/* =====================================================
   App CSS — Clean SaaS Redesign
   Modern / Minimal / Linear-inspired
   ===================================================== */

/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Design Tokens ────────────────────────────────── */
:root {
  --font-body: 'Inter', 'Plus Jakarta Sans', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-rgb: 37, 99, 235;
  --accent-2: #10b981;
  --accent-2-rgb: 16, 185, 129;
  --mint: #10b981;
  --sky: #0ea5e9;
  --coral: #f97316;

  --ink: #111827;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 8px -2px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 20px -4px rgba(0,0,0,0.1), 0 4px 8px -2px rgba(0,0,0,0.04);
  --soft-shadow: var(--shadow);

  --topbar-h: 56px;
  --r-sm: 6px;
  --r: 8px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 16px;

  /* Theme-aware aliases */
  --theme-text: #111827;
  --theme-heading: #0f172a;
  --theme-muted: #6b7280;
  --theme-body-bg: #f8fafc;
  --theme-card-bg: #ffffff;
  --theme-card-border: #e5e7eb;
  --theme-card-shadow: 0 1px 3px rgba(0,0,0,0.08);
  --theme-card-header-bg: #f9fafb;
  --theme-card-hover-border: #93c5fd;
  --theme-card-hover-shadow: 0 4px 12px rgba(37,99,235,0.12);
  --theme-soft-surface: #f9fafb;
  --theme-soft-surface-2: #f3f4f6;
  --theme-soft-border: #e5e7eb;
  --theme-table-head-bg: #f9fafb;
  --theme-table-head-border: #e5e7eb;
  --theme-table-row-bg: #ffffff;
  --theme-table-row-border: #f3f4f6;
  --theme-table-row-hover: #f9fafb;
  --theme-hero-bg: #ffffff;
  --theme-hero-border: #e5e7eb;
  --theme-hero-shadow: var(--shadow);
  --theme-pill-bg: rgba(37,99,235,0.08);
  --theme-pill-border: rgba(37,99,235,0.2);
  --theme-pill-color: #1d4ed8;
  --theme-btn-primary-bg: #2563eb;
  --theme-btn-primary-hover-bg: #1d4ed8;
  --theme-btn-primary-color: #ffffff;
  --theme-btn-primary-shadow: 0 2px 8px rgba(37,99,235,0.3);
  --theme-btn-light-bg: #ffffff;
  --theme-btn-light-border: #e5e7eb;
  --theme-btn-light-color: #374151;
  --theme-input-bg: #ffffff;
  --theme-input-border: #d1d5db;
  --theme-input-focus-border: #2563eb;
  --theme-input-focus-ring: 0 0 0 3px rgba(37,99,235,0.12);
  --theme-terminal-bg: #0f172a;
  --theme-terminal-header-bg: #1e293b;
  --theme-terminal-border: #334155;
  --theme-terminal-output: #e2e8f0;
  --theme-success: #15803d;
  --theme-danger: #dc2626;
  --theme-warning: #d97706;
  --theme-info: #0891b2;
  --theme-footer-bg: #ffffff;
  --theme-footer-border: #e5e7eb;
  --theme-footer-color: #9ca3af;
  --theme-notification-bg: #ffffff;
  --theme-notification-border: #e5e7eb;
  --theme-notification-shadow: 0 10px 24px rgba(0,0,0,0.12);
  --theme-notification-title: #111827;
  --theme-notification-sub: #6b7280;
  --theme-notification-item-hover: #f9fafb;
  --theme-notification-badge-bg: #ef4444;
  --theme-notification-badge-color: #ffffff;
  --theme-notification-empty-bg: #f9fafb;
  --theme-notification-empty-border: #e5e7eb;
  --theme-danger-text: #dc2626;
  --theme-danger-bg: rgba(239,68,68,0.06);
  --theme-danger-border: rgba(239,68,68,0.25);
  --theme-danger-hover-bg: rgba(239,68,68,0.1);
  --theme-danger-hover-border: rgba(239,68,68,0.4);
  --theme-toggle-bg: #f3f4f6;
  --theme-toggle-border: #e5e7eb;
  --theme-toggle-color: #374151;
  --theme-login-bg: #f8fafc;
  --theme-login-card-bg: #ffffff;
  --theme-login-card-border: #e5e7eb;
  --theme-login-text: #111827;
  --theme-login-muted: #6b7280;

  --bs-body-bg: #f8fafc;
  --bs-body-color: #111827;
  --bs-border-color: #e5e7eb;
}

/* ── Cyber (Dark) Theme ───────────────────────────── */
html[data-theme="cyber"] {
  color-scheme: dark;
  --ink: #f1f5f9;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --bg: #0f172a;
  --surface: #1e293b;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-rgb: 59,130,246;
  --accent-2: #10b981;
  --accent-2-rgb: 16,185,129;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.5);
  --soft-shadow: 0 2px 6px rgba(0,0,0,0.4);
  --theme-text: #f1f5f9;
  --theme-heading: #f8fafc;
  --theme-muted: #94a3b8;
  --theme-body-bg: #0f172a;
  --theme-card-bg: #1e293b;
  --theme-card-border: rgba(255,255,255,0.08);
  --theme-card-shadow: 0 2px 8px rgba(0,0,0,0.4);
  --theme-card-header-bg: rgba(255,255,255,0.03);
  --theme-card-hover-border: rgba(59,130,246,0.4);
  --theme-card-hover-shadow: 0 4px 16px rgba(59,130,246,0.15);
  --theme-soft-surface: rgba(255,255,255,0.04);
  --theme-soft-surface-2: rgba(255,255,255,0.06);
  --theme-soft-border: rgba(255,255,255,0.08);
  --theme-table-head-bg: rgba(255,255,255,0.03);
  --theme-table-head-border: rgba(255,255,255,0.08);
  --theme-table-row-bg: rgba(255,255,255,0.02);
  --theme-table-row-border: rgba(255,255,255,0.05);
  --theme-table-row-hover: rgba(255,255,255,0.04);
  --theme-hero-bg: #1e293b;
  --theme-hero-border: rgba(255,255,255,0.08);
  --theme-hero-shadow: 0 2px 8px rgba(0,0,0,0.4);
  --theme-pill-bg: rgba(59,130,246,0.15);
  --theme-pill-border: rgba(59,130,246,0.3);
  --theme-pill-color: #93c5fd;
  --theme-btn-primary-bg: #2563eb;
  --theme-btn-primary-hover-bg: #1d4ed8;
  --theme-btn-primary-color: #ffffff;
  --theme-btn-primary-shadow: 0 2px 8px rgba(37,99,235,0.4);
  --theme-btn-light-bg: rgba(255,255,255,0.06);
  --theme-btn-light-border: rgba(255,255,255,0.1);
  --theme-btn-light-color: #e2e8f0;
  --theme-input-bg: rgba(255,255,255,0.05);
  --theme-input-border: rgba(255,255,255,0.12);
  --theme-input-focus-border: #3b82f6;
  --theme-input-focus-ring: 0 0 0 3px rgba(59,130,246,0.2);
  --theme-terminal-bg: #020617;
  --theme-terminal-header-bg: #0f172a;
  --theme-terminal-border: rgba(255,255,255,0.1);
  --theme-terminal-output: #94a3b8;
  --theme-success: #4ade80;
  --theme-danger: #f87171;
  --theme-warning: #fbbf24;
  --theme-info: #38bdf8;
  --theme-footer-bg: #0f172a;
  --theme-footer-border: rgba(255,255,255,0.06);
  --theme-footer-color: #475569;
  --theme-notification-bg: #1e293b;
  --theme-notification-border: rgba(255,255,255,0.1);
  --theme-notification-shadow: 0 10px 24px rgba(0,0,0,0.6);
  --theme-notification-title: #f1f5f9;
  --theme-notification-sub: #94a3b8;
  --theme-notification-item-hover: rgba(255,255,255,0.04);
  --theme-notification-badge-bg: #ef4444;
  --theme-notification-badge-color: #ffffff;
  --theme-notification-empty-bg: rgba(255,255,255,0.02);
  --theme-notification-empty-border: rgba(255,255,255,0.08);
  --theme-danger-text: #f87171;
  --theme-danger-bg: rgba(239,68,68,0.12);
  --theme-danger-border: rgba(239,68,68,0.3);
  --theme-danger-hover-bg: rgba(239,68,68,0.18);
  --theme-danger-hover-border: rgba(239,68,68,0.45);
  --theme-toggle-bg: rgba(255,255,255,0.06);
  --theme-toggle-border: rgba(255,255,255,0.1);
  --theme-toggle-color: #e2e8f0;
  --theme-login-bg: #0f172a;
  --theme-login-card-bg: #1e293b;
  --theme-login-card-border: rgba(255,255,255,0.1);
  --theme-login-text: #f1f5f9;
  --theme-login-muted: #94a3b8;
  --bs-body-bg: #0f172a;
  --bs-body-color: #f1f5f9;
  --bs-border-color: rgba(255,255,255,0.08);
}

/* ── Base ─────────────────────────────────────────── */
html, body { height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

body:not(.login-page) { padding-top: var(--topbar-h); }

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

code, pre, .font-mono {
  font-family: var(--font-mono);
}

.text-muted { color: var(--muted) !important; }
.text-primary { color: var(--accent) !important; }
.bg-primary { background-color: var(--accent) !important; }
.is-hidden { display: none; }
.btn-mini { font-size: 0.7rem; }
.mono-truncate { font-family: var(--font-mono); max-width: 400px; }
.small-muted { font-size: 0.75rem; color: var(--muted); }
.form-hint { font-size: 0.75rem; color: var(--muted); }

/* ── Layout Shell ─────────────────────────────────── */
.app-shell {
  display: flex;
  flex: 1 0 auto;
  min-height: calc(100vh - var(--topbar-h));
}

@supports (height: 100dvh) {
  .app-shell { min-height: calc(100dvh - var(--topbar-h)); }
}

.main-content {
  flex: 1 1 auto;
  padding: 28px 0 64px;
}

/* ── Topbar ───────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  padding: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1100;
}

.topbar .container-fluid { height: 100%; }

.topbar-inner {
  height: 100%;
  padding: 0 16px;
}

.topbar .brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.brand-link { color: var(--ink); text-decoration: none; }
.brand-link:hover { color: var(--ink); }

html[data-theme="cyber"] .brand-link,
html[data-theme="cyber"] .brand-link:hover { color: var(--theme-heading); }

.topbar .brand-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.sidebar-toggle,
.sidebar-collapse {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sidebar-toggle:hover,
.sidebar-collapse:hover {
  background: var(--bg);
  color: var(--ink);
}

html[data-theme="cyber"] .sidebar-toggle,
html[data-theme="cyber"] .sidebar-collapse {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: var(--muted);
}

html[data-theme="cyber"] .sidebar-toggle:hover,
html[data-theme="cyber"] .sidebar-collapse:hover {
  background: rgba(255,255,255,0.1);
  color: var(--theme-heading);
}

/* ── Sidebar ──────────────────────────────────────── */
.sidebar {
  width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  transition: width 0.2s ease;
  flex-shrink: 0;
}

html[data-theme="cyber"] .sidebar {
  background: var(--bg);
  border-right-color: rgba(255,255,255,0.06);
}

.sidebar-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  font-weight: 700;
  padding: 4px 10px;
  margin-bottom: 4px;
}

