/* ── AutoSecure web — main stylesheet ───────────────────────────────────────
   Design pass: unified spacing scale, Sora/Inter type system, layered
   shadows, softened motion (cubic-bezier), sticky table headers, focus
   rings, staggered entrance animations, reduced-motion support.           */

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --bg: #0a0c12;
  --bg-soft: #0e1119;
  --panel: #131824;
  --panel-2: #171d2c;
  --line: rgba(148, 163, 199, 0.14);
  --line-soft: rgba(148, 163, 199, 0.08);
  --line-strong: rgba(148, 163, 199, 0.28);
  --txt: #e9edf6;
  --muted: #8d97ae;
  --acc: #38e8c6;
  --acc-2: #7c6cff;
  --acc-3: #38bdf8;
  --acc-soft: rgba(56, 232, 198, 0.10);
  --acc-line: rgba(56, 232, 198, 0.30);
  --acc-glow: rgba(56, 232, 198, 0.45);
  --acc-focus: rgba(56, 232, 198, 0.35);
  --acc-ink: #06251f;
  --acc-grad-end: #2bd0b1;
  --good: #4ade80;
  --warn: #ffb454;
  --bad: #ff5c7a;
  --discord: #5865F2;
  --side-bg: #0e1119;
  --topbar-bg: rgba(10, 12, 18, 0.78);
  --row: rgba(255, 255, 255, 0.02);
  --field-bg: rgba(255, 255, 255, 0.035);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 10px -4px rgba(0, 0, 0, 0.5);
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 32px 64px -28px rgba(0, 0, 0, 0.78);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.17s;
  --dur-slow: 0.34s;
  --ring: 0 0 0 3px var(--acc-focus);

  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Sora', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
}

/* ── Themes (set via <html data-theme="…">) ─────────────────────────────── */
html[data-theme='ocean'] {
  --bg: #081018; --bg-soft: #0a141f; --panel: #0f1b29; --panel-2: #122233;
  --line: rgba(125, 155, 200, 0.16); --line-soft: rgba(125, 155, 200, 0.09);
  --line-strong: rgba(125, 155, 200, 0.3);
  --txt: #e8eef9; --muted: #8b98b4;
  --acc: #38bdf8; --acc-2: #6366f1; --acc-3: #7dd3fc;
  --acc-soft: rgba(56, 189, 248, 0.11); --acc-line: rgba(56, 189, 248, 0.32);
  --acc-glow: rgba(56, 189, 248, 0.45); --acc-focus: rgba(56, 189, 248, 0.35);
  --acc-ink: #041c2a; --acc-grad-end: #2ba6e0;
  --side-bg: #0a141f; --topbar-bg: rgba(8, 16, 24, 0.78);
}
html[data-theme='end'] {
  --bg: #0d0a15; --bg-soft: #120e1e; --panel: #171225; --panel-2: #1c1630;
  --line: rgba(167, 139, 250, 0.18); --line-soft: rgba(167, 139, 250, 0.09);
  --line-strong: rgba(167, 139, 250, 0.32);
  --txt: #efeafb; --muted: #9a8fb8;
  --acc: #a78bfa; --acc-2: #f472b6; --acc-3: #c4b5fd;
  --acc-soft: rgba(167, 139, 250, 0.13); --acc-line: rgba(167, 139, 250, 0.34);
  --acc-glow: rgba(167, 139, 250, 0.5); --acc-focus: rgba(167, 139, 250, 0.38);
  --acc-ink: #160a2e; --acc-grad-end: #8b6cf3;
  --side-bg: #120e1e; --topbar-bg: rgba(13, 10, 21, 0.78);
}
html[data-theme='nether'] {
  --bg: #120c08; --bg-soft: #181009; --panel: #1e1510; --panel-2: #251a12;
  --line: rgba(255, 170, 120, 0.16); --line-soft: rgba(255, 170, 120, 0.08);
  --line-strong: rgba(255, 170, 120, 0.3);
  --txt: #f8ede4; --muted: #b39a8a;
  --acc: #ffa14a; --acc-2: #ff5c7a; --acc-3: #ffd166;
  --acc-soft: rgba(255, 161, 74, 0.12); --acc-line: rgba(255, 161, 74, 0.34);
  --acc-glow: rgba(255, 161, 74, 0.45); --acc-focus: rgba(255, 161, 74, 0.36);
  --acc-ink: #2a1004; --acc-grad-end: #ef8630;
  --side-bg: #181009; --topbar-bg: rgba(18, 12, 8, 0.78);
}
html[data-theme='crimson'] {
  --bg: #120a0e; --bg-soft: #170d12; --panel: #1d1117; --panel-2: #251519;
  --line: rgba(255, 138, 160, 0.16); --line-soft: rgba(255, 138, 160, 0.08);
  --line-strong: rgba(255, 138, 160, 0.3);
  --txt: #f9e9ee; --muted: #b18d99;
  --acc: #ff5c7a; --acc-2: #ff8ab0; --acc-3: #ffb3c6;
  --acc-soft: rgba(255, 92, 122, 0.12); --acc-line: rgba(255, 92, 122, 0.34);
  --acc-glow: rgba(255, 92, 122, 0.45); --acc-focus: rgba(255, 92, 122, 0.36);
  --acc-ink: #2a060f; --acc-grad-end: #e64a68;
  --side-bg: #170d12; --topbar-bg: rgba(18, 10, 14, 0.78);
}
html[data-theme='overworld'] {
  --bg: #f2f4f9; --bg-soft: #e9edf5; --panel: #ffffff; --panel-2: #f6f8fc;
  --line: rgba(20, 30, 55, 0.14); --line-soft: rgba(20, 30, 55, 0.08);
  --line-strong: rgba(20, 30, 55, 0.26);
  --txt: #141c2e; --muted: #5d6b87;
  --acc: #0ea5a4; --acc-2: #6366f1; --acc-3: #0284c7;
  --acc-soft: rgba(14, 165, 164, 0.11); --acc-line: rgba(14, 165, 164, 0.38);
  --acc-glow: rgba(14, 165, 164, 0.3); --acc-focus: rgba(14, 165, 164, 0.35);
  --acc-ink: #ffffff; --acc-grad-end: #0b8f8e;
  --side-bg: #ffffff; --topbar-bg: rgba(255, 255, 255, 0.82);
  --row: rgba(15, 23, 42, 0.025);
  --field-bg: #ffffff;
  --shadow-sm: 0 2px 10px -6px rgba(20, 30, 55, 0.25);
  --shadow: 0 18px 40px -22px rgba(20, 30, 55, 0.35);
  --shadow-lg: 0 32px 64px -28px rgba(20, 30, 55, 0.4);
}

