/* Hub Zone Academy, in The Hub Zone brand.
   Colours come from the logo: the navy it sits on, and the magenta, purple
   and blue of the sphere. Status lights and the port meters glow cyan. */

:root {
  color-scheme: dark;
  --bg: #060a15;            /* the logo's own background */
  --raise: #0a101f;
  --panel: #0c1324;
  --field: #0a1122;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #ffffff;
  --text-2: #e6e9f5;
  --muted: #a9b0c6;
  --magenta: #d42b97;
  --magenta-hover: #e2479f;
  --purple: #8a4dc8;
  --blue: #338eeb;
  --cyan: #44d4f6;
  --amber: #f5b94c;
  --red: #ff6b81;
  --plate: #03060d;
  --socket: #0f1830;
  --socket-edge: #263555;
  --brand: linear-gradient(90deg, #d42b97 0%, #8a4dc8 52%, #338eeb 100%);
  --field-line: #253150;
  --placeholder: #6f7891;
  --hover-faint: rgba(255, 255, 255, 0.04);
  --hover: rgba(255, 255, 255, 0.05);
  --line-faint: rgba(255, 255, 255, 0.06);
  --active-bg: rgba(255, 255, 255, 0.07);
  --hover-strong: rgba(255, 255, 255, 0.08);
  --glass-line: rgba(255, 255, 255, 0.12);
  --topbar: rgba(6, 10, 21, 0.92);
  --accent-text: #44d4f6;
  --red-text: #ff6b81;
  --amber-text: #f5b94c;
  --ok-bg: rgba(68, 212, 246, 0.1);
  --ok-line: rgba(68, 212, 246, 0.35);
  --ok-text: #c4f2fd;
  --err-bg: rgba(255, 107, 129, 0.1);
  --err-line: rgba(255, 107, 129, 0.4);
  --err-text: #ffc6cf;
  --glow-1: rgba(51, 142, 235, 0.16);
  --glow-2: rgba(212, 43, 151, 0.14);
  --primary: #7c6cff;
  --primary-hover: #8f82ff;
  --primary-soft: rgba(124, 108, 255, 0.16);
  --primary-text: #c4bdff;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.45);
  --track: rgba(255, 255, 255, 0.08);
  --side-bg: #070d1b;
  --ok-strong: #34d399;
  --t-teal: #5eead4; --t-indigo: #c4bdff; --t-magenta: #f9a8d4; --t-blue: #93c5fd; --t-amber: #fcd34d;
  --t-purple: #d8b4fe; --t-green: #6ee7b7; --t-red: #fda4af; --t-gray: #cbd5e1;
  --font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fb;
  --raise: #f8f9fc;
  --panel: #ffffff;
  --field: #ffffff;
  --line: rgba(11, 16, 32, 0.1);
  --line-strong: rgba(11, 16, 32, 0.22);
  --text: #0b1020;
  --text-2: #263048;
  --muted: #5b6378;
  --field-line: #c5cedf;
  --placeholder: #8a93a8;
  --hover-faint: rgba(11, 16, 32, 0.03);
  --hover: rgba(11, 16, 32, 0.05);
  --line-faint: rgba(11, 16, 32, 0.07);
  --active-bg: #ffffff;
  --hover-strong: rgba(11, 16, 32, 0.07);
  --glass-line: rgba(11, 16, 32, 0.1);
  --topbar: rgba(255, 255, 255, 0.94);
  --accent-text: #0b7ea6;
  --red-text: #c0263f;
  --amber-text: #9a5b00;
  --ok-bg: #e7f7fc;
  --ok-line: #9edcf0;
  --ok-text: #0b5f7c;
  --err-bg: #fdecef;
  --err-line: #f2b3be;
  --err-text: #9b1c33;
  --glow-1: rgba(51, 142, 235, 0.1);
  --glow-2: rgba(212, 43, 151, 0.08);
  --primary: #6246ea;
  --primary-hover: #5236d6;
  --primary-soft: rgba(98, 70, 234, 0.09);
  --primary-text: #4b33d1;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 8px rgba(16, 24, 40, 0.05);
  --shadow-lg: 0 18px 40px rgba(16, 24, 40, 0.14);
  --track: #eceff5;
  --side-bg: #ffffff;
  --ok-strong: #059669;
  --t-teal: #0f766e; --t-indigo: #4b33d1; --t-magenta: #a3166e; --t-blue: #1d4ed8; --t-amber: #92400e;
  --t-purple: #6b21a8; --t-green: #047857; --t-red: #b91c1c; --t-gray: #475569;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f4f6fb;
    --raise: #f8f9fc;
    --panel: #ffffff;
    --field: #ffffff;
    --line: rgba(11, 16, 32, 0.1);
    --line-strong: rgba(11, 16, 32, 0.22);
    --text: #0b1020;
    --text-2: #263048;
    --muted: #5b6378;
    --field-line: #c5cedf;
    --placeholder: #8a93a8;
    --hover-faint: rgba(11, 16, 32, 0.03);
    --hover: rgba(11, 16, 32, 0.05);
    --line-faint: rgba(11, 16, 32, 0.07);
    --active-bg: #ffffff;
    --hover-strong: rgba(11, 16, 32, 0.07);
    --glass-line: rgba(11, 16, 32, 0.1);
    --topbar: rgba(255, 255, 255, 0.94);
    --accent-text: #0b7ea6;
    --red-text: #c0263f;
    --amber-text: #9a5b00;
    --ok-bg: #e7f7fc;
    --ok-line: #9edcf0;
    --ok-text: #0b5f7c;
    --err-bg: #fdecef;
    --err-line: #f2b3be;
    --err-text: #9b1c33;
    --glow-1: rgba(51, 142, 235, 0.1);
    --glow-2: rgba(212, 43, 151, 0.08);
    --primary: #6246ea;
    --primary-hover: #5236d6;
    --primary-soft: rgba(98, 70, 234, 0.09);
    --primary-text: #4b33d1;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 8px rgba(16, 24, 40, 0.05);
    --shadow-lg: 0 18px 40px rgba(16, 24, 40, 0.14);
    --track: #eceff5;
    --side-bg: #ffffff;
    --ok-strong: #059669;
    --t-teal: #0f766e; --t-indigo: #4b33d1; --t-magenta: #a3166e; --t-blue: #1d4ed8; --t-amber: #92400e;
    --t-purple: #6b21a8; --t-green: #047857; --t-red: #b91c1c; --t-gray: #475569;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text-2);
  background: var(--bg);
}
.is-site {
  background:
    radial-gradient(900px 520px at 85% -8%, var(--glow-1), transparent 70%),
    radial-gradient(760px 520px at -6% 8%, var(--glow-2), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
}

a { color: var(--text); text-underline-offset: 3px; }
a:hover { color: var(--accent-text); }

h1, h2, h3 { color: var(--text); font-family: var(--font); }
h1 { font-weight: 800; font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem); line-height: 1.06; letter-spacing: -0.03em; margin: 0 0 0.25em; }
h2 { font-weight: 700; font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.015em; margin: 1.8em 0 0.6em; }
h3 { font-weight: 700; font-size: 1.12rem; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 0.3em; }
p { max-width: 70ch; }
strong { color: var(--text); }
code { font-family: var(--mono); font-size: 0.9em; background: var(--hover-strong); padding: 1px 6px; border-radius: 6px; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 20; }
.skip:focus { left: 12px; background: var(--magenta); color: #fff; padding: 8px 14px; border-radius: 999px; font-weight: 700; }

/* ---------- Top bar ---------- */
.topbar { background: var(--topbar); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--text); flex: none; }
.brand-tag { margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line-strong); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.01em; color: var(--text-2); }
.brand:hover .brand-tag { color: var(--text); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.top-right a { color: var(--muted); text-decoration: none; font-weight: 500; }
.top-right a:hover { color: var(--text); }
.top-right a.btn { color: #fff; }
.who { color: var(--muted); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkbtn:hover { color: var(--text); }
.navbtn, .navt { display: none; }

/* ---------- Logo: sphere icon + name, laid out like the original logo ---------- */
.lockup { display: inline-flex; align-items: center; gap: 10px; }
.lockup img { display: block; width: 44px; height: 44px; flex: none; }
.lockup-words { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.lockup-name { font-weight: 800; font-size: 1.12rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text); white-space: nowrap; }
.lockup-sub { margin-top: 5px; padding-top: 4px; border-top: 1px solid rgba(138, 160, 210, 0.45); font-size: 0.56rem; font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.setup-lockup { margin: 0 0 24px; gap: 14px; }
.setup-lockup img { width: 72px; height: 72px; }
.setup-lockup .lockup-name { font-size: 1.6rem; }
.setup-lockup .lockup-sub { font-size: 0.68rem; }

/* ---------- Light and dark switch ---------- */
.theme-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); cursor: pointer; flex: none; }
.theme-btn:hover { background: var(--hover-strong); }
.theme-btn .i-moon { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-btn .i-sun { display: none; }
  :root:not([data-theme="dark"]) .theme-btn .i-moon { display: block; }
}
:root[data-theme="light"] .hero-art { background: #060a15; padding: 16px 8px 0; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .hero-art { background: #060a15; padding: 16px 8px 0; border-radius: 28px; } }

/* ---------- Plans and packages ---------- */
.plans { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.plans.pkgs { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; }
.plan h3 { font-size: 1.25rem; margin: 0; }
.plan-price { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); margin: 6px 0 0; line-height: 1.1; }
.plan-price small { display: block; font-size: 0.85rem; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-top: 3px; }
.plan .ticks { flex: 1; margin: 12px 0 16px; }
.plan .ticks li { margin: 8px 0; font-size: 0.97rem; }
.plan > .btn { align-self: flex-start; }
.pkg-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.login-box dd small { display: block; margin-top: 4px; font-weight: 400; }
input.mini { min-height: 34px; width: 150px; padding: 4px 10px; font-size: 0.9rem; display: inline-block; }
details.aside summary { cursor: pointer; color: var(--accent-text); }
.reveal summary { cursor: pointer; color: var(--accent-text); font-weight: 650; }
.reveal[open] summary { margin-bottom: 6px; }

/* ---------- App shell ---------- */
.shell { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 140px); }
.side { position: sticky; top: 0; align-self: start; padding: 22px 12px 22px 20px; display: flex; flex-direction: column; gap: 2px; max-height: 100vh; overflow-y: auto; }
.side a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px 9px 28px; border-radius: 10px; color: var(--muted); text-decoration: none; position: relative; font-weight: 500; }
.side a:hover { background: var(--hover); color: var(--text); }
.side a[aria-current="page"] { background: var(--active-bg); color: var(--text); font-weight: 650; box-shadow: inset 0 0 0 1px var(--line); }
.side a[aria-current="page"]::before { content: ""; position: absolute; left: 11px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.count { background: var(--magenta); color: #fff; font-size: 0.78rem; min-width: 24px; text-align: center; padding: 1px 8px; border-radius: 999px; }
.main { padding: 28px 28px 64px; min-width: 0; }
.site-main { max-width: 1140px; margin: 0 auto; padding: 0 20px 64px; }
.is-site .site-main > .narrow { margin-top: 44px; }
.narrow { max-width: 560px; }

/* ---------- Page heading ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.sub { color: var(--muted); margin: 6px 0 0; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.crumbs { margin: 0 0 6px; font-size: 0.92rem; }
.crumbs a { color: var(--muted); }

/* ---------- Panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; margin: 18px 0; }
.panel h2 { margin-top: 0; }
.panel-signal { border: 1px solid transparent; background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--brand) border-box; }
.panel-wait { border-color: rgba(245, 185, 76, 0.45); }
.panel-danger { border-color: rgba(255, 107, 129, 0.45); }
details.panel > summary { cursor: pointer; font-weight: 700; font-size: 1.15rem; color: var(--text); }
details.panel[open] > summary { margin-bottom: 12px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 24px; align-items: start; }
.stack > .panel:first-child { margin-top: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px;
  background: var(--magenta); color: #fff; font: inherit; font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--magenta-hover); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-line { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-line:hover { background: var(--hover-strong); color: var(--text); }
.btn-small { min-height: 34px; padding: 0 14px; font-size: 0.9rem; }
.btn-danger { background: transparent; border-color: rgba(255, 107, 129, 0.6); color: var(--red); }
.btn-danger:hover { background: rgba(255, 107, 129, 0.12); color: var(--red); }
form.inline { display: inline; margin: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 22px 0 0; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; max-width: 560px; }
.form > .btn, .form > p > .btn { justify-self: start; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 18px; max-width: none; }
.narrow-form { max-width: 560px; }
.form-wide { max-width: none; }
.form-end { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.form-end .note { margin: 0; }
.field { display: grid; gap: 6px; align-content: start; margin: 0; }
.field-wide { grid-column: 1 / -1; }
fieldset.field { border: 0; padding: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
.label { font-weight: 650; font-size: 0.95rem; color: var(--text); }
.field small { color: var(--muted); font-size: 0.875rem; }
input, select, textarea {
  font: inherit; font-size: 1rem; color: var(--text); background: var(--field);
  border: 1px solid var(--field-line); border-radius: 12px; padding: 10px 14px; min-height: 46px; width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--placeholder); }
textarea { line-height: 1.55; resize: vertical; min-height: auto; }
select option { background: var(--field); color: var(--text); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 0; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(68, 212, 246, 0.25); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; min-height: auto; margin: 2px 0 0; flex: none; accent-color: var(--magenta); }
.inline-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; max-width: none; margin: 12px 0; }
.inline-form .field { flex: 1 1 220px; max-width: 360px; }

/* ---------- Messages ---------- */
.flash { padding: 12px 16px; border-radius: 14px; margin: 0 0 18px; border: 1px solid; max-width: none; }
.flash-ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-text); }
.flash-error { background: var(--err-bg); border-color: var(--err-line); color: var(--err-text); }
.note { color: var(--muted); font-size: 0.92rem; }
.note-wait { color: var(--amber-text); font-weight: 650; }
.muted { color: var(--muted); }
small.muted { font-size: 0.85rem; }
.empty { color: var(--muted); padding: 16px 18px; border: 1px dashed var(--line-strong); border-radius: 16px; max-width: none; }
.empty-box { padding: 20px; border: 1px dashed var(--line-strong); border-radius: 16px; }
.empty-box p { margin: 0 0 12px; }
.minus { color: var(--red-text); font-weight: 650; }
.plus { color: var(--accent-text); font-weight: 650; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; margin: 12px 0 22px; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 0.85rem; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--raise); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line-faint); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td form.inline + form.inline { margin-left: 6px; }