.sidebar-nav { list-style: none; padding: 0; margin: 0; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin: 2px 0;
  border-radius: var(--r-md);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.sidebar-link i { width: 16px; text-align: center; font-size: 0.85rem; }

.sidebar-link:hover {
  background: var(--bg);
  color: var(--ink);
}

html[data-theme="cyber"] .sidebar-link:hover {
  background: rgba(255,255,255,0.05);
  color: var(--theme-heading);
}

.sidebar-link.active {
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  font-weight: 700;
  border-left: 3px solid var(--accent);
  padding-left: 7px;
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

html[data-theme="cyber"] .sidebar-link.active {
  background: rgba(var(--accent-rgb), 0.15);
  color: #93c5fd;
  border-left-color: #93c5fd;
}

body.sidebar-collapsed .sidebar-link.active {
  border-left: none;
  padding: 9px;
  border-radius: var(--r-md);
}

body.sidebar-collapsed .sidebar { width: 60px; padding: 16px 8px; }
body.sidebar-collapsed .sidebar-title,
body.sidebar-collapsed .sidebar-text { display: none; }
body.sidebar-collapsed .sidebar-link { justify-content: center; gap: 0; padding: 9px; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1080;
}

@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 1095;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-backdrop { display: block; }
  body.sidebar-open { overflow: hidden; }
  body.sidebar-collapsed .sidebar {
    width: 240px; padding: 16px 12px;
  }
  body.sidebar-collapsed .sidebar-title,
  body.sidebar-collapsed .sidebar-text { display: block; }
  body.sidebar-collapsed .sidebar-link {
    justify-content: flex-start; gap: 10px; padding: 8px 10px;
  }
}

@supports (height: 100dvh) {
  .sidebar { height: calc(100dvh - var(--topbar-h)); }
  @media (max-width: 991.98px) {
    .sidebar { height: calc(100dvh - var(--topbar-h)); }
  }
}

/* ── Footer ───────────────────────────────────────── */
footer {
  background: var(--theme-footer-bg);
  border-top: 1px solid var(--theme-footer-border);
  padding: 1.5rem 0;
  margin-top: auto;
}

footer small, footer .text-muted {
  color: var(--theme-footer-color) !important;
}

/* ── Cards ────────────────────────────────────────── */
.card {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

html[data-theme="cyber"] .card {
  background: var(--surface);
  border-color: rgba(255,255,255,0.08);
}

.card-header {
  background: var(--theme-card-header-bg);
  border-bottom: 1px solid var(--border);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}

html[data-theme="cyber"] .card-header {
  border-bottom-color: rgba(255,255,255,0.06);
}

.hover-rise {
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  will-change: transform;
}
.hover-rise:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--theme-card-hover-border);
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s, border-color 0.15s;
}

.btn:active { transform: translateY(0) !important; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(var(--accent-rgb), 0.25);
}

.btn-primary:hover, .btn-primary:focus {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 10px rgba(var(--accent-rgb), 0.3);
}

.btn-light {
  background: var(--theme-btn-light-bg);
  border-color: var(--theme-btn-light-border);
  color: var(--theme-btn-light-color);
}

.btn-light:hover, .btn-light:focus {
  background: var(--bg);
  border-color: var(--border-strong);
  color: var(--ink);
}

html[data-theme="cyber"] .btn-light {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
  color: var(--theme-heading);
}

html[data-theme="cyber"] .btn-light:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.18);
}

.btn-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.btn-outline-danger { border-width: 1.5px; }

/* ── Forms ────────────────────────────────────────── */
.form-control,
.form-select,
.input-group-text {
  background: var(--theme-input-bg);
  border: 1px solid var(--theme-input-border);
  border-radius: var(--r-md);
  color: var(--ink);
  font-size: 0.875rem;
}

html[data-theme="cyber"] .form-control,
html[data-theme="cyber"] .form-select,
html[data-theme="cyber"] .input-group-text {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
  color: var(--theme-heading);
}

