:root,
html[data-theme="dark"] {
  --bg: #000000;
  --bg-2: #0a0a0a;
  --card: #111111;
  --line: #1e1e1e;
  --line-2: #2a2a2a;
  --text: #ffffff;
  --muted: #a0a0a8;
  --muted-2: #6e6e76;
  --accent: #4681FF;
  --accent-2: #3a6fe0;
  --accent-soft: #4681FF22;
  --green: #3dca6e;
  --green-soft: #16361f;
  --orange: #f0a03a;
  --orange-soft: #3a2a12;
  --red: #f07171;
  --red-soft: #3a1616;
  --ink: #000000;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 18px 44px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #ffffff;
  --bg-2: #f5f6f8;
  --card: #ffffff;
  --line: #ececf0;
  --line-2: #dfdfe6;
  --text: #0b0b10;
  --muted: #6d6d79;
  --muted-2: #a0a0ab;
  --accent: #4681FF;
  --accent-2: #3a6fe0;
  --accent-soft: #4681FF18;
  --green: #15a34a;
  --green-soft: #e8f7ee;
  --orange: #d97706;
  --orange-soft: #fdf3e1;
  --red: #dc2626;
  --red-soft: #fdecec;
  --ink: #0b0b10;
  --shadow: 0 1px 2px rgba(16, 16, 24, .04), 0 12px 32px -16px rgba(16, 16, 24, .16);
  color-scheme: light;
}

