/* ==========================================================================
   VRAITH AUTH — neon violet theme (black / violet / neon glow)
   A single design system: palette tokens, layout, and components.
   ========================================================================== */

:root {
  /* Surfaces — pure blacks with a violet undertone */
  --bg: #08050d;
  --bg-2: #0c0812;
  --panel: #120a1c;
  --panel-2: #1a1028;
  --elev: #241638;
  --line: rgba(168, 85, 247, 0.13);
  --line-strong: rgba(168, 85, 247, 0.28);

  /* Text */
  --text: #f2ecff;
  --text-dim: #b8a8d4;
  --text-faint: #7a6d92;

  /* Accent — Vraith neon violet */
  --accent: #a855f7;
  --accent-2: #7c3aed;
  --accent-3: #c084fc;
  --accent-soft: rgba(168, 85, 247, 0.18);
  --accent-line: rgba(168, 85, 247, 0.55);
  --accent-glow: 0 0 24px rgba(168, 85, 247, 0.45);
  --silver: linear-gradient(135deg, #d8b4fe 0%, #a855f7 40%, #7c3aed 70%, #c084fc 100%);

  /* Semantic */
  --green: #a855f7;
  --green-soft: rgba(168, 85, 247, 0.18);
  --red: #ff5c8a;
  --red-soft: rgba(255, 92, 138, 0.16);
  --amber: #d8b4fe;
  --amber-soft: rgba(168, 85, 247, 0.10);
  --blue: #c084fc;
  --blue-soft: rgba(192, 132, 252, 0.12);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 24px 70px -20px rgba(0, 0, 0, 0.9);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
}
/* Glitter / starfield layer — violet nebula haze + neon specks */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 640px at 12% -10%, rgba(168, 85, 247, 0.18), transparent 60%),
    radial-gradient(900px 520px at 100% 0%, rgba(124, 58, 237, 0.14), transparent 55%),
    radial-gradient(700px 400px at 50% 110%, rgba(192, 132, 252, 0.10), transparent 60%),
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(216,180,254,.9), transparent),
    radial-gradient(1.5px 1.5px at 70% 20%, rgba(192,132,252,.7), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(168,85,247,.8), transparent),
    radial-gradient(1px 1px at 85% 60%, rgba(216,180,254,.6), transparent),
    radial-gradient(1.5px 1.5px at 55% 45%, rgba(192,132,252,.7), transparent),
    radial-gradient(1px 1px at 10% 85%, rgba(168,85,247,.65), transparent),
    radial-gradient(1px 1px at 92% 88%, rgba(216,180,254,.6), transparent);
  background-repeat: no-repeat;
  animation: twinkle 5.5s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
#root { position: relative; z-index: 1; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: rgba(168,85,247,.35); color: #fff; }
[hidden] { display: none !important; }

/* Vraith brand wordmark — neon violet shine */
.brand-name {
  background: linear-gradient(100deg, #c084fc 0%, #a855f7 25%, #e9d5ff 50%, #7c3aed 75%, #c084fc 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shine 6s linear infinite;
  letter-spacing: .3px;
}
@keyframes shine { to { background-position: 200% center; } }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.26); background-clip: content-box; }