/* ── Icons ──────────────────────────────────────────────────────────────── */
.icon-sprite { display: none; }
.ico {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.ico-solid { fill: currentColor; stroke: none; }

/* ── Base ───────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.page-landing::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 480px at 78% -8%, rgba(124, 108, 255, 0.13), transparent 60%),
    radial-gradient(760px 420px at 12% 4%, rgba(56, 232, 198, 0.1), transparent 55%),
    radial-gradient(640px 380px at 50% 108%, rgba(56, 189, 248, 0.07), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
main, .site-header, .site-footer { position: relative; z-index: 1; }

img { max-width: 100%; display: inline-block; }
a { color: var(--acc); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.16; margin: 0 0 0.5em; font-weight: 700;
  letter-spacing: -0.022em;
}
h1 { font-size: clamp(2.05rem, 4.4vw, 3.3rem); letter-spacing: -0.028em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); letter-spacing: -0.024em; }
h3 { font-size: 1.12rem; letter-spacing: -0.014em; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: 0.92em; font-variant-numeric: tabular-nums; }
code { background: rgba(124, 108, 255, 0.12); border: 1px solid var(--line-soft); padding: 0.08em 0.4em; border-radius: 6px; }
ul { padding-left: 1.2em; }
.container { width: min(1160px, 92vw); margin: 0 auto; }
.container.narrow { width: min(780px, 92vw); }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.center { text-align: center; }
[hidden] { display: none !important; }
.grad {
  background: linear-gradient(92deg, var(--acc), var(--acc-2) 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  font: inherit; font-family: var(--font); font-weight: 600; font-size: 0.94rem;
  padding: 0.62em 1.25em; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; text-decoration: none !important;
  transition:
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    filter var(--dur) var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn-primary {
  background: linear-gradient(92deg, var(--acc), var(--acc-grad-end));
  color: var(--acc-ink);
  box-shadow: 0 10px 26px -10px var(--acc-glow);
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 16px 34px -12px var(--acc-glow); }
.btn-primary:active { filter: brightness(0.98); }
.btn-ghost { background: rgba(148, 163, 199, 0.08); border-color: var(--line); color: var(--txt); }
.btn-ghost:hover { background: rgba(148, 163, 199, 0.13); border-color: var(--line-strong); }
.btn-discord { background: var(--discord); color: #fff; }
.btn-discord:hover { filter: brightness(1.09); box-shadow: 0 14px 30px -14px rgba(88, 101, 242, 0.7); }
.btn-lg { font-size: 1.02rem; padding: 0.8em 1.6em; border-radius: 12px; }
.btn-sm { font-size: 0.85rem; padding: 0.42em 0.95em; }
.btn-xs { font-size: 0.78rem; padding: 0.28em 0.6em; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; gap: 1.4rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--txt); text-decoration: none !important; font-family: var(--font-display); font-weight: 800; font-size: 1.06rem; letter-spacing: -0.02em; }
.brand em {
  font-style: normal;
  background: linear-gradient(92deg, var(--acc), var(--acc-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-mark { display: inline-flex; }
.site-nav { display: flex; gap: 1.4rem; margin-left: 1.2rem; }
.site-nav a { color: var(--muted); font-weight: 500; font-size: 0.93rem; text-decoration: none; transition: color var(--dur) var(--ease); }
.site-nav a:hover { color: var(--txt); }
.header-actions { margin-left: auto; display: flex; gap: 0.6rem; align-items: center; }
.header-user {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.24rem 0.9rem 0.24rem 0.28rem;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: rgba(148, 163, 199, 0.06);
  color: var(--txt); text-decoration: none;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.header-user:hover { border-color: var(--acc-line); background: var(--acc-soft); box-shadow: 0 8px 22px -14px var(--acc-glow); }
.header-avatar { position: relative; width: 32px; height: 32px; flex: none; }
.header-avatar img { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); object-fit: cover; display: block; }
.header-avatar .presence { border-color: var(--bg); }
.header-user-name { font-weight: 600; font-size: 0.9rem; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-signout {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: none;
  border: 1px solid var(--line); border-radius: 50%;
  background: rgba(148, 163, 199, 0.06); color: var(--muted);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.header-signout:hover { color: var(--bad); border-color: rgba(255, 92, 122, 0.4); background: rgba(255, 92, 122, 0.1); transform: translateY(-1px); }
.nav-toggle { display: none; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { padding: 5.4rem 0 3.4rem; }
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(620px 320px at 68% 22%, rgba(124, 108, 255, 0.16), transparent 65%);
}
.hero-inner { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 3rem; align-items: center; }
.pill {
  display: inline-block; font-size: 0.76rem; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--acc); background: var(--acc-soft); border: 1px solid var(--acc-line);
  padding: 0.35em 0.95em; border-radius: var(--radius-pill); margin-bottom: 1.25rem;
  box-shadow: 0 6px 20px -12px var(--acc-glow);
}
.hero-sub { color: var(--muted); font-size: 1.06rem; max-width: 34rem; line-height: 1.68; }
.hero-cta { display: flex; gap: 0.8rem; margin: 1.7rem 0 1.5rem; flex-wrap: wrap; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.hero-points li { color: var(--muted); font-size: 0.93rem; padding-left: 1.5em; position: relative; }
.hero-points li::before { content: '✓'; position: absolute; left: 0; color: var(--acc); font-weight: 700; }

.hero-panel { min-width: 0; }
.panel-window {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: perspective(1200px) rotateY(-4deg) rotateX(1.5deg);
}
.panel-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.62rem 0.95rem; border-bottom: 1px solid var(--line-soft); background: rgba(255,255,255,0.02); }
.panel-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3145; display: inline-block; }
.panel-bar i:first-child { background: #ff5f57; } .panel-bar i:nth-child(2) { background: #febc2e; } .panel-bar i:nth-child(3) { background: #28c840; }
.panel-bar span { margin-left: auto; color: var(--muted); font-size: 0.75rem; }
.panel-body { padding: 1rem 1.1rem 1.25rem; display: grid; gap: 0.7rem; font-size: 0.9rem; }
.p-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.46rem 0.65rem; background: rgba(255,255,255,0.025); border: 1px solid var(--line-soft); border-radius: 9px; }
.p-row b { font-weight: 600; }
.p-dot { width: 8px; height: 8px; border-radius: 50%; background: #3a4358; flex: none; }
.p-dot.ok { background: var(--good); } .p-dot.warn { background: var(--warn); }
.p-tag { margin-left: auto; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.045em; padding: 0.2em 0.62em; border-radius: 6px; background: rgba(148,163,199,0.12); color: var(--muted); }
.p-tag.ok { background: rgba(74, 222, 128, 0.12); color: var(--good); }
.p-tag.bad { background: rgba(255, 92, 122, 0.13); color: var(--bad); }
.p-tag.warn { background: rgba(255, 180, 84, 0.13); color: var(--warn); }
.p-tag.run { background: rgba(56, 189, 248, 0.13); color: var(--acc-3); }
.p-tag.on { background: rgba(56, 232, 198, 0.12); color: var(--acc); }
.p-progress { height: 7px; background: rgba(255,255,255,0.06); border-radius: 99px; overflow: hidden; }
.p-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc-2)); border-radius: 99px; }
.p-caption { color: var(--muted); font-size: 0.72rem; text-align: right; }

/* ── Stats band ─────────────────────────────────────────────────────────── */
.stats-band { border-block: 1px solid var(--line-soft); background: var(--bg-soft); padding: 1.7rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat { text-align: center; }
.stat-num { display: block; font-family: var(--font-display); font-size: 1.95rem; font-weight: 800; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 0.83rem; }

/* ── Sections & cards ───────────────────────────────────────────────────── */
.section { padding: 4.4rem 0; }
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--line-soft); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.7rem; }
.section-head p { margin: 0.4rem 0 0; }
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.35rem 1.45rem; box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.95rem; }
.card-head h2 { font-size: 1.08rem; margin: 0; letter-spacing: -0.012em; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.15rem; }
.feature { transition: transform var(--dur-slow) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.feature:hover { transform: translateY(-3px); border-color: rgba(56, 232, 198, 0.35); box-shadow: var(--shadow); }
.feature-icon { font-size: 1.5rem; margin-bottom: 0.65rem; }
.feature h3 { margin-bottom: 0.35rem; }
.feature p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ── Pricing ────────────────────────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; align-items: stretch; }
.plan { display: flex; flex-direction: column; position: relative; padding-top: 1.65rem; }
.plan h3 { font-size: 0.98rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font); }
.plan-price { font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 1rem; }
.plan-price span { display: block; font-size: 0.78rem; font-weight: 500; color: var(--muted); letter-spacing: 0; font-family: var(--font); }
.plan ul { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: 0.5rem; flex: 1; }
.plan li { font-size: 0.88rem; color: var(--muted); padding-left: 1.4em; position: relative; }
.plan li::before { content: '✓'; position: absolute; left: 0; color: var(--acc); }
.plan-hot { border-color: rgba(124, 108, 255, 0.5); box-shadow: 0 24px 52px -26px rgba(124, 108, 255, 0.55); }
.plan-badge {
  position: absolute; top: -0.72rem; left: 50%; transform: translateX(-50%);
  background: linear-gradient(92deg, var(--acc), var(--acc-2)); color: #08131f;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.28em 0.95em; border-radius: var(--radius-pill);
  box-shadow: 0 8px 22px -12px rgba(124, 108, 255, 0.8);
}
.plan-cta { width: 100%; }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq details {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1rem 1.25rem; margin-bottom: 0.7rem;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.faq details:hover { border-color: var(--line-strong); }
.faq details[open] { border-color: var(--acc-line); background: var(--panel-2); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 2em; transition: color var(--dur) var(--ease); }
.faq summary:hover { color: var(--acc); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: -0.1em; font-size: 1.3rem; color: var(--acc); transition: transform var(--dur-slow) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0.7rem 0 0; font-size: 0.93rem; }

/* ── CTA band ───────────────────────────────────────────────────────────── */
.cta-band { padding: 4.6rem 0; background: linear-gradient(180deg, transparent, rgba(124, 108, 255, 0.07)); border-top: 1px solid var(--line-soft); }
.cta-inner { text-align: center; }
.cta-inner .btn { margin-top: 0.8rem; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line-soft); background: var(--bg-soft); padding: 2.7rem 0 1.7rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; margin-bottom: 2rem; }
.footer-brand p { margin-top: 0.8rem; max-width: 24rem; font-size: 0.9rem; }
.footer-col { display: grid; gap: 0.5rem; align-content: start; }
.footer-col h4 { font-family: var(--font); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 0.3rem; }
.footer-col a { color: var(--txt); font-size: 0.92rem; text-decoration: none; }
.footer-col a:hover { color: var(--acc); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line-soft); padding-top: 1.25rem; font-size: 0.85rem; }