html[data-theme="light"] .toast { background: #0b0b10; border-color: transparent; }
html[data-theme="light"] .tab.active { box-shadow: 0 1px 3px rgba(0, 0, 0, .08); background: #fff; }
html[data-theme="light"] .modal { background: rgba(11, 11, 16, .45); }
html[data-theme="light"] .input[readonly] { background: var(--bg-2); }
html[data-theme="light"] .chip-gray { background: var(--bg-2); }
html[data-theme="light"] .btn-dark { background: var(--ink); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-feature-settings: 'cv11', 'ss01';
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #fff; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.text-green { color: var(--green); }
.text-orange { color: var(--orange); }
.text-red { color: var(--red); }
.text-accent { color: var(--accent); }
.muted { color: var(--muted); }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; letter-spacing: -0.02em; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 900;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 13px; white-space: nowrap;
  border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s, filter .15s;
  user-select: none;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-dark { background: #1a1a1a; color: #fff; border-color: var(--line-2); }
.btn-dark:hover { filter: brightness(1.15); }
.btn-white { background: #fff; color: #000; }
.btn-white:hover { background: #e8e8ec; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--bg-2); border-color: var(--muted-2); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { filter: brightness(1.08); }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 7px; }
.btn-xs svg { width: 14px; height: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 34px; height: 34px; padding: 0; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label, .field-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.input {
  width: 100%; height: 38px; padding: 0 12px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  outline: none; transition: border-color .15s, box-shadow .15s; color: var(--text);
}
html[data-theme="dark"] .input { background: var(--bg-2); }
.input::placeholder { color: var(--muted-2); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input[readonly] { background: #0d0d0d; color: var(--muted); }
.input.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(240, 113, 113, .15); }
textarea.input { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
select.input {
  appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a0a0a8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-right: 70px; }
.input-group .btn { position: absolute; right: 6px; }
.form-error { color: var(--red); font-size: 12.5px; font-weight: 600; }
.form-error:empty { display: none; }
.form-hint { color: var(--muted-2); font-size: 12px; }
.checkbox { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--accent); flex: none; margin-top: 1px; }
.checkbox a { color: var(--accent); }

/* ---------- Chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; }
.chip-green { background: var(--green-soft); color: var(--green); }
.chip-red { background: var(--red-soft); color: var(--red); }
.chip-orange { background: var(--orange-soft); color: var(--orange); }
.chip-accent { background: var(--accent-soft); color: var(--accent); }
.chip-gray { background: #1a1a1a; color: var(--muted); }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: rgba(0, 0, 0, .72); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-box {
  position: relative; width: 100%; max-width: 400px; max-height: calc(100vh - 40px); overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow);
  transform: translateY(10px); transition: transform .2s;
}
.modal-box-wide { max-width: 560px; }
.modal.open .modal-box { transform: none; }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; color: var(--muted);
}
.modal-close:hover { background: var(--bg-2); color: var(--text); }
.tabs { display: flex; padding: 3px; gap: 3px; background: var(--bg-2); border-radius: 10px; margin: 0 36px 18px 0; }
.tab { flex: 1; height: 32px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); }
.tab.active { background: #1a1a1a; color: var(--text); box-shadow: 0 1px 0 #2a2a2a; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-title { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.auth-sub { color: var(--muted); font-size: 13px; }
.auth-bonus { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 12.5px; color: var(--text); }
.auth-bonus b { color: var(--accent); }
.auth-demo-hint { font-size: 12px; color: var(--muted); text-align: center; }
.auth-demo-hint b { color: var(--text); font-weight: 600; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 360px;
  padding: 11px 14px; border-radius: 10px; font-size: 13px; font-weight: 500;
  background: #1a1a1a; color: #fff; border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: toastIn .2s ease-out;
}
.toast::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; flex: none; }
.toast.error::before { background: #f87171; }
.toast.hide { opacity: 0; transform: translateY(6px); transition: .2s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* =====================================================================
   LANDING
   ===================================================================== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.header-inner { height: 56px; display: flex; align-items: center; gap: 32px; }
.nav { display: flex; gap: 22px; flex: 1; }
.nav a { color: var(--muted); font-weight: 600; font-size: 13px; }
.nav a:hover { color: var(--text); }
.header-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
#headerAuth { display: flex; gap: 8px; }

.theme-toggle {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  color: var(--muted); border: 1px solid var(--line-2); background: var(--card); flex: none;
}
.theme-toggle:hover { color: var(--text); background: var(--bg-2); }
.theme-toggle svg { width: 16px; height: 16px; }

.hero {
  padding: 72px 0 64px;
  background:
    radial-gradient(ellipse 80% 50% at 70% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    var(--bg);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 99px;
  border: 1px solid var(--line-2); font-size: 11.5px; font-weight: 600; color: var(--muted);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: clamp(36px, 4.6vw, 52px); line-height: 1.04; font-weight: 800; letter-spacing: -0.04em; margin: 16px 0 16px; }
.hero h1 span { color: var(--accent); }
.lead { color: var(--muted); font-size: 15px; max-width: 460px; margin-bottom: 22px; }
.hero-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-note { color: var(--muted-2); font-size: 11.5px; margin-top: 12px; }
.hero-stats { display: flex; gap: 48px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.hero-stats b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.hero-stats b small { font-size: 14px; color: var(--muted); font-weight: 600; }
.hero-stats span { color: var(--muted); font-size: 12px; }

.hero-visual { position: relative; }
.mock { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.mock-bar {
  display: flex; align-items: center; gap: 5px; padding: 9px 12px;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
  font-size: 10px; font-weight: 600; letter-spacing: .08em; color: var(--muted); text-transform: uppercase;
}
.mock-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.mock-bar i:last-of-type { margin-right: 8px; }
.mock-body { padding: 16px 16px 12px; }
.mock-label { font-size: 10px; font-weight: 600; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.mock-value { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; margin: 2px 0 6px; }
.mock-list { display: flex; flex-direction: column; margin-top: 12px; }
.mock-list div { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.mock-list div:last-child { border-bottom: 0; }
.mock-list i { font-style: normal; font-size: 10px; font-weight: 600; color: var(--muted); background: var(--bg-2); border-radius: 4px; padding: 1px 5px; }
.mock-list span { flex: 1; color: var(--muted); }
.mock-list b { font-weight: 600; }
.mock-foot { font-size: 10.5px; color: var(--muted-2); padding: 0 16px 12px; display: flex; align-items: center; gap: 6px; }
.mock-foot::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.float {
  position: absolute; right: 0; bottom: 0; padding: 12px 16px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.float b { display: block; font-size: 20px; font-weight: 700; color: var(--accent); letter-spacing: -0.02em; line-height: 1.2; }
.float small { color: var(--muted); font-size: 11px; line-height: 1.3; display: block; }

.strip { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip-inner { display: flex; align-items: center; gap: 28px; height: 52px; overflow-x: auto; white-space: nowrap; }
.strip-inner small { font-size: 10px; font-weight: 600; letter-spacing: .1em; color: var(--muted-2); text-transform: uppercase; }
.strip-inner span { font-size: 12.5px; font-weight: 700; color: var(--text); }

.section { padding: 64px 0; }
.section-alt { background: var(--bg-2); }
.section-head { max-width: 560px; margin-bottom: 28px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.kicker::before { content: ''; width: 18px; height: 1px; background: var(--muted-2); }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin: 10px 0 10px; }
.section-head p { color: var(--muted); font-size: 14px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.step { padding: 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.step-num { font-size: 11px; font-weight: 600; color: var(--accent); margin-bottom: 18px; }
.step h3 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 12.5px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feature { padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.feature-icon {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 14px;
}
.feature-icon svg { width: 18px; height: 18px; }
.feature h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 13px; }

.pricing-card {
  max-width: 420px; margin: 0 auto; padding: 28px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
  text-align: center;
}
.pricing-card .price { font-size: 48px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: 12px 0 4px; }
.pricing-card .price small { font-size: 16px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.pricing-card .price-note { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.pricing-card ul { list-style: none; text-align: left; display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.pricing-card li { display: flex; gap: 8px; font-size: 13px; color: var(--muted); }
.pricing-card li::before { content: '—'; color: var(--accent); }

.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pay-item { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.pay-item b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.pay-item span { color: var(--muted); font-size: 12.5px; }

.faq { max-width: 720px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; font-weight: 600; font-size: 14px; text-align: left; }
.faq-q::after { content: '+'; color: var(--muted); font-size: 18px; font-weight: 400; transition: transform .2s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a p { padding: 0 0 16px; color: var(--muted); font-size: 13px; }

.cta-band {
  border-radius: 16px; padding: 32px; background: var(--card); border: 1px solid var(--line); color: #fff;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
}
.cta-band h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; }
.cta-band p { color: var(--muted); margin-top: 4px; font-size: 13px; }

.footer { padding: 28px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 20px; color: var(--muted); font-size: 12.5px; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--muted-2); font-size: 11.5px; margin-top: 12px; }

.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* =====================================================================
   DASHBOARD
   ===================================================================== */
body.app-body { background: var(--bg); }
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; width: 216px; z-index: 60;
  display: flex; flex-direction: column; gap: 18px; padding: 16px 12px;
  background: var(--card); border-right: 1px solid var(--line); transition: transform .25s; overflow-y: auto;
}
.sidebar .logo { padding: 4px 8px 6px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px;
  font-weight: 600; font-size: 13px; color: var(--muted); width: 100%;
}
.nav-item svg { width: 16px; height: 16px; flex: none; }
.nav-item:hover { color: var(--text); background: var(--bg-2); }
.nav-item.active { color: var(--text); background: var(--bg-2); font-weight: 600; }
.nav-item.active svg { color: var(--accent); }
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.manager { padding: 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.manager-top { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.avatar {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none;
  font-weight: 700; font-size: 12px; background: var(--accent-soft); color: var(--accent);
}
.manager small { display: block; color: var(--muted); font-size: 11px; }
.manager b { font-size: 12.5px; font-weight: 600; }

.main { flex: 1; margin-left: 216px; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: 56px; padding: 0 24px;
  display: flex; align-items: center; gap: 12px;
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; flex: 1; }
.burger { display: none; }
.balance-chip { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 3px 0 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); }
.balance-chip small { color: var(--muted); font-size: 12px; }
.balance-chip b { font-size: 13px; font-weight: 700; }
.balance-chip .btn { height: 26px; }
.user-chip { display: flex; align-items: center; gap: 8px; }
.user-chip b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.user-chip small { color: var(--muted); font-size: 11px; }

.content { padding: 20px 24px 40px; max-width: 1100px; }
.page { display: flex; flex-direction: column; gap: 14px; animation: pageIn .25s ease-out; }
@keyframes pageIn { from { opacity: 0; transform: translateY(4px); } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-title { font-size: 14px; font-weight: 700; }
.card-sub { color: var(--muted); font-size: 12px; margin-top: 1px; }

.grid { display: grid; gap: 14px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-hero { grid-template-columns: 1.4fr 1fr; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.an-kpi { padding: 16px 18px; border-right: 1px solid var(--line); background: var(--card); }
.an-kpi:last-child { border-right: 0; }
.an-kpi-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.an-kpi-value { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin-top: 8px; }
.an-kpi.accent { background: var(--accent); color: #fff; }
.an-kpi.accent .an-kpi-label { color: rgba(255, 255, 255, .82); }
.an-kpi.accent .an-kpi-value { color: #fff; }
.an-kpi-note { color: var(--muted-2); font-size: 11.5px; margin-top: 2px; }
.an-kpi.accent .an-kpi-note { color: rgba(255, 255, 255, .7); }

.sub-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, #000), var(--card));
}
.sub-banner h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.sub-banner p { color: var(--muted); font-size: 13px; }
.sub-banner.expired { border-color: var(--orange); background: linear-gradient(135deg, #3a2a12, var(--card)); }

.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.toggle-row:last-child { border-bottom: 0; }
.toggle {
  position: relative; width: 42px; height: 24px; border-radius: 99px; background: #2a2a2a; flex: none; transition: .2s;
}
.toggle.on { background: var(--accent); }
.toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: .2s;
}
.toggle.on::after { left: 21px; }

.log-list, .log-panel { display: flex; flex-direction: column; max-height: 320px; overflow: auto; }
.log-panel {
  min-height: 180px; padding: 4px 2px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2);
}
.log-panel .empty-note { margin: auto; padding: 40px 16px; }
.log-panel .log-item { padding: 8px 12px; border-bottom-color: var(--line); }
.log-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.log-item:last-child { border-bottom: 0; }
.log-item time { color: var(--muted-2); flex: none; font-variant-numeric: tabular-nums; min-width: 110px; }
.log-item.ok { color: var(--green); }
.log-item.err { color: var(--red); }

.acc-list { display: flex; flex-direction: column; gap: 8px; }
.acc-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); flex-wrap: wrap;
}
.acc-item .grow { flex: 1; min-width: 140px; }
.acc-item b { display: block; font-size: 13px; font-weight: 700; letter-spacing: -0.01em; }
.acc-item small { color: var(--muted); font-size: 11.5px; }
.acc-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--muted-2); flex: none;
}
.acc-dot.on { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }

.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.table th { text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); padding: 0 10px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); }
.table tbody tr:hover { background: var(--bg-2); }
.table th.r, .table td.r { text-align: right; }
.table .empty { text-align: center; color: var(--muted); padding: 32px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.status { display: inline-flex; align-items: center; gap: 5px; }
.status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.form { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-inline { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 12px; align-items: end; }
.info-list { display: flex; flex-direction: column; }
.info-list div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.info-list div:last-child { border-bottom: 0; }
.info-list span { color: var(--muted); }
.info-list b { text-align: right; word-break: break-all; font-weight: 600; }

.color-row { display: flex; align-items: center; gap: 12px; }
.color-row input[type=color] {
  width: 42px; height: 38px; padding: 2px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--bg-2); cursor: pointer;
}
.color-swatch {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line-2); flex: none;
}

.lock-overlay {
  position: relative;
}
.lock-overlay.is-locked::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: rgba(0, 0, 0, .55); backdrop-filter: blur(2px); z-index: 2;
}
.lock-msg {
  position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; text-align: center; padding: 24px;
}
.lock-msg .inner {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; max-width: 320px;
}
.lock-msg h4 { font-size: 15px; margin-bottom: 6px; }
.lock-msg p { color: var(--muted); font-size: 13px; margin-bottom: 14px; }

.overlay { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .55); display: none; }

.empty-note { color: var(--muted); text-align: center; padding: 24px 0; font-size: 13px; }

/* Admin */
.admin-users { display: flex; flex-direction: column; gap: 8px; }
.admin-user {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-2); flex-wrap: wrap;
}
.admin-user .grow { flex: 1; min-width: 160px; }
.admin-user b { display: block; font-size: 13px; }
.admin-user small { color: var(--muted); font-size: 11.5px; }

.chart-card { overflow: hidden; }
.chart-box { position: relative; height: 220px; }
.chart-box-lg { height: 360px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding-top: 8px; }
.chart-leg {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px;
  border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted-2);
  font-size: 12.5px; font-weight: 600; cursor: pointer; background: transparent;
}
.chart-leg.on { color: var(--text); border-color: var(--line-2); background: var(--bg-2); }
.chart-leg i {
  width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent);
}
.charts-row { margin-top: 0; }

.svc-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 28%, transparent);
}
.svc-dot.warn { background: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 28%, transparent); }
.svc-dot.bad { background: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 28%, transparent); }