/* ===== Auth (login / register) =========================================== */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 400px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)), var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.06);
  padding: 34px 30px; position: relative; overflow: hidden;
}
.auth-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 1.5px;
  background: linear-gradient(90deg, transparent, #fff, #9a9aa4, transparent);
  opacity: .9;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.brand .logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: radial-gradient(circle at 30% 25%, #4c1d95, #0a0512);
  border: 1px solid rgba(168, 85, 247, .55);
  display: grid; place-items: center; color: #e9d5ff;
  box-shadow: 0 0 26px -4px rgba(168, 85, 247, .65), inset 0 1px 0 rgba(216, 180, 254, .25);
}
.brand .logo svg { filter: drop-shadow(0 0 8px rgba(192, 132, 252, .8)); }
.brand h1 { font-size: 17px; margin: 0; font-weight: 700; }
.brand p { margin: 0; font-size: 12px; color: var(--text-faint); }

.tabs-pill { display: flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.tabs-pill button { flex: 1; border: 0; background: transparent; color: var(--text-dim); padding: 9px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px; transition: .15s; }
.tabs-pill button.active { background: linear-gradient(180deg, rgba(168,85,247,.28), rgba(168,85,247,.10)); color: #f2ecff; box-shadow: inset 0 0 0 1px var(--accent-line); }

/* ===== Forms ============================================================= */
.field { margin-bottom: 15px; }
.field > label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 7px; font-weight: 600; }
.input, .select, textarea.input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-strong);
  color: var(--text); border-radius: var(--radius-sm); padding: 11px 13px; font-size: 14px;
  outline: none; transition: border-color .15s, box-shadow .15s; font-family: inherit;
}
.input::placeholder { color: var(--text-faint); }
.input:focus, .select:focus, textarea.input:focus { border-color: rgba(168,85,247,.7); box-shadow: 0 0 0 3px rgba(168,85,247,.18); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23b8a8d4' stroke-width='2'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.hint { font-size: 11.5px; color: var(--text-faint); margin-top: 6px; }
.checkbox { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-dim); cursor: pointer; user-select: none; }
.checkbox input { width: 16px; height: 16px; accent-color: #a855f7; }

/* ===== Buttons =========================================================== */
.btn {
  --b: var(--panel-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-strong); background: var(--b); color: var(--text);
  border-radius: var(--radius-sm); padding: 10px 15px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: rgba(255,255,255,.28); background: var(--elev); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
/* Neon primary with a moving shimmer streak */
.btn-primary {
  position: relative; overflow: hidden; border: 1px solid rgba(216, 180, 254, .7); color: #ffffff;
  background: linear-gradient(180deg, #a855f7, #8b2fe0 60%, #6d28d9);
  box-shadow: 0 8px 26px -8px rgba(168, 85, 247, .75), inset 0 1px 0 rgba(233, 213, 255, .55);
}
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(233, 213, 255, .85), transparent);
  transform: skewX(-20deg); animation: sweep 3.2s ease-in-out infinite;
}
@keyframes sweep { 0% { left: -60%; } 55%, 100% { left: 140%; } }
.btn-primary:hover { background: linear-gradient(180deg, #b46bff, #9c47ee 60%, #7c3aed); }
.btn-danger { background: var(--red-soft); border-color: rgba(255,107,107,.35); color: #ffb3b3; }
.btn-danger:hover { background: rgba(255,107,107,.22); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); background: var(--panel-2); }
.btn-sm { padding: 7px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-icon { padding: 8px; width: 34px; height: 34px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== App shell ========================================================= */
.shell { display: grid; grid-template-columns: 258px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent), var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 6px 8px 18px; margin: 0; border-bottom: 1px solid var(--line); }
.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 14px; flex: 1; overflow-y: auto; }
.nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--text-faint); padding: 14px 12px 6px; font-weight: 700; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
  color: var(--text-dim); font-size: 13.5px; font-weight: 550; cursor: pointer; transition: .13s; position: relative;
}
.nav a svg { width: 18px; height: 18px; opacity: .85; flex-shrink: 0; }
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.active { background: linear-gradient(90deg, rgba(168,85,247,.24), rgba(168,85,247,.06)); color: #f2ecff; box-shadow: inset 0 0 0 1px var(--accent-line), 0 0 20px -6px rgba(168,85,247,.5); }
.nav a.active svg { opacity: 1; filter: drop-shadow(0 0 6px rgba(192,132,252,.7)); }
.nav a .count { margin-left: auto; font-size: 11px; color: var(--text-faint); background: var(--panel-2); padding: 1px 7px; border-radius: 20px; }

.side-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid var(--line); margin-top: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #c084fc, #7c3aed); color: #ffffff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; box-shadow: inset 0 1px 0 rgba(233,213,255,.55), 0 0 12px -2px rgba(168,85,247,.55); }
.side-user .who { min-width: 0; }
.side-user .who b { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .who span { font-size: 11px; color: var(--text-faint); }

/* Topbar + main */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 16px 26px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
  background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(14px);
}
.topbar h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.topbar .sub { color: var(--text-faint); font-size: 12.5px; }
.topbar .spacer { flex: 1; }
.menu-toggle { display: none; }
.content { padding: 24px 26px 60px; max-width: 1320px; width: 100%; }

/* ===== Cards / stats ===================================================== */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 650; }
.card-head .spacer { flex: 1; }

.grid { display: grid; gap: 16px; }
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.stat {
  background: linear-gradient(180deg, rgba(255,255,255,.035), transparent), var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: relative; overflow: hidden;
}
.stat::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(168,85,247,.55), transparent); }
.stat .ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px; }
.stat .ico svg { width: 20px; height: 20px; }
.stat .val { font-size: 28px; font-weight: 800; letter-spacing: -.5px; line-height: 1; }
.stat .lbl { color: var(--text-dim); font-size: 12.5px; margin-top: 7px; }
.stat .delta { position: absolute; top: 18px; right: 18px; font-size: 11.5px; padding: 3px 8px; border-radius: 20px; }
.ico.violet, .ico.green, .ico.blue, .ico.amber { background: rgba(168,85,247,.14); color: #e9d5ff; border: 1px solid rgba(168,85,247,.30); }
.ico.violet svg, .ico.green svg, .ico.blue svg, .ico.amber svg { filter: drop-shadow(0 0 6px rgba(168,85,247,.6)); }
.ico.red { background: var(--red-soft); color: var(--red); border: 1px solid rgba(255,107,107,.3); }

/* ===== Pills / badges (monochrome; fill = positive, outline = negative) === */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: 20px; line-height: 1.5; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-green { background: rgba(168,85,247,.24); color: #e9d5ff; }
.pill-violet { background: rgba(168,85,247,.20); color: #d8b4fe; }
.pill-blue { background: rgba(192,132,252,.16); color: #d8b4fe; }
.pill-amber { background: transparent; color: #c4b5fd; box-shadow: inset 0 0 0 1px rgba(168,85,247,.35); }
.pill-gray { background: rgba(168,85,247,.05); color: var(--text-dim); }
.pill-red { background: var(--red-soft); color: var(--red); }
.badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 650; padding: 2px 8px; border-radius: 6px; background: var(--panel-2); color: var(--text-dim); border: 1px solid var(--line); }
.badge.rank-owner { color: #ffffff; border-color: rgba(216,180,254,.7); background: linear-gradient(180deg,#a855f7,#6d28d9); box-shadow: 0 0 12px -2px rgba(168,85,247,.6); }
.badge.rank-admin { color: #f2ecff; border-color: rgba(168,85,247,.5); background: rgba(168,85,247,.22); }
.badge.rank-mod { color: #e9d5ff; border-color: rgba(168,85,247,.3); background: rgba(168,85,247,.12); }
.badge.rank-reseller { color: #c4b5fd; border-color: rgba(168,85,247,.22); background: rgba(168,85,247,.07); }

/* ===== Tables ============================================================ */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; color: var(--text-faint); font-weight: 650; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: rgba(255,255,255,.03); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .mono { font-family: var(--mono); font-size: 12.5px; }
.cell-key { display: inline-flex; align-items: center; gap: 8px; }
.copy-btn { cursor: pointer; color: var(--text-faint); border: 0; background: transparent; padding: 3px; border-radius: 6px; display: inline-grid; place-items: center; }
.copy-btn:hover { color: #fff; background: rgba(255,255,255,.1); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.toolbar .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-faint); }
.toolbar .search .input { padding-left: 36px; }
.toolbar .spacer { flex: 1; }

/* ===== Pagination ======================================================== */
.pager { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-dim); }
.pager .btns { display: flex; gap: 8px; }

/* ===== States ============================================================ */
.empty { text-align: center; padding: 54px 20px; color: var(--text-faint); }
.empty svg { width: 40px; height: 40px; opacity: .4; margin-bottom: 14px; }
.empty h4 { margin: 0 0 6px; color: var(--text-dim); font-size: 15px; }
.spinner { width: 20px; height: 20px; border: 2.5px solid var(--line-strong); border-top-color: #c084fc; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-row { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 50px; color: var(--text-dim); }
.skeleton { background: linear-gradient(90deg, var(--panel-2) 25%, var(--elev) 50%, var(--panel-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===== Modal / drawer ==================================================== */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(4px); z-index: 100; display: grid; place-items: center; padding: 24px; animation: fade .16s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 520px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.06); max-height: 90vh; display: flex; flex-direction: column; animation: pop .18s cubic-bezier(.2,.9,.3,1.2); }
.modal.lg { max-width: 720px; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.modal-head .sub { font-size: 12.5px; color: var(--text-faint); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 20px; border-top: 1px solid var(--line); }
.x-btn { margin-left: auto; background: transparent; border: 0; color: var(--text-faint); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.x-btn:hover { color: var(--text); background: var(--panel-2); }

/* ===== Toast ============================================================= */
#toast-root { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 11px; background: var(--elev); border: 1px solid var(--line-strong); border-left: 3px solid #a855f7; border-radius: 11px; padding: 12px 15px; min-width: 260px; max-width: 380px; box-shadow: var(--shadow-lg); animation: slideIn .22s cubic-bezier(.2,.9,.3,1.2); font-size: 13px; }
.toast.ok { border-left-color: #a855f7; }
.toast.err { border-left-color: var(--red); }
.toast.warn { border-left-color: #d8b4fe; }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast.ok svg { color: #c084fc; } .toast.err svg { color: var(--red); } .toast.warn svg { color: #d8b4fe; }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } }

/* ===== Misc ============================================================== */
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--text-faint); }
.kv dd { margin: 0; color: var(--text); word-break: break-word; }
.code-block { position: relative; background: #050506; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 15px; overflow-x: auto; }
.code-block pre { margin: 0; font-family: var(--mono); font-size: 12.5px; color: #e2e2e8; line-height: 1.6; }
.code-block .copy-btn { position: absolute; top: 10px; right: 10px; background: var(--panel-2); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; color: var(--text-dim); padding: 9px 14px; cursor: pointer; font-size: 13px; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: #e9d5ff; border-bottom-color: #a855f7; box-shadow: 0 4px 12px -6px rgba(168,85,247,.55); }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); font-weight: 700; margin: 4px 0 10px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.perm-item { display: flex; align-items: center; gap: 9px; padding: 9px 11px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px; }
.perm-item input { accent-color: #a855f7; width: 15px; height: 15px; }
.perm-item.disabled { opacity: .4; }
.secret-reveal { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 4px; }
.secret-reveal .lbl { font-size: 11.5px; color: #d8b4fe; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }

/* Docs page */
.doc-block { color: var(--text-dim); font-size: 13.5px; line-height: 1.7; }
.doc-block h3 { color: var(--text); font-size: 15px; margin: 22px 0 8px; font-weight: 650; }
.doc-block code.inline { background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-family: var(--mono); font-size: 12px; color: #e9d5ff; }
.endpoint { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; margin-bottom: 8px; font-size: 12.5px; }
.endpoint .verb { font-family: var(--mono); font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 6px; background: rgba(168,85,247,.28); color: #f2ecff; }
.endpoint .path { font-family: var(--mono); color: var(--text); }
.endpoint .desc { color: var(--text-faint); margin-left: auto; }

/* ===== Chart ============================================================= */
.chart { width: 100%; height: 200px; }
.chart-legend { display: flex; gap: 18px; font-size: 12px; color: var(--text-dim); padding: 0 4px 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ===== Responsive ======================================================== */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 90; transform: translateX(-100%); transition: transform .22s; width: 258px; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: inline-grid; }
  .content { padding: 18px 16px 50px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 8px; }
  .sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 80; }
  .landing-nav { padding: 16px 18px !important; }
  .hero { padding: 44px 18px 30px !important; }
}

/* ===== Landing (pre-login) =============================================== */
.landing { position: relative; z-index: 1; min-height: 100vh; overflow-x: hidden; }
.landing-nav { display: flex; align-items: center; gap: 12px; padding: 20px 32px; max-width: 1160px; margin: 0 auto; }
.landing-nav .brand { margin: 0; }
.landing-nav .spacer { flex: 1; }

.hero { max-width: 880px; margin: 0 auto; padding: 72px 24px 34px; text-align: center; position: relative; }
.hero::before {
  content: ''; position: absolute; left: 50%; top: 40px; width: 520px; height: 320px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(168,85,247,.22), transparent 70%); pointer-events: none; filter: blur(6px);
}
.hero .shield-badge {
  width: 76px; height: 76px; border-radius: 20px; margin: 0 auto 24px;
  background: radial-gradient(circle at 30% 25%, #4c1d95, #0a0512); border: 1px solid rgba(168,85,247,.55);
  display: grid; place-items: center; color: #e9d5ff; position: relative; z-index: 1;
  box-shadow: 0 0 44px -6px rgba(168,85,247,.65), inset 0 1px 0 rgba(216,180,254,.25);
}
.hero .shield-badge svg { width: 38px; height: 38px; filter: drop-shadow(0 0 10px rgba(192,132,252,.85)); }
.hero h1 { font-size: clamp(34px, 6vw, 58px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.05; margin: 0 0 18px; position: relative; z-index: 1; }
.hero .lead { font-size: clamp(15px, 2.4vw, 19px); color: var(--text-dim); max-width: 620px; margin: 0 auto 30px; position: relative; z-index: 1; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }
.pill-badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 26px; position: relative; z-index: 1; }

.feature-grid { max-width: 1120px; margin: 44px auto 0; padding: 0 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.feature { background: linear-gradient(180deg, rgba(255,255,255,.03), transparent), var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; transition: transform .15s, border-color .15s; }
.feature:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.feature .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px; background: rgba(168,85,247,.14); border: 1px solid rgba(168,85,247,.32); color: #e9d5ff; }
.feature .ico svg { width: 21px; height: 21px; filter: drop-shadow(0 0 6px rgba(168,85,247,.55)); }
.feature h3 { margin: 0 0 6px; font-size: 15.5px; font-weight: 650; }
.feature p { margin: 0; font-size: 13px; color: var(--text-dim); line-height: 1.6; }

.landing-footer { text-align: center; color: var(--text-faint); padding: 44px 24px 30px; font-size: 12.5px; border-top: 1px solid var(--line); margin-top: 50px; }
.auth-back { background: none; border: 0; color: var(--text-faint); cursor: pointer; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; padding: 4px; margin-bottom: 8px; }
.auth-back:hover { color: var(--text); }
.auth-back svg { width: 15px; height: 15px; transform: rotate(180deg); }

/* Topbar user menu */
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 6px; border: 1px solid var(--line); border-radius: 30px; background: var(--panel-2); cursor: pointer; transition: .13s; }
.user-chip:hover { border-color: var(--line-strong); background: var(--elev); }
.user-chip .avatar { width: 26px; height: 26px; font-size: 11px; border-radius: 7px; }
.user-chip b { font-size: 12.5px; }
.user-chip svg { width: 14px; height: 14px; color: var(--text-faint); transform: rotate(90deg); }
.user-menu { position: relative; }
.menu-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; background: var(--elev); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 210px; padding: 6px; animation: pop .14s ease; }
.menu-pop .mi { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 8px; font-size: 13px; color: var(--text-dim); cursor: pointer; width: 100%; background: none; border: 0; text-align: left; }
.menu-pop .mi:hover { background: var(--panel); color: var(--text); }
.menu-pop .mi svg { width: 16px; height: 16px; }
.menu-pop .mi.danger { color: #ffb3b3; }
.menu-pop .mhead { padding: 9px 11px 6px; font-size: 11px; color: var(--text-faint); }
.menu-pop .sep { height: 1px; background: var(--line); margin: 5px 0; }

/* ===== Landing v2 (premium) ============================================= */
.hero { padding-top: 52px; }
.hero h1 { font-size: clamp(38px, 7vw, 66px); }
.hero-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); background: rgba(255,255,255,.06); border: 1px solid var(--line-strong); border-radius: 30px; padding: 6px 14px; margin-bottom: 24px; position: relative; z-index: 1; }
.hero-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #c084fc; box-shadow: 0 0 10px #a855f7; animation: twinkle 2.4s ease-in-out infinite; }
.aurora { position: absolute; left: 50%; top: -30px; width: 720px; height: 400px; transform: translateX(-50%); pointer-events: none; z-index: 0; border-radius: 50%; filter: blur(64px); opacity: .55;
  background: conic-gradient(from 0deg at 50% 50%, rgba(168,85,247,.35), transparent 25%, rgba(192,132,252,.20) 50%, transparent 75%, rgba(168,85,247,.35)); animation: spinAurora 20s linear infinite; }
@keyframes spinAurora { to { transform: translateX(-50%) rotate(360deg); } }

.section-head { text-align: center; max-width: 640px; margin: 60px auto 10px; padding: 0 24px; }
.section-head h2 { font-size: clamp(24px, 3.5vw, 32px); font-weight: 750; letter-spacing: -.6px; margin: 0 0 8px; }
.section-head p { color: var(--text-dim); margin: 0; font-size: 14px; }

/* Browser mockup */
.mockup-wrap { max-width: 940px; margin: 24px auto 0; padding: 0 24px; }
.mockup { border: 1px solid var(--line-strong); border-radius: 16px; overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow-lg), 0 0 80px -18px rgba(168,85,247,.35); }
.mockup .bar { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.mockup .dots { display: flex; gap: 6px; }
.mockup .dots i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.18); display: block; }
.mockup .addr { flex: 1; text-align: center; font-size: 11.5px; color: var(--text-faint); font-family: var(--mono); }
.mockup .shot { display: grid; grid-template-columns: 158px 1fr; min-height: 252px; }
.mockup .m-side { border-right: 1px solid var(--line); padding: 14px 12px; }
.mockup .m-side .mlogo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12px; margin-bottom: 16px; }
.mockup .m-side .mlogo i { width: 20px; height: 20px; border-radius: 6px; background: linear-gradient(135deg,#c084fc,#7c3aed); display: inline-block; }
.mockup .m-nav { display: flex; flex-direction: column; gap: 6px; }
.mockup .m-nav div { height: 10px; border-radius: 5px; background: rgba(255,255,255,.06); }
.mockup .m-nav div.on { background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 1px var(--accent-line); }
.mockup .m-main { padding: 16px; }
.mockup .m-tiles { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 12px; }
.mockup .m-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.mockup .m-tile b { font-size: 21px; font-weight: 800; display: block; letter-spacing: -.5px; }
.mockup .m-tile small { color: var(--text-faint); font-size: 10px; }
.mockup .m-chart { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; }

/* Code window */
.code-window { border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; background: #060607; box-shadow: var(--shadow-lg); }
.code-window .bar { display: flex; align-items: center; gap: 10px; padding: 10px 13px; border-bottom: 1px solid var(--line); background: var(--panel); }
.code-window .bar .dots { display: flex; gap: 6px; }
.code-window .bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.18); display: block; }
.code-window .bar .name { font-size: 11.5px; color: var(--text-faint); font-family: var(--mono); }
.code-window pre { margin: 0; padding: 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.75; overflow-x: auto; color: #cdd3e6; }
.tok-c { color: #63636b; } .tok-s { color: #eaeaf0; } .tok-k { color: #c084fc; font-weight: 600; } .tok-f { color: #b9b9c4; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: center; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } .mockup .shot { grid-template-columns: 1fr; } .mockup .m-side { display: none; } }

.steps { display: flex; flex-direction: column; gap: 18px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step .num { width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg,#c084fc,#7c3aed); color: #0a0a0c; box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.step h4 { margin: 0 0 3px; font-size: 15px; font-weight: 650; }
.step p { margin: 0; font-size: 13px; color: var(--text-dim); line-height: 1.6; }

.stat-band { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 40px; padding: 28px 24px; margin: 40px auto 0; max-width: 940px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-band .s { text-align: center; }
.stat-band .s b { font-size: 23px; font-weight: 800; display: block; letter-spacing: -.5px; }
.stat-band .s small { color: var(--text-faint); font-size: 11.5px; }

.cta-final { text-align: center; max-width: 620px; margin: 66px auto 0; padding: 0 24px; position: relative; }
.cta-final h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -1px; margin: 0 0 12px; }
.cta-final p { color: var(--text-dim); margin: 0 0 22px; }

.reveal { opacity: 0; transform: translateY(16px); animation: revealUp .65s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes revealUp { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; opacity: 1; transform: none; } .aurora, .hero-pill .dot { animation: none; } }

/* ===== Dashboard (TheendAuth-style clone) ================================ */
.welcome { margin-bottom: 22px; }
.welcome-title { margin: 0 0 4px; font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -.6px; color: var(--text); }
.welcome-title .brand-name { font-size: inherit; }
.welcome-sub { margin: 0; color: var(--text-faint); font-size: 13.5px; }

.tile-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
@media (max-width: 780px) { .tile-row { grid-template-columns: 1fr; } }
.tile {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(180deg, rgba(168,85,247,.08), rgba(168,85,247,0)), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.tile:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-lg), 0 0 30px -12px rgba(168,85,247,.35); }
.tile::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(168,85,247,.55), transparent); }
.tile-ico {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 14px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, rgba(168,85,247,.35), rgba(76,29,149,.15));
  border: 1px solid rgba(168,85,247,.45);
  color: #e9d5ff;
  box-shadow: 0 0 20px -4px rgba(168,85,247,.55), inset 0 1px 0 rgba(216,180,254,.25);
}
.tile-ico svg { width: 24px; height: 24px; filter: drop-shadow(0 0 6px rgba(192,132,252,.7)); }
.tile-val { font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1; color: var(--text); }
.tile-lbl { color: var(--text-dim); font-size: 12.5px; margin-top: 6px; text-transform: uppercase; letter-spacing: .08em; font-weight: 650; }

/* Latest updates list inside a card */
.updates { display: flex; flex-direction: column; gap: 12px; }
.update {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: border-color .15s, background .15s;
}
.update:hover { border-color: rgba(168,85,247,.35); background: rgba(168,85,247,.05); }
.update-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.update-date { margin-left: auto; font-size: 11.5px; color: var(--text-faint); font-family: var(--mono); }
.update-title { margin: 0 0 4px; font-size: 14.5px; font-weight: 650; color: var(--text); }
.update-text { margin: 0; font-size: 13px; color: var(--text-dim); line-height: 1.55; }

/* Developer resources grid */
.res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.res-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px; padding: 22px 18px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.res-card:hover { transform: translateY(-3px); border-color: rgba(168,85,247,.45); box-shadow: 0 12px 28px -14px rgba(168,85,247,.5); }
.res-orb {
  width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(216,180,254,.35);
  box-shadow: 0 0 24px -4px rgba(168,85,247,.55), inset 0 1px 0 rgba(255,255,255,.15);
  margin-bottom: 4px;
}
.res-lang { font-family: var(--mono); font-size: 14px; font-weight: 800; color: #ffffff; text-shadow: 0 0 8px rgba(0,0,0,.4); letter-spacing: -.5px; }
.res-title { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--text); }
.res-desc { margin: 0; font-size: 12.5px; color: var(--text-dim); line-height: 1.5; min-height: 54px; }
.res-card .btn { margin-top: 6px; }

/* ===== Page headers with action button on the right ==================== */
.welcome-row { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.welcome-row > *:first-child { flex: 1; }
.welcome-row .btn-primary { margin-bottom: 4px; }

/* ===== Files page ====================================================== */
.file-app-list { display: flex; flex-direction: column; gap: 10px; }
.file-app {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; transition: border-color .15s, background .15s;
}
.file-app:hover { border-color: rgba(168,85,247,.35); background: rgba(168,85,247,.05); }
.file-app-name { font-weight: 650; font-size: 14px; color: var(--text); }
.file-app-meta { display: flex; gap: 6px; margin-left: 4px; }
.file-app .row-actions { margin-left: auto; }

/* ===== Static API spec list ============================================ */
.spec-list { margin: 8px 0 0; padding-left: 18px; color: var(--text-dim); font-size: 13px; line-height: 1.75; }
.spec-list li { margin-bottom: 2px; }
.spec-list li::marker { color: var(--accent); }

/* ===== Topup / Support forms =========================================== */
.topup-form { display: flex; flex-direction: column; gap: 4px; max-width: 480px; }
.topup-form .btn-primary { margin-top: 8px; align-self: flex-start; }

/* ===== Rebrand palette preview ========================================= */
.rebrand-preview .rebrand-swatch { display: flex; gap: 10px; margin-bottom: 12px; }
.rebrand-preview .sw {
  width: 60px; height: 60px; border-radius: 12px;
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 18px -8px rgba(168,85,247,.4);
}

/* ==========================================================================
   POLISH v2 — premium finish: refined tokens, glass cards, richer glow,
   micro-animations, better typography.
   ========================================================================== */

:root {
  --bg:            #06030c;
  --bg-2:          #0b0714;
  --panel:         #100823;
  --panel-2:       #1a0d33;
  --elev:          #241247;
  --line:          rgba(168, 85, 247, 0.14);
  --line-strong:   rgba(168, 85, 247, 0.32);
  --text:          #f5efff;
  --text-dim:      #beacdd;
  --text-faint:    #7f6da3;
  --accent-glow-strong: 0 0 40px -8px rgba(168,85,247,.55), 0 0 90px -30px rgba(124,58,237,.6);
  --radius:        16px;
  --radius-sm:     12px;
  --radius-lg:     22px;
  --font:          "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body { font-feature-settings: "ss01" on, "cv11" on; letter-spacing: -0.01em; }

body::after {
  content: "";
  position: fixed; inset: 0;
  z-index: 0; pointer-events: none;
  background:
    radial-gradient(700px 460px at 15% 85%, rgba(124, 58, 237, .18), transparent 60%),
    radial-gradient(600px 400px at 90% 15%, rgba(168, 85, 247, .15), transparent 65%),
    radial-gradient(500px 350px at 50% 45%, rgba(192, 132, 252, .08), transparent 70%);
  animation: auroraDrift 26s ease-in-out infinite alternate;
  filter: blur(2px);
  mix-blend-mode: screen;
}
@keyframes auroraDrift {
  0%   { transform: translate3d(0, 0, 0)     scale(1);    opacity: .9; }
  50%  { transform: translate3d(-3%, 2%, 0)  scale(1.06); opacity: 1; }
  100% { transform: translate3d(2%, -2%, 0)  scale(1.02); opacity: .85; }
}
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }

.brand-name {
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(100deg, #e9d5ff 0%, #a855f7 20%, #ffffff 45%, #c084fc 65%, #7c3aed 85%, #e9d5ff 100%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shineFast 5.5s linear infinite;
}
@keyframes shineFast { to { background-position: 220% center; } }

.auth-wrap {
  background:
    radial-gradient(700px 500px at 50% 20%, rgba(124,58,237,.22), transparent 60%),
    radial-gradient(500px 340px at 50% 90%, rgba(168,85,247,.14), transparent 60%);
}
.auth-card {
  background:
    linear-gradient(180deg, rgba(168,85,247,.08), rgba(168,85,247,0) 40%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01)),
    var(--panel);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  box-shadow:
    var(--shadow-lg),
    0 0 60px -20px rgba(168,85,247,.4),
    inset 0 1px 0 rgba(255,255,255,.08);
  padding: 38px 34px;
  transform: translateZ(0);
  animation: cardIn .55s cubic-bezier(.2,.9,.3,1.05);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.auth-card::before {
  height: 2px;
  background: linear-gradient(90deg, transparent, #a855f7 20%, #e9d5ff 50%, #a855f7 80%, transparent);
  filter: blur(.5px);
  animation: barShine 3s ease-in-out infinite;
}
@keyframes barShine { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

.btn-primary {
  border: 1px solid rgba(216,180,254,.55);
  background: linear-gradient(180deg, #b46bff 0%, #a855f7 45%, #7c3aed 100%);
  box-shadow:
    0 10px 30px -10px rgba(168,85,247,.7),
    inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .15s cubic-bezier(.2,.9,.3,1.05), box-shadow .15s;
}
.btn-primary:hover {
  transform: translateY(-1.5px);
  box-shadow:
    0 16px 36px -10px rgba(168,85,247,.8),
    inset 0 1px 0 rgba(255,255,255,.42);
}
.btn-primary:active { transform: translateY(0); }

.input, .select, textarea.input {
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)), var(--bg-2);
  border-radius: 12px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.input:focus, .select:focus, textarea.input:focus {
  border-color: rgba(168,85,247,.75);
  box-shadow: 0 0 0 4px rgba(168,85,247,.16), 0 0 22px -8px rgba(168,85,247,.5);
  background: linear-gradient(180deg, rgba(168,85,247,.05), rgba(168,85,247,0)), var(--bg-2);
}

.sidebar { background: linear-gradient(180deg, rgba(168,85,247,.04), transparent 40%), var(--bg-2); }
.nav a { position: relative; transition: background .15s, color .15s, transform .12s; }
.nav a:hover { transform: translateX(2px); }
.nav a.active {
  background: linear-gradient(90deg, rgba(168,85,247,.28), rgba(168,85,247,.05));
  box-shadow: inset 0 0 0 1px var(--accent-line), 0 0 26px -8px rgba(168,85,247,.55);
}
.nav a.active::after {
  content: ""; position: absolute; left: -14px; top: 6px; bottom: 6px; width: 3px;
  border-radius: 2px; background: linear-gradient(180deg, #a855f7, #7c3aed);
  box-shadow: 0 0 12px #a855f7;
}

.tile {
  background:
    linear-gradient(180deg, rgba(168,85,247,.10), rgba(168,85,247,0) 40%),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0)),
    var(--panel);
  box-shadow:
    0 20px 50px -30px rgba(168,85,247,.5),
    inset 0 1px 0 rgba(255,255,255,.05);
}
.tile-ico {
  background: radial-gradient(circle at 30% 25%, #7c3aed, #2a1155);
  border-color: rgba(216,180,254,.55);
  box-shadow:
    0 0 24px -4px rgba(168,85,247,.65),
    inset 0 1px 0 rgba(233,213,255,.35);
}

.card {
  background: linear-gradient(180deg, rgba(168,85,247,.04), rgba(168,85,247,0) 60%), var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.04);
}
.card-head { background: linear-gradient(180deg, rgba(168,85,247,.06), rgba(168,85,247,0)); }

.hero h1 { letter-spacing: -1.6px; font-weight: 800; }
.hero .shield-badge { animation: shieldPulse 3.6s ease-in-out infinite; }
@keyframes shieldPulse {
  0%,100% { box-shadow: 0 0 44px -6px rgba(168,85,247,.55), inset 0 1px 0 rgba(216,180,254,.25); }
  50%     { box-shadow: 0 0 66px -6px rgba(168,85,247,.85), 0 0 120px -20px rgba(124,58,237,.6), inset 0 1px 0 rgba(216,180,254,.35); }
}

.toast {
  background: linear-gradient(180deg, rgba(168,85,247,.10), rgba(168,85,247,0)), var(--elev);
  box-shadow: 0 20px 40px -18px rgba(168,85,247,.5), var(--shadow-lg);
}

*::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(168,85,247,.35), rgba(124,58,237,.25)); background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(168,85,247,.55), rgba(124,58,237,.4)); background-clip: content-box; }

.tbl tbody tr:hover { background: linear-gradient(90deg, rgba(168,85,247,.08), rgba(168,85,247,0)); }

.user-chip {
  background: linear-gradient(180deg, rgba(168,85,247,.10), rgba(168,85,247,0)), var(--panel-2);
  border-color: var(--line-strong);
  transition: box-shadow .15s, transform .15s;
}
.user-chip:hover {
  box-shadow: 0 0 22px -6px rgba(168,85,247,.5);
  transform: translateY(-1px);
}

.spinner {
  border-color: rgba(168,85,247,.18);
  border-top-color: #c084fc;
  filter: drop-shadow(0 0 6px rgba(168,85,247,.6));
}

/* Modal glassy */
.modal {
  background: linear-gradient(180deg, rgba(168,85,247,.06), rgba(168,85,247,0) 40%), var(--panel);
  backdrop-filter: blur(14px) saturate(140%);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg), 0 0 60px -20px rgba(168,85,247,.4), inset 0 1px 0 rgba(255,255,255,.06);
}
.overlay { background: rgba(6,3,12,.78); }

/* Tabs pill highlight */
.tabs-pill button.active {
  background: linear-gradient(180deg, rgba(168,85,247,.32), rgba(168,85,247,.12));
  box-shadow: inset 0 0 0 1px rgba(216,180,254,.4), 0 0 16px -6px rgba(168,85,247,.5);
}

/* Pills — richer variants */
.pill-green { background: linear-gradient(180deg, rgba(168,85,247,.24), rgba(168,85,247,.12)); color: #e9d5ff; box-shadow: 0 0 10px -4px rgba(168,85,247,.55); }
.pill-red   { background: linear-gradient(180deg, rgba(255,92,138,.20), rgba(255,92,138,.08)); color: #ffb3c8; box-shadow: 0 0 10px -4px rgba(255,92,138,.55); }