html[data-theme="cyber"] .form-control::placeholder { color: #475569; }

.form-control:focus,
.form-select:focus {
  border-color: var(--theme-input-focus-border);
  box-shadow: var(--theme-input-focus-ring);
  outline: none;
}

.form-label { font-weight: 600; font-size: 0.875rem; }

/* Badges */
.badge.bg-primary { background-color: var(--accent) !important; border-radius: 999px; }
.badge.bg-warning, .badge.bg-info { color: #111827; }
.badge.bg-secondary { color: #374151; }

/* ── Global Toast ─────────────────────────────────── */
.global-toast {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  min-width: 220px; max-width: 340px;
  background: #111827;
  color: #fff;
  border-radius: var(--r-lg);
  padding: 0.75rem 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2), 0 2px 8px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.22s cubic-bezier(0.16,1,0.3,1);
  z-index: 1300;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: none;
}
.global-toast.show { opacity: 1; transform: translateY(0); }
.global-toast.success { background: #15803d; }
.global-toast.error   { background: #dc2626; }
.global-toast.info    { background: #111827; }
.global-toast .toast-icon {
  width: 28px; height: 28px; border-radius: var(--r-md);
  background: rgba(255,255,255,0.15);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.85rem; flex-shrink: 0;
}
.global-toast .toast-message { font-weight: 600; font-size: 0.875rem; }

html[data-theme="cyber"] .global-toast { background: #1e293b; border: 1px solid rgba(255,255,255,0.1); }
html[data-theme="cyber"] .global-toast.success { background: #166534; }
html[data-theme="cyber"] .global-toast.error   { background: #991b1b; }

/* ── Page Enter Animation ─────────────────────────── */
.main-content > .container,
.main-content > .container-fluid {
  animation: page-enter 350ms cubic-bezier(0.16,1,0.3,1);
}

@keyframes page-enter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Chips ────────────────────────────────────────── */
.chip {
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.chip-sky     { background: rgba(14,165,233,0.1);  color: #0369a1; }
.chip-warning { background: rgba(249,115,22,0.12); color: #c2410c; }
.chip-danger  { background: rgba(239,68,68,0.1);   color: #b91c1c; }
.chip-muted   { background: rgba(107,114,128,0.1); color: #4b5563; }

html[data-theme="cyber"] .chip-sky     { background: rgba(14,165,233,0.15); color: #38bdf8; }
html[data-theme="cyber"] .chip-warning { background: rgba(249,115,22,0.15); color: #fb923c; }
html[data-theme="cyber"] .chip-danger  { background: rgba(239,68,68,0.15);  color: #f87171; }
html[data-theme="cyber"] .chip-muted   { background: rgba(255,255,255,0.07); color: #94a3b8; }

/* ── Status Badges ────────────────────────────────── */
.status-badge {
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.65rem;
}

/* ── Filter Pills ─────────────────────────────────── */
.filter-pill {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  letter-spacing: 0.02em;
  transition: all 0.15s;
  cursor: pointer;
}

.filter-pill:hover { border-color: var(--border-strong); color: var(--ink); }

.filter-pill.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

html[data-theme="cyber"] .filter-pill {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: var(--muted);
}
html[data-theme="cyber"] .filter-pill:hover {
  background: rgba(255,255,255,0.09);
  color: var(--theme-heading);
}
html[data-theme="cyber"] .filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.fp-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.2rem; height: 1.2rem;
  padding: 0 0.26rem; border-radius: 999px;
  background: rgba(0,0,0,0.07);
  font-size: 0.62rem; font-weight: 800; line-height: 1;
  margin-left: 0.18rem;
}
.filter-pill.active .fp-count { background: rgba(255,255,255,0.2); }

/* Colored filter pills */
.fp-expiring.active, .fp-expiring:hover { border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.07); color: #dc2626; }
.fp-renew.active,    .fp-renew:hover    { border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.07); color: #b45309; }
.fp-healthy.active,  .fp-healthy:hover  { border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.07); color: #15803d; }
.fp-unknown.active,  .fp-unknown:hover  { border-color: rgba(107,114,128,0.3); background: rgba(107,114,128,0.06); color: #374151; }
.fp-expired.active,  .fp-expired:hover  { border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.06); color: #b91c1c; }

/* ── Tool Grid ────────────────────────────────────── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.tool-card {
  height: 100%;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: box-shadow 0.18s, border-color 0.18s, transform 0.18s;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--accent-rgb), 0.3);
  box-shadow: var(--shadow-lg);
}

html[data-theme="cyber"] .tool-card { background: var(--surface); border-color: rgba(255,255,255,0.08); }
html[data-theme="cyber"] .tool-card:hover { border-color: rgba(var(--accent-rgb), 0.35); }

.tool-card .card-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-card .tool-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

.tool-card h4 { font-size: 1rem; margin: 0; color: var(--theme-heading); }
.tool-card p  { font-size: 0.875rem; margin: 0; color: var(--muted); }
.tool-card .tool-actions { margin-top: auto; padding-top: 6px; }

/* ── Dashboard ────────────────────────────────────── */
.dash-stat {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s, border-color 0.15s;
}

html[data-theme="cyber"] .dash-stat { background: var(--surface); border-color: rgba(255,255,255,0.08); }

.dash-stat-link { display: block; text-decoration: none; color: inherit; }
.dash-stat-link:hover, .dash-stat-link:focus { color: inherit; text-decoration: none; }
.dash-stat-link:hover .dash-stat {
  border-color: rgba(var(--accent-rgb), 0.3);
  box-shadow: var(--shadow-md);
}

.dash-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.dash-icon.sky   { background: rgba(14,165,233,0.1);  color: #0284c7; }
.dash-icon.mint  { background: rgba(16,185,129,0.1);  color: #15803d; }
.dash-icon.coral { background: rgba(249,115,22,0.12); color: #c2410c; }
.dash-icon.ink   { background: rgba(17,24,39,0.06);   color: #374151; }

html[data-theme="cyber"] .dash-icon.sky   { color: #38bdf8; }
html[data-theme="cyber"] .dash-icon.mint  { color: #4ade80; }
html[data-theme="cyber"] .dash-icon.coral { color: #fb923c; }
html[data-theme="cyber"] .dash-icon.ink   { background: rgba(255,255,255,0.08); color: #cbd5e1; }

.dash-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 700; }
.dash-value { font-weight: 800; font-size: 1.3rem; color: var(--theme-heading); }
.dash-meta  { font-size: 0.73rem; color: var(--muted); }

.dash-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }

.dash-item {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

html[data-theme="cyber"] .dash-item { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.07); }

.dash-item-title { font-weight: 700; color: var(--theme-heading); font-size: 0.875rem; }
.dash-item-sub   { font-size: 0.75rem; color: var(--muted); margin-top: 0.15rem; }

.dash-empty {
  padding: 1rem; border-radius: var(--r-lg);
  background: var(--bg); border: 1px dashed var(--border);
  color: var(--muted); font-size: 0.875rem;
}

html[data-theme="cyber"] .dash-empty { background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.08); }

/* ── Idx Status Badges ────────────────────────────── */
.idx-status-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.75rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700;
  border: 1px solid transparent;
}
.idx-status-badge.idx-status-ok {
  background: rgba(16,185,129,0.1); color: #15803d; border-color: rgba(16,185,129,0.25);
}
.idx-status-badge.idx-status-warn {
  background: rgba(239,68,68,0.1); color: #dc2626; border-color: rgba(239,68,68,0.25);
}
html[data-theme="cyber"] .idx-status-badge.idx-status-ok  { color: #4ade80; border-color: rgba(74,222,128,0.3); }
html[data-theme="cyber"] .idx-status-badge.idx-status-warn { color: #f87171; border-color: rgba(248,113,113,0.3); }

/* ── Idx Stat Cards ───────────────────────────────── */
.idx-stat {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left-width: 3px;
  box-shadow: var(--shadow);
}

html[data-theme="cyber"] .idx-stat { background: var(--surface); border-color: rgba(255,255,255,0.08); }

.dash-stat-link:hover .idx-stat { border-color: rgba(var(--accent-rgb), 0.3); box-shadow: var(--shadow-md); }

.idx-stat-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.95rem; flex-shrink: 0;
}

.idx-stat-sky    { border-left-color: #0284c7; }
.idx-stat-coral  { border-left-color: #dc2626; }
.idx-stat-purple { border-left-color: #7c3aed; }
.idx-stat-slate  { border-left-color: #64748b; }

.idx-stat-sky    .idx-stat-icon { background: rgba(14,165,233,0.1);  color: #0284c7; }
.idx-stat-coral  .idx-stat-icon { background: rgba(239,68,68,0.1);   color: #dc2626; }
.idx-stat-purple .idx-stat-icon { background: rgba(124,58,237,0.1);  color: #7c3aed; }
.idx-stat-slate  .idx-stat-icon { background: rgba(100,116,139,0.1); color: #475569; }

html[data-theme="cyber"] .idx-stat-sky    .idx-stat-icon { color: #38bdf8; }
html[data-theme="cyber"] .idx-stat-coral  .idx-stat-icon { color: #f87171; }
html[data-theme="cyber"] .idx-stat-purple .idx-stat-icon { color: #a78bfa; }
html[data-theme="cyber"] .idx-stat-slate  .idx-stat-icon { color: #94a3b8; }

.idx-stat-value {
  font-size: 1.6rem; font-weight: 800; line-height: 1.1;
  color: var(--theme-heading); font-variant-numeric: tabular-nums;
}
.idx-stat-label { font-size: 0.78rem; font-weight: 700; color: var(--ink); margin-top: 0.2rem; }
.idx-stat-meta  { font-size: 0.7rem; color: var(--muted); margin-top: 0.1rem; }

@media (max-width: 575.98px) {
  .idx-stat-value { font-size: 1.45rem; }
}

/* ── Domain Hero ──────────────────────────────────── */
.domain-hero,
.ip-hero,
.calc-hero {
  position: relative;
  padding: 1.5rem 1.75rem;
  border-radius: var(--r-xl);
  background: var(--theme-hero-bg);
  border: 1px solid var(--theme-hero-border);
  box-shadow: var(--theme-hero-shadow);
  overflow: hidden;
}

html[data-theme="cyber"] .domain-hero,
html[data-theme="cyber"] .ip-hero,
html[data-theme="cyber"] .calc-hero {
  background: var(--surface);
  border-color: rgba(255,255,255,0.08);
}

/* ── Domain Pill ──────────────────────────────────── */
.domain-pill,
.ip-pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.45rem 0.9rem; border-radius: 999px;
  background: var(--theme-pill-bg);
  border: 1px solid var(--theme-pill-border);
  font-weight: 700; color: var(--theme-pill-color);
  font-size: 0.85rem;
}

/* ── Domain Card ──────────────────────────────────── */
.domain-card {
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.domain-card.soft { background: var(--bg); }

html[data-theme="cyber"] .domain-card { background: var(--surface); border-color: rgba(255,255,255,0.08); }
html[data-theme="cyber"] .domain-card.soft { background: var(--bg); }

.domain-card-header {
  background: var(--theme-card-header-bg);
  border-bottom: 1px solid var(--border);
}
html[data-theme="cyber"] .domain-card-header { border-bottom-color: rgba(255,255,255,0.06); }

/* ── Domain Table ─────────────────────────────────── */
.domain-table {
  border-collapse: separate;
  border-spacing: 0 6px;
  margin: 0;
}

.domain-table th {
  background: var(--theme-table-head-bg);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--theme-table-head-border);
  padding: 0.7rem 1rem;
}

html[data-theme="cyber"] .domain-table th { color: #64748b; }

.domain-table tbody tr { background: transparent; }
.domain-table tbody tr.empty-row { box-shadow: none; }

.domain-table-wrap { padding: 0.5rem 0.85rem 0.85rem; }

.domain-table tbody td {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1rem;
  vertical-align: middle;
}

html[data-theme="cyber"] .domain-table tbody td {
  background: rgba(255,255,255,0.02);
  border-top-color: rgba(255,255,255,0.05);
  border-bottom-color: rgba(255,255,255,0.05);
}

.domain-table tbody td:first-child {
  border-left: 1px solid var(--border);
  border-radius: var(--r-md) 0 0 var(--r-md);
}
.domain-table tbody td:last-child {
  border-right: 1px solid var(--border);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

html[data-theme="cyber"] .domain-table tbody td:first-child { border-left-color: rgba(255,255,255,0.05); }
html[data-theme="cyber"] .domain-table tbody td:last-child  { border-right-color: rgba(255,255,255,0.05); }

.domain-table tbody tr:hover td {
  background: var(--theme-table-row-hover);
  transition: background 0.15s;
}

html[data-theme="cyber"] .domain-table tbody tr:hover td { background: rgba(255,255,255,0.04); }

/* Row status indicators */
.domain-row.status-danger   td:first-child { box-shadow: inset 3px 0 0 #ef4444; }
.domain-row.status-warning  td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }
.domain-row.status-info     td:first-child { box-shadow: inset 3px 0 0 #06b6d4; }
.domain-row.status-success  td:first-child { box-shadow: inset 3px 0 0 #10b981; }
.domain-row.status-secondary td:first-child { box-shadow: inset 3px 0 0 #94a3b8; }

/* ── Domain Text Components ───────────────────────── */
.domain-title {
  font-weight: 700; font-size: 0.9rem;
  color: var(--theme-heading);
}

.domain-meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  align-items: center; margin-top: 0.25rem;
}

.domain-sub   { font-size: 0.73rem; color: var(--muted); }
.expiry-stack { display: grid; gap: 0.15rem; }
.expiry-date  { font-weight: 700; color: var(--theme-heading); font-size: 0.875rem; }
.expiry-sub   { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.expiry-sub.expired { color: #dc2626; }

/* ── Domain Actions ───────────────────────────────── */
.domain-actions {
  display: inline-flex; gap: 0.4rem; justify-content: flex-end;
}
.domain-actions .btn {
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.3rem 0.55rem;
}
.domain-actions .btn:hover { background: var(--bg); }

html[data-theme="cyber"] .domain-actions .btn {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.1);
  color: var(--muted);
}
html[data-theme="cyber"] .domain-actions .btn:hover {
  background: rgba(255,255,255,0.09);
  color: var(--theme-heading);
}

/* ── Domain Header (dinh) ─────────────────────────── */
.dinh-header { padding: 1rem 1.1rem 0.8rem; }

.dinh-top {
  display: flex; align-items: center; gap: 0.65rem;
  flex-wrap: wrap; margin-bottom: 0.75rem;
}

.dinh-title {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.9rem; font-weight: 700;
  color: var(--theme-heading); flex-shrink: 0;
}

.dinh-icon { color: var(--accent); font-size: 0.85rem; }

.dinh-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.4rem; height: 1.4rem; padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  color: var(--accent);
  font-size: 0.68rem; font-weight: 800; line-height: 1;
}

html[data-theme="cyber"] .dinh-count { background: rgba(var(--accent-rgb), 0.15); color: #93c5fd; }

.dinh-controls {
  display: flex; align-items: center; gap: 0.45rem;
  flex: 1; justify-content: flex-end; flex-wrap: wrap;
}

.dinh-search-wrap {
  position: relative; flex: 1; max-width: 220px; min-width: 130px;
}
.dinh-search-icon {
  position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%);
  color: var(--muted-2); font-size: 0.72rem; pointer-events: none; z-index: 2;
}
.dinh-search { padding-left: 2rem !important; }
.dinh-sort   { width: auto; min-width: 160px; flex-shrink: 0; }

.dinh-bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.65rem; flex-wrap: wrap;
}
.dinh-filters { flex: 1; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.dinh-bulk    { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }

.dinh-bulk-count {
  font-size: 0.72rem; font-weight: 600; color: var(--muted-2); white-space: nowrap;
}
.dinh-bulk-btn {
  display: inline-flex; align-items: center; gap: 0.28rem;
  padding: 0.26rem 0.65rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700;
  border: 1px solid; cursor: pointer; transition: all 0.15s; background: transparent;
}
.dinh-bulk-btn:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.dinh-bulk-refresh {
  border-color: rgba(var(--accent-rgb), 0.3); color: var(--accent);
}
.dinh-bulk-refresh:not(:disabled):hover {
  background: rgba(var(--accent-rgb), 0.07); border-color: rgba(var(--accent-rgb), 0.5);
}
.dinh-bulk-delete {
  border-color: rgba(239,68,68,0.3); color: #dc2626;
}
.dinh-bulk-delete:not(:disabled):hover {
  background: rgba(239,68,68,0.07); border-color: rgba(239,68,68,0.5);
}

/* ── Domain Stat ──────────────────────────────────── */
.domain-stat {
  padding: 0.85rem 0.95rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--bg);
}
html[data-theme="cyber"] .domain-stat { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.07); }
.domain-stat .label {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); font-weight: 700;
}
.domain-stat .value { font-weight: 800; font-size: 1.05rem; margin-top: 0.2rem; color: var(--theme-heading); }

/* ── Domain Search/Sort ───────────────────────────── */
.domain-search,
.domain-sort {
  border-radius: 999px;
  border: 1px solid var(--theme-input-border);
  background: var(--theme-input-bg);
  color: var(--ink);
  font-size: 0.875rem;
  padding: 0.35rem 0.85rem;
}
.domain-search:focus, .domain-sort:focus {
  border-color: var(--accent); outline: none;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

/* ── Quick Stats Strip ────────────────────────────── */
.dqs-row {
  display: flex; gap: 0;
  border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--border);
}
.dqs-item {
  flex: 1; text-align: center; padding: 0.55rem 0.35rem;
  border-right: 1px solid var(--border);
  background: var(--surface);
}
.dqs-item:last-child { border-right: none; }
html[data-theme="cyber"] .dqs-item { background: rgba(255,255,255,0.03); border-right-color: rgba(255,255,255,0.06); }
html[data-theme="cyber"] .dqs-row  { border-color: rgba(255,255,255,0.08); }
.dqs-val { font-size: 1.25rem; font-weight: 800; line-height: 1; color: var(--theme-heading); font-variant-numeric: tabular-nums; }
.dqs-lbl { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; color: var(--muted); margin-top: 0.15rem; }
.dqs-ok     .dqs-val { color: #15803d; }
.dqs-warn   .dqs-val { color: #b45309; }
.dqs-info   .dqs-val { color: #0891b2; }
.dqs-danger .dqs-val { color: #dc2626; }
html[data-theme="cyber"] .dqs-ok     .dqs-val { color: #4ade80; }
html[data-theme="cyber"] .dqs-warn   .dqs-val { color: #fbbf24; }
html[data-theme="cyber"] .dqs-info   .dqs-val { color: #38bdf8; }
html[data-theme="cyber"] .dqs-danger .dqs-val { color: #f87171; }
.dqs-source {
  font-size: 0.66rem; font-weight: 600; color: var(--muted);
  background: var(--bg); border: 1px solid var(--border);
  padding: 0.15rem 0.5rem; border-radius: 999px;
}

/* ── Priority Watch ───────────────────────────────── */
.dqp-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem; padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
}
html[data-theme="cyber"] .dqp-header { border-bottom-color: rgba(255,255,255,0.06); }
.dqp-count {
  font-size: 0.7rem; font-weight: 700; color: #b45309;
  background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2);
  padding: 0.15rem 0.5rem; border-radius: 999px;
}
.dqp-body { padding: 0.75rem 1rem 0.9rem; }

/* ── Priority Chips ───────────────────────────────── */
.priority-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.2rem; }
.priority-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.28rem 0.5rem 0.28rem 0.65rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.75rem; font-weight: 600; color: var(--theme-heading);
}
html[data-theme="cyber"] .priority-chip { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
.pchip-critical { border-color: rgba(239,68,68,0.3);  background: rgba(239,68,68,0.04); }
.pchip-high     { border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.04); }
.pchip-domain   { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pchip-more {
  display: inline-flex; align-items: center; padding: 0.28rem 0.65rem;
  border-radius: 999px; font-size: 0.7rem; font-weight: 700;
  color: var(--muted); background: var(--bg); border: 1px dashed var(--border);
}
.priority-chip .chip-sub {
  font-size: 0.66rem; font-weight: 700;
  padding: 0.12rem 0.38rem; border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.1); color: var(--accent);
}
.pchip-critical .chip-sub { color: #dc2626; background: rgba(239,68,68,0.1); }
.pchip-high     .chip-sub { color: #b45309; background: rgba(245,158,11,0.1); }
.priority-chip .chip-actions a { color: var(--muted-2); margin-left: 0.12rem; font-size: 0.7rem; transition: color 0.15s; }
.priority-chip .chip-actions a:hover { color: var(--accent); }
.priority-empty { font-size: 0.85rem; color: var(--muted); padding: 0.35rem 0; }

/* ── Timeline ─────────────────────────────────────── */
.timeline-wrap  { margin-top: 1rem; }
.timeline-title { font-size: 0.75rem; font-weight: 700; color: var(--muted); margin-bottom: 0.45rem; text-transform: uppercase; letter-spacing: 0.07em; }
.timeline       { position: relative; padding: 1.1rem 0 0.75rem; }
.timeline-track {
  position: absolute; left: 0; right: 0; top: 50%; height: 5px;
  border-radius: 999px; background: var(--border); transform: translateY(-50%);
}
html[data-theme="cyber"] .timeline-track { background: rgba(255,255,255,0.08); }
.timeline-marker { position: absolute; top: 50%; transform: translate(-50%,-50%); }
.timeline-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.15);
}
.timeline-tooltip {
  position: absolute; top: -1.5rem; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 0.62rem;
  padding: 0.12rem 0.45rem; border-radius: var(--r-sm); white-space: nowrap;
  opacity: 0; transition: opacity 0.15s; pointer-events: none;
}
.timeline-marker:hover .timeline-tooltip { opacity: 1; transform: translateX(-50%) translateY(-2px); }
.timeline-ends { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--muted); margin-top: 0.28rem; }

/* ── Risk Meter ───────────────────────────────────── */
.risk-meter { display: inline-flex; gap: 0.18rem; margin-top: 0.3rem; }
.risk-dot   { width: 10px; height: 5px; border-radius: 999px; background: var(--border); }
html[data-theme="cyber"] .risk-dot { background: rgba(255,255,255,0.1); }
.risk-meter[data-level="1"] .risk-dot.active { background: #10b981; }
.risk-meter[data-level="2"] .risk-dot.active { background: #84cc16; }
.risk-meter[data-level="3"] .risk-dot.active { background: #f59e0b; }
.risk-meter[data-level="4"] .risk-dot.active { background: #f97316; }
.risk-meter[data-level="5"] .risk-dot.active { background: #ef4444; }
.risk-label { font-size: 0.68rem; color: var(--muted); margin-top: 0.2rem; font-weight: 600; }

/* ── Freshness Dot ────────────────────────────────── */
.freshness  { display: inline-flex; align-items: center; gap: 0.3rem; }
.fresh-dot  { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.fresh-dot.fresh   { background: #10b981; }
.fresh-dot.recent  { background: #0ea5e9; }
.fresh-dot.stale   { background: #f59e0b; }
.fresh-dot.unknown { background: #d1d5db; }

/* ── NS Pill ──────────────────────────────────────── */
.ns-pill {
  display: inline-flex; align-items: center;
  padding: 0.15rem 0.5rem; border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.08); color: var(--accent);
  font-size: 0.7rem; font-weight: 700;
  margin: 0 0.22rem 0.22rem 0;
}

/* ── Empty State ──────────────────────────────────── */
.empty-state .empty-icon,
.empty-icon {
  width: 52px; height: 52px; border-radius: var(--r-xl);
  background: rgba(var(--accent-rgb), 0.1); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 0.75rem;
}
.empty-state h6 { font-weight: 700; margin-bottom: 0.35rem; color: var(--theme-heading); }

/* Empty row */
.empty-row td { background: transparent !important; border: none !important; box-shadow: none !important; }

/* ── Domain Form Inline ───────────────────────────── */
.domain-form-inline { display: flex; gap: 0.65rem; align-items: stretch; }
.domain-form-inline .form-control { flex: 1 1 auto; min-width: 0; }
.domain-form-inline .btn { white-space: nowrap; padding-left: 1.1rem; padding-right: 1.1rem; }
@media (max-width: 768px) { .domain-form-inline { flex-direction: column; } }

/* ── Terminal ─────────────────────────────────────── */
.terminal-container {
  background: var(--theme-terminal-bg);
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--theme-terminal-border);
  margin-top: 10px;
}
.terminal-header {
  background: var(--theme-terminal-header-bg);
  padding: 9px 14px; display: flex; align-items: center;
  border-bottom: 1px solid var(--theme-terminal-border);
}
.dot { height: 9px; width: 9px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.dot-red    { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green  { background: #27c93f; }
textarea.terminal-output {
  background: transparent; border: none;
  color: var(--theme-terminal-output);
  font-family: var(--font-mono); font-size: 0.83rem;
  width: 100%; outline: none; resize: none;
  padding: 14px; line-height: 1.6;
}
.terminal-copy-btn {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: #94a3b8; font-size: 0.68rem; padding: 3px 10px; border-radius: var(--r-sm);
  transition: all 0.15s; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700;
  display: flex; align-items: center;
}
.terminal-copy-btn:hover { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.25); }
.terminal-copy-btn.copied { background: #15803d; color: white; border-color: #15803d; }

/* ── IP Info ──────────────────────────────────────── */
.ip-stat {
  padding: 0.85rem 0.95rem; border-radius: var(--r-lg);
  border: 1px solid var(--border); background: var(--bg);
}
html[data-theme="cyber"] .ip-stat { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.07); }
.ip-stat .label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 700; }
.ip-stat .value { font-weight: 700; font-size: 0.95rem; margin-top: 0.18rem; color: var(--theme-heading); }
.ip-details { list-style: none; margin: 0; padding: 0.45rem 1rem 0.9rem; }
.ip-details li {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}
html[data-theme="cyber"] .ip-details li { border-bottom-color: rgba(255,255,255,0.06); }
.ip-details li:last-child { border-bottom: none; }
.label-wrap {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--muted); font-weight: 700; font-size: 0.875rem; min-width: 130px;
}
.value-wrap { text-align: right; font-weight: 600; word-break: break-word; color: var(--theme-heading); }
.copy-btn {
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); border-radius: var(--r-sm);
  font-size: 0.78rem; padding: 0.15rem 0.38rem; margin-left: 0.4rem;
}
html[data-theme="cyber"] .copy-btn { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
.country-flag { margin-left: 0.35rem; border-radius: 2px; vertical-align: middle; }
.map-wrap {
  border-radius: var(--r-md); overflow: hidden;
  margin: 0.5rem 1rem 1rem; border: 1px solid var(--border);
  flex: 1; min-height: 200px;
}
html[data-theme="cyber"] .map-wrap { border-color: rgba(255,255,255,0.08); }
.map-wrap iframe { width: 100%; height: 100%; min-height: 200px; border: 0; display: block; }
.api-json {
  width: 100%; min-height: 180px; resize: vertical;
  border-radius: var(--r-md); border: 1px solid var(--border);
  padding: 0.75rem; font-family: var(--font-mono); font-size: 0.82rem;
  background: var(--bg); color: var(--ink);
}
html[data-theme="cyber"] .api-json { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); color: var(--theme-terminal-output); }
@media (max-width: 991.98px) { .map-wrap { flex: none; min-height: 280px; } }
@media (max-width: 575.98px) { .ip-details li { flex-direction: column; align-items: flex-start; } .value-wrap { text-align: left; width: 100%; } }

/* ── IP Calculator ────────────────────────────────── */
.calc-card {
  border-radius: var(--r-xl); border: 1px solid var(--border);
  background: var(--surface); box-shadow: var(--shadow);
}
html[data-theme="cyber"] .calc-card { background: var(--surface); border-color: rgba(255,255,255,0.08); }
.calc-table th {
  background: var(--bg); color: var(--muted); font-weight: 700;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em;
}
.calc-table tbody tr:hover { background: var(--bg); transition: background 0.15s; }
html[data-theme="cyber"] .calc-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.binary { font-family: var(--font-mono); color: var(--theme-heading); font-weight: 600; }

/* ── Login Page ───────────────────────────────────── */
body.login-page {
  font-family: var(--font-body);
  background: var(--theme-login-bg);
  color: var(--theme-login-text);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.login-card {
  background: var(--theme-login-card-bg);
  border: 1px solid var(--theme-login-card-border);
  border-radius: var(--r-xl);
  width: 100%; max-width: 360px;
  box-shadow: var(--shadow-lg);
}

.card-header-custom { padding: 22px 22px 8px; text-align: center; }

.brand-text {
  font-weight: 700; font-size: 1.15rem; letter-spacing: -0.3px;
  font-family: var(--font-display); color: var(--theme-login-text);
}

.login-page .form-label {
  font-weight: 600; font-size: 0.78rem;
  color: var(--theme-login-muted); margin-bottom: 5px;
}

.login-page .form-control {
  background: var(--theme-input-bg);
  border: 1px solid var(--theme-input-border);
  border-radius: var(--r-md);
  padding: 9px 12px; font-size: 0.9rem;
  color: var(--theme-login-text); transition: border-color 0.15s, box-shadow 0.15s;
}
.login-page .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

html[data-theme="cyber"] .login-page .form-control { color: var(--theme-heading); }

.btn-login {
  background: var(--accent); border: none;
  border-radius: var(--r-md); padding: 10px 12px;
  font-weight: 700; font-size: 0.93rem;
  color: white; width: 100%; margin-top: 6px;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.3);
  cursor: pointer;
}
.btn-login:hover { background: var(--accent-hover); box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.35); }

.login-page .alert {
  border-radius: var(--r-md); font-size: 0.84rem; font-weight: 500; border: none;
}

.footer-note { text-align: center; margin-top: 16px; font-size: 0.73rem; color: var(--theme-login-muted); }

/* ── Topbar Actions ───────────────────────────────── */
.topbar-actions { display: flex; align-items: center; gap: 0.5rem; }

.quick-action-btn,
.topbar-actions .quick-action-btn {
  width: 34px; height: 34px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: transparent;
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center;
  padding: 0; font-size: 0.9rem; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  position: relative;
}

.topbar-actions .quick-action-btn:hover,
.topbar-actions .quick-action-btn:focus {
  background: var(--bg); color: var(--ink); border-color: var(--border-strong);
}

html[data-theme="cyber"] .quick-action-btn,
html[data-theme="cyber"] .topbar-actions .quick-action-btn {
  border-color: rgba(255,255,255,0.08); color: var(--muted);
}
html[data-theme="cyber"] .topbar-actions .quick-action-btn:hover {
  background: rgba(255,255,255,0.07); color: var(--theme-heading);
}

/* ── Notification Badge ───────────────────────────── */
.notification-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; font-size: 0.6rem; font-weight: 800; line-height: 16px;
  background: var(--theme-notification-badge-bg);
  color: var(--theme-notification-badge-color);
  text-align: center;
}
.notification-badge.is-critical { box-shadow: 0 0 0 2px var(--surface); }

/* ── Notification Menu ────────────────────────────── */
.notification-menu,
.user-menu {
  min-width: 290px; border-radius: var(--r-xl);
  border: 1px solid var(--theme-notification-border) !important;
  background: var(--theme-notification-bg) !important;
  box-shadow: var(--theme-notification-shadow) !important;
  padding: 0 !important; overflow: hidden;
}

.notification-menu-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1rem 0.75rem;
  border-bottom: 1px solid var(--theme-notification-border);
}

.notification-title {
  font-weight: 700; font-size: 0.9rem;
  color: var(--theme-notification-title);
}
.notification-subtitle { font-size: 0.75rem; color: var(--theme-notification-sub); margin-top: 1px; }

.notification-menu-body { padding: 0.4rem 0; }

.notification-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 1rem; text-decoration: none;
  transition: background 0.15s;
}
.notification-item:hover { background: var(--theme-notification-item-hover) !important; }

.notification-item-main { flex: 1; min-width: 0; }
.notification-item-title {
  font-weight: 700; font-size: 0.85rem;
  color: var(--theme-notification-title);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notification-item-sub { font-size: 0.72rem; color: var(--theme-notification-sub); margin-top: 1px; }

.notification-empty {
  padding: 1rem; font-size: 0.83rem; color: var(--theme-notification-sub);
  text-align: center;
  background: var(--theme-notification-empty-bg);
  border-radius: var(--r-md); margin: 0.35rem 0.6rem;
  border: 1px dashed var(--theme-notification-empty-border);
}

/* ── User Menu ────────────────────────────────────── */
.user-menu-toggle-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.12); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.85rem; overflow: hidden;
}
.user-menu-toggle-avatar.has-image { background: transparent; }
.user-menu-toggle-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.user-menu-toggle.is-active {
  background: rgba(var(--accent-rgb), 0.08) !important;
  border-color: rgba(var(--accent-rgb), 0.3) !important;
}

.user-menu-head {
  padding: 0.85rem 1rem 0.7rem;
  border-bottom: 1px solid var(--theme-notification-border);
  background: var(--theme-notification-item-hover);
}

.user-menu-profile { display: flex; align-items: center; gap: 0.65rem; }

.user-menu-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.12); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem; flex-shrink: 0; overflow: hidden;
}
.user-menu-avatar.has-image { background: transparent; }
.user-menu-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.user-menu-meta { flex: 1; min-width: 0; }
.user-menu-title { font-weight: 700; font-size: 0.88rem; color: var(--theme-notification-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu-subtitle { font-size: 0.72rem; color: var(--theme-notification-sub); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.user-menu-chip {
  font-size: 0.62rem; font-weight: 700; padding: 0.12rem 0.45rem;
  border-radius: 999px; background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent); border: 1px solid rgba(var(--accent-rgb), 0.2);
  white-space: nowrap; flex-shrink: 0;
}

.user-menu-divider { margin: 0.2rem 0; border-color: var(--theme-notification-border); }

.user-menu-item {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.55rem 1rem !important; font-size: 0.875rem; font-weight: 600;
  color: var(--theme-notification-title) !important;
  border-radius: 0 !important; background: transparent !important;
  transition: background 0.15s; cursor: pointer; width: 100%;
  text-decoration: none; border: none;
}
.user-menu-item i { width: 16px; text-align: center; color: var(--theme-notification-sub); font-size: 0.9rem; }
.user-menu-item:hover, .user-menu-item:focus {
  background: var(--theme-notification-item-hover) !important;
  color: var(--theme-notification-title) !important;
}
.user-menu-item.is-active { color: var(--accent) !important; }
.user-menu-item.is-active i { color: var(--accent); }
.user-menu-item.is-danger { color: var(--theme-danger-text) !important; }
.user-menu-item.is-danger i { color: var(--theme-danger-text); }
.user-menu-item.is-danger:hover { background: var(--theme-danger-bg) !important; }
.theme-menu-item { text-align: left; }

/* ── Research Vault (Commands Switcher) ───────────── */
.commands-switcher {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.22rem 0.28rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
}
html[data-theme="cyber"] .commands-switcher { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }

.commands-switch-pill {
  border-radius: 999px; padding: 0.3rem 0.68rem;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted); text-decoration: none;
  border: 1px solid transparent; background: transparent;
  transition: all 0.15s;
}
.commands-switch-pill:hover { color: var(--ink); background: var(--bg); border-color: var(--border); }
.commands-switch-pill.active { color: var(--ink); background: var(--bg); border-color: var(--border); }
html[data-theme="cyber"] .commands-switch-pill.active { color: var(--theme-heading); background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.12); }

/* ── Research Vault Workspace ─────────────────────── */
.research-vault-page { --research-panel-radius: 14px; }
.research-vault-head h2 { letter-spacing: -0.01em; font-size: 1.35rem; }
.research-vault-head .text-muted { font-size: 0.85rem; }

.research-workspace .research-panel {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}
html[data-theme="cyber"] .research-workspace .research-panel { background: var(--surface); border-color: rgba(255,255,255,0.08); }

.research-library-panel { display: flex; flex-direction: column; min-height: 520px; max-height: calc(100vh - var(--topbar-h) - 96px); }
.research-vault-page .research-editor .research-area { min-height: 175px; resize: vertical; line-height: 1.5; }
.research-vault-page .research-editor .code-area { min-height: 130px; resize: vertical; line-height: 1.46; font-family: var(--font-mono); font-size: 0.8rem; }
.research-vault-page .research-editor .form-control,
.research-vault-page .research-editor .form-select { padding: 0.44rem 0.62rem; font-size: 0.875rem; border-radius: var(--r-md); }
.research-vault-page .research-editor .form-label { font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.32rem; }
.research-vault-page .research-editor .btn-primary { padding: 0.46rem 0.9rem; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
.research-vault-page .research-editor .mb-3 { margin-bottom: 0.75rem !important; }

.research-list { display: flex; flex-direction: column; gap: 0.45rem; overflow: auto; padding-right: 0.1rem; }

.research-item {
  border-radius: var(--r-md); border: 1px solid var(--border);
  background: var(--bg); padding: 0.58rem 0.62rem;
  transition: border-color 0.15s;
}
html[data-theme="cyber"] .research-item { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.07); }
.research-item:hover { border-color: var(--border-strong); }
html[data-theme="cyber"] .research-item:hover { border-color: rgba(255,255,255,0.14); }
.research-item.is-active {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.05);
}

.research-title-link { display: block; color: var(--theme-heading); text-decoration: none; font-size: 0.875rem; font-weight: 700; line-height: 1.3; }
.research-title-link:hover { color: var(--theme-heading); text-decoration: underline; }
.research-item .min-w-0 { min-width: 0; }
.research-meta { margin-top: 0.12rem; font-size: 0.64rem; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }

.research-type-badge {
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap; padding: 0.16rem 0.42rem; border-radius: 999px;
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--border);
}
.research-type-badge.research { background: rgba(var(--accent-rgb), 0.08); color: var(--accent); border-color: rgba(var(--accent-rgb), 0.2); }
.research-type-badge.cheat    { background: rgba(245,158,11,0.1); color: #b45309; border-color: rgba(245,158,11,0.25); }
.research-type-badge.generic  { background: var(--bg); color: var(--muted); }

.research-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.38rem; }
.research-tag {
  font-size: 0.57rem; border-radius: 999px; padding: 0.08rem 0.38rem;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--muted); font-weight: 600;
}
html[data-theme="cyber"] .research-tag { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }

.research-preview {
  margin-top: 0.38rem; white-space: normal; color: var(--muted);
  line-height: 1.36; font-size: 0.75rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.research-code {
  margin: 0.45rem 0 0; padding: 0.48rem 0.56rem;
  border-radius: var(--r-md); border: 1px solid var(--theme-terminal-border);
  background: var(--theme-terminal-bg); color: var(--theme-terminal-output);
  font-family: var(--font-mono); font-size: 0.67rem; line-height: 1.4;
  max-height: 82px; overflow: auto;
}

.research-empty {
  text-align: center; padding: 0.9rem 0.62rem;
  border: 1px dashed var(--border); border-radius: var(--r-md);
  background: var(--bg);
}
html[data-theme="cyber"] .research-empty { background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.1); }
.research-empty .empty-icon {
  width: 34px; height: 34px; border-radius: var(--r-md); margin: 0 auto 0.45rem;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8rem; border: 1px solid var(--border);
  background: var(--bg); color: var(--muted);
}

.research-filter-pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.research-filter-pill {
  display: inline-flex; align-items: center; border-radius: 999px; text-decoration: none;
  padding: 0.22rem 0.48rem; font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--border);
  background: var(--surface); transition: all 0.15s;
}
.research-filter-pill:hover { color: var(--ink); border-color: var(--border-strong); }
.research-filter-pill.active { color: var(--ink); border-color: var(--border-strong); background: var(--bg); }
html[data-theme="cyber"] .research-filter-pill.active { background: rgba(255,255,255,0.07); color: var(--theme-heading); }

@media (max-width: 991.98px) {
  .research-vault-page .research-editor { position: static; }
  .research-library-panel { min-height: auto; max-height: none; }
  .research-list { max-height: none; }
  .research-vault-head h2 { font-size: 1.2rem; }
}

/* ── Standard Notes Vault ─────────────────────────── */
.sn-vault {
  --sn-line: var(--border);
  --sn-soft: var(--bg);
  --sn-bg: var(--surface);
  --sn-text: var(--ink);
  --sn-muted: var(--muted);
}

html[data-theme="light-enterprise"] .sn-vault {
  --sn-line: #e5e7eb;
  --sn-soft: #f9fafb;
  --sn-bg: #ffffff;
  --sn-text: #111827;
  --sn-muted: #6b7280;
}

html[data-theme="cyber"] .sn-vault {
  --sn-line: rgba(255,255,255,0.08);
  --sn-soft: rgba(255,255,255,0.03);
  --sn-bg: #1e293b;
  --sn-text: #f1f5f9;
  --sn-muted: #94a3b8;
}

.sn-vault .sn-shell {
  display: grid; grid-template-columns: 250px minmax(0,1fr);
  min-height: calc(100vh - var(--topbar-h) - 28px);
  border: 1px solid var(--sn-line); border-radius: var(--r-md);
  overflow: hidden; background: var(--sn-bg);
}
.sn-vault .sn-navpane {
  background: var(--sn-soft); border-right: 1px solid var(--sn-line);
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
}
.sn-vault .sn-nav-categories { padding: 0.65rem 0.7rem 0.45rem; border-bottom: 1px solid var(--sn-line); flex-shrink: 0; }
.sn-vault .sn-nav-notes { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sn-vault .sn-nav-notes-head { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.7rem 0.28rem; flex-shrink: 0; }
.sn-vault .sn-nav-notes-label { display: inline-flex; align-items: center; gap: 0.32rem; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--sn-muted); }
.sn-vault .sn-editorpane { background: var(--sn-bg); min-width: 0; }
.sn-vault .sn-search-wrap { position: relative; margin-bottom: 0.8rem; }
.sn-vault .sn-search-wrap i { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); color: var(--sn-muted); font-size: 0.82rem; }
.sn-vault .sn-search-wrap input {
  width: 100%; border: 1px solid var(--sn-line); background: var(--sn-bg); color: var(--sn-text);
  border-radius: 999px; padding: 0.55rem 0.88rem 0.55rem 2.1rem; font-size: 0.875rem;
}
.sn-vault .sn-search-wrap input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.12); }
.sn-vault .sn-block { margin-bottom: 0.9rem; }
.sn-vault .sn-block-title { display: flex; align-items: center; justify-content: space-between; font-size: 0.82rem; font-weight: 700; color: var(--sn-text); margin: 0.12rem 0 0.45rem; }
.sn-vault .sn-block-action { color: var(--sn-muted); font-size: 0.85rem; }
.sn-vault .sn-block-action-btn {
  width: 22px; height: 22px; border: 1px solid var(--sn-line); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--sn-bg); color: var(--sn-muted); font-size: 0.72rem;
}
.sn-vault .sn-block-action-btn:hover { color: var(--sn-text); border-color: rgba(var(--accent-rgb),0.4); }
.sn-vault .sn-nav-row { display: flex; align-items: center; gap: 0.26rem; margin-bottom: 0.1rem; }
.sn-vault .sn-nav-row .sn-nav-item { flex: 1; }
.sn-vault .sn-category-delete-form { margin: 0; }
.sn-vault .sn-category-delete-btn {
  width: 26px; height: 26px; border-radius: var(--r-sm); border: 1px solid transparent;
  background: transparent; color: var(--sn-muted);
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.76rem;
}
.sn-vault .sn-category-delete-btn:hover { border-color: rgba(239,68,68,0.3); color: #dc2626; background: rgba(239,68,68,0.06); }

body.sn-confirm-open { overflow: hidden; touch-action: none; }

.sn-confirm-modal {
  --sn-line: var(--border); --sn-soft: var(--bg); --sn-bg: var(--surface);
  --sn-text: var(--ink); --sn-muted: var(--muted);
  position: fixed; inset: 0; z-index: 1500; display: none;
}
html[data-theme="light-enterprise"] .sn-confirm-modal { --sn-line:#e5e7eb; --sn-soft:#f9fafb; --sn-bg:#ffffff; --sn-text:#111827; --sn-muted:#6b7280; }
html[data-theme="cyber"] .sn-confirm-modal { --sn-line:rgba(255,255,255,0.08); --sn-soft:rgba(255,255,255,0.03); --sn-bg:#1e293b; --sn-text:#f1f5f9; --sn-muted:#94a3b8; }
.sn-confirm-modal.is-open { display: block; }

.sn-confirm-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.2s;
}
.sn-confirm-modal.is-open .sn-confirm-backdrop { opacity: 1; }

.sn-confirm-dialog {
  position: relative; width: min(420px, calc(100% - 2rem));
  margin: min(18vh, 140px) auto 0;
  background: var(--sn-bg); border: 1px solid var(--sn-line);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.16), 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(10px) scale(0.98); opacity: 0;
  transition: transform 0.2s cubic-bezier(.22,.68,0,1.2), opacity 0.18s;
}
html[data-theme="cyber"] .sn-confirm-dialog {
  box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
}
.sn-confirm-modal.is-open .sn-confirm-dialog { transform: translateY(0) scale(1); opacity: 1; }

/* ── Header ── */
.sn-confirm-head {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 1.35rem 1.5rem 1.1rem;
}
.sn-confirm-site-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(var(--accent-rgb), 0.1); color: var(--accent); font-size: 1.05rem;
  transition: background 0.2s, color 0.2s;
}
.sn-confirm-modal.is-danger .sn-confirm-site-icon {
  background: rgba(220, 38, 38, 0.1); color: #dc2626;
}
html[data-theme="cyber"] .sn-confirm-modal.is-danger .sn-confirm-site-icon { color: #f87171; background: rgba(248,113,113,0.12); }
.sn-confirm-head-copy { display: flex; flex-direction: column; gap: 0.12rem; min-width: 0; flex: 1; }
.sn-confirm-title { font-weight: 700; font-size: 1rem; color: var(--sn-text); line-height: 1.3; }
.sn-confirm-host { font-size: 0.72rem; color: var(--sn-muted); }

/* ── Divider after head ── */
.sn-confirm-head { border-bottom: 1px solid var(--sn-line); }

/* ── Message ── */
.sn-confirm-message {
  padding: 1rem 1.5rem 0.5rem; font-size: 0.9rem; color: var(--sn-muted); line-height: 1.6;
}

/* ── Action buttons ── */
.sn-confirm-actions {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.5rem 1.35rem;
}
/* Inside create form, form already supplies horizontal padding */
.sn-create-form .sn-confirm-actions { padding: 0.9rem 0 0; }
.sn-confirm-ok {
  padding: 0.48rem 1.3rem; border-radius: 8px; border: none; cursor: pointer;
  font-size: 0.875rem; font-weight: 600; line-height: 1.4;
  background: var(--accent); color: #fff; transition: opacity 0.15s, transform 0.1s;
}
.sn-confirm-ok:hover { opacity: 0.88; }
.sn-confirm-ok:active { transform: scale(0.97); }
.sn-confirm-modal.is-danger .sn-confirm-ok { background: #dc2626; }
html[data-theme="cyber"] .sn-confirm-modal.is-danger .sn-confirm-ok { background: #ef4444; }
.sn-confirm-cancel {
  padding: 0.48rem 1rem; border-radius: 8px; cursor: pointer;
  font-size: 0.875rem; font-weight: 500; line-height: 1.4;
  background: transparent; color: var(--sn-muted); border: 1.5px solid var(--sn-line);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sn-confirm-cancel:hover { background: var(--sn-soft); color: var(--sn-text); border-color: var(--sn-muted); }

/* ── Create Category form ── */
.sn-create-form { padding: 1rem 1.5rem 1.35rem; }
.sn-create-label {
  display: block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--sn-muted); margin-bottom: 0.45rem;
}
.sn-create-input {
  width: 100%; border: 1.5px solid var(--sn-line); border-radius: 9px;
  background: var(--sn-soft); color: var(--sn-text);
  padding: 0.58rem 0.9rem; font-size: 0.9rem; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sn-create-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}
.sn-create-input::placeholder { color: var(--sn-muted); opacity: 0.7; }
html[data-theme="cyber"] .sn-create-input { background: rgba(255,255,255,0.04); }
.sn-confirm-footer { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.65rem 1.1rem 0.9rem; border-top: 1px solid var(--sn-line); }

/* SN Nav Items */
.sn-vault .sn-nav-item,
.sn-vault .sn-note-item {
  display: block; padding: 0.38rem 0.52rem; border-radius: var(--r-sm);
  font-size: 0.82rem; color: var(--sn-muted); font-weight: 500;
  text-decoration: none; transition: background 0.12s, color 0.12s; cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
}
.sn-vault .sn-nav-item:hover,
.sn-vault .sn-note-item:hover { background: rgba(var(--accent-rgb),0.07); color: var(--sn-text); }
.sn-vault .sn-nav-item.active,
.sn-vault .sn-note-item.active { background: rgba(var(--accent-rgb),0.1); color: var(--accent); font-weight: 700; }
html[data-theme="cyber"] .sn-vault .sn-nav-item.active,
html[data-theme="cyber"] .sn-vault .sn-note-item.active { color: #93c5fd; background: rgba(var(--accent-rgb),0.15); }

.sn-vault .sn-note-list,
.sn-vault .sn-notes-list { display: flex; flex-direction: column; gap: 0; overflow-y: auto; flex: 1; }
.sn-vault .sn-note-item { border-bottom: 1px solid var(--sn-line); border-radius: 0; padding: 0.55rem 0.7rem; }
.sn-vault .sn-note-item:last-child { border-bottom: none; }
.sn-vault .sn-note-title { font-weight: 700; font-size: 0.83rem; color: var(--sn-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-vault .sn-note-meta  { font-size: 0.65rem; color: var(--sn-muted); margin-top: 1px; }
.sn-vault .sn-note-preview { font-size: 0.73rem; color: var(--sn-muted); margin-top: 0.12rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; }

.sn-vault .sn-editor-head { padding: 0.75rem 1rem; border-bottom: 1px solid var(--sn-line); display: flex; align-items: center; gap: 0.5rem; }
.sn-vault .sn-editor-title-input {
  flex: 1; border: none; background: none; outline: none;
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
  color: var(--sn-text); padding: 0;
}
.sn-vault .sn-editor-title-input::placeholder { color: var(--sn-muted); }
.sn-vault .sn-editor-body { padding: 0.75rem 1rem; }
.sn-vault .sn-editor-textarea {
  width: 100%; min-height: 360px; resize: vertical;
  background: none; border: none; outline: none;
  font-size: 0.9rem; line-height: 1.65; color: var(--sn-text);
  font-family: var(--font-body);
}
.sn-vault .sn-editor-textarea::placeholder { color: var(--sn-muted); }
.sn-vault .sn-editor-empty { padding: 3rem 1rem; text-align: center; color: var(--sn-muted); font-size: 0.875rem; }
.sn-vault .sn-editor-code { font-family: var(--font-mono); font-size: 0.82rem; }
.sn-vault .sn-empty-list { padding: 1.2rem 0.7rem; text-align: center; font-size: 0.82rem; color: var(--sn-muted); }
.sn-vault .sn-add-btn { width: 24px; height: 24px; border: 1px solid var(--sn-line); border-radius: 50%; background: var(--sn-bg); color: var(--sn-muted); display: inline-flex; align-items: center; justify-content: center; font-size: 0.78rem; }
.sn-vault .sn-add-btn:hover { border-color: rgba(var(--accent-rgb),0.4); color: var(--accent); background: rgba(var(--accent-rgb),0.07); }

@media (max-width: 767.98px) {
  .sn-vault .sn-shell { grid-template-columns: 1fr; }
  .sn-vault .sn-navpane { border-right: none; border-bottom: 1px solid var(--sn-line); max-height: 300px; }
  .sn-vault .sn-note-list { max-height: 250px; }
}

/* ── Domain Inventory mobile table ────────────────── */
@media (max-width: 768px) {
  .domain-hero, .ip-hero, .calc-hero { padding: 1.25rem; border-radius: var(--r-xl); }
  .domain-table thead { display: none; }
  .domain-table,
  .domain-table tbody,
  .domain-table tr,
  .domain-table td { display: block; width: 100%; }
  .domain-table tbody tr { margin-bottom: 0.75rem; }
  .domain-table tbody td {
    border: 1px solid var(--border);
    border-bottom: 0; border-radius: 0;
  }
  .domain-table tbody td:first-child { border-radius: var(--r-md) var(--r-md) 0 0; }
  .domain-table tbody td:last-child   { border-radius: 0 0 var(--r-md) var(--r-md); border-bottom: 1px solid var(--border); }
  .domain-table tbody td::before {
    content: attr(data-label); display: block;
    font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--muted-2); margin-bottom: 0.35rem; font-weight: 700;
  }
  .domain-table tbody tr.empty-row td::before { display: none; }
  .domain-actions { justify-content: flex-start; }
  .dinh-top { flex-wrap: wrap; }
  .dinh-controls { flex: 1 1 100%; justify-content: flex-start; }
  .dinh-search-wrap { max-width: 100%; flex: 1; }
  .dinh-bottom { flex-direction: column; align-items: flex-start; }
  .dinh-bulk { padding-top: 0.45rem; border-top: 1px solid var(--border); width: 100%; }
  .card, .tool-card, .dash-stat, .domain-card, .calc-card, .login-card { border-radius: var(--r-xl); }
}

/* ── Main-content layout (matching existing structure) */
.main-content > .container { animation: page-enter 350ms cubic-bezier(0.16,1,0.3,1); }

@media (max-width: 991.98px) {
  .main-content { padding: 20px 0 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Dashboard: Hero ──────────────────────────────── */
.idx-hero {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  padding: 1.4rem 1.6rem;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

html[data-theme="cyber"] .idx-hero { background: var(--surface); border-color: rgba(255,255,255,0.08); }

.idx-hero-left { display: flex; align-items: center; gap: 1rem; }

.idx-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.12); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem; flex-shrink: 0;
}

.idx-greeting {
  font-size: 1.35rem; font-weight: 800; margin: 0; line-height: 1.2;
  color: var(--theme-heading); letter-spacing: -0.03em;
}

.idx-date { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }

/* ── Dashboard: idx-stat body ─────────────────────── */
.idx-stat-body { flex: 1; min-width: 0; }

/* ── Dashboard: idx-card ──────────────────────────── */
.idx-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.idx-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.09), 0 2px 6px rgba(0,0,0,0.05);
}
html[data-theme="cyber"] .idx-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.2);
}

html[data-theme="cyber"] .idx-card { background: var(--surface); border-color: rgba(255,255,255,0.08); }

.idx-card-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem;
  padding: 1rem 1.1rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: var(--theme-card-header-bg);
}

html[data-theme="cyber"] .idx-card-header {
  background: rgba(255,255,255,0.02);
  border-bottom-color: rgba(255,255,255,0.06);
}

.idx-card-header h5 { font-size: 0.9rem; }

.idx-card-body { padding: 1rem 1.1rem; }

.idx-tz-badge {
  font-size: 0.68rem; font-weight: 700;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--muted); padding: 0.18rem 0.55rem; border-radius: 999px;
}

html[data-theme="cyber"] .idx-tz-badge {
  background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1);
}

.idx-see-all {
  font-size: 0.78rem; font-weight: 600; color: var(--accent);
  text-decoration: none; transition: color 0.15s;
}
.idx-see-all:hover { color: var(--accent-hover); text-decoration: underline; }

/* ── Activity Feed ────────────────────────────────── */
.activity-feed { display: flex; flex-direction: column; gap: 0; }

.activity-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 0; border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: background 0.12s;
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--bg); margin: 0 -1.1rem; padding-left: 1.1rem; padding-right: 1.1rem; border-radius: var(--r-md); }

html[data-theme="cyber"] .activity-item { border-bottom-color: rgba(255,255,255,0.06); }
html[data-theme="cyber"] .activity-item:hover { background: rgba(255,255,255,0.03); }

.activity-icon {
  width: 32px; height: 32px; border-radius: var(--r-md); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.82rem;
  background: rgba(107,114,128,0.1); color: var(--muted);
}

/* Activity icon color variants */
.activity-icon.act-auth     { background: rgba(37,99,235,0.1);  color: #2563eb; }
.activity-icon.act-domain   { background: rgba(14,165,233,0.1); color: #0284c7; }
.activity-icon.act-research { background: rgba(124,58,237,0.1); color: #7c3aed; }
.activity-icon.act-bash     { background: rgba(15,23,42,0.08);  color: #334155; }
.activity-icon.act-profile  { background: rgba(16,185,129,0.1); color: #15803d; }
.activity-icon.act-ip       { background: rgba(8,145,178,0.1);  color: #0891b2; }
.activity-icon.act-whois    { background: rgba(234,88,12,0.1);  color: #ea580c; }

html[data-theme="cyber"] .activity-icon.act-auth     { color: #60a5fa; }
html[data-theme="cyber"] .activity-icon.act-domain   { color: #38bdf8; }
html[data-theme="cyber"] .activity-icon.act-research { color: #a78bfa; }
html[data-theme="cyber"] .activity-icon.act-bash     { background: rgba(255,255,255,0.07); color: #94a3b8; }
html[data-theme="cyber"] .activity-icon.act-profile  { color: #4ade80; }
html[data-theme="cyber"] .activity-icon.act-ip       { color: #38bdf8; }

.activity-copy { flex: 1; min-width: 0; }

.activity-title {
  display: block; font-weight: 600; font-size: 0.84rem;
  color: var(--theme-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.activity-detail {
  display: block; font-size: 0.73rem; color: var(--muted); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.activity-time {
  font-size: 0.7rem; color: var(--muted-2); white-space: nowrap; flex-shrink: 0;
}

/* ── Dashboard: Empty State ───────────────────────── */
.dash-empty { padding: 1rem; border-radius: var(--r-lg); background: var(--bg); border: 1px dashed var(--border); }
.dash-empty-title { font-weight: 700; font-size: 0.875rem; color: var(--theme-heading); }
.dash-empty-sub   { font-size: 0.78rem; color: var(--muted); margin-top: 3px; }
html[data-theme="cyber"] .dash-empty { background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.08); }

/* ── Dashboard: Quick Access ──────────────────────── */
.idx-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.55rem;
}

.idx-tool-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.45rem;
  padding: 0.75rem 0.5rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--bg);
  text-decoration: none; color: var(--ink);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  text-align: center;
}
.idx-tool-btn:hover {
  border-color: rgba(var(--accent-rgb), 0.3);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
}
html[data-theme="cyber"] .idx-tool-btn {
  background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); color: var(--theme-heading);
}
html[data-theme="cyber"] .idx-tool-btn:hover {
  background: rgba(255,255,255,0.07); border-color: rgba(var(--accent-rgb), 0.35);
}

.idx-tool-icon {
  width: 36px; height: 36px; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem;
  flex-shrink: 0;
}

.idx-tool-label {
  font-size: 0.68rem; font-weight: 700; color: var(--muted); line-height: 1.2;
  text-align: center; word-break: break-word;
}
.idx-tool-btn:hover .idx-tool-label { color: var(--ink); }
html[data-theme="cyber"] .idx-tool-btn:hover .idx-tool-label { color: var(--theme-heading); }

/* ── Dashboard: Expiring Domains ──────────────────── */
.idx-exp-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.55rem 0; border-bottom: 1px solid var(--border);
}
.idx-exp-row:last-child { border-bottom: none; }
html[data-theme="cyber"] .idx-exp-row { border-bottom-color: rgba(255,255,255,0.06); }

.idx-exp-domain {
  font-size: 0.84rem; font-weight: 600; color: var(--theme-heading);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1;
}

.idx-exp-pill {
  font-size: 0.7rem; font-weight: 700; padding: 0.18rem 0.5rem; border-radius: 999px;
  white-space: nowrap; flex-shrink: 0;
  background: rgba(245,158,11,0.12); color: #b45309; border: 1px solid rgba(245,158,11,0.25);
}
.idx-exp-pill.critical {
  background: rgba(239,68,68,0.1); color: #dc2626; border-color: rgba(239,68,68,0.25);
}
html[data-theme="cyber"] .idx-exp-pill { color: #fbbf24; border-color: rgba(251,191,36,0.3); }
html[data-theme="cyber"] .idx-exp-pill.critical { color: #f87171; border-color: rgba(248,113,113,0.3); }

/* ── Account Page ─────────────────────────────────── */
.account-avatar-preview {
  display: flex; align-items: flex-start; gap: 1rem;
}

.account-avatar-tile {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.12); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.4rem; flex-shrink: 0;
  border: 2px solid var(--border); overflow: hidden;
}
.account-avatar-tile.has-image { background: transparent; }
.account-avatar-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

.account-avatar-copy { flex: 1; min-width: 0; }
.account-avatar-copy .fw-semibold { font-size: 0.875rem; color: var(--theme-heading); }
.account-avatar-copy .text-muted  { font-size: 0.78rem; }

/* ── Users Page ───────────────────────────────────── */
.perm-check-item { display: flex; align-items: center; gap: 0.5rem; }

/* ── Quick Stats: Unknown Notice ─────────────────── */
.dqs-unknown {
  font-size: 0.73rem; color: var(--muted); margin-top: 0.5rem;
  padding: 0.3rem 0.6rem; border-radius: var(--r-md);
  background: rgba(107,114,128,0.07);
}
html[data-theme="cyber"] .dqs-unknown { background: rgba(255,255,255,0.04); }

/* ── Priority Chips (domain expiry widget) ────────── */
.pchip-warn { border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.04); }
.pchip-warn .chip-sub { color: #b45309; background: rgba(245,158,11,0.1); }
html[data-theme="cyber"] .pchip-warn .chip-sub { color: #fbbf24; }

/* ── Priority Filter Button ───────────────────────── */
.priority-filter {
  font-size: 0.75rem; padding: 0.2rem 0.65rem; border-radius: 999px;
}

/* ── Bash Library Page ────────────────────────────── */
.bash-library-page { padding-bottom: 2rem; }

.bash-library-hero {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
  padding: 1.2rem 0 1rem;
}
.bash-library-hero-badges { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.bl-pill {
  display: inline-flex; align-items: center;
  font-size: 0.72rem; font-weight: 700; padding: 0.22rem 0.65rem; border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.08); color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
}
html[data-theme="cyber"] .bl-pill { background: rgba(var(--accent-rgb), 0.12); border-color: rgba(var(--accent-rgb), 0.25); }

.bl-shell {
  display: flex; flex-direction: row; min-height: 480px; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow);
}
html[data-theme="cyber"] .bl-shell { border-color: rgba(255,255,255,0.08); }

.bl-pane { padding: 1.25rem; }

.bl-pane-controls {
  width: 280px; flex-shrink: 0; border-right: 1px solid var(--border);
  background: var(--bg);
}
html[data-theme="cyber"] .bl-pane-controls { background: rgba(255,255,255,0.02); border-right-color: rgba(255,255,255,0.08); }

.bl-pane-output { flex: 1; min-width: 0; background: var(--surface); display: flex; flex-direction: column; gap: 0.85rem; }

.bl-script-description {
  font-size: 0.8rem; color: var(--muted); padding: 0.6rem 0.75rem;
  border-radius: var(--r-md); border: 1px solid var(--border); background: var(--bg);
  min-height: 52px; line-height: 1.5;
}
.bl-script-description.is-empty { color: var(--muted-2); font-style: italic; }
html[data-theme="cyber"] .bl-script-description { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); }

.bl-status {
  font-size: 0.78rem; padding: 0.5rem 0.7rem; border-radius: var(--r-md);
  border-left: 3px solid var(--accent); background: rgba(var(--accent-rgb), 0.06);
  color: var(--muted); line-height: 1.4;
}
.bl-status[data-state="success"] { border-left-color: #15803d; background: rgba(21,128,61,0.06); }
.bl-status[data-state="error"]   { border-left-color: #dc2626; background: rgba(220,38,38,0.06); }
html[data-theme="cyber"] .bl-status { background: rgba(var(--accent-rgb), 0.08); }

.bl-copy-btn { font-size: 0.78rem; }
.bl-copy-btn.is-hidden { display: none !important; }

.bl-terminal {
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--border);
  flex: 1;
}

.bl-analysis {
  padding: 0.75rem 0.9rem; border-radius: var(--r-lg);
  border: 1px solid var(--border); background: var(--bg);
  font-size: 0.82rem;
}
.bl-analysis.is-hidden { display: none !important; }
html[data-theme="cyber"] .bl-analysis { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); }

.bl-analysis-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.35rem;
}

.bl-analysis-summary { font-size: 0.82rem; color: var(--ink); line-height: 1.5; }

.bl-analysis-actions {
  margin: 0.5rem 0 0; padding-left: 1rem; font-size: 0.8rem; color: var(--ink); line-height: 1.6;
}
.bl-analysis-actions.is-hidden { display: none !important; }

.bl-help {
  padding: 0.6rem 0; font-size: 0.78rem;
  border-top: 1px solid var(--border); margin-top: auto;
}
html[data-theme="cyber"] .bl-help { border-top-color: rgba(255,255,255,0.07); }

@media (max-width: 767px) {
  .bl-shell { flex-direction: column; min-height: auto; }
  .bl-pane-controls { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
}

/* ── sn-vault: Nav Labels & Count ─────────────────── */
.sn-vault .sn-nav-label {
  display: inline-flex; align-items: center; gap: 0.4rem;
  flex: 1; font-size: 0.82rem; font-weight: 500; color: var(--sn-text);
}
.sn-vault .sn-count {
  flex-shrink: 0; font-size: 0.68rem; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 0.35rem;
  border-radius: 999px; background: rgba(var(--accent-rgb),0.1); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
html[data-theme="cyber"] .sn-vault .sn-count { background: rgba(var(--accent-rgb),0.15); color: #93c5fd; }

/* ── sn-vault: Editor Form Layout ─────────────────── */
.sn-vault .sn-editor-form {
  display: flex; flex-direction: column; height: 100%;
}

.sn-vault .sn-editor-top {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.85rem 1rem 0.75rem; border-bottom: 1px solid var(--sn-line); flex-shrink: 0;
}

.sn-vault .sn-title-input {
  flex: 1; border: none; background: none; outline: none;
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
  color: var(--sn-text); padding: 0; min-width: 0;
}
.sn-vault .sn-title-input::placeholder { color: var(--sn-muted); }

.sn-vault .sn-editor-tools {
  display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0;
}

.sn-vault .sn-state-wrap {
  display: flex; align-items: center; gap: 0.4rem;
}

.sn-vault .sn-state {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem; border-radius: 999px;
  background: rgba(var(--accent-rgb),0.1); color: var(--accent);
  transition: background 0.2s, color 0.2s;
}
html[data-theme="cyber"] .sn-vault .sn-state { background: rgba(var(--accent-rgb),0.15); color: #93c5fd; }
/* Viewing state — neutral grey chip */
.sn-vault .sn-editor-form:not(.is-editing):not(.is-new) .sn-state {
  background: var(--border); color: var(--sn-muted);
}

.sn-vault .sn-updated {
  font-size: 0.7rem; color: var(--sn-muted); white-space: nowrap;
}

/* ── sn-vault: Category + Actions Row ─────────────── */
.sn-vault .sn-cat-actions {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.6rem 1rem; border-bottom: 1px solid var(--sn-line); flex-shrink: 0;
}

.sn-vault .sn-category-select {
  width: auto; min-width: 140px; max-width: 200px;
  font-size: 0.8rem; padding: 0.3rem 2rem 0.3rem 0.65rem; height: auto;
  border-color: var(--sn-line); background-color: var(--sn-bg); color: var(--sn-text);
}
html[data-theme="cyber"] .sn-vault .sn-category-select {
  border-color: rgba(255,255,255,0.1); background-color: rgba(255,255,255,0.05);
}

.sn-vault .sn-actions-group {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
}

/* ── sn-vault: View / Edit mode toggle ────────────── */
/* Default: view mode — hide edit-only buttons, show view-only buttons */
.sn-vault .sn-editor-form .sn-actions-group .sn-edit-only { display: none; }
.sn-vault .sn-editor-form .sn-actions-group .sn-view-only { display: inline-flex; }

/* New entry: edit mode */
.sn-vault .sn-editor-form.is-new .sn-actions-group .sn-edit-only { display: inline-flex; }
.sn-vault .sn-editor-form.is-new .sn-actions-group .sn-view-only { display: none; }

/* Editing mode unlocked */
.sn-vault .sn-editor-form.is-editing .sn-actions-group .sn-edit-only { display: inline-flex; }
.sn-vault .sn-editor-form.is-editing .sn-actions-group .sn-view-only { display: none; }

/* Block-level edit-only elements inside editor (toolbar uses flex, textarea uses block) */
.sn-vault .sn-editor-form .sn-single-editor .sn-edit-only { display: none !important; }
.sn-vault .sn-editor-form.is-new .sn-single-editor .sn-edit-only,
.sn-vault .sn-editor-form.is-editing .sn-single-editor .sn-edit-only { display: revert !important; }
/* toolbar specifically needs flex */
.sn-vault .sn-editor-form.is-new .sn-editor-toolbar,
.sn-vault .sn-editor-form.is-editing .sn-editor-toolbar { display: flex !important; }

/* View-only content viewer */
.sn-vault .sn-editor-form .sn-single-editor .sn-view-only { display: block; }
.sn-vault .sn-editor-form.is-new .sn-single-editor .sn-view-only,
.sn-vault .sn-editor-form.is-editing .sn-single-editor .sn-view-only { display: none !important; }

/* Lock title & category inputs in view mode */
.sn-vault .sn-editor-form .sn-title-input[readonly] {
  background: transparent; border-color: transparent; cursor: default; color: var(--sn-text);
}
.sn-vault .sn-editor-form .sn-category-select[disabled] {
  opacity: 1; background: transparent; border-color: transparent;
  pointer-events: none; color: var(--sn-muted);
}

/* Content viewer */
.sn-vault .sn-content-viewer {
  flex: 1; padding: 0.85rem 1.1rem; min-height: 300px;
  font-size: 0.875rem; line-height: 1.7; color: var(--sn-text);
  font-family: var(--font-mono); white-space: pre-wrap; word-break: break-word;
  overflow-y: auto;
}

/* ── sn-vault: Single Editor with Toolbar ─────────── */
.sn-vault .sn-single-editor {
  display: flex; flex-direction: column; flex: 1; min-height: 0;
}

.sn-vault .sn-editor-toolbar {
  display: flex; align-items: center; gap: 0.15rem; flex-wrap: wrap;
  padding: 0.38rem 0.75rem; border-bottom: 1px solid var(--sn-line);
  background: var(--sn-soft); flex-shrink: 0;
}

.sn-vault .sn-toolbar-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 26px; border: none; background: transparent;
  border-radius: var(--r-sm); color: var(--sn-muted); font-size: 0.78rem;
  cursor: pointer; transition: background 0.12s, color 0.12s; flex-shrink: 0;
}
.sn-vault .sn-toolbar-btn:hover { background: rgba(var(--accent-rgb),0.1); color: var(--accent); }
.sn-vault .sn-toolbar-btn:active { background: rgba(var(--accent-rgb),0.18); }

.sn-vault .sn-toolbar-label { font-size: 0.72rem; font-weight: 700; line-height: 1; }

.sn-vault .sn-toolbar-sep {
  width: 1px; height: 16px; background: var(--sn-line);
  margin: 0 0.2rem; flex-shrink: 0;
}

.sn-vault .sn-textarea {
  flex: 1; width: 100%; padding: 0.85rem 1.1rem;
  border: none; background: none; outline: none; resize: none;
  font-size: 0.875rem; line-height: 1.7; color: var(--sn-text);
  font-family: var(--font-body); min-height: 300px;
}
.sn-vault .sn-textarea::placeholder { color: var(--sn-muted); }

/* ── sn-vault: Shortcuts Hint ─────────────────────── */
.sn-vault .sn-shortcuts-hint {
  font-size: 0.7rem; color: var(--sn-muted); padding: 0.45rem 1rem 0.5rem;
  border-top: 1px solid var(--sn-line); flex-shrink: 0;
}
html[data-theme="cyber"] .sn-vault .sn-shortcuts-hint { border-top-color: rgba(255,255,255,0.07); }

/* ── Skeleton Shimmer ─────────────────────────────── */
@keyframes skeleton-shimmer {
  0%   { background-position: -600px center; }
  100% { background-position: 600px center; }
}

.skeleton-line {
  display: block; border-radius: var(--r-sm);
  background: linear-gradient(90deg,
    var(--border) 25%,
    rgba(var(--accent-rgb), 0.04) 50%,
    var(--border) 75%
  );
  background-size: 1200px 100%;
  animation: skeleton-shimmer 1.4s linear infinite;
}
html[data-theme="cyber"] .skeleton-line {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.06) 25%,
    rgba(255,255,255,0.1) 50%,
    rgba(255,255,255,0.06) 75%
  );
  background-size: 1200px 100%;
}

.bl-skeleton { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.5rem 0; }
.bl-skeleton .skeleton-line { height: 11px; }
.bl-skeleton .s-w-full { width: 100%; }
.bl-skeleton .s-w-80 { width: 80%; }
.bl-skeleton .s-w-65 { width: 65%; }
.bl-skeleton .s-w-50 { width: 50%; }
.bl-skeleton.is-hidden { display: none !important; }

/* ── Command Palette ──────────────────────────────── */
.cmd-palette {
  display: none;
  position: fixed; inset: 0; z-index: 1500;
}
.cmd-palette.is-open { display: block; }

.cmd-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.cmd-panel {
  position: absolute;
  top: min(10vh, 72px); left: 50%;
  transform: translateX(-50%);
  width: min(580px, calc(100vw - 2rem));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,0.16), 0 4px 16px rgba(0,0,0,0.08);
  overflow: hidden;
  animation: cmd-panel-in 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}
html[data-theme="cyber"] .cmd-panel {
  background: var(--surface);
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 4px 20px rgba(0,0,0,0.3);
}

@keyframes cmd-panel-in {
  from { opacity: 0; transform: translateX(-50%) scale(0.96) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) scale(1)    translateY(0); }
}

.cmd-search-wrap {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
}
html[data-theme="cyber"] .cmd-search-wrap { border-bottom-color: rgba(255,255,255,0.08); }

.cmd-search-icon { color: var(--muted); font-size: 0.95rem; flex-shrink: 0; }

.cmd-input {
  flex: 1; border: none; background: none; outline: none;
  font-size: 1rem; color: var(--ink); font-family: var(--font-body);
}
.cmd-input::placeholder { color: var(--muted); }

.cmd-esc-hint {
  font-size: 0.65rem; font-family: var(--font-mono);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 0.15rem 0.45rem;
  color: var(--muted); flex-shrink: 0; line-height: 1.6;
}
html[data-theme="cyber"] .cmd-esc-hint {
  background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1);
}

.cmd-results { max-height: 380px; overflow-y: auto; padding: 0.4rem; }

.cmd-section-label {
  display: block; font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); padding: 0.5rem 0.7rem 0.2rem;
}

.cmd-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.75rem; border-radius: var(--r-lg);
  text-decoration: none; color: var(--ink);
  transition: background 0.1s, color 0.1s;
  width: 100%; border: none; background: none; text-align: left; cursor: pointer;
}
.cmd-item:hover,
.cmd-item.is-active {
  background: rgba(var(--accent-rgb), 0.08); color: var(--accent);
}
html[data-theme="cyber"] .cmd-item:hover,
html[data-theme="cyber"] .cmd-item.is-active {
  background: rgba(var(--accent-rgb), 0.13); color: #93c5fd;
}

.cmd-item-icon {
  width: 32px; height: 32px; border-radius: var(--r-md);
  background: var(--bg); border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.78rem; color: var(--muted); flex-shrink: 0;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.cmd-item:hover .cmd-item-icon,
.cmd-item.is-active .cmd-item-icon {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.2);
  color: var(--accent);
}
html[data-theme="cyber"] .cmd-item:hover .cmd-item-icon,
html[data-theme="cyber"] .cmd-item.is-active .cmd-item-icon {
  color: #93c5fd; background: rgba(var(--accent-rgb), 0.15);
}

.cmd-item-label { flex: 1; font-size: 0.875rem; font-weight: 600; }

.cmd-empty {
  padding: 2rem 1rem; text-align: center;
  font-size: 0.875rem; color: var(--muted);
}

/* Topbar trigger button */
.cmd-trigger {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.32rem 0.7rem; border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--bg);
  color: var(--muted); font-size: 0.8rem; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  height: 32px;
}
.cmd-trigger:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  color: var(--ink); background: var(--surface);
}
html[data-theme="cyber"] .cmd-trigger { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); }
html[data-theme="cyber"] .cmd-trigger:hover { background: rgba(255,255,255,0.09); color: var(--theme-heading); }

.cmd-trigger-label { display: none; }
@media (min-width: 576px) { .cmd-trigger-label { display: inline; } }

.cmd-trigger-kbd {
  font-size: 0.62rem; font-family: var(--font-mono);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 3px; padding: 0.1rem 0.35rem; color: var(--muted);
  display: none; line-height: 1.6;
}
@media (min-width: 768px) { .cmd-trigger-kbd { display: inline; } }
html[data-theme="cyber"] .cmd-trigger-kbd {
  background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12);
}

/* ── Empty State (enhanced) ───────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.5rem; padding: 2rem 1rem; text-align: center;
}
.empty-state-icon {
  width: 44px; height: 44px; border-radius: var(--r-xl);
  background: var(--bg); border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--muted); margin-bottom: 0.25rem;
}
.empty-state-title {
  font-weight: 700; font-size: 0.9rem; color: var(--theme-heading);
}
.empty-state-sub {
  font-size: 0.8rem; color: var(--muted); max-width: 300px; line-height: 1.5;
}
html[data-theme="cyber"] .empty-state-icon { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }

