/* ============================================================
   WraithVision — Modern Refined
   ------------------------------------------------------------
   Aesthetic: deep midnight canvas, layered surfaces with inner
   highlights, soft violet/cyan accents, premium typography,
   subtle depth via elevation + glow rather than borders.
   ============================================================ */

:root {
  /* canvas — cool midnight, layered */
  --bg:        #0a0b10;
  --bg-1:      #0d0f17;
  --bg-2:      #11141e;
  --bg-3:      #161a26;
  --bg-4:      #1c2030;
  --bg-5:      #232838;

  /* hairlines + highlights */
  --border:        rgba(255,255,255,0.06);
  --border-2:      rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.14);
  --hl-inner:      inset 0 1px 0 rgba(255,255,255,0.04);
  --hl-inner-2:    inset 0 1px 0 rgba(255,255,255,0.07);

  /* text */
  --fg:        #f3f4f7;
  --fg-dim:    #b6bccd;
  --muted:     #7c8398;
  --muted-2:   #5e6478;

  /* signal */
  --accent:        #8b6dff;        /* refined violet */
  --accent-2:      #6b4dff;
  --accent-3:      #a78bff;
  --accent-soft:   rgba(139,109,255,0.14);
  --accent-line:   rgba(139,109,255,0.40);
  --accent-glow:   rgba(139,109,255,0.35);

  /* complement */
  --cyan:      #56d4ff;
  --cyan-soft: rgba(86,212,255,0.14);

  /* status */
  --ok:        #4ade80;
  --warn:      #fbbf24;
  --danger:    #f87171;
  --info:      #60a5fa;

  /* legacy aliases */
  --violet:    #a78bff;
  --blue:      #60a5fa;
  --emerald:   #4ade80;
  --amber:     #fbbf24;

  --radius:     10px;
  --radius-sm:  6px;
  --radius-lg:  14px;

  --shadow-sm:   0 1px 2px rgba(0,0,0,0.30);
  --shadow:      0 8px 24px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.25);
  --shadow-lg:   0 24px 60px rgba(0,0,0,0.55), 0 8px 24px rgba(0,0,0,0.35);
  --shadow-glow: 0 8px 32px var(--accent-glow);

  --topbar-h: 56px;
  --ease:     cubic-bezier(0.32, 0.72, 0, 1);

  --mono: "JetBrains Mono", "Berkeley Mono", "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --sans: "Geist", "Inter var", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[x-cloak] { display: none !important; }

html, body {
  margin: 0; height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "ss01", "ss02", "cv11";
  overscroll-behavior-y: none;
}

/* Ambient gradient mesh on the canvas */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 50% at 12% 0%,  rgba(139,109,255,0.10) 0%, transparent 60%),
    radial-gradient(50% 40% at 100% 0%, rgba(86,212,255,0.06)  0%, transparent 55%),
    radial-gradient(45% 40% at 85% 100%, rgba(139,109,255,0.05) 0%, transparent 60%);
}
body::after {
  /* subtle grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.35;
  mix-blend-mode: overlay;
}

::selection { background: var(--accent-soft); color: var(--fg); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-4); border: 2px solid transparent; background-clip: padding-box; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--bg-5); background-clip: padding-box; }

/* ---------- TYPE -------------------------------------------------- */
h1, h2, h3, h4 { margin: 0 0 12px 0; font-weight: 600; letter-spacing: -0.02em; color: var(--fg); }
h1 { font-size: 24px; }
h2 { font-size: 22px; }
h3 { font-size: 16px; }
h4 { font-size: 13px; }

p { margin: 0 0 8px 0; color: var(--fg-dim); }
.muted { color: var(--muted); font-size: 12px; }
.error { color: var(--danger); font-size: 13px; margin-top: 6px; }

code {
  background: var(--bg-3);
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-family: var(--mono);
  color: var(--accent-3);
  word-break: break-all;
}

hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ---------- BUTTONS ---------------------------------------------- */
button {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-2);
  background: var(--bg-3);
  color: var(--fg);
  cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .12s var(--ease), box-shadow .15s var(--ease);
  min-height: 36px;
  box-shadow: var(--hl-inner), var(--shadow-sm);
  letter-spacing: -0.005em;
}
button:hover { background: var(--bg-4); border-color: var(--border-strong); }
button:active { transform: translateY(1px); box-shadow: var(--hl-inner); }
button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

button.btn-primary {
  background: linear-gradient(180deg, var(--accent-3) 0%, var(--accent) 50%, var(--accent-2) 100%);
  border: 1px solid var(--accent-2);
  color: white;
  font-weight: 600;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 1px 0 rgba(0,0,0,0.20),
    0 6px 20px rgba(139,109,255,0.28);
  text-shadow: 0 1px 1px rgba(0,0,0,0.18);
}
button.btn-primary:hover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    0 1px 0 rgba(0,0,0,0.20),
    0 10px 28px rgba(139,109,255,0.45);
  filter: brightness(1.05);
}
button.btn-primary:active { filter: brightness(0.96); }

button.ghost {
  background: transparent;
  border-color: var(--border-2);
  color: var(--fg-dim);
  box-shadow: none;
}
button.ghost:hover { background: rgba(255,255,255,0.04); color: var(--fg); border-color: var(--border-strong); }
button.ghost.danger { color: var(--danger); border-color: rgba(248,113,113,0.30); }
button.ghost.danger:hover { background: rgba(248,113,113,0.10); border-color: var(--danger); color: var(--danger); }

/* ---------- INPUTS ----------------------------------------------- */
input, textarea, select {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--fg);
  width: 100%;
  transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
  min-height: 40px;
  box-shadow: var(--hl-inner);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-3);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--hl-inner);
}
input[type="checkbox"] {
  width: auto; min-height: 0;
  accent-color: var(--accent);
  transform: scale(1.1);
  margin-right: 6px;
  box-shadow: none;
}

label {
  display: block; margin: 12px 0;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
label input, label textarea, label select {
  margin-top: 6px;
  color: var(--fg);
  text-transform: none;
  letter-spacing: 0;
  font-weight: normal;
  font-size: 14px;
}

.search { max-width: 280px; }
.duration-picker { display: flex; gap: 8px; margin-top: 6px; }
.duration-picker input { flex: 1 1 0; min-width: 0; margin: 0; }
.duration-picker select { flex: 1 1 0; min-width: 0; margin: 0; }

/* caps grid */
.caps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
.cap-group {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; background: var(--bg-2);
  box-shadow: var(--hl-inner);
}
.cap-group legend { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; padding: 0 6px; font-weight: 600; }
.cap-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--fg); font-weight: normal; }
.cap-row code { font-size: 11px; }

/* user details */
.user-details { max-width: 820px; }
.user-details h4 { margin: 18px 0 10px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.user-meta {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  margin: 8px 0 14px;
  font-size: 13px;
}
.user-meta > span { display: inline-flex; align-items: baseline; gap: 6px; }
.user-meta .meta-label {
  color: var(--muted); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.06em; font-weight: 600;
}
.user-meta code { padding: 1px 6px; }
.hwid-list, .ent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hwid-list li {
  display: flex; flex-direction: column; gap: 10px;
  padding: 11px 13px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--hl-inner);
}
.hwid-list li > .row { flex-wrap: wrap; }
.hwid-list li code { flex: 1 1 220px; }
.hwid-components {
  margin-top: 4px; padding: 10px 12px;
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow-x: auto;
}
.hwid-components table { width: 100%; border-collapse: collapse; font-size: 12px; background: transparent; border: none; }
.hwid-components th { text-align: left; padding: 4px 8px; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--border); background: transparent; }
.hwid-components td { padding: 4px 8px; }
.hwid-components code { font-size: 11px; }
.ent-list li {
  display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap;
  padding: 11px 13px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--hl-inner);
}
.ent-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.ent-actions { display: flex; gap: 6px; flex-shrink: 0; }
.upload-label { display: inline-flex; align-items: center; padding: 9px 14px; cursor: pointer; min-height: 36px; }

/* ---------- PILLS ------------------------------------------------ */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  font-size: 11px; font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.06em;
  border: 1px solid var(--border-2);
  background: var(--bg-3);
  color: var(--fg-dim);
}
.pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}
.pill-ok      { color: var(--ok);     border-color: rgba(74,222,128,0.30);  background: rgba(74,222,128,0.08); }
.pill-warn    { color: var(--warn);   border-color: rgba(251,191,36,0.30);  background: rgba(251,191,36,0.08); }
.pill-muted   { color: var(--muted);  border-color: var(--border); }
.pill-violet  { color: var(--accent-3); border-color: var(--accent-line);   background: var(--accent-soft); }
.pill-green   { color: var(--ok);     border-color: rgba(74,222,128,0.30);  background: rgba(74,222,128,0.08); margin-left: 8px; vertical-align: middle; }

.pill-ok::before {
  animation: dot-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 0 0 currentColor;
}
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0.7); }
  50%      { box-shadow: 0 0 0 4px rgba(74,222,128,0); }
}

.row { display: flex; align-items: center; flex-wrap: wrap; }
.row.gap > * + * { margin-left: 8px; }
.row.end { justify-content: flex-end; }

/* ---------- TOPBAR / SIDEBAR ------------------------------------ */
.topbar {
  display: flex; position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h); padding: 0 18px;
  background: rgba(13,15,23,0.80); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  align-items: center; gap: 12px;
}
.topbar-spacer { flex: 1; }
.mobile-only { display: none; }
.topbar .brand { padding: 0; }
.menu-toggle {
  display: none; padding: 8px; min-width: 38px; min-height: 38px;
  background: transparent; border: 1px solid var(--border-2);
  box-shadow: none;
}
.menu-toggle svg { width: 18px; height: 18px; display: block; margin: auto; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(4px); z-index: 39; }

/* ---------- AUTH ------------------------------------------------- */
.auth {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 16px; position: relative; overflow: hidden;
}
.auth-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(50% 40% at 30% 20%, rgba(139,109,255,0.22), transparent 60%),
    radial-gradient(40% 35% at 80% 80%, rgba(86,212,255,0.14),  transparent 60%),
    radial-gradient(35% 30% at 70% 10%, rgba(167,139,255,0.12), transparent 60%);
  filter: blur(20px);
}
.auth::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right,  rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(60% 50% at 50% 50%, black 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(60% 50% at 50% 50%, black 0%, transparent 80%);
}
.auth .card {
  position: relative;
  width: 100%; max-width: 400px;
  padding: 36px;
}
.brand-big { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.brand-big h1 { margin: 0; font-size: 22px; letter-spacing: -0.025em; }
.auth .subtitle { color: var(--muted); margin: 0 0 28px 0; font-size: 13px; }
.auth button { width: 100%; padding: 12px; font-size: 14px; }

/* logo mark — premium gradient dot with violet→cyan, plus glow ring */
.logo-dot {
  width: 24px; height: 24px;
  border-radius: 7px;
  background:
    conic-gradient(from 220deg at 50% 50%, var(--accent-3), var(--cyan), var(--accent-2), var(--accent-3));
  position: relative;
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.30),
    0 0 0 1px rgba(255,255,255,0.06),
    0 4px 14px rgba(139,109,255,0.45);
}
.logo-dot::after {
  content: ""; position: absolute; inset: 4px; border-radius: 4px;
  background: var(--bg-1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.logo-dot::before {
  content: ""; position: absolute; inset: 0; border-radius: 7px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 50%);
  pointer-events: none;
}

/* glass — refined: subtle gradient, real inner highlight, proper blur */
.glass {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.005)),
    rgba(17,20,30,0.70);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 24px 60px rgba(0,0,0,0.55),
    0 8px 24px rgba(0,0,0,0.35);
}

/* ---------- LAYOUT ---------------------------------------------- */
.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; position: relative; z-index: 1; }
.sidebar {
  background: linear-gradient(180deg, rgba(13,15,23,0.85), rgba(10,11,16,0.85));
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex; flex-direction: column;
  position: relative;
}
.brand {
  font-weight: 700; font-size: 15px; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 11px;
  padding: 4px 8px 20px;
  color: var(--fg);
}
.sidebar nav { margin-top: 4px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
  color: var(--fg-dim);
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  display: flex; align-items: center; gap: 11px;
  transition: background .14s var(--ease), color .14s var(--ease);
  min-height: 38px;
  position: relative;
  border: 1px solid transparent;
}
.sidebar nav a svg { width: 16px; height: 16px; opacity: 0.6; flex-shrink: 0; transition: opacity .14s var(--ease), color .14s var(--ease); }
.sidebar nav a:hover { background: rgba(255,255,255,0.04); color: var(--fg); }
.sidebar nav a:hover svg { opacity: 0.9; }
.sidebar nav a.active {
  background:
    linear-gradient(180deg, rgba(139,109,255,0.18), rgba(139,109,255,0.08));
  color: #fff;
  border-color: rgba(139,109,255,0.30);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 6px 20px rgba(139,109,255,0.18);
}
.sidebar nav a.active svg { opacity: 1; color: var(--accent-3); }

.palette-trigger {
  margin-top: 12px; padding: 9px 11px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-transform: none;
  box-shadow: var(--hl-inner);
}
.palette-trigger:hover { border-color: var(--accent-line); color: var(--fg-dim); }
.palette-trigger kbd {
  background: var(--bg);
  border: 1px solid var(--border-2);
  padding: 1px 6px; border-radius: 4px;
  font-size: 10.5px; font-family: var(--mono);
  color: var(--muted);
  box-shadow: 0 1px 0 rgba(0,0,0,0.30);
}

.user {
  border-top: 1px solid var(--border);
  padding-top: 14px; margin-top: 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

.content { padding: 32px 36px; overflow: auto; min-width: 0; position: relative; z-index: 1; }
.content-wrap { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px; gap: 16px; flex-wrap: wrap;
}
.page-head h2 { margin-bottom: 4px; }
.page-head p { margin: 0; }

.tab-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin: 4px 0 18px;
}
.tab-head h3 { margin: 0 0 2px; font-size: 18px; }
.tab-head p { margin: 0; font-size: 13px; }
.tab-head .tab-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.tab-head .tab-head-actions .search { width: 220px; max-width: 220px; flex: 0 0 auto; }
.tab-head .tab-head-actions select.search { width: 170px; max-width: 170px; }
.tab-head .tab-head-actions .btn-primary,
.tab-head .tab-head-actions .upload-label,
.tab-head .tab-head-actions > button { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 720px) {
  .tab-head { align-items: stretch; }
  .tab-head .tab-head-actions { width: 100%; flex-wrap: wrap; }
  .tab-head .tab-head-actions .search,
  .tab-head .tab-head-actions select.search { width: 100%; max-width: 100%; flex: 1 1 100%; }
  .tab-head .tab-head-actions .btn-primary,
  .tab-head .tab-head-actions .upload-label { flex: 1; }
}

/* ---------- CARDS ------------------------------------------------ */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)) , var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--hl-inner), var(--shadow-sm);
  position: relative;
}
.card.narrow { max-width: 620px; }

.settings-tab { display: flex; flex-direction: column; gap: 8px; }
.settings-tab > h3 { margin: 0 0 4px; }
.settings-section {
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
  padding-top: 18px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.settings-section:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.settings-section-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.settings-section-head h4 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted, #9aa0aa); }
.settings-section-head p.muted { margin: 0; font-size: 12px; }
.settings-actions { margin-top: 6px; }
.muted.small { font-size: 12px; }

/* ====== Discord tab (compact) ====== */
.discord-tab { display: flex; flex-direction: column; gap: 10px; }

.discord-hero {
  display: flex; flex-direction: column; gap: 0;
  border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(88,101,242,0.30);
  background: linear-gradient(135deg, rgba(88,101,242,0.16), rgba(88,101,242,0.03));
}
.discord-hero-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px;
}
.discord-hero-main { display: flex; align-items: center; gap: 11px; }
.discord-hero-main h3 { margin: 0; font-size: 15px; }
.discord-hero-main p { margin: 1px 0 0; max-width: 52ch; }
.discord-glyph {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #5865f2; color: #fff; box-shadow: 0 4px 14px rgba(88,101,242,0.45);
}
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; cursor: pointer; }
.hero-switch { font-weight: 600; color: var(--muted, #9aa0aa); }
.hero-switch.on { color: #c7ccf7; }
.hero-switch input { position: absolute; opacity: 0; width: 0; height: 0; }

/* live status strip */
.discord-status-strip {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 10px 16px;
  background: rgba(0,0,0,0.18);
  border-top: 1px solid rgba(88,101,242,0.20);
}
.discord-status-strip .stat { display: flex; flex-direction: column; gap: 1px; }
.stat-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #9aa0aa); }
.stat-value { font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.stat-value .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.stat-value.ok { color: #3ba55d; }
.stat-value.err { color: #ed4245; }
.stat-value.muted { color: #99aab5; }
.stat-value.checking { color: #faa61a; }
.stat-refresh { margin-left: auto; }

/* setup progress */
.discord-setup {
  display: flex; flex-direction: column; gap: 9px;
  padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  background: rgba(255,255,255,0.02);
}
.discord-setup.complete { border-color: rgba(59,165,93,0.4); background: rgba(59,165,93,0.06); }
.setup-bar-head { display: flex; align-items: center; gap: 12px; }
.setup-track {
  flex: 1; height: 6px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,0.10);
}
.setup-fill {
  height: 100%; border-radius: 999px; transition: width .3s var(--ease, ease);
  background: linear-gradient(90deg, #5865f2, #7983f5);
}
.discord-setup.complete .setup-fill { background: linear-gradient(90deg, #3ba55d, #57f287); }
.setup-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.setup-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border, rgba(255,255,255,0.10));
  color: var(--muted, #9aa0aa); background: rgba(255,255,255,0.02);
}
.setup-chip.done { color: #c8e6d0; border-color: rgba(59,165,93,0.4); background: rgba(59,165,93,0.10); }
.setup-tick { font-weight: 800; }
.setup-chip.done .setup-tick { color: #3ba55d; }

/* ====== Discord two-pane layout ====== */
.dc2 { display: flex; gap: 16px; align-items: flex-start; }
.dc2-nav {
  flex: 0 0 210px; position: sticky; top: 12px;
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px; border-radius: 14px;
  border: 1px solid var(--border, rgba(255,255,255,0.08)); background: rgba(255,255,255,0.02);
}
.dc2-identity { display: flex; align-items: center; gap: 10px; padding: 2px 4px 10px; border-bottom: 1px solid var(--border, rgba(255,255,255,0.06)); margin-bottom: 4px; }
.dc2-id-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dc2-botname { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc2-menu { display: flex; flex-direction: column; gap: 2px; }
.dc2-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  padding: 9px 11px; border-radius: 9px; border: 0; background: transparent;
  color: var(--muted, #9aa0aa); font-size: 13.5px; position: relative;
  transition: background .12s, color .12s;
}
.dc2-item:hover { background: rgba(255,255,255,0.04); color: var(--text, #e7e9ee); }
.dc2-item.active { background: rgba(88,101,242,0.16); color: #fff; }
.dc2-item.active::before {
  content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px;
  border-radius: 0 3px 3px 0; background: #5865f2;
}
.dc2-item-ic { width: 18px; text-align: center; font-size: 14px; }
.dc2-item-label { flex: 1; }
.dc2-item .count-badge { min-width: 20px; height: 20px; font-size: 11px; }
.dc2-nav-foot { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--border, rgba(255,255,255,0.06)); }

.dc2-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.dc2-content .dc-pane { gap: 12px; }
.dc2-content .discord-savebar { position: static; margin-top: 4px; }

@media (max-width: 720px) {
  .dc2 { flex-direction: column; }
  .dc2-nav { position: static; flex: none; width: 100%; }
  .dc2-menu { flex-direction: row; overflow-x: auto; gap: 4px; }
  .dc2-item { flex-direction: column; gap: 3px; padding: 8px 10px; white-space: nowrap; }
  .dc2-item.active::before { display: none; }
  .dc2-item-label { font-size: 11px; }
  .dc2-nav-foot { border-top: 0; padding-top: 0; }
}

/* ====== Discord "Mission Control" (legacy, unused) ====== */
/* Command bar */
.dc-command {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: 14px;
  border: 1px solid rgba(88,101,242,0.30);
  background: linear-gradient(135deg, rgba(88,101,242,0.16), rgba(88,101,242,0.03));
}
.dc-command.live { border-color: rgba(59,165,93,0.35); }
.dc-identity { display: flex; align-items: center; gap: 11px; }
.dc-avatar {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px;
  display: grid; place-items: center; color: #fff; background: #5865f2;
  box-shadow: 0 4px 14px rgba(88,101,242,0.45);
}
.dc-id-text { display: flex; flex-direction: column; gap: 2px; }
.dc-botname { font-weight: 700; font-size: 14px; }
.dc-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.dc-status .pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dc-status.ok { color: #3ba55d; }
.dc-status.ok .pulse { animation: dc-pulse 1.8s infinite; }
.dc-status.err { color: #ed4245; }
.dc-status.muted { color: #99aab5; }
.dc-status.checking { color: #faa61a; }
@keyframes dc-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(59,165,93,0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(59,165,93,0); }
  100% { box-shadow: 0 0 0 0 rgba(59,165,93,0); }
}
.dc-command-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* connection pipeline */
.dc-pipeline { display: flex; align-items: center; justify-content: center; gap: 4px; flex: 1; min-width: 240px; }
.pl-node { display: flex; flex-direction: column; align-items: center; gap: 4px; opacity: .45; transition: opacity .25s; }
.pl-node.on { opacity: 1; }
.pl-ic {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 16px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border, rgba(255,255,255,0.10));
}
.pl-node.on .pl-ic { background: rgba(88,101,242,0.18); border-color: rgba(88,101,242,0.5); }
.pl-label { font-size: 11px; color: var(--muted, #9aa0aa); max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-link { width: 40px; height: 2px; margin-bottom: 18px; background: rgba(255,255,255,0.12); border-radius: 2px; transition: background .25s; }
.pl-link.on { background: linear-gradient(90deg, #5865f2, #7983f5); box-shadow: 0 0 8px rgba(88,101,242,0.5); }

/* segmented nav */
.dc-seg {
  display: flex; gap: 4px; padding: 4px; border-radius: 12px; overflow-x: auto;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border, rgba(255,255,255,0.08));
}
.seg-btn {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; cursor: pointer;
  padding: 7px 13px; border-radius: 9px; border: 0; background: transparent;
  color: var(--muted, #9aa0aa); font-size: 13px; transition: background .12s, color .12s;
}
.seg-btn:hover { color: var(--text, #e7e9ee); }
.seg-btn.active { background: #5865f2; color: #fff; box-shadow: 0 2px 8px rgba(88,101,242,0.4); }
.seg-ic { font-size: 13px; }
.seg-badge { background: rgba(255,255,255,0.22); border-radius: 999px; padding: 0 6px; font-size: 11px; font-weight: 700; }

.dc-pane { display: flex; flex-direction: column; gap: 12px; }

/* overview */
.ov-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.ov-stat {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border, rgba(255,255,255,0.08)); background: rgba(255,255,255,0.02);
}
.ov-stat-label { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted, #9aa0aa); }
.ov-stat-value { font-size: 18px; font-weight: 700; }
.ov-setup {
  display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--border, rgba(255,255,255,0.08)); background: rgba(255,255,255,0.02);
}
.ov-setup.complete { border-color: rgba(59,165,93,0.4); background: rgba(59,165,93,0.06); }
.ov-setup-body { display: flex; flex-direction: column; gap: 9px; }
.ring {
  position: relative; width: 58px; height: 58px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(#5865f2 calc(var(--pct) * 1%), rgba(255,255,255,0.10) 0);
}
.ov-setup.complete .ring { background: conic-gradient(#3ba55d calc(var(--pct) * 1%), rgba(255,255,255,0.10) 0); }
.ring::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--panel, #14161e); }
.ring-num { position: relative; z-index: 1; font-size: 13px; font-weight: 700; }

/* commands showcase */
.card-ic.ic-cmd { background: rgba(199,204,247,0.12); border-color: rgba(199,204,247,0.3); }
.cmd-list { display: flex; flex-direction: column; border: 1px solid var(--border, rgba(255,255,255,0.08)); border-radius: 10px; overflow: hidden; }
.cmd-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-top: 1px solid var(--border, rgba(255,255,255,0.06)); }
.cmd-row:first-child { border-top: 0; }
.cmd-sig { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: rgba(255,255,255,0.05); padding: 3px 8px; border-radius: 6px; }
.cmd-name { color: #c7ccf7; font-weight: 700; }
.cmd-args { color: var(--muted, #9aa0aa); }
.cmd-desc { flex: 1; min-width: 150px; }
.cmd-perm { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.cmd-perm.open  { background: rgba(59,165,93,0.14);  color: #3ba55d; border: 1px solid rgba(59,165,93,0.3); }
.cmd-perm.gated { background: rgba(250,166,26,0.14); color: #faa61a; border: 1px solid rgba(250,166,26,0.3); }

.discord-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}
.discord-card { display: flex; flex-direction: column; gap: 9px; padding: 12px 14px; }
.discord-card-wide { grid-column: 1 / -1; }
.discord-card-head { display: flex; align-items: center; gap: 10px; }
.discord-card-head h4 { margin: 0; font-size: 13px; }
.discord-card-head p { margin: 1px 0 0; }
.card-ic {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border, rgba(255,255,255,0.08));
}
.card-ic.ic-conn   { background: rgba(88,101,242,0.16);  border-color: rgba(88,101,242,0.35); }
.card-ic.ic-roles  { background: rgba(59,165,93,0.15);   border-color: rgba(59,165,93,0.35); }
.card-ic.ic-notify { background: rgba(250,166,26,0.15);  border-color: rgba(250,166,26,0.35); }
.card-ic.ic-admins { background: rgba(237,66,69,0.14);   border-color: rgba(237,66,69,0.32); }
.card-ic.ic-verify { background: rgba(59,165,93,0.15);   border-color: rgba(59,165,93,0.35); }
.discord-card label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.discord-card input, .discord-card select { padding: 7px 10px; font-size: 13px; }

.discord-test-row { align-items: center; flex-wrap: wrap; gap: 8px; }
.discord-test.ok  { color: #3ba55d; }
.discord-test.err { color: #ed4245; }

.discord-rolemap { display: flex; flex-direction: column; gap: 6px; }
.discord-rolemap > .field-label { margin-bottom: 2px; }
.rolemap-rows {
  display: flex; flex-direction: column;
  border: 1px solid var(--border, rgba(255,255,255,0.08)); border-radius: 10px; overflow: hidden;
}
.rolemap-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0;
  padding: 7px 10px; border-top: 1px solid var(--border, rgba(255,255,255,0.06));
}
.rolemap-row:first-child { border-top: 0; }
.rolemap-row .rolemap-name { flex: 1; font-size: 12.5px; font-weight: 500; }
.rolemap-row input { max-width: 170px; padding: 6px 9px; font-size: 12px; }

/* chips for notify events + permissions */
.discord-notify-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.notify-chip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 6px 12px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--border, rgba(255,255,255,0.10));
  background: rgba(255,255,255,0.02); transition: background .12s, border-color .12s;
}
.notify-chip.small { padding: 4px 10px; font-size: 12px; }
.notify-chip:hover { border-color: rgba(88,101,242,0.5); }
.notify-chip.on { background: rgba(88,101,242,0.18); border-color: rgba(88,101,242,0.6); color: #c7ccf7; }
.notify-chip input { accent-color: #5865f2; }

/* ---- Notifications card ---- */
.notify-card { gap: 10px; }
.notify-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notify-toolbar-actions { display: flex; gap: 6px; }
.notify-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--border, rgba(255,255,255,0.08)); border-radius: 12px; overflow: hidden;
}
.notify-row {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 7px 12px; border-top: 1px solid var(--border, rgba(255,255,255,0.06));
  transition: background .12s;
}
.notify-row:first-child { border-top: 0; }
.notify-row:hover { background: rgba(255,255,255,0.03); }
.notify-row.on { background: rgba(88,101,242,0.07); }
.notify-ic {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 7px; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border, rgba(255,255,255,0.07));
}
.notify-row.on .notify-ic { background: rgba(88,101,242,0.18); border-color: rgba(88,101,242,0.4); }
.notify-name { font-size: 13px; flex: 1; min-width: 0; }

/* iOS-style switch (compact) */
.switch-track {
  flex-shrink: 0; width: 34px; height: 19px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,0.14); position: relative; transition: background .15s;
}
.switch-track.on { background: #5865f2; }
.switch-knob {
  position: absolute; top: 2.5px; left: 2.5px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.switch-track.on .switch-knob { transform: translateX(15px); }

.btn-primary.small, .ghost.small, .btn.small { font-size: 12px; padding: 4px 11px; }
.member-name { font-weight: 600; }

/* ---- Bot admins card ---- */
.admins-card { gap: 12px; }
.field-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted, #9aa0aa);
}
.count-badge {
  flex-shrink: 0; min-width: 22px; height: 22px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(88,101,242,0.18); color: #c7ccf7; border: 1px solid rgba(88,101,242,0.4);
}

.admins-add { display: flex; flex-direction: column; gap: 8px; }
.search-wrap { position: relative; }
.search-box {
  display: flex; align-items: center; gap: 8px; padding: 0 12px;
  border: 1px solid var(--border, rgba(255,255,255,0.10)); border-radius: 10px;
  background: rgba(255,255,255,0.03); transition: border-color .12s;
}
.search-box:focus-within { border-color: rgba(88,101,242,0.6); }
.search-box .search-ic { opacity: .6; font-size: 14px; }
.search-box input { flex: 1; border: 0; background: transparent; padding: 11px 0; outline: none; }
.search-clear {
  background: transparent; border: 0; cursor: pointer; color: var(--muted, #9aa0aa);
  font-size: 13px; padding: 2px 4px; line-height: 1;
}
.search-clear:hover { color: var(--text, #e7e9ee); }
.spinner {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.2); border-top-color: #5865f2;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* search results as a floating popover so they read as a picker, not a list */
.member-results { list-style: none; margin: 0; padding: 0; }
.member-results.popover {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  border: 1px solid var(--border, rgba(255,255,255,0.12)); border-radius: 12px;
  background: var(--panel, #14161e); box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  max-height: 300px; overflow-y: auto;
}
.member-results li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; }
.member-results li:hover { background: rgba(255,255,255,0.05); }
.member-results img { border-radius: 50%; flex-shrink: 0; }
.member-id { display: flex; flex-direction: column; line-height: 1.2; }
.member-results .already, .member-results button { margin-left: auto; }
.search-hint { padding: 2px; }

.avatar-fallback {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, #5865f2, #7983f5);
}
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }

/* current admins */
.admins-current { display: flex; flex-direction: column; gap: 10px; }
.admins-subhead { display: flex; align-items: center; gap: 8px; }
.admins-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--border, rgba(255,255,255,0.08)); border-radius: 12px; overflow: hidden;
}
.admin-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 11px 14px; background: transparent; border: 0; cursor: pointer;
  border-top: 1px solid var(--border, rgba(255,255,255,0.06));
  transition: background .12s;
}
.admin-row:first-child { border-top: 0; }
.admin-row:hover { background: rgba(88,101,242,0.08); }
.admin-row .member-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-avatar { border-radius: 50%; flex-shrink: 0; object-fit: cover; width: 36px; height: 36px; }
.admin-avatar.lg { width: 46px; height: 46px; }
.admin-row-go { flex-shrink: 0; color: var(--muted, #9aa0aa); font-size: 20px; line-height: 1; opacity: .5; }
.admin-row:hover .admin-row-go { opacity: 1; color: #c7ccf7; }

.icon-btn {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border, rgba(255,255,255,0.12));
  color: var(--muted, #9aa0aa); transition: background .12s, color .12s, border-color .12s;
}
.icon-btn.danger:hover { background: rgba(237,66,69,0.15); color: #ed4245; border-color: rgba(237,66,69,0.5); }

.admins-empty {
  text-align: center; padding: 26px 12px; border: 1px dashed var(--border, rgba(255,255,255,0.12));
  border-radius: 12px;
}
.admins-empty .empty-ic { font-size: 28px; display: block; margin-bottom: 6px; opacity: .6; }
.admins-empty p { margin: 0; }

/* admin details modal */
.admin-modal { width: min(480px, 94vw); display: flex; flex-direction: column; gap: 14px; }
.admin-modal-head { display: flex; align-items: center; gap: 12px; }
.admin-modal-head h3 { margin: 0; font-size: 16px; }
.avatar-fallback.lg { width: 46px; height: 46px; font-size: 20px; }
.perm-editor { display: flex; flex-direction: column; gap: 10px; }
.perm-card {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border, rgba(255,255,255,0.10));
  background: rgba(255,255,255,0.02); transition: background .12s, border-color .12s;
}
.perm-card:hover { border-color: rgba(88,101,242,0.5); }
.perm-card.on { background: rgba(88,101,242,0.14); border-color: rgba(88,101,242,0.55); }
.perm-card input { width: 18px; height: 18px; accent-color: #5865f2; flex-shrink: 0; }
.perm-card-body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.perm-card-title { font-weight: 600; font-size: 14px; }
.perm-card-desc { line-height: 1.35; }
.perm-card-state {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted, #9aa0aa);
}
.perm-card.on .perm-card-state { color: #c7ccf7; }
.admin-modal-foot { margin-top: 2px; }
.row.between { justify-content: space-between; }

@media (max-width: 640px) {
  .admin-perm-summary { margin-left: 0; width: 100%; }
  .admin-id { min-width: 0; }
}

.discord-savebar {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 8px 12px; border-radius: 10px;
  background: var(--panel, rgba(20,22,30,0.92)); backdrop-filter: blur(8px);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
}

/* tighter buttons across the whole Discord tab */
.discord-tab .btn-primary, .discord-tab .ghost { padding: 7px 13px; font-size: 13px; }
.discord-tab .btn-primary.small, .discord-tab .ghost.small { padding: 4px 10px; font-size: 12px; }

@media (max-width: 640px) {
  .discord-hero { flex-direction: column; align-items: flex-start; }
  .discord-hero-status { width: 100%; justify-content: space-between; }
  .admin-list li { flex-wrap: wrap; }
  .admin-list .admin-perms { margin-left: 0; width: 100%; }
}

.pending-badge {
  margin-left: 6px;
  font-size: 10px; padding: 1px 6px;
  vertical-align: middle;
}

.reset-status {
  background: var(--surface-2, rgba(255,255,255,0.03));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius, 10px);
  padding: 10px 12px; margin-bottom: 12px;
}
.reset-history { list-style: none; padding: 6px 0 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 4px; }
.reset-history li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; }

.hwid-note { padding: 4px 0 0 26px; }
.hwid-note input {
  width: 100%; background: transparent;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 6px; padding: 4px 8px;
  color: var(--muted, #9aa0aa); font-size: 12px;
}
.hwid-note input:focus { color: var(--fg); border-color: var(--accent); outline: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.product-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.app-card {
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.app-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-line);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 28px rgba(0,0,0,0.40),
    0 0 0 1px var(--accent-line);
}
.app-card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px; margin-bottom: 4px;
}
.app-card h3 { margin: 0 0 4px; letter-spacing: -0.015em; }
.app-card code { display: block; margin-top: 14px; font-size: 11px; color: var(--muted); border-color: transparent; background: transparent; padding: 0; }
.app-card-glow {
  position: absolute; inset: -1px; border-radius: var(--radius); pointer-events: none;
  opacity: 0; transition: opacity .3s var(--ease);
  background: radial-gradient(80% 60% at 50% 0%, rgba(139,109,255,0.22), transparent 70%);
  z-index: 0;
}
.app-card:hover .app-card-glow { opacity: 1; }
.app-card > * { position: relative; z-index: 1; }

.product-card { display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.product-card.archived { opacity: 0.55; }
.product-card.paused { border-color: rgba(251,191,36,0.35); }
.product-card.paused::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(251,191,36,0.05) 14px 28px);
  pointer-events: none; z-index: 0;
}
.product-card > * { position: relative; z-index: 1; }

.status-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status-row .status-select { flex: 0 1 160px; min-height: 32px; padding: 5px 9px; font-size: 12px; }
.status-row .status-msg-btn { flex: 1 1 120px; min-height: 32px; padding: 5px 10px; font-size: 12px; text-align: left; font-weight: 500; }

.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  border: 1px solid var(--border-2);
  background: var(--bg-3);
}
.status-pill .status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  animation: status-pulse 2s ease-in-out infinite;
}
@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; }
  50%      { box-shadow: 0 0 0 4px transparent; }
}
.status-undetected  { color: var(--ok);     border-color: rgba(74,222,128,0.32);  background: rgba(74,222,128,0.08); }
.status-updating    { color: var(--info);   border-color: rgba(96,165,250,0.32);  background: rgba(96,165,250,0.08); }
.status-detected    { color: var(--danger); border-color: rgba(248,113,113,0.40); background: rgba(248,113,113,0.10); }
.status-maintenance { color: var(--muted);  border-color: var(--border); }
.status-maintenance .status-dot { animation: none; }

.product-card h3 { margin: 0 0 2px; }
.product-stats { font-size: 13px; color: var(--muted); flex-wrap: wrap; gap: 14px; }
.product-stats strong { color: var(--fg); font-weight: 600; }

/* ---------- KPIs ------------------------------------------------- */
.grid.stats { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.kpi {
  position: relative; overflow: hidden;
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)), var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--hl-inner), var(--shadow-sm);
}
.kpi h4 {
  color: var(--muted); font-weight: 600;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em;
  margin: 0 0 8px;
}
.kpi p {
  font-size: 30px; font-weight: 700;
  margin: 0; letter-spacing: -0.03em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.kpi-icon {
  position: absolute; top: 14px; right: 16px;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
  border-radius: 8px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--fg-dim);
  opacity: 0.9;
}
.kpi-bar { margin-top: 14px; height: 4px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.kpi-bar > div {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  transition: width .6s var(--ease);
}

.kpi-violet  { background: linear-gradient(160deg, rgba(167,139,255,0.10), var(--bg-2) 60%); border-color: rgba(167,139,255,0.20); }
.kpi-blue    { background: linear-gradient(160deg, rgba(96,165,250,0.10),  var(--bg-2) 60%); border-color: rgba(96,165,250,0.20); }
.kpi-emerald { background: linear-gradient(160deg, rgba(74,222,128,0.10),  var(--bg-2) 60%); border-color: rgba(74,222,128,0.20); }
.kpi-amber   { background: linear-gradient(160deg, rgba(251,191,36,0.10),  var(--bg-2) 60%); border-color: rgba(251,191,36,0.20); }
.kpi-pink    { background: linear-gradient(160deg, rgba(236,72,153,0.10),  var(--bg-2) 60%); border-color: rgba(236,72,153,0.20); }

.kpi-violet  .kpi-icon { color: var(--accent-3); background: rgba(167,139,255,0.10); border-color: rgba(167,139,255,0.25); }
.kpi-blue    .kpi-icon { color: var(--info);     background: rgba(96,165,250,0.10);  border-color: rgba(96,165,250,0.25); }
.kpi-emerald .kpi-icon { color: var(--ok);       background: rgba(74,222,128,0.10);  border-color: rgba(74,222,128,0.25); }
.kpi-amber   .kpi-icon { color: var(--warn);     background: rgba(251,191,36,0.10);  border-color: rgba(251,191,36,0.25); }
.kpi-pink    .kpi-icon { color: #ec4899;         background: rgba(236,72,153,0.10);  border-color: rgba(236,72,153,0.25); }

/* ---------- EMPTY STATE ----------------------------------------- */
.empty {
  padding: 64px 24px; text-align: center;
  grid-column: 1 / -1;
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(139,109,255,0.06), transparent 70%);
}
.empty-inline { padding: 40px 20px; margin-bottom: 16px; }
.empty-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(139,109,255,0.12), rgba(139,109,255,0.04));
  border: 1px solid var(--accent-line);
  color: var(--accent-3);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 20px rgba(139,109,255,0.15);
}
.empty h3 { margin: 0 0 6px; }

/* ---------- TABS ------------------------------------------------- */
.tabs-wrap {
  position: relative;
  margin: 6px 0 24px 0;
}
.tabs-wrap::before,
.tabs-wrap::after {
  content: "";
  position: absolute; top: 0; bottom: 0; width: 28px;
  pointer-events: none; z-index: 1;
  opacity: 0; transition: opacity .2s var(--ease, ease);
}
.tabs-wrap::before { left: 0;  background: linear-gradient(to right, var(--bg, #0b0b10), transparent); }
.tabs-wrap::after  { right: 0; background: linear-gradient(to left,  var(--bg, #0b0b10), transparent); }
.tabs-wrap::before, .tabs-wrap::after { display: none; }

.tabs {
  display: flex; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  gap: 2px;
  overflow: visible;
}
.tabs a {
  padding: 10px 14px;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: color .14s var(--ease), border-color .14s var(--ease);
  min-height: 40px;
  display: inline-flex; align-items: center;
  position: relative;
  top: 1px;
}
.tabs a:hover { color: var(--fg); }
.tabs a.active {
  color: var(--fg);
  border-bottom-color: var(--accent);
}
.tabs a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  filter: blur(3px); opacity: 0.7;
}

/* ---------- TABLES ----------------------------------------------- */
.table-wrap {
  width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-2);
  box-shadow: var(--hl-inner);
}
.table-wrap table { border: none; border-radius: 0; box-shadow: none; }

/* BAN APPEALS */
.appeal-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.appeal-card { padding: 16px 18px; }
.appeal-message {
  margin: 8px 0; padding: 10px 12px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 6px;
  font-family: inherit; font-size: 13px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
  max-height: 280px; overflow: auto;
}

/* CHANGELOG */
.changelog-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.changelog-row { padding: 18px 20px; }
.changelog-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.changelog-head strong { font-size: 15px; }
.changelog-body {
  margin: 0 0 12px; padding: 12px 14px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 13px; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word;
  color: var(--fg);
}
table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 13px;
}
th, td {
  text-align: left; padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle; white-space: nowrap;
}
th {
  background: rgba(255,255,255,0.02);
  font-weight: 600; color: var(--muted);
  text-transform: uppercase;
  font-size: 10.5px; letter-spacing: 0.08em;
}
tr { transition: background .1s var(--ease); }
tbody tr:hover { background: rgba(139,109,255,0.04); }
tr:last-child td { border-bottom: none; }

/* ---------- MODAL ------------------------------------------------ */
.modal {
  position: fixed; inset: 0;
  background: rgba(5,7,12,0.65);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 50; padding: 16px;
  animation: fade-in .18s var(--ease);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: 100%; max-width: 520px; max-height: 90vh; overflow: auto;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)) , var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--hl-inner-2), var(--shadow-lg);
  animation: scale-in .22s var(--ease);
}
@keyframes scale-in { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-card h3 {
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

/* ---------- TOASTS ----------------------------------------------- */
.toasts {
  position: fixed; top: 20px; right: 20px; z-index: 100;
  display: flex; flex-direction: column; gap: 10px; max-width: 380px;
}
.toast {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(22,26,38,0.85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-2);
  font-size: 13px;
  box-shadow: var(--hl-inner), var(--shadow);
  animation: slideIn .22s var(--ease);
}
@keyframes slideIn {
  from { transform: translateX(16px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.toast-icon {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
  font-size: 12px;
}
.toast-ok .toast-icon  { background: rgba(74,222,128,0.16);  color: var(--ok); }
.toast-err .toast-icon { background: rgba(248,113,113,0.16); color: var(--danger); }
.toast-info .toast-icon { background: rgba(96,165,250,0.16); color: var(--info); }
.toast-ok  { border-left: 2px solid var(--ok); }
.toast-err { border-left: 2px solid var(--danger); }
.toast-info { border-left: 2px solid var(--info); }

/* ---------- COMMAND PALETTE ------------------------------------- */
.palette {
  position: fixed; inset: 0;
  background: rgba(5,7,12,0.65);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 14vh 16px 16px;
  animation: fade-in .15s var(--ease);
}
.palette-card {
  width: 100%; max-width: 620px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)) , var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--hl-inner-2), var(--shadow-lg);
  overflow: hidden;
  animation: scale-in .2s var(--ease);
}
.palette-card input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 18px 22px;
  font-size: 15px;
  box-shadow: none;
}
.palette-card input::placeholder { color: var(--muted-2); }
.palette-card input:focus { box-shadow: none; border-bottom-color: var(--accent); background: transparent; }
.palette-card ul {
  list-style: none; margin: 0; padding: 8px;
  max-height: 380px; overflow: auto;
}
.palette-card li {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; gap: 11px;
  min-height: 40px;
  font-size: 13.5px;
}
.palette-card li.active {
  background: linear-gradient(180deg, rgba(139,109,255,0.18), rgba(139,109,255,0.08));
  color: #fff;
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.palette-kind {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  flex-shrink: 0; min-width: 60px; text-align: center;
  font-weight: 600;
}
.palette-hint {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  display: flex; gap: 14px; flex-wrap: wrap;
}
.palette-hint kbd {
  background: var(--bg);
  border: 1px solid var(--border-2);
  padding: 1px 6px; border-radius: 4px;
  font-family: var(--mono); font-size: 10.5px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.30);
}

/* ---------- MOBILE ---------------------------------------------- */
@media (max-width: 900px) {
  .content { padding: 22px 18px; }
  .grid.stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  .mobile-only { display: inline-flex; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .palette-trigger kbd { display: none; }

  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 80%; max-width: 320px; z-index: 40;
    transform: translateX(-100%);
    transition: transform .25s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open { display: block; }

  .content { padding: 18px 14px 32px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 20px; }
  .page-head .row.gap { flex-wrap: wrap; gap: 10px; }
  .page-head .btn-primary { width: 100%; }

  .table-wrap { width: calc(100% + 4px); margin: 0 -2px; }
  table { min-width: 560px; }
  th, td { padding: 10px 12px; }

  .grid { grid-template-columns: 1fr; gap: 12px; }
  .product-grid { grid-template-columns: 1fr; }
  .grid.stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { padding: 16px; }
  .kpi p { font-size: 24px; }

  .search { max-width: 100%; }
  header.row.gap.end { justify-content: stretch; }
  header.row.gap.end > * { flex: 1 1 auto; }
  header.row.gap.end > .btn-primary { flex: 1 1 100%; }

  .modal { padding: 0; align-items: flex-end; }
  .modal-card { max-width: 100%; max-height: 95vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 18px; }

  .toasts { top: auto; right: 12px; left: 12px; bottom: 12px; max-width: none; }

  .palette { padding: 6vh 10px 10px; }
  .palette-card input { padding: 14px 16px; font-size: 14px; }

  .tabs-wrap { margin: 0 -14px 18px; }
  .tabs { padding: 0 14px; }
  .tabs-wrap::before,
  .tabs-wrap::after { width: 20px; }
  .tabs a { padding: 12px 14px; font-size: 13px; }

  .card.narrow { max-width: 100%; }
  .card { padding: 18px; }

  .auth .card { padding: 28px 22px; }
}

@media (max-width: 380px) {
  .grid.stats { grid-template-columns: 1fr; }
}

/* ---------- SYSTEM SECRETS -------------------------------------- */
.system-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}
.secret-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.secret-head { display: flex; align-items: center; justify-content: space-between; }
.secret-head strong { font-size: 15px; }
.secret-card p { margin: 0; font-size: 13px; }
.secret-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; background: var(--bg-3); border-radius: 8px;
  font-size: 13px;
}
.secret-preview { font-family: ui-monospace, monospace; flex: 1; }

/* ---------- THREAT RADAR ---------------------------------------- */
.nav-pill {
  margin-left: auto; padding: 1px 7px; font-size: 11px; font-weight: 700;
  background: #ef4444; color: #fff; border-radius: 999px; line-height: 1.5;
}
.threat-summary {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 14px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px;
  font-size: 13px;
}
.threat-summary i.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle;
}
.threat-summary i.sev-high { background: #ef4444; }
.threat-summary i.sev-medium { background: #f59e0b; }
.threat-summary i.sev-low { background: #56d4ff; }
.threat-summary strong { font-weight: 600; margin-left: 2px; }
.threat-summary-total { margin-left: auto; font-size: 12px; }

.threat-grid { display: block; }
.threat-feed { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.threat-filters { gap: 6px !important; flex-wrap: wrap; }
.chip {
  padding: 4px 12px; font-size: 12px; border-radius: 999px;
  background: transparent; border: 1px solid var(--border);
  color: var(--muted); cursor: pointer;
}
.chip:hover { color: var(--fg); border-color: var(--border-2); }
.chip.active { background: var(--accent, #8b6dff); color: #fff; border-color: transparent; }

.threat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.threat-item {
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: rgba(255,255,255,0.02); border-left-width: 3px;
}
.threat-item.sev-high   { border-left-color: #ef4444; }
.threat-item.sev-medium { border-left-color: #f59e0b; }
.threat-item.sev-low    { border-left-color: #56d4ff; }
.threat-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 11px; }
.threat-kind { text-transform: uppercase; letter-spacing: 0.05em; }
.threat-time { margin-left: auto; }
.threat-title { font-weight: 600; margin-bottom: 4px; }
.threat-detail { font-size: 13px; line-height: 1.4; }
.threat-bar { margin-top: 10px; height: 4px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.threat-bar > div { height: 100%; background: linear-gradient(90deg, #56d4ff, #8b6dff); transition: width .4s; }
.threat-item.sev-high   .threat-bar > div { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.threat-item.sev-medium .threat-bar > div { background: linear-gradient(90deg, #56d4ff, #f59e0b); }
.pill.sev-pill-high   { background: rgba(239,68,68,0.18);  color: #ef4444; }
.pill.sev-pill-medium { background: rgba(245,158,11,0.18); color: #f59e0b; }
.pill.sev-pill-low    { background: rgba(86,212,255,0.18); color: #56d4ff; }
.threat-empty { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; gap: 8px; align-items: center; }

/* ---------- REPLAY TIMELINE ------------------------------------- */
.replay { margin: 8px 0; }
.replay-track {
  position: relative; height: 22px; margin-bottom: 12px;
  background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2));
  border: 1px solid var(--border); border-radius: 999px;
}
.replay-dot {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--muted); cursor: help;
  transition: transform .1s;
}
.replay-dot:hover { transform: translate(-50%, -50%) scale(1.6); }
.replay-dot.rep-auth-login           { background: #4ade80; }
.replay-dot.rep-auth-login-fail      { background: #ef4444; }
.replay-dot.rep-auth-login_key       { background: #56d4ff; }
.replay-dot.rep-auth-register        { background: #8b6dff; }
.replay-dot.rep-var-read             { background: #f59e0b; }
.replay-dot.rep-file-download        { background: #a78bff; }
.replay-dot.rep-hwid-reset           { background: #ec4899; }
.replay-dot.rep-threat-flagged       { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.35); }
.replay-list {
  list-style: none; margin: 0; padding: 0;
  max-height: 220px; overflow: auto;
  font-size: 12px; border-top: 1px solid var(--border);
}
.replay-list li {
  display: grid; grid-template-columns: 130px auto auto 1fr; gap: 10px;
  padding: 6px 4px; border-bottom: 1px solid var(--border);
  align-items: center;
}
.replay-list li:last-child { border-bottom: none; }
.replay-kind { font-family: ui-monospace, monospace; color: var(--cyan); font-size: 11px; }
.replay-list code { font-size: 11px; opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- AI THREAT VERDICT ----------------------------------- */
.ai-verdict {
  margin-top: 10px; padding: 10px 12px;
  background: rgba(139,109,255,0.08); border: 1px solid rgba(139,109,255,0.20);
  border-radius: 8px; font-size: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.ai-verdict-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.ai-verdict-head strong {
  text-transform: uppercase; letter-spacing: 0.05em; font-size: 11px;
}
.ai-tag { color: var(--accent-3); font-weight: 700; font-size: 11px; }
.ai-conf { font-weight: 600; }
.ai-rec {
  margin-left: auto; padding: 2px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.05em;
  font-size: 10px; font-weight: 700;
  background: rgba(255,255,255,0.06); color: var(--fg);
}
.ai-rec.rec-ban         { background: rgba(239,68,68,0.18);  color: #ef4444; }
.ai-rec.rec-investigate { background: rgba(245,158,11,0.18); color: #f59e0b; }
.ai-rec.rec-monitor     { background: rgba(96,165,250,0.18); color: #60a5fa; }
.ai-rec.rec-ignore      { background: rgba(124,131,152,0.18); color: var(--muted); }
.ai-key {
  font-weight: 600; font-size: 12px; padding: 6px 8px;
  background: rgba(0,0,0,0.18); border-left: 2px solid var(--accent-3);
  border-radius: 0 6px 6px 0;
}
.ai-reasoning { font-size: 12px; line-height: 1.45; }
.ai-section { margin-top: 2px; }
.ai-section-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); font-weight: 600; margin-bottom: 4px;
}
.ai-bullets {
  margin: 0; padding-left: 18px;
  display: flex; flex-direction: column; gap: 2px;
  font-size: 12px; line-height: 1.4;
}
.ai-bullets li { padding-left: 2px; }
ol.ai-bullets li::marker { color: var(--accent-3); font-weight: 700; }
.ai-verdict.ai-sharing    { background: rgba(239,68,68,0.10); border-color: rgba(239,68,68,0.30); }
.ai-verdict.ai-attack     { background: rgba(239,68,68,0.10); border-color: rgba(239,68,68,0.30); }
.ai-verdict.ai-suspicious { background: rgba(245,158,11,0.10); border-color: rgba(245,158,11,0.30); }
.ai-verdict.ai-benign     { background: rgba(74,222,128,0.08); border-color: rgba(74,222,128,0.25); }
.ai-verdict.ai-unclear    { background: rgba(124,131,152,0.08); border-color: rgba(124,131,152,0.25); }
.ai-verdict.ai-sharing    strong, .ai-verdict.ai-attack strong { color: #ef4444; }
.ai-verdict.ai-suspicious strong { color: #f59e0b; }
.ai-verdict.ai-benign     strong { color: #4ade80; }
.ai-verdict.ai-unclear    strong { color: var(--muted); }

/* ---------- NOTIFICATIONS --------------------------------------- */
.notif { position: relative; }
.notif-btn {
  position: relative; width: 40px; height: 40px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(20,23,33,0.75); backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); cursor: pointer;
  transition: border-color .15s, transform .1s;
}
.notif-btn:hover { border-color: var(--border-2); }
.notif-btn:active { transform: scale(0.96); }
.notif-btn svg { width: 18px; height: 18px; }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 600;
  border-radius: 9px; border: 2px solid rgba(13,15,23,0.95);
  line-height: 1;
}
.notif-panel {
  position: absolute; top: calc(100% + 8px); right: 0; width: min(360px, 92vw);
  max-height: 70vh; overflow: auto;
  background: rgba(17,20,29,0.96); backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
  padding: 8px;
}
.notif-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 6px 10px 10px; border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.notif-desktop-toggle {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 10px; margin-bottom: 6px;
  background: transparent; border: 1px dashed var(--border);
  border-radius: 8px; color: var(--muted); cursor: pointer;
  font-size: 12px; text-align: left;
}
.notif-desktop-toggle:hover { color: var(--fg); border-color: var(--border-2); }
.notif-desktop-toggle.active {
  color: var(--ok); border-style: solid;
  border-color: rgba(74,222,128,0.30); background: rgba(74,222,128,0.06);
}
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px;
  padding: 10px 10px; border-radius: 8px; cursor: pointer;
  align-items: center;
}
.notif-list li:hover { background: rgba(255,255,255,0.04); }
.notif-kind {
  grid-column: 1 / 2; font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--accent, #a78bfa); font-weight: 600;
}
.notif-text { grid-column: 1 / 2; font-size: 13px; }
.notif-time { grid-column: 2 / 3; grid-row: 1 / 3; font-size: 11px; white-space: nowrap; }
.notif-empty { padding: 18px 10px; text-align: center; font-size: 13px; }

.big { font-size: 28px; font-weight: 700; }

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