/* =====================================================================
   xauth, design system
   Restrained, professional dark UI: one neutral surface scale, a single
   solid accent, flat panels, sharp corners, disciplined type. No gradients,
   no glow, no decorative rings. Class names are stable across all pages.
   ===================================================================== */

:root {
  /* surfaces (neutral, slightly cool near-black) */
  --bg:        #0b0c0e;
  --bg-2:      #101215;
  --panel:     #131519;
  --panel-2:   #16191d;
  --panel-3:   #1c2025;
  --hover:     #191c21;
  --line:      #23272d;
  --line-2:    #2c313a;

  /* text */
  --text:      #e7e9ec;
  --muted:     #9BA1AA;
  --faint:     #6a7079;

  /* single accent (restrained blue), used sparingly for actions/links/focus */
  --accent:      #4c7dfb;
  --accent-2:    #6f97ff;
  --accent-ink:  #ffffff;
  --accent-soft: rgba(76,125,251,0.12);
  --accent-line: rgba(76,125,251,0.30);
  /* legacy gradient tokens kept as SOLID fallbacks so inline uses stay flat */
  --grad:      var(--accent);
  --grad-soft: var(--panel-2);

  /* status (muted, not neon) */
  --ok:          #3ecf8e;
  --ok-soft:     rgba(62,207,142,0.12);
  --warn:        #d9a441;
  --warn-soft:   rgba(217,164,65,0.12);
  --danger:      #f0616d;
  --danger-soft: rgba(240,97,109,0.12);
  --info:        #58a6ff;
  --info-soft:   rgba(88,166,255,0.12);

  /* geometry, sharper than the default template look */
  --r-sm: 5px;
  --r:    7px;
  --r-lg: 10px;
  --r-xl: 12px;
  --shadow:    0 1px 2px rgba(0,0,0,0.30);
  --shadow-lg: 0 16px 40px -24px rgba(0,0,0,0.75);
  --ring: 0 0 0 3px var(--accent-soft);

  --sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", "Cascadia Code", ui-monospace, Menlo, Consolas, monospace;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}
/* Flat background (no radial "aurora" glow). A single, barely-there top wash. */
body.bg-aurora {
  background: linear-gradient(180deg, #0d0f12 0%, var(--bg) 320px);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -0.014em; font-weight: 600; color: var(--text); }
h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.85rem); }
h3 { font-size: 1.05rem; }
p  { margin: 0 0 1em; color: var(--muted); }
code, pre, kbd { font-family: var(--mono); }
::selection { background: rgba(76,125,251,0.28); color: #fff; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #3a3f48; }

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.grid { display: grid; gap: 18px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.center { text-align: center; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }

/* one accent word in a heading, solid, not a gradient fill */
.gt { color: var(--accent); }

/* section label (was a pill with a pulsing dot), now a plain uppercase kicker */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0; background: none; border: none;
  color: var(--faint); font-size: .75rem; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase;
}
.eyebrow .dot { display: none; }

/* ---------- buttons ---------- */
.btn {
  --b: var(--panel-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 15px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: var(--b); color: var(--text);
  font-family: inherit; font-size: .9rem; font-weight: 500; cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
  white-space: nowrap; user-select: none;
}
.btn:hover { background: var(--hover); border-color: var(--line-2); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.subtle { background: var(--panel-2); }
.btn.danger { background: transparent; border-color: rgba(240,97,109,0.4); color: #f4909a; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { padding: 6px 11px; font-size: .82rem; border-radius: var(--r-sm); }
.btn.lg { padding: 11px 20px; font-size: .95rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .ico { width: 16px; height: 16px; }

/* ---------- cards / panels ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px;
}
.card.pad-lg { padding: 28px; }
.card.glow { position: relative; } /* glow removed, kept as a no-op for compatibility */

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: var(--r-sm); font-size: .74rem; font-weight: 600;
  letter-spacing: .01em; border: 1px solid var(--line-2); background: var(--panel-3); color: var(--muted);
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.ok     { color: var(--ok);     background: var(--ok-soft);     border-color: rgba(62,207,142,0.28); }
.badge.warn   { color: var(--warn);   background: var(--warn-soft);   border-color: rgba(217,164,65,0.28); }
.badge.danger { color: var(--danger); background: var(--danger-soft); border-color: rgba(240,97,109,0.28); }
.badge.info   { color: var(--info);   background: var(--info-soft);   border-color: rgba(88,166,255,0.28); }
.badge.accent { color: var(--accent-2); background: var(--accent-soft); border-color: var(--accent-line); }

/* ---------- forms ---------- */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: .82rem; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.input, input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], textarea, select {
  width: 100%; padding: 9px 12px; border-radius: var(--r);
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text);
  font-family: inherit; font-size: .9rem; transition: border-color .12s ease, box-shadow .12s ease;
}
textarea { resize: vertical; min-height: 96px; font-family: var(--mono); font-size: .84rem; }
.input:focus, input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.input::placeholder, input::placeholder, textarea::placeholder { color: var(--faint); }
.hint { font-size: .78rem; color: var(--faint); margin-top: 6px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 15px center, right 10px center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

.otp { display: flex; gap: 10px; justify-content: center; }
.otp input { width: 46px; height: 54px; text-align: center; font-size: 1.4rem; font-family: var(--mono); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
table.data { width: 100%; border-collapse: collapse; font-size: .87rem; min-width: 640px; }
table.data th { text-align: left; padding: 11px 16px; color: var(--faint); font-weight: 500; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--line); background: var(--panel-2); position: sticky; top: 0; }
table.data td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background .1s ease; }
table.data tbody tr:hover { background: var(--hover); }
.cell-key { font-family: var(--mono); font-size: .82rem; color: #c3c9d4; }

/* avatar (discord identity) */
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--panel-3); border: 1px solid var(--line-2); object-fit: cover; }
.identity { display: inline-flex; align-items: center; gap: 9px; }
.identity .who { display: flex; flex-direction: column; line-height: 1.25; }
.identity .who b { font-size: .85rem; font-weight: 600; }
.identity .who small { color: var(--faint); font-size: .72rem; }

/* ---------- marketing nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,12,14,0.85); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.nav .links { display: flex; align-items: center; gap: 26px; }
.nav .links a { color: var(--muted); font-size: .9rem; font-weight: 450; transition: color .12s ease; }
.nav .links a:hover { color: var(--text); }

.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; letter-spacing: -0.01em; font-size: 1.02rem; color: var(--text); }
.brand .logo { width: 27px; height: 27px; border-radius: 7px; background: var(--panel-3); border: 1px solid var(--line-2); display: grid; place-items: center; }
.brand .logo svg { width: 15px; height: 15px; color: var(--accent); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 76px 0 44px; text-align: center; }
.hero h1 { max-width: 18ch; margin-inline: auto; }
.hero p.lead { font-size: 1.08rem; max-width: 58ch; margin: 16px auto 26px; color: var(--muted); }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.orbit { display: none; } /* decorative rings removed */

/* section */
.section { padding: 66px 0; }
.section-head { max-width: 60ch; margin: 0 auto 40px; }
.section-head.center, .section-head { text-align: center; }
.section-head p { font-size: 1rem; }

/* feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
  padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line);
  background: var(--panel); transition: border-color .12s ease;
}
.feature:hover { border-color: var(--line-2); }
.feature .ic { width: 38px; height: 38px; border-radius: var(--r); display: grid; place-items: center; background: var(--panel-3); border: 1px solid var(--line-2); margin-bottom: 14px; }
.feature .ic svg { width: 19px; height: 19px; color: var(--accent); }
.feature h3 { font-size: 1.02rem; }
.feature p { font-size: .9rem; margin: 0; color: var(--muted); }

/* stat strip */
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: var(--r-lg); overflow: hidden; padding: 0; border: 1px solid var(--line); }
.stat-mini { text-align: center; padding: 22px 16px; background: var(--panel); }
.stat-mini .n { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em; color: var(--text); }
.stat-mini .n.gt { color: var(--text); } /* keep stat numbers neutral, not accent-flooded */
.stat-mini .l { color: var(--faint); font-size: .82rem; margin-top: 4px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { position: relative; padding: 22px; }
.step .num { width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--panel-3); border: 1px solid var(--line-2); display: grid; place-items: center; font-weight: 600; font-size: .85rem; color: var(--accent); margin-bottom: 12px; }

/* code block */
.code {
  background: #08090b; border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px 16px; overflow-x: auto; font-size: .83rem; line-height: 1.7; color: #c3c9d4;
  position: relative;
}
.code .cm { color: var(--faint); }
.code .st { color: #8fd6a9; }
.code .kw { color: #7aa2ff; }
.code .copy { position: absolute; top: 10px; right: 10px; }

/* pricing */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan { padding: 26px; display: flex; flex-direction: column; }
.plan.pop { border-color: var(--accent-line); }
.plan .price { font-size: 2rem; font-weight: 650; letter-spacing: -0.02em; margin: 8px 0; }
.plan .price small { font-size: .85rem; font-weight: 450; color: var(--faint); }
.plan ul { list-style: none; padding: 0; margin: 16px 0 22px; display: flex; flex-direction: column; gap: 10px; }
.plan li { display: flex; align-items: flex-start; gap: 9px; font-size: .9rem; color: var(--muted); }
.plan li svg { width: 16px; height: 16px; color: var(--ok); flex: none; margin-top: 2px; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0 28px; margin-top: 32px; color: var(--faint); font-size: .87rem; }
.footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer a { color: var(--muted); display: block; padding: 4px 0; }
.footer a:hover { color: var(--text); }
.footer h5 { color: var(--text); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; font-weight: 600; }

/* ---------- auth pages ---------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-aside { position: relative; padding: 52px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 388px; }
.auth-card h1 { font-size: 1.55rem; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: .8rem; margin: 18px 0; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }

/* ---------- dashboard app-shell ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; padding: 16px 12px; gap: 3px; overflow-y: auto; }
.side .brand { padding: 8px 10px 14px; }
.side .navlabel { font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); padding: 14px 12px 6px; }
.side .navlink { display: flex; align-items: center; gap: 11px; padding: 8px 11px; border-radius: var(--r); color: var(--muted); font-size: .89rem; font-weight: 450; cursor: pointer; transition: background .1s ease, color .1s ease; }
.side .navlink svg { width: 17px; height: 17px; opacity: .85; }
.side .navlink:hover { background: var(--hover); color: var(--text); }
.side .navlink.active { background: var(--panel-3); color: var(--text); }
.side .navlink.active svg { color: var(--accent); opacity: 1; }
.side .sidefoot { margin-top: auto; padding: 12px 6px 4px; border-top: 1px solid var(--line); }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 26px; border-bottom: 1px solid var(--line); background: rgba(11,12,14,0.85); backdrop-filter: blur(10px); }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: .85rem; }
.crumbs b { color: var(--text); font-weight: 600; }
.content { padding: 26px; max-width: 1160px; width: 100%; }
.acct-chip { display: inline-flex; align-items: center; gap: 10px; padding: 5px 8px 5px 5px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; }
.acct-chip .av { width: 26px; height: 26px; border-radius: 5px; background: var(--panel-3); border: 1px solid var(--line-2); display: grid; place-items: center; font-weight: 600; font-size: .78rem; color: var(--accent); }

/* stat cards */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat {
  position: relative; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--line);
  background: var(--panel);
}
.stat .ic { position: absolute; top: 15px; right: 15px; width: 32px; height: 32px; border-radius: var(--r); display: grid; place-items: center; background: var(--panel-3); border: 1px solid var(--line-2); }
.stat .ic svg { width: 17px; height: 17px; }
.stat .k { color: var(--faint); font-size: .8rem; font-weight: 450; }
.stat .v { font-size: 1.7rem; font-weight: 650; letter-spacing: -0.02em; margin: 6px 0 2px; }
.stat .sub { font-size: .77rem; color: var(--faint); }
.stat .bar { height: 4px; border-radius: 3px; background: var(--panel-3); margin-top: 12px; overflow: hidden; }
.stat .bar > i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
/* icon tints, muted, single-hue washes */
.ic.i-accent { color: var(--accent); }
.ic.i-ok { color: var(--ok); }
.ic.i-warn { color: var(--warn); }
.ic.i-info { color: var(--info); }
.ic.i-danger { color: var(--danger); }

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel-head h2, .panel-head h3 { margin: 0; }

/* toast */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 11px 15px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--panel-2); box-shadow: var(--shadow-lg); font-size: .87rem; display: flex; align-items: center; gap: 10px; animation: slidein .15s ease; max-width: 360px; }
.toast.ok .ti { color: var(--ok); }
.toast.err { border-color: rgba(240,97,109,0.4); } .toast.err .ti { color: var(--danger); }
@keyframes slidein { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(4,5,7,0.66); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 150; padding: 20px; }
.modal { width: 100%; max-width: 440px; }

/* empty state */
.empty { text-align: center; padding: 42px 20px; color: var(--faint); }
.empty svg { width: 36px; height: 36px; margin-bottom: 12px; opacity: .6; }

/* misc */
.kbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.copyfield { display: flex; gap: 8px; }
.copyfield input { font-family: var(--mono); font-size: .82rem; }
hr.sep { border: none; border-top: 1px solid var(--line); margin: 20px 0; }
.tag-mode { text-transform: capitalize; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .feature-grid, .steps, .pricing { grid-template-columns: 1fr; }
  .int-grid { grid-template-columns: 1fr !important; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .footer .cols { grid-template-columns: 1fr 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; z-index: 100; width: 236px; transform: translateX(-105%); transition: transform .18s ease; box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .menu-btn { display: inline-flex !important; }
}
@media (min-width: 961px) { .menu-btn { display: none; } }
@media (max-width: 560px) {
  .stat-cards, .stats-strip { grid-template-columns: 1fr; }
  .nav .links { display: none; }
  .content { padding: 18px; }
}