/* ---------- Status lights ---------- */
.led { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 650; color: var(--text-2); white-space: nowrap; }
.led::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.led-on::before { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.led-wait::before { background: var(--amber); box-shadow: 0 0 8px rgba(245, 185, 76, 0.8); }
.led-off::before { background: var(--red); box-shadow: 0 0 8px rgba(255, 107, 129, 0.7); }

/* ---------- Port meter: one socket per allowed client, lit when used ---------- */
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 4px 28px; }
.meter { margin: 10px 0 16px; }
.meter-head { display: flex; justify-content: space-between; gap: 12px; font-size: 0.92rem; margin-bottom: 8px; }
.meter-head span { color: var(--muted); }
.ports { display: inline-flex; flex-wrap: wrap; gap: 5px; padding: 7px; background: var(--plate); border: 1px solid var(--line); border-radius: 8px; max-width: 100%; }
.ports i { position: relative; display: block; width: 20px; height: 16px; border-radius: 3px; background: var(--socket); box-shadow: inset 0 0 0 1px var(--socket-edge); }
.ports i::before { content: ""; position: absolute; top: 3px; left: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--socket-edge); }
.ports i.lit::before { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.ports i.full::before { background: #ff4fb0; box-shadow: 0 0 6px #ff4fb0; }
.ports i.lit::after, .ports i.full::after { content: ""; position: absolute; left: 6px; right: 3px; top: 6px; bottom: 3px; border-radius: 1px; background: #33598f; }
.ports i.full::after { background: #7a3170; }

/* ---------- Home page ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px 40px; align-items: center; padding: 56px 0 8px; }
.hero h1 { font-size: clamp(2.5rem, 1.4rem + 3.4vw, 4.4rem); line-height: 1.0; letter-spacing: -0.04em; margin-bottom: 0.4em; }
.grad { color: #e65bb0; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .grad { background: linear-gradient(90deg, #ff4fa3 0%, #a86bff 55%, #44d4f6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 54ch; margin: 0; }
.hero-art { position: relative; }
.hero-art::before { content: ""; position: absolute; inset: 12% 8% 6%; background: radial-gradient(closest-side, rgba(212, 43, 151, 0.38), rgba(51, 142, 235, 0.2) 60%, transparent); filter: blur(28px); }
.hero-art img { position: relative; display: block; width: 100%; height: auto; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 24px; background: var(--hover); border: 1px solid var(--glass-line); overflow: hidden; margin: 8px 0 0; }
.stats > div { display: flex; flex-direction: column; gap: 2px; padding: 22px 24px; }
.stats > div + div { border-left: 1px solid var(--glass-line); }
.stats b { font-weight: 800; font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); letter-spacing: -0.03em; color: var(--accent-text); line-height: 1.1; }
.stats span { color: var(--muted); font-weight: 500; }

.band { margin: 64px 0; }
.band > h2 { font-size: 1.8rem; letter-spacing: -0.025em; margin: 0 0 0.3em; }

.route { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; position: relative; padding: 0; margin: 28px 0 0; }
.route::after { content: ""; position: absolute; top: 15px; left: 19px; width: 64px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, transparent, var(--cyan), #ff4fa3, transparent); opacity: 0; animation: signal 2.6s ease-in-out 0.6s 1 both; }
@keyframes signal {
  0% { left: 19px; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: calc(75% + 6px); opacity: 0; }
}
.route li { position: relative; padding-top: 56px; counter-increment: step; }
.route li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 40px; height: 38px; display: grid; place-items: center; background: var(--socket); color: #fff; font-weight: 800; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--socket-edge); }
.route li:not(:last-child)::after { content: ""; position: absolute; top: 17px; left: 40px; right: -24px; height: 4px; background: var(--line-strong); }
.route li.route-live::before { color: var(--cyan); box-shadow: inset 0 0 0 1px var(--cyan), 0 0 0 5px rgba(68, 212, 246, 0.16), 0 0 18px rgba(68, 212, 246, 0.35); }
.route b { display: block; font-size: 1.22rem; font-weight: 800; letter-spacing: -0.015em; color: var(--text); margin-bottom: 4px; }
.route span { color: var(--muted); }

.price-list { list-style: none; padding: 0; margin: 18px 0; border-top: 1px solid var(--line-strong); }
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 170px auto; gap: 12px 24px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.price-what h3 { font-size: 1.3rem; margin: 0 0 4px; }
.price-what p { margin: 0; color: var(--muted); }
.price-seats { color: var(--muted); font-weight: 600; }
.price-amount { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); line-height: 1.1; }
.price-amount small { display: block; font-size: 0.8rem; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-top: 2px; }

.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 30px; margin: 12px 0; max-width: 60ch; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 16px; height: 12px; border-radius: 3px; background: var(--socket); box-shadow: inset 0 0 0 1px var(--cyan), 0 0 8px rgba(68, 212, 246, 0.35); }
.verify-panel { margin: 0; }
.verify-box { margin: 18px 0; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.verify-box p { margin: 8px 0 0; }
.aside { color: var(--muted); margin-top: 20px; }

/* ---------- Setup ---------- */
.setup { max-width: 560px; margin: 44px auto 0; }
.setup .lead { margin-bottom: 14px; }
.setup-steps { margin: 0 0 18px; padding-left: 1.3em; color: var(--muted); }
.setup-steps li { margin: 4px 0; }
.setup .form.panel { max-width: none; }

/* ---------- Learning ---------- */
.course-list { list-style: none; padding: 0; margin: 12px 0; }
.course-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 12px; }
.course-list .meter { margin: 8px 0; }
.lesson-list { list-style: none; padding: 0; margin: 16px 0; border-top: 1px solid var(--line); max-width: 760px; }
.lesson-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.lesson-list a { display: flex; gap: 14px; align-items: center; padding: 12px 4px; text-decoration: none; color: var(--text); font-weight: 600; flex: 1; }
.lesson-list a:hover span:last-child { text-decoration: underline; }
.lesson-no { flex: none; width: 32px; height: 28px; display: grid; place-items: center; background: var(--socket); color: #fff; border-radius: 6px; font-size: 0.9rem; font-weight: 800; box-shadow: inset 0 0 0 1px var(--socket-edge); }
.lesson-list li.is-done .lesson-no { color: var(--cyan); box-shadow: inset 0 0 0 1px var(--cyan); }
.lesson { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px clamp(18px, 4vw, 40px); max-width: 760px; font-size: 1.08rem; line-height: 1.7; color: var(--text-2); }
.lesson > :first-child { margin-top: 0; }
.lesson h2 { font-size: 1.4rem; margin: 1.6em 0 0.5em; }
.lesson h3 { margin-top: 1.3em; }
.lesson li { margin: 4px 0; }
.lesson blockquote { border-left: 3px solid var(--magenta); margin: 1em 0; padding: 0.2em 1em; background: rgba(212, 43, 151, 0.08); border-radius: 0 10px 10px 0; }
.lesson .table-wrap { margin: 14px 0; background: var(--raise); }
.lesson-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; max-width: 760px; margin: 18px 0; }

.quiz { display: grid; gap: 16px; max-width: 760px; }
.question { border: 1px solid var(--line); background: var(--panel); border-radius: 18px; padding: 16px 18px 12px; margin: 0; min-width: 0; }
.question legend { float: left; width: 100%; padding: 0; margin: 0 0 10px; font-weight: 650; color: var(--text); display: flex; gap: 12px; align-items: baseline; }
.question legend + * { clear: both; }
.q-no { font-weight: 800; color: var(--cyan); min-width: 1.4em; }
.option { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: 12px; cursor: pointer; }
.option input { width: 18px; height: 18px; min-height: auto; margin: 4px 0 0; flex: none; accent-color: var(--magenta); }
.option:hover { background: var(--hover-faint); }
.option:has(input:checked) { background: rgba(212, 43, 151, 0.12); box-shadow: inset 0 0 0 1px var(--magenta); }

/* ---------- Bits and pieces ---------- */
.pairs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 22px; margin: 0; }
.pairs dt { color: var(--muted); }
.pairs dd { margin: 0; font-weight: 650; color: var(--text); overflow-wrap: anywhere; }
.secret { font-family: var(--mono); font-size: 1.05rem; letter-spacing: 0.02em; color: var(--accent-text); }
.group-code { display: inline-block; font-size: 2rem; font-weight: 800; letter-spacing: 0.16em; background: var(--plate); color: var(--cyan); border: 1px solid rgba(68, 212, 246, 0.3); padding: 6px 18px; border-radius: 12px; margin: 6px 0 10px; }
.balance { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); line-height: 1.05; margin: 4px 0 10px; }
.balance.is-negative { color: var(--red); }
.plain { list-style: none; padding: 0; margin: 8px 0; }
.plain li { padding: 7px 0; border-bottom: 1px solid var(--line-faint); }
.plain li:last-child { border-bottom: 0; }
.todo a { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.todo a:hover { text-decoration: underline; }
.todo b { background: var(--magenta); color: #fff; min-width: 34px; text-align: center; border-radius: 999px; padding: 2px 10px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 10px 0; border-bottom: 1px dashed var(--line-strong); }
.checklist li:last-child { border-bottom: 0; }
.checklist p { margin: 2px 0 0; color: var(--muted); }
.checklist a { color: var(--accent-text); }
.checklist li.is-done strong { color: var(--muted); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.tabs a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--muted); background: var(--panel); font-weight: 500; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 650; }
.tabs small { opacity: 0.75; margin-left: 4px; }

.foot { border-top: 1px solid var(--line); }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 20px; color: var(--muted); font-size: 0.9rem; }
.foot-in p { margin: 0; max-width: none; }
.foot a { color: var(--muted); }

/* ---------- Small screens ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 36px; }
  .hero-art { max-width: 560px; }
}

@media (max-width: 860px) {
  .navt { display: block; position: absolute; opacity: 0; width: 1px; height: 1px; }
  .navbtn { display: inline-flex; align-items: center; color: var(--text); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 16px; cursor: pointer; font-weight: 650; }
  .navt:focus-visible + .topbar .navbtn { outline: 2px solid var(--cyan); outline-offset: 2px; }
  .navt:checked + .topbar .navbtn { background: var(--glass-line); }
  .who { display: none; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; position: static; max-height: none; padding: 10px 14px 14px; background: var(--raise); border-bottom: 1px solid var(--line); }
  .navt:checked ~ .shell .side { display: flex; }
  .side a { padding: 11px 12px 11px 30px; }
  .main { padding: 20px 16px 48px; }
}

@media (max-width: 720px) {
  .route { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .route li:not(:last-child)::after { top: 42px; bottom: -22px; left: 18px; right: auto; width: 4px; height: auto; }
  .route::after { display: none; }
  .route li { padding: 4px 0 0 60px; min-height: 40px; }
  .price-row { grid-template-columns: minmax(0, 1fr) auto; }
  .price-what, .price-go { grid-column: 1 / -1; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stats > div + div { border-left: 0; border-top: 1px solid var(--glass-line); }
  .stats > div { flex-direction: row; align-items: baseline; gap: 12px; padding: 14px 20px; }
}

@media (max-width: 640px) {
  .hide-sm { display: none; }
  .is-site .top-right .btn { display: none; }
  .topbar-in { padding: 10px 14px; gap: 10px; }
  .lockup img { width: 36px; height: 36px; }
  .brand .lockup-name { font-size: 0.98rem; }
  .brand .lockup-sub { display: none; }
  .brand-tag { margin-left: 10px; padding-left: 10px; font-size: 0.95rem; }
  .top-right { gap: 12px; }
  .pairs { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pairs dd { margin-bottom: 8px; }
}

@media (max-width: 360px) {
  .brand-tag { display: none; }
}

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

/* ---------- Certificate (printed on white) ---------- */
.is-cert { color-scheme: light; background: #e7eaf2; color: #0b1020; padding: 24px 16px; }
.cert-tools { max-width: 1000px; margin: 0 auto 16px; display: flex; gap: 18px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.cert-tools a { color: #0b1020; }
.cert {
  position: relative; max-width: 1000px; aspect-ratio: 297 / 210; margin: 0 auto; background: #fff; color: #0b1020;
  border: 12px solid #060a15; padding: 0 64px 30px; display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden;
}
.cert p { max-width: none; }
.cert-band { align-self: stretch; margin: 0 -64px 8px; background: #060a15; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 18px 24px; border-bottom: 4px solid; border-image: linear-gradient(90deg, #d42b97, #8a4dc8, #338eeb) 1; }
.cert-band .lockup img { width: 64px; height: 64px; }
.cert-band .lockup-name { font-size: 1.6rem; }
.cert-band .lockup-sub { font-size: 0.68rem; }
.cert-tag { color: #e6e9f5; font-weight: 600; font-size: 1.2rem; padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, 0.25); }
.cert-kind { font-weight: 800; letter-spacing: -0.03em; font-size: clamp(1.8rem, 3.6vw, 2.8rem); margin: 18px 0 6px; line-height: 1.05; color: #0b1020; }
.cert-small { color: #5b6378; margin: 4px 0; }
.cert-name { font-weight: 800; letter-spacing: -0.03em; font-size: clamp(1.8rem, 4.2vw, 3.1rem); line-height: 1.1; margin: 4px 0 8px; padding: 0 18px 6px; border-bottom: 3px solid; border-image: linear-gradient(90deg, #d42b97, #8a4dc8, #338eeb) 1; color: #0b1020; }
.cert-course { font-weight: 700; font-size: 1.2rem; margin: 4px 0; }
.cert-title { font-weight: 750; font-size: 1.35rem; letter-spacing: -0.015em; margin: 4px 0 14px; }
.cert-ports { display: inline-flex; gap: 6px; padding: 7px; background: #060a15; border-radius: 6px; }
.cert-band .lockup-name { color: #fff; }
.cert-band .lockup-sub { color: #a9b0c6; }
.cert-ports i { position: relative; width: 18px; height: 13px; background: var(--socket); border-radius: 2px; box-shadow: inset 0 0 0 1px var(--socket-edge); }
.cert-ports i::before { content: ""; position: absolute; top: 3px; left: 3px; width: 3px; height: 3px; border-radius: 50%; background: var(--cyan); }
.cert-foot { margin-top: auto; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; text-align: left; border-top: 1px solid #d9deea; padding-top: 14px; }
.cert-foot span { display: block; color: #5b6378; font-size: 0.8rem; }
.cert-foot strong { font-size: 0.95rem; color: #0b1020; }
.cert-check { font-size: 0.8rem; color: #5b6378; margin: 10px 0 0; }
.cert-void { position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg); font-weight: 800; font-size: 5rem; color: rgba(214, 47, 74, 0.4); border: 6px solid rgba(214, 47, 74, 0.4); padding: 0 24px; margin: 0; }

@media (max-width: 760px) {
  .cert { aspect-ratio: auto; padding: 0 22px 24px; }
  .cert-band { margin: 0 -22px 8px; }
  .cert-band .lockup img { width: 44px; height: 44px; }
  .cert-band .lockup-name { font-size: 1.15rem; }
  .cert-foot { grid-template-columns: minmax(0, 1fr); text-align: center; margin-top: 24px; }
}

@media print {
  @page { size: A4 landscape; margin: 0; }
  .is-cert { background: #fff; padding: 0; }
  .cert-tools { display: none; }
  .cert { width: 297mm; height: 210mm; max-width: none; aspect-ratio: auto; margin: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}


/* =====================================================================
   Dashboard look: sidebar with icons, top bar, KPI cards, charts, tables
   ===================================================================== */
.btn { background: var(--primary); color: #fff; border-radius: 10px; }
.btn:hover { background: var(--primary-hover); color: #fff; }
.btn-line { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-line:hover { background: var(--hover-strong); color: var(--text); }
.btn-danger { background: transparent; border-color: rgba(239, 68, 68, 0.5); color: var(--red-text); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.1); color: var(--red-text); }
.is-site .btn:not(.btn-line):not(.btn-danger) { background: var(--magenta); border-radius: 999px; }
.is-site .btn:not(.btn-line):not(.btn-danger):hover { background: var(--magenta-hover); }
.is-site .btn-line { border-radius: 999px; }
.top-right .theme-btn { order: -1; }

.is-app { background: var(--bg); }
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 20px 14px 18px; background: var(--side-bg); border-right: 1px solid var(--line); }
.side-brand { display: flex; align-items: center; padding: 2px 8px 0; text-decoration: none; color: var(--text); }
.side-tag { margin: 0 0 14px 62px; font-size: 0.82rem; font-weight: 650; color: var(--muted); text-transform: capitalize; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.97rem; }
.side-nav a .ico { flex: none; opacity: 0.9; }
.side-nav a:hover { background: var(--hover); color: var(--text); }
.side-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-text); box-shadow: inset 3px 0 0 var(--primary); }
.side-nav a .count { margin-left: auto; }
.side-status { margin-top: auto; padding: 12px 12px 4px; }
.side-card { margin-top: auto; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); font-size: 0.9rem; }
.side-status + .side-card { margin-top: 8px; }
.side-card div { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.side-card span:not(.side-card-icon) { color: var(--muted); }
.side-card a:not(.btn) { color: var(--primary-text); font-weight: 650; text-decoration: none; }
.side-card .btn { margin-top: 6px; }
.side-card-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); flex: none; }

.app-main { min-width: 0; display: flex; flex-direction: column; }
.app-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; padding: 12px 28px; background: var(--topbar); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-search { position: relative; flex: 1; max-width: 520px; }
.top-search .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.top-search input { padding-left: 42px; min-height: 42px; border-radius: 12px; background: var(--field); }
.top-greet { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-strong); display: inline-grid; place-items: center; color: var(--text); background: transparent; text-decoration: none; cursor: pointer; }
.icon-btn:hover { background: var(--hover-strong); color: var(--text); }
.icon-btn .dot { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--magenta); color: #fff; font-size: 0.72rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.app-top .theme-btn { width: 40px; height: 40px; border-radius: 12px; }
.navbtn.icon-btn { display: none; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 12px; cursor: pointer; color: var(--text); }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--hover); }
.user-text { display: flex; flex-direction: column; line-height: 1.2; }
.user-text b { font-size: 0.95rem; }
.user-text small { color: var(--muted); font-size: 0.8rem; }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 20; }
.user-menu .menu form { margin: 0; }
.user-menu .menu a, .user-menu .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-weight: 550; text-decoration: none; cursor: pointer; }
.user-menu .menu a:hover, .user-menu .menu button:hover { background: var(--hover); }
.app-content { flex: 1; padding: 26px 28px 48px; }
.app-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; }
.app-foot nav { display: flex; gap: 20px; }
.app-foot a { color: var(--muted); text-decoration: none; }
.app-foot a:hover { color: var(--text); }

/* Cards and panels */
.panel, .card, .table-wrap { border-radius: 16px; box-shadow: var(--shadow); }
.card { background: var(--panel); border: 1px solid var(--line); padding: 20px 22px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.card-head h2 { margin: 0; font-size: 1.15rem; letter-spacing: -0.01em; }
.card-head p { margin: 3px 0 0; color: var(--muted); font-size: 0.92rem; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); }
.dash-grid { display: grid; gap: 18px; margin-bottom: 18px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2.15fr); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

/* KPI cards */
.kpi { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 18px 18px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.kpi-top { display: flex; align-items: center; gap: 12px; }
.kpi-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.kpi-label { color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.kpi-value { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; font-size: 1.95rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); line-height: 1.1; }
.kpi-value small { font-size: 0.92rem; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.delta { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: 0.9rem; font-weight: 700; letter-spacing: 0; }
.delta.up { color: var(--ok-strong); }
.delta.down { color: var(--red-text); }
.kpi-sub { margin: 0; color: var(--muted); font-size: 0.88rem; }
.kpi-sub b { color: var(--text); }
.kpi .spark { width: 100%; height: 46px; display: block; margin-top: 4px; }
.kpi .bar { margin: 8px 0 2px; }
.tone-indigo .kpi-icon { background: rgba(98, 70, 234, 0.13); color: var(--t-indigo); }
.tone-teal .kpi-icon { background: rgba(20, 184, 166, 0.14); color: var(--t-teal); }
.tone-magenta .kpi-icon { background: rgba(212, 43, 151, 0.13); color: var(--t-magenta); }
.tone-blue .kpi-icon { background: rgba(59, 130, 246, 0.14); color: var(--t-blue); }
.tone-amber .kpi-icon { background: rgba(245, 158, 11, 0.16); color: var(--t-amber); }

/* Progress bars */
.bar { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.bar-teal span { background: #14b8a6; }
.bar-magenta span { background: #d42b97; }
.bar-blue span { background: #3b82f6; }
.bar-high span { background: #ef4444; }
.bar-free span { background: linear-gradient(90deg, var(--primary-soft), transparent); }
.meter { margin: 6px 0 16px; }
.meter-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 0.93rem; }
.meter-head span { color: var(--muted); }
.meter-pct { display: block; margin-top: 5px; text-align: right; color: var(--muted); font-size: 0.8rem; }

/* Badges and avatars */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 8px; font-size: 0.82rem; font-weight: 650; white-space: nowrap; }
.b-teal { background: rgba(20, 184, 166, 0.14); color: var(--t-teal); }
.b-indigo { background: rgba(98, 70, 234, 0.13); color: var(--t-indigo); }
.b-magenta { background: rgba(212, 43, 151, 0.13); color: var(--t-magenta); }
.b-blue { background: rgba(59, 130, 246, 0.14); color: var(--t-blue); }
.b-amber { background: rgba(245, 158, 11, 0.16); color: var(--t-amber); }
.b-purple { background: rgba(138, 77, 200, 0.16); color: var(--t-purple); }
.b-green { background: rgba(16, 185, 129, 0.14); color: var(--t-green); }
.b-red { background: rgba(239, 68, 68, 0.13); color: var(--t-red); }
.b-gray { background: rgba(100, 116, 139, 0.14); color: var(--t-gray); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-size: 0.8rem; font-weight: 750; letter-spacing: 0.02em; }
.avatar-lg { width: 48px; height: 48px; font-size: 0.95rem; }
.av-0 { background: rgba(98, 70, 234, 0.14); color: var(--t-indigo); }
.av-1 { background: rgba(20, 184, 166, 0.15); color: var(--t-teal); }
.av-2 { background: rgba(212, 43, 151, 0.13); color: var(--t-magenta); }
.av-3 { background: rgba(59, 130, 246, 0.15); color: var(--t-blue); }
.av-4 { background: rgba(245, 158, 11, 0.17); color: var(--t-amber); }
.av-5 { background: rgba(138, 77, 200, 0.16); color: var(--t-purple); }

/* Data tables */
.dt { width: 100%; border-collapse: collapse; }
.dt th { background: transparent; font-size: 0.85rem; padding: 12px 14px; }
.dt td { padding: 12px 14px; }
.dt tbody tr:hover td { background: var(--hover-faint); }
.who-cell { display: flex; align-items: center; gap: 11px; min-width: 180px; }
.who-cell b { display: block; color: var(--text); font-weight: 650; }
.who-cell b a { color: inherit; text-decoration: none; }
.who-cell b a:hover { color: var(--primary-text); }
.who-cell small { display: block; color: var(--muted); font-size: 0.82rem; }
.store-cell { min-width: 150px; }
.store-cell small { display: block; margin-top: 5px; color: var(--muted); font-size: 0.82rem; }
.acts { display: flex; gap: 6px; align-items: center; }
.act { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-strong); display: inline-grid; place-items: center; color: var(--text); background: transparent; text-decoration: none; cursor: pointer; padding: 0; }
.act:hover { background: var(--primary-soft); color: var(--primary-text); border-color: transparent; }
form.act-form { display: inline; margin: 0; }
.dt-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.dt-tools .tool-search { position: relative; flex: 1 1 260px; }
.dt-tools .tool-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.dt-tools .tool-search input { padding-left: 40px; }
.dt-tools select { width: auto; min-width: 170px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 4px 0; color: var(--muted); font-size: 0.92rem; }
.pager nav { display: flex; gap: 6px; }
.pager a, .pager span.cur { min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px; display: inline-grid; place-items: center; text-decoration: none; color: var(--text); font-weight: 600; }
.pager a:hover { background: var(--hover-strong); }
.pager span.cur { background: var(--primary-soft); color: var(--primary-text); }

/* Charts */
.donut { width: 100%; max-width: 250px; display: block; margin: 0 auto; }
.donut-num { font-size: 34px; font-weight: 800; fill: var(--text); letter-spacing: -1px; }
.donut-cap { font-size: 12px; font-weight: 600; fill: var(--muted); }
.donut-pct { font-size: 12px; font-weight: 750; fill: #fff; }
.donut-empty { stroke: var(--track); }
.donut-legend { list-style: none; padding: 0; margin: 18px 0 0; }
.donut-legend li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.donut-legend i { width: 12px; height: 12px; border-radius: 50%; }
.donut-legend b { color: var(--text); }
.donut-legend small { grid-column: 2; color: var(--muted); }
.donut-legend em { font-style: normal; font-weight: 750; color: var(--text); grid-row: 1 / span 2; grid-column: 3; }
.area { width: 100%; height: auto; display: block; }
.area .grid { stroke: var(--line); stroke-dasharray: 3 5; }
.area .axis { font-size: 11px; fill: var(--muted); }
.legend { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 6px; color: var(--muted); font-size: 0.88rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; }
.status-list { list-style: none; padding: 0; margin: 0; }
.status-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.status-list li:first-child { border-top: 0; }
.status-list b { color: var(--text); }
.status-list small { display: block; color: var(--muted); }
.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.mini-list li:first-child { border-top: 0; }
.mini-list .grow { flex: 1; min-width: 0; }
.mini-list b { display: block; color: var(--text); font-weight: 650; }
.mini-list small { color: var(--muted); }
.mini-list .n { min-width: 34px; height: 30px; padding: 0 9px; border-radius: 8px; display: grid; place-items: center; font-weight: 750; background: var(--primary-soft); color: var(--primary-text); }
.welcome { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.welcome h1 { margin: 0; font-size: clamp(1.6rem, 1.3rem + 1vw, 2.15rem); }
.welcome p { margin: 4px 0 0; color: var(--muted); }
.date-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--text-2); font-weight: 600; background: var(--panel); }
.da-card .btn { margin-top: 14px; }
.da-card .login-box { margin-top: 2px; }
.empty-chart { padding: 34px 10px; text-align: center; color: var(--muted); }

@media (max-width: 1200px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-3, .g-1-2, .g-2-1 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; position: fixed; z-index: 40; inset: 0 auto 0 0; width: 280px; box-shadow: var(--shadow-lg); }
  .navt:checked ~ .app .sidebar { display: flex; }
  .navbtn.icon-btn { display: inline-grid; }
  .app-top { padding: 10px 14px; }
  .app-content { padding: 18px 14px 40px; }
  .user-text { display: none; }
  .top-search { max-width: none; }
  .g-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .g-4 { grid-template-columns: minmax(0, 1fr); }
  .top-greet span { display: none; }
}

.app { background: linear-gradient(90deg, var(--side-bg) 0 263px, var(--line) 263px 264px, var(--bg) 264px); }
.sidebar { border-right: 0; }
.bar-green span { background: #10b981; }
.dt a, .mini-list a, .card-head a:not(.btn), .login-box a { text-decoration: none; color: inherit; }
.dt a:hover, .mini-list a:hover, .login-box a:hover { color: var(--primary-text); text-decoration: underline; }
.dt td .muted { font-size: 0.82rem; }
.table-wrap.flat { box-shadow: none; }
.app-content a:not(.btn):not(.act):not(.icon-btn) { text-decoration-color: var(--line-strong); }
.app-content a:not(.btn):not(.act):not(.icon-btn):hover { text-decoration-color: currentColor; }
@media (max-width: 860px) { .app { background: var(--bg); } }