/* ── Login ──────────────────────────────────────────────────────────────── */
.login-main { padding: 4.6rem 0 5rem; }
.narrow-login { width: min(430px, 92vw); }
.login-card { text-align: center; padding: 2.3rem 2rem; }
.login-mark { margin-bottom: 1rem; }
.login-card h1 { font-size: 1.6rem; }
.btn-block { margin: 1.2rem 0 1rem; }
.legal-note { margin-top: 1.2rem; }
.alert { border-radius: 10px; padding: 0.9rem 1rem; font-size: 0.9rem; margin: 1rem 0; text-align: left; }
.alert-warn { background: rgba(255, 180, 84, 0.1); border: 1px solid rgba(255, 180, 84, 0.35); color: var(--warn); }

/* ── Error pages ────────────────────────────────────────────────────────── */
.error-main { padding: 4.5rem 0; }
.error-card { text-align: center; padding: 2.4rem 2rem; }
.error-code { font-family: var(--font-display); font-size: 3rem; font-weight: 800; color: var(--acc); letter-spacing: -0.03em; }
.error-actions { display: flex; gap: 0.7rem; justify-content: center; margin-top: 1.2rem; }

/* ── Legal ──────────────────────────────────────────────────────────────── */
.page-legal .section { padding-top: 3rem; }
.page-legal h2 { font-size: 1.15rem; margin-top: 1.8rem; }
.page-legal p, .page-legal li { color: var(--muted); }

/* ── Dashboard shell ────────────────────────────────────────────────────── */
.page-dash { background: var(--bg); }
.page-dash::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(720px 420px at 88% -10%, rgba(124, 108, 255, 0.08), transparent 62%),
    radial-gradient(620px 380px at 6% 110%, rgba(56, 232, 198, 0.06), transparent 60%);
}
.dash-shell { position: relative; z-index: 1; display: grid; grid-template-columns: 262px 1fr; min-height: 100vh; }
.dash-side {
  border-right: 1px solid var(--line-soft); background: var(--side-bg);
  display: flex; flex-direction: column; padding: 1rem 0.85rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.dash-side::-webkit-scrollbar { width: 6px; }
.dash-side::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.side-brand { margin: 0.15rem 0.45rem 1rem; }
.side-user {
  display: flex; align-items: center; gap: 0.65rem; padding: 0.6rem 0.65rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--row);
  text-decoration: none !important; color: var(--txt) !important; margin-bottom: 0.9rem;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.side-user:hover { border-color: var(--acc-line); background: var(--acc-soft); box-shadow: 0 10px 26px -18px var(--acc-glow); }
.side-avatar { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; padding: 2px; background: linear-gradient(135deg, var(--acc), var(--acc-2)); }
.side-avatar img { width: 100%; height: 100%; border-radius: 50%; display: block; object-fit: cover; background: var(--panel); }
.presence { position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: var(--good); border: 2.5px solid var(--side-bg); }
.side-user-meta { display: grid; line-height: 1.22; min-width: 0; }
.side-user-name { font-weight: 650; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-handle { color: var(--muted); font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .chip { margin-left: auto; }
.chip { display: inline-flex; align-items: center; gap: 0.35em; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.035em; text-transform: uppercase; padding: 0.24em 0.64em; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--row); color: var(--muted); white-space: nowrap; }
.chip-acc { color: var(--acc); border-color: var(--acc-line); background: var(--acc-soft); }
.chip .ico { width: 12px; height: 12px; }
.side-nav { display: grid; gap: 0.18rem; flex: 1; align-content: start; padding-bottom: 0.8rem; }
.side-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.11em; color: var(--muted); padding: 1rem 0.7rem 0.4rem; font-weight: 700; opacity: 0.85; }
.side-nav a {
  position: relative; display: flex; align-items: center; gap: 0.7rem;
  padding: 0.56rem 0.7rem 0.56rem 1.02rem; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-size: 0.93rem; font-weight: 520;
  border: 1px solid transparent;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.side-nav a .ico { width: 17px; height: 17px; opacity: 0.9; transition: color var(--dur) var(--ease); }
.side-nav a:hover { color: var(--txt); background: var(--row); transform: translateX(2px); }
.side-nav a.active { color: var(--txt); background: var(--acc-soft); border-color: var(--acc-line); }
.side-nav a.active::before { content: ''; position: absolute; left: 0.42rem; top: 26%; bottom: 26%; width: 3px; border-radius: 3px; background: var(--acc); box-shadow: 0 0 10px var(--acc-glow); }
.side-nav a.active .ico { color: var(--acc); opacity: 1; }
.side-foot { padding-top: 0.7rem; border-top: 1px solid var(--line-soft); display: grid; gap: 0.15rem; }
.side-mini {
  display: flex; align-items: center; gap: 0.65rem; padding: 0.52rem 0.7rem 0.52rem 1.02rem;
  border-radius: 10px; color: var(--muted); font-size: 0.9rem; font-weight: 520; text-decoration: none;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.side-mini .ico { width: 17px; height: 17px; }
.side-mini:hover { color: var(--txt); background: var(--row); transform: translateX(2px); }
.side-mini.side-danger:hover { color: var(--bad); background: rgba(255, 92, 122, 0.08); }

.dash-main { min-width: 0; display: flex; flex-direction: column; }
.dash-top {
  display: flex; align-items: center; gap: 1rem; padding: 0.85rem 1.6rem;
  border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; z-index: 20;
  background: var(--topbar-bg);
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
}
.dash-title { font-family: var(--font-display); font-size: 1.08rem; margin: 0; letter-spacing: -0.014em; }
.dash-user { margin-left: auto; }
.dash-user-pill {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.32rem 0.8rem 0.32rem 0.4rem;
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--row);
  text-decoration: none !important; color: var(--txt) !important;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.dash-user-pill:hover { border-color: var(--acc-line); background: var(--acc-soft); box-shadow: 0 8px 22px -16px var(--acc-glow); }
.avatar { border-radius: 50%; border: 1px solid var(--line); }
.avatar.lg { width: 56px; height: 56px; }
.avatar.xl { width: 76px; height: 76px; }
.dash-user-meta { display: grid; line-height: 1.2; }
.dash-user-name { font-weight: 650; font-size: 0.88rem; }
.dash-user-role { font-size: 0.72rem; color: var(--muted); }
.dash-content { padding: 1.7rem; display: grid; gap: 1.25rem; align-content: start; }
.dash-toggle { display: none; }

.grid-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat-card { display: grid; gap: 0.2rem; }
.stat-k { color: var(--muted); font-size: 0.82rem; }
.stat-v { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.stat-v.ok { color: var(--good); } .stat-v.bad { color: var(--bad); } .stat-v.warn { color: var(--warn); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }

.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.list-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.55rem 0.7rem; background: var(--row); border: 1px solid var(--line-soft); border-radius: 9px; font-size: 0.9rem; transition: border-color var(--dur) var(--ease); }
.list-row:hover { border-color: var(--line-strong); }
.list-row .p-tag { margin-left: auto; }

.table-scroll { overflow-x: auto; }
.table-scroll.tall { max-height: 480px; overflow-y: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; color: var(--muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.065em; font-weight: 600; padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-scroll.tall .table th { position: sticky; top: 0; z-index: 2; background: var(--panel); }
.table td { padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr { transition: background-color var(--dur) var(--ease); }
.table tr:hover td { background: rgba(148, 163, 199, 0.04); }
.table td.mono, .table td .mono { font-size: 0.82rem; }
.row-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.secret { font-family: var(--mono); font-size: 0.82rem; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form { display: grid; gap: 0.9rem; max-width: 460px; }
.field { display: grid; gap: 0.35rem; }
.field > span { font-size: 0.84rem; color: var(--muted); font-weight: 500; }
.input {
  font: inherit; color: var(--txt); background: var(--field-bg);
  border: 1px solid var(--line); border-radius: 9px; padding: 0.6em 0.8em; width: 100%;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.input:hover { border-color: var(--line-strong); }
.input:focus { outline: none; border-color: var(--acc-line); box-shadow: var(--ring); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.check { display: flex; align-items: center; gap: 0.6rem; font-size: 0.92rem; cursor: pointer; }
.check input { width: 1.1em; height: 1.1em; accent-color: var(--acc); }
.inline-form { display: flex; gap: 0.5rem; }
.inline-form .input { width: 220px; }
.mint-out { background: var(--acc-soft); border: 1px dashed var(--acc-line); border-radius: 9px; padding: 0.8rem 1rem; margin-top: 1rem; font-size: 0.85rem; word-break: break-all; white-space: pre-wrap; }
.profile-row { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.profile-name { font-weight: 700; font-size: 1.05rem; }

/* ── Settings & theme management ────────────────────────────────────────── */
.profile-hero { display: flex; gap: 1.1rem; align-items: center; margin-bottom: 1.1rem; flex-wrap: wrap; }
.profile-avatar { position: relative; flex: none; }
.profile-avatar .presence { width: 14px; height: 14px; border-width: 3px; right: 3px; bottom: 3px; }
.profile-name { margin: 0 0 0.15rem; font-size: 1.3rem; }
.profile-handle { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.chip-copy { background: none; border: 0; padding: 0; margin-left: 0.25rem; color: var(--muted); cursor: pointer; display: inline-flex; transition: color var(--dur) var(--ease); }
.chip-copy:hover { color: var(--acc); }
.chip-copy .ico { width: 13px; height: 13px; }
.meta-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.meta-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 0.9rem; padding: 0.5rem 0.75rem; background: var(--row); border: 1px solid var(--line-soft); border-radius: 9px; transition: border-color var(--dur) var(--ease); }
.meta-list li:hover { border-color: var(--line-strong); }
.meta-list li > span { color: var(--muted); }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.8rem; }
.theme-card {
  position: relative; display: grid; gap: 0.55rem; text-align: left; font: inherit; color: var(--txt);
  background: var(--row); border: 1px solid var(--line); border-radius: 12px; padding: 0.6rem;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.theme-card:hover { border-color: var(--acc-line); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.theme-card.active { border-color: var(--acc); box-shadow: 0 12px 26px -18px var(--acc-glow); }
.theme-preview {
  position: relative; display: block; height: 92px; border-radius: 8px;
  background: var(--p-bg); border: 1px solid rgba(148, 163, 199, 0.18); overflow: hidden;
}
.theme-shot { display: block; width: 100%; height: 100%; object-fit: cover; }
.theme-card.active .theme-shot { filter: saturate(1.08); }
.theme-meta { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.theme-name { font-weight: 600; font-size: 0.88rem; }
.theme-tag { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.theme-check {
  position: absolute; top: 0.5rem; right: 0.5rem; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--acc); color: var(--acc-ink); display: none; align-items: center; justify-content: center;
}
.theme-check .ico { width: 0.72rem; height: 0.72rem; stroke-width: 3; }
.theme-card.active .theme-check { display: inline-flex; }
.lic-strip { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.lic-strip .mono { font-size: 0.85rem; }

/* ── Toasts ─────────────────────────────────────────────────────────────── */
.toast-wrap { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 200; display: grid; gap: 0.6rem; max-width: 360px; }
.toast {
  background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--acc);
  border-radius: 10px; padding: 0.75rem 1rem; font-size: 0.9rem; box-shadow: var(--shadow-lg);
  animation: toast-in 0.22s var(--ease);
}
.toast.bad { border-left-color: var(--bad); }
.toast.warn { border-left-color: var(--warn); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-panel { display: none; }
}
@media (max-width: 900px) {
  .grid-stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .dash-shell { grid-template-columns: 1fr; }
  .dash-side {
    position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 60;
    transform: translateX(-100%); transition: transform 0.24s var(--ease);
  }
  body.side-open .dash-side { transform: none; }
  .dash-toggle { display: inline-flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .site-nav { display: none; }
  body.nav-open .site-nav { display: flex; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-soft); padding: 1rem 4vw; flex-direction: column; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; margin-left: auto; padding: 0.4rem; }
  .nav-toggle span { width: 22px; height: 2px; background: var(--txt); border-radius: 2px; }
  .header-actions { margin-left: 0; }
  .pricing-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-stats { grid-template-columns: 1fr; }
  .dash-content { padding: 1rem; }
  .inline-form .input { width: 100%; }
}

/* ── Bot cards & manage page ────────────────────────────────────────────── */
.bot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 0.9rem;
  margin-top: 0.4rem;
}

.bot-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  aspect-ratio: 1 / 1;
  min-width: 0;
  padding: 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-slow) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.bot-card:hover { transform: translateY(-2px); border-color: var(--acc-line); box-shadow: var(--shadow); }

.bot-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }

.bot-avatar {
  width: 54px; height: 54px; border-radius: 16px;
  object-fit: cover; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  background: var(--field-bg);
}
.bot-avatar-fallback { font-weight: 700; font-size: 1.35rem; color: var(--acc); font-family: var(--mono); }

.bot-status {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.18rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(148, 163, 199, 0.07);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--muted);
  flex: none;
}
.bot-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted);
  flex: none;
}
.bot-status.online { color: var(--good); border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.09); }
.bot-status.online .bot-dot { background: var(--good); box-shadow: 0 0 6px rgba(74, 222, 128, 0.7); }
.bot-status.offline { color: var(--bad); border-color: rgba(255, 92, 122, 0.35); background: rgba(255, 92, 122, 0.09); }
.bot-status.offline .bot-dot { background: var(--bad); }
.bot-status.unknown { color: var(--muted); }
.bot-dot.online { background: var(--good); box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.16); }
.bot-dot.offline { background: var(--bad); box-shadow: 0 0 0 3px rgba(255, 92, 122, 0.16); }

.bot-card-mid { min-width: 0; display: grid; gap: 0.15rem; }
.bot-name { margin: 0; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-meta { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tiny { font-size: 0.72rem; }

.bot-card-pills { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.bot-card-pills .p-tag { margin-left: 0; }
.bot-manage-btn { margin-top: auto; text-align: center; }

.new-bot-panel {
  display: grid;
  gap: 0.9rem;
  max-width: 100%;
  margin-top: 0.9rem;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--acc-line);
  border-radius: var(--radius-sm);
  background: var(--acc-soft);
}
.new-bot-panel .muted { max-width: 60ch; }

.control-note {
  display: flex; align-items: flex-start; gap: 0.5rem;
  margin: 0.9rem 0 0;
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(255, 180, 84, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(255, 180, 84, 0.08);
  color: var(--warn);
}
.control-note svg { flex: none; margin-top: 1px; }
.control-note .mono { color: inherit; }

/* ── Bot manage: hero ───────────────────────────────────────────────────── */
.manage-back { margin: 0; }
.manage-back a { text-decoration: none; }
.manage-back a:hover { color: var(--acc); }

.bot-hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin-top: 14px;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.bot-hero:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.bot-hero-id { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.bot-hero-avatar {
  width: 76px; height: 76px; border-radius: 18px;
  object-fit: cover; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  background: var(--field-bg);
  font-size: 1.9rem; font-family: var(--mono); font-weight: 700; color: var(--acc);
}
.bot-hero-text { min-width: 0; }
.bot-hero-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.bot-hero-name { margin: 0 0 0.15rem; font-size: 1.35rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-hero-status { margin: 0.25rem 0 0; display: flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; color: var(--muted); }

.copyable { cursor: pointer; border-bottom: 1px dashed var(--line); transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.copyable:hover { color: var(--acc); border-color: var(--acc-line); }

.sep { border: none; border-top: 1px solid var(--line-soft); margin: 1rem 0; }

.danger-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.danger-row p { margin: 0.2rem 0 0; }
.btn-danger { background: rgba(255, 92, 122, 0.14); border-color: rgba(255, 92, 122, 0.35); color: var(--bad); }
.btn-danger:hover { background: rgba(255, 92, 122, 0.22); box-shadow: 0 12px 26px -16px rgba(255, 92, 122, 0.6); }

/* ── Bot manage: settings ───────────────────────────────────────────────── */
#bot-settings-form { display: grid; gap: 1rem; }
#bot-settings-form .card { margin: 0; }
#bot-settings-form .row-actions { justify-content: flex-end; }

.switch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.55rem; }
.switch-row {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.6rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.switch-row:hover { border-color: var(--acc-line); background: var(--acc-soft); }
/* checkbox painted as a toggle switch */
.switch-row input[type='checkbox'] {
  appearance: none; -webkit-appearance: none;
  position: relative; flex: none;
  width: 40px; height: 23px; margin: 0;
  border-radius: 999px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.switch-row input[type='checkbox']::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--muted);
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.switch-row input[type='checkbox']:checked { background: var(--acc); border-color: var(--acc); }
.switch-row input[type='checkbox']:checked::after { transform: translateX(17px); background: var(--acc-ink); }
.switch-row input[type='checkbox']:focus-visible { outline: 2px solid var(--acc-line); outline-offset: 2px; }
.switch-row:has(input[type='checkbox']:checked) { border-color: var(--acc-line); }
.switch-text { display: grid; gap: 0.1rem; min-width: 0; }
.switch-text strong { font-size: 0.86rem; font-weight: 600; }
.switch-text em { font-style: normal; font-size: 0.72rem; color: var(--muted); line-height: 1.35; }

.text-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.8rem; }

/* ── Bot manage: embed editor ───────────────────────────────────────────── */
.embed-layout { display: grid; grid-template-columns: minmax(200px, 250px) 1fr; gap: 1rem; }

.embed-list { max-height: 560px; overflow: auto; padding-right: 0.5rem; border-right: 1px solid var(--line-soft); }
.embed-group { margin-bottom: 0.8rem; }
.embed-group h4 { margin: 0 0 0.35rem; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.embed-type-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  width: 100%; text-align: left;
  padding: 0.38rem 0.6rem; margin-bottom: 0.22rem;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--txt); font-size: 0.82rem; cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.embed-type-btn:hover { background: rgba(148, 163, 199, 0.08); }
.embed-type-btn.active { background: var(--acc-soft); border-color: var(--acc-line); color: var(--acc); }
.embed-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); flex: none; }

.embed-editor { min-width: 0; display: grid; gap: 0.8rem; align-content: start; }

.embed-workbench { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr); gap: 1.1rem; align-items: start; }
.embed-fields { display: grid; gap: 0.6rem; min-width: 0; }
.embed-side { display: grid; gap: 0.55rem; position: sticky; top: 0.8rem; align-content: start; min-width: 0; }
.embed-side-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; }
.embed-side .embed-preview { max-width: none; }
#embed-form { display: grid; gap: 0.8rem; }
.embed-editor textarea.input { resize: vertical; }

.json-details summary { cursor: pointer; color: var(--muted); font-size: 0.82rem; margin-bottom: 0.4rem; transition: color var(--dur) var(--ease); }
.json-details summary:hover { color: var(--acc); }
.json-details textarea { width: 100%; }

.embed-preview {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  border: 1px solid rgba(0, 0, 0, 0.45);
  border-radius: 8px;
  overflow: hidden;
  background: #313338;
  max-width: 480px;
  box-shadow: 0 12px 28px -20px rgba(0, 0, 0, 0.95);
}
.embed-preview-bar { grid-row: 1 / span 2; width: 4px; background: #5865f2; }
.embed-preview-body { grid-column: 2; display: flex; gap: 0.8rem; padding: 0.85rem 1rem; min-width: 0; }
.embed-preview-main { flex: 1; min-width: 0; display: grid; gap: 0.3rem; align-content: start; }
.embed-preview-author { font-size: 0.78rem; font-weight: 600; color: #f2f3f5; }
.embed-preview-title { color: #f2f3f5; font-size: 0.98rem; line-height: 1.3; }
.embed-preview-desc { margin: 0; color: #dbdee1; font-size: 0.84rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.embed-preview-thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex: none; margin-left: auto; }
.embed-preview-fields { display: grid; gap: 0.45rem; margin-top: 0.15rem; }
.embed-preview-field { display: grid; gap: 0.1rem; }
.embed-preview-field strong { color: #f2f3f5; font-size: 0.76rem; font-weight: 600; }
.embed-preview-field span { color: #dbdee1; font-size: 0.78rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.embed-preview-foot {
  grid-column: 2;
  display: flex; align-items: center; gap: 0.4rem;
  margin: 0 1rem;
  padding: 0.5rem 0 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #b5bac1; font-size: 0.72rem;
  overflow-wrap: anywhere;
}

/* Components V2 payload preview */
.embed-v2 { border-top: 1px solid var(--line-soft); padding-top: 0.6rem; }
.embed-v2 summary { cursor: pointer; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.embed-v2 summary:hover { color: var(--txt); }
.embed-v2[open] summary { margin-bottom: 0.4rem; }
.v2-preview {
  margin-top: 0.5rem;
  background: #2b2d31;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  display: grid; gap: 0.4rem;
}
.v2-preview-head { border-left: 4px solid #8b5cf6; padding-left: 0.55rem; color: #f2f3f5; font-weight: 700; font-size: 0.9rem; }
.v2-preview-line { margin: 0; color: #dbdee1; font-size: 0.82rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.v2-preview-field { display: grid; gap: 0.1rem; }
.v2-preview-field strong { color: #f2f3f5; font-size: 0.74rem; }
.v2-preview-field span { color: #dbdee1; font-size: 0.76rem; white-space: pre-wrap; word-break: break-word; }
.v2-preview-foot { color: #949ba4; }
.v2-preview-rows { border-top: 1px dashed rgba(255, 255, 255, 0.08); padding-top: 0.35rem; }
.embed-v2-json {
  margin: 0.5rem 0 0; padding: 0.65rem 0.75rem;
  background: var(--bg-soft, #1e1f22); border: 1px solid var(--line-soft);
  border-radius: 10px; max-height: 300px; overflow: auto;
  color: var(--txt); white-space: pre;
}

@media (max-width: 860px) {
  .embed-layout { grid-template-columns: 1fr; }
  .embed-list {
    border-right: none; border-bottom: 1px solid var(--line-soft);
    padding: 0 0 0.6rem; max-height: 260px;
  }
}
@media (max-width: 540px) {
  .bot-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .bot-card { aspect-ratio: auto; }
}

/* ── Manage: tabs, quick facts, card actions ────────────────────────────── */
.card-head-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.card-head-actions .p-tag { margin-left: 0; }

.bot-card-actions { margin-top: auto; display: flex; gap: 0.45rem; }
.bot-card-actions .bot-manage-btn { flex: 1; margin-top: 0; }
.bot-card-actions .bot-toggle-btn { display: inline-flex; align-items: center; gap: 0.3rem; flex: none; }
.bot-toggle-btn .ico { width: 13px; height: 13px; }

.manage-tabs {
  display: flex; gap: 0.3rem;
  margin: 14px 0 2px;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--panel);
  width: fit-content; max-width: 100%;
  overflow-x: auto;
}
.manage-tab {
  border: none; background: transparent; color: var(--muted);
  font: inherit; font-size: 0.85rem; font-weight: 600;
  padding: 0.42rem 1rem; border-radius: var(--radius-pill);
  cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.manage-tab:hover { color: var(--txt); background: rgba(148, 163, 199, 0.06); }
.manage-tab.active { background: var(--acc-soft); color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc-line); }
.manage-panel { display: grid; gap: 1rem; margin-top: 0.9rem; }

.fact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.6rem; }
.fact {
  display: grid; gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  transition: border-color var(--dur) var(--ease);
}
.fact:hover { border-color: var(--line-strong); }
.fact-label { font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.fact-value { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Embed default panel ────────────────────────────────────────────────── */
.embed-default {
  display: grid; gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: rgba(148, 163, 199, 0.05);
}
.embed-default-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; }
.embed-default-head .row-actions { margin: 0; }
.embed-default .embed-preview { max-width: 480px; }

/* ── Shop ───────────────────────────────────────────────────────────────── */
.shop-hero .control-note { margin-top: 0.8rem; }
.domain-hero .control-note { margin: 0.6rem 0 0; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 0.9rem; margin: 1rem 0; }
.shop-card {
  position: relative;
  display: flex; flex-direction: column; gap: 0.45rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-slow) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.shop-card:hover { transform: translateY(-2px); border-color: var(--acc-line); box-shadow: var(--shadow); }
.shop-card.highlight { border-color: var(--acc-line); }
.shop-flag {
  position: absolute; top: -9px; right: 12px;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--acc); color: #06131a;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  box-shadow: 0 6px 18px -10px var(--acc-glow);
}
.shop-name { margin: 0; font-size: 1.02rem; }
.shop-price { margin: 0; display: flex; align-items: baseline; gap: 0.35rem; }
.shop-usd { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--acc); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.shop-features { margin: 0; padding-left: 1.05rem; display: grid; gap: 0.25rem; font-size: 0.8rem; color: var(--muted); }
.shop-card .shop-buy { margin-top: auto; }

.pay-panel .card-head { margin-bottom: 0.6rem; }
.pay-layout { display: grid; grid-template-columns: 1fr auto; gap: 1.2rem; align-items: start; }
.pay-info { display: grid; gap: 0.55rem; min-width: 0; }
.pay-row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  flex-wrap: wrap;
}
.pay-label { font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; min-width: 58px; }
.pay-value { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pay-qr { display: grid; gap: 0.4rem; justify-items: center; }
.pay-qr img { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: 6px; }
.pay-qr .mono { max-width: 230px; overflow-wrap: anywhere; text-align: center; }

.admin-bots-table .admin-domain-input { width: 100%; min-width: 160px; }

/* ── Domain setup page ─────────────────────────────────────────────────── */
.domain-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1rem; align-items: start; }
.domain-grid .card { margin: 0; }
#domain-form { display: grid; gap: 0.55rem; margin-bottom: 1.1rem; }
.domain-bots { border-top: 1px solid var(--line); padding-top: 0.6rem; }
.domain-bot-list { list-style: none; margin: 0.2rem 0 0; padding: 0; display: grid; gap: 0.35rem; }
.domain-bot-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.42rem 0.6rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2, rgba(255, 255, 255, 0.02)); }
.domain-steps { margin: 0 0 0.9rem; padding-left: 1.15rem; display: grid; gap: 0.5rem; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }
.domain-steps strong { color: var(--txt); }
.domain-records td { padding-top: 0.55rem; padding-bottom: 0.55rem; }
.domain-records .btn { padding: 0.25rem 0.6rem; }

.dns-result { display: grid; gap: 0.55rem; }
.dns-result-head { margin: 0; font-weight: 600; }
.dns-result.ok .dns-result-head { color: var(--good); }
.dns-result.bad .dns-result-head { color: var(--bad); }
.dns-result-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.dns-result-rows li { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.dns-result-rows li .muted { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dns-issues { margin: 0; padding-left: 1.15rem; display: grid; gap: 0.25rem; color: var(--bad); font-size: 0.84rem; }
#domain-verify-result { margin-top: 0.4rem; }

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

@media (max-width: 1100px) {
  .embed-workbench { grid-template-columns: 1fr; }
  .embed-side { position: static; }
}

/* ── Pay panel & shop extras ────────────────────────────────────────────── */
.pay-panel { border-color: rgba(88, 101, 242, 0.35); }
.pay-panel .pay-layout { gap: 1.8rem; }
#pay-ltc { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: 0.01em; }
.pay-row { align-items: center; }
#pay-address { background: rgba(148, 163, 199, 0.07); border: 1px solid var(--line-soft); border-radius: 6px; padding: 0.32rem 0.55rem; }
.pay-qr img { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8); }
.p-tag.run { animation: p-tag-pulse 1.8s var(--ease) infinite; }
@keyframes p-tag-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.domain-bot-list.scroll { max-height: 300px; overflow: auto; padding-right: 0.35rem; }
.domain-bot-list li { flex-wrap: wrap; }

@media (max-width: 720px) {
  .pay-layout { grid-template-columns: 1fr; }
  .manage-tabs { width: 100%; }
}

/* ── Claimants manager (bot manage → settings) ──────────────────────────── */
.claimant-add { display: grid; grid-template-columns: minmax(180px, 1fr) 120px 150px auto; gap: 0.5rem; margin-top: 0.85rem; align-items: center; }
@media (max-width: 720px) { .claimant-add { grid-template-columns: 1fr 1fr; } }
#claimants-list select.input, #claimants-list input.input { width: auto; min-width: 96px; padding: 0.3rem 0.5rem; font-size: 0.84rem; }
#claimants-list .table td { padding-top: 0.4rem; padding-bottom: 0.4rem; }
.seed-text { word-break: break-all; max-width: 100%; line-height: 1.5; color: var(--muted); }

/* ── Polish pass: selection, scrollbars, focus ──────────────────────────── */
::selection { background: rgba(56, 232, 198, 0.32); }
@supports (background: color-mix(in srgb, red 50%, blue)) {
  ::selection { background: color-mix(in srgb, var(--acc) 32%, transparent); }
}
html { scrollbar-width: thin; scrollbar-color: rgba(148, 163, 199, 0.25) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 199, 0.22); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 199, 0.36); background-clip: padding-box; }
:focus-visible { outline: 2px solid var(--acc-focus); outline-offset: 2px; }
.input:focus-visible { outline: none; }

/* ── Motion: entrance & stagger (respects reduced motion) ───────────────── */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.hero-copy > * { animation: rise-in 0.5s var(--ease) both; }
.hero-copy > *:nth-child(1) { animation-delay: 0.02s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.07s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.12s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.17s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.22s; }
.hero-panel { animation: rise-in 0.6s var(--ease) 0.12s both; }
.cta-inner, .section-head { animation: rise-in 0.5s var(--ease) both; }

.dash-content > * { animation: rise-in 0.38s var(--ease) both; }
.dash-content > *:nth-child(2) { animation-delay: 0.04s; }
.dash-content > *:nth-child(3) { animation-delay: 0.08s; }
.dash-content > *:nth-child(4) { animation-delay: 0.12s; }
.dash-content > *:nth-child(5) { animation-delay: 0.16s; }

.feature-grid > *, .pricing-grid > *, .shop-grid > *, .bot-grid > *, .theme-grid > *, .fact-grid > * { animation: rise-in 0.42s var(--ease) both; }
.feature-grid > *:nth-child(2n), .pricing-grid > *:nth-child(2n), .shop-grid > *:nth-child(2n), .bot-grid > *:nth-child(2n), .theme-grid > *:nth-child(2n), .fact-grid > *:nth-child(2n) { animation-delay: 0.05s; }
.feature-grid > *:nth-child(3n), .pricing-grid > *:nth-child(3n), .shop-grid > *:nth-child(3n), .bot-grid > *:nth-child(3n), .theme-grid > *:nth-child(3n), .fact-grid > *:nth-child(3n) { animation-delay: 0.1s; }
.site-nav { animation: fade-in 0.5s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