.svc-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.svc-card {
  padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2);
}
.svc-card.ok { border-color: color-mix(in srgb, var(--green) 35%, var(--line)); }
.svc-card.warn { border-color: color-mix(in srgb, var(--orange) 40%, var(--line)); }
.svc-card.bad { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
.svc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.svc-top b { display: block; font-size: 14px; font-weight: 700; }
.svc-top small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.svc-badge {
  flex: none; font-size: 11.5px; font-weight: 700; padding: 4px 8px; border-radius: 7px;
}
.svc-badge.ok { background: var(--green-soft); color: var(--green); }
.svc-badge.warn { background: var(--orange-soft); color: var(--orange); }
.svc-badge.bad { background: var(--red-soft); color: var(--red); }
.svc-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

#servicesQuickBtn { display: inline-flex; align-items: center; gap: 8px; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1100px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .an-kpi:nth-child(2n) { border-right: 0; }
  .an-kpi:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .features { grid-template-columns: 1fr 1fr; }
  .charts-row { grid-template-columns: 1fr; }
  .chart-box-lg { height: 280px; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .steps, .pay-grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .header-inner { justify-content: space-between; }
  .grid-hero, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-inline { grid-template-columns: 1fr 1fr; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: 10px 0 40px rgba(0, 0, 0, .4); }
  .sidebar.open ~ .overlay { display: block; }
  .main { margin-left: 0; }
  .burger { display: grid; }
  .user-chip div { display: none; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .hero { padding: 40px 0; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .steps, .pay-grid, .features { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 24px; }
  .header-actions .btn-ghost { display: none; }
  .topbar { padding: 0 14px; }
  .balance-chip small, .balance-chip .btn { display: none; }
  .balance-chip { padding-right: 12px; }
  .content { padding: 14px 12px 40px; }
  .form-row, .form-inline { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .card { padding: 14px; }
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
}
