:root {
  --ink: #0a1120;
  --ink-2: #111c31;
  --ink-3: #1a2740;
  --line: #e4e8f0;
  --line-dark: rgba(148, 163, 184, .16);
  --paper: #f5f7fb;
  --white: #ffffff;
  --text: #16213a;
  --muted: #66718c;
  --muted-dark: #9fb0c9;
  --accent: #10b981;
  --accent-2: #34d399;
  --indigo: #6366f1;
  --amber: #f59e0b;
  --danger: #ef4444;
  --sky: #0ea5e9;
  --shadow: 0 18px 50px rgba(12, 25, 55, .08);
  --shadow-lg: 0 30px 80px rgba(6, 15, 35, .25);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.15; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
code, pre { font-family: var(--mono); }
.small { font-size: 12.5px; }
.muted { color: var(--muted); }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt0 { margin-top: 0 !important; }
.mt1 { margin-top: 8px; }
.mt2 { margin-top: 16px; }
.mt3 { margin-top: 26px; }
.mt4 { margin-top: 40px; }
.mb1 { margin-bottom: 8px; }
.mb2 { margin-bottom: 16px; }
.hidden { display: none !important; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 11px; border: 1px solid transparent; padding: 10px 18px;
  font-weight: 650; font-size: 14px; transition: .18s ease; text-align: center;
  background: var(--white); color: var(--text);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #04281c; box-shadow: 0 10px 25px rgba(16, 185, 129, .28); }
.btn-primary:hover { background: var(--accent-2); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-3); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-dark-ghost { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.18); color: #e6ecf6; }
.btn-danger { background: #fee2e2; color: #991b1b; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 9px; }
.btn-lg { padding: 14px 26px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.link { color: #047857; font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ------------------------------------------------------------ badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  background: #eef2f8; color: #526079; white-space: nowrap;
}
.badge.ok { background: #dcfce7; color: #166534; }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.bad { background: #fee2e2; color: #991b1b; }
.badge.neutral { background: #eef2f8; color: #526079; }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-dark { background: rgba(52, 211, 153, .14); color: #6ee7b7; }

/* ------------------------------------------------------------ marketing */
body.marketing { background: var(--ink); color: #e8eefa; }
.marketing .nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 17, 32, .86); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-dark);
}
.nav-inner { max-width: 1180px; margin: 0 auto; padding: 16px 26px; display: flex; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: #fff; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(140deg, #10b981, #0ea5e9); color: #04121f; font-weight: 900; font-size: 15px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, .35);
}
.brand small { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: #6ee7b7; font-weight: 700; display: block; margin-top: -2px; }
.nav-links { display: flex; gap: 26px; margin-left: 8px; }
.nav-links a { color: #b8c5da; font-size: 14px; font-weight: 550; }
.nav-links a:hover { color: #fff; }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-cta .signin { color: #cfdbef; font-weight: 600; font-size: 14px; }
.marketing .btn-ghost { border-color: rgba(255,255,255,.16); color: #e6ecf6; background: rgba(255,255,255,.03); }
.marketing .btn-ghost:hover { background: rgba(255,255,255,.08); }

.hero { position: relative; overflow: hidden; padding: 84px 26px 64px; }
.hero::before {
  content: ""; position: absolute; inset: -30% 20% 40% -20%;
  background: radial-gradient(closest-side, rgba(16, 185, 129, .22), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 20% -20% -60% 40%;
  background: radial-gradient(closest-side, rgba(99, 102, 241, .22), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(16, 185, 129, .1); border: 1px solid rgba(16, 185, 129, .28); color: #6ee7b7;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(38px, 5vw, 58px); font-weight: 800; color: #fff; letter-spacing: -.035em; margin: 18px 0 16px; }
.hero h1 .grad { background: linear-gradient(100deg, #34d399 10%, #38bdf8 60%, #a5b4fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { font-size: 18px; color: #aab8cf; max-width: 560px; }
.hero .actions { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.hero .trust { display: flex; gap: 26px; margin-top: 34px; flex-wrap: wrap; }
.hero .trust div { color: #93a4bf; font-size: 12.5px; }
.hero .trust strong { display: block; color: #fff; font-size: 20px; letter-spacing: -.02em; }

.hero-panel { position: relative; }
.mock {
  background: linear-gradient(180deg, #101d33, #0c1627); border: 1px solid rgba(148,163,184,.18);
  border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; transform: rotate(.4deg);
}
.mock-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(148,163,184,.12); background: rgba(255,255,255,.02); }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: #334155; display: block; }
.mock-bar i:first-child { background: #ef4444; } .mock-bar i:nth-child(2) { background: #f59e0b; } .mock-bar i:nth-child(3) { background: #22c55e; }
.mock-bar span { margin-left: 8px; font-size: 11px; color: #7d8da7; letter-spacing: .08em; text-transform: uppercase; }
.mock-body { padding: 18px; display: grid; gap: 12px; }
.mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-kpi { background: rgba(255,255,255,.035); border: 1px solid rgba(148,163,184,.12); border-radius: 12px; padding: 12px; }
.mock-kpi b { display: block; font-size: 20px; color: #fff; letter-spacing: -.03em; }
.mock-kpi small { color: #7d8da7; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; }
.mock-chart { background: rgba(255,255,255,.03); border: 1px solid rgba(148,163,184,.12); border-radius: 12px; padding: 12px 12px 6px; }
.mock-chart .row { display: flex; align-items: flex-end; gap: 5px; height: 86px; }
.mock-chart .row i { flex: 1; background: linear-gradient(180deg, #34d399, rgba(52,211,153,.15)); border-radius: 3px 3px 0 0; display: block; }
.mock-chart .row i:nth-child(6) { background: linear-gradient(180deg, #38bdf8, rgba(56,189,248,.14)); }
.mock-chart .row i:nth-child(11) { background: linear-gradient(180deg, #a5b4fc, rgba(165,180,252,.14)); }
.mock-list { display: grid; gap: 7px; }
.mock-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; background: rgba(255,255,255,.03); border: 1px solid rgba(148,163,184,.1); font-size: 11.5px; color: #b9c6da; }
.mock-item .dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,.14); }
.mock-item .tag { margin-left: auto; color: #6ee7b7; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.mock-float {
  position: absolute; right: -14px; bottom: -26px; background: #fff; color: var(--text);
  border-radius: 14px; padding: 13px 16px; box-shadow: var(--shadow-lg); display: flex; gap: 11px; align-items: center; width: 250px;
}
.mock-float .ring { width: 40px; height: 40px; flex: none; border-radius: 50%; background: conic-gradient(#10b981 93%, #e2e8f0 0); display: grid; place-items: center; }
.mock-float .ring::after { content: ""; width: 30px; height: 30px; background: #fff; border-radius: 50%; }
.mock-float .ring b { position: absolute; font-size: 10.5px; }
.mock-float b { font-size: 13px; display: block; }
.mock-float small { color: var(--muted); font-size: 11px; }

.logo-strip { border-block: 1px solid var(--line-dark); background: rgba(255,255,255,.015); padding: 18px 26px; }
.logo-strip .inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 32px; flex-wrap: wrap; color: #6f809b; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 650; }
.logo-strip strong { color: #b7c4d9; letter-spacing: 0; text-transform: none; font-size: 14px; }

.section { max-width: 1180px; margin: 0 auto; padding: 86px 26px; }
.section.tight { padding-top: 54px; }
.section-head { max-width: 720px; margin-bottom: 42px; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker { color: #34d399; font-size: 12px; text-transform: uppercase; letter-spacing: .16em; font-weight: 750; margin-bottom: 12px; }
.section h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; color: #fff; letter-spacing: -.03em; }
.section h2.dark { color: var(--text); }
.section .lede { color: #9fb0c9; font-size: 16.5px; }
.section .lede.dark { color: var(--muted); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature {
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
  border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 24px;
}
.feature .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.22); margin-bottom: 14px; }
.feature h3 { color: #fff; font-size: 18px; }
.feature p { color: #9fb0c9; font-size: 14px; margin: 0; }

.sector-card {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 12px; transition: .2s;
}
.sector-card:hover { border-color: rgba(52,211,153,.4); transform: translateY(-3px); }
.sector-card .icon { font-size: 27px; }
.sector-card h3 { color: #fff; font-size: 19px; margin: 0; }
.sector-card p { color: #9fb0c9; font-size: 13.5px; margin: 0; flex: 1; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { font-size: 11px; padding: 4px 9px; border-radius: 999px; background: rgba(148,163,184,.1); color: #b7c4d9; border: 1px solid rgba(148,163,184,.14); }

.device-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.device-chip { background: rgba(255,255,255,.035); border: 1px solid var(--line-dark); border-radius: 14px; padding: 16px 12px; text-align: center; }
.device-chip .ico { font-size: 24px; display: block; margin-bottom: 6px; }
.device-chip b { color: #dbe5f4; font-size: 12.5px; font-weight: 600; display: block; }
.device-chip small { color: #7d8da7; font-size: 10.5px; }

.arch { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 18px; align-items: center; }
.arch-col { display: grid; gap: 10px; }
.arch-node { background: rgba(255,255,255,.04); border: 1px solid var(--line-dark); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: #cfdbef; display: flex; align-items: center; gap: 9px; }
.arch-node small { display: block; color: #7d8da7; font-size: 10.5px; }
.arch-node .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; flex: none; }
.arch-core {
  background: linear-gradient(160deg, rgba(16,185,129,.16), rgba(14,165,233,.12));
  border: 1px solid rgba(52,211,153,.32); border-radius: 18px; padding: 22px; text-align: center;
}
.arch-core h4 { color: #fff; margin: 0 0 6px; font-size: 16px; }
.arch-core p { color: #9fb0c9; font-size: 12px; margin: 0 0 12px; }
.arch-core .mini { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.arch-core .mini span { background: rgba(4,18,31,.35); border: 1px solid rgba(148,163,184,.14); padding: 6px; border-radius: 7px; font-size: 10.5px; color: #c9d6e8; }
.arch-label { text-align: center; color: #6f809b; font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 4px; font-weight: 700; }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column;
}
.plan.popular { border-color: rgba(52,211,153,.55); box-shadow: 0 0 0 1px rgba(52,211,153,.25), 0 24px 60px rgba(16,185,129,.12); position: relative; }
.plan .tag { position: absolute; top: -12px; left: 24px; background: var(--accent); color: #04281c; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.plan h3 { color: #fff; font-size: 20px; margin-bottom: 4px; }
.plan .best { color: #8ea0bb; font-size: 12.5px; min-height: 34px; }
.plan .price { color: #fff; font-size: 36px; font-weight: 800; letter-spacing: -.03em; margin: 12px 0 2px; }
.plan .price small { font-size: 13px; color: #8ea0bb; font-weight: 500; letter-spacing: 0; }
.plan .annual { color: #6ee7b7; font-size: 12px; }
.plan ul { display: grid; gap: 9px; margin: 18px 0 22px; }
.plan li { color: #b9c6da; font-size: 13.5px; display: flex; gap: 9px; align-items: flex-start; }
.plan li::before { content: "✓"; color: #34d399; font-weight: 800; }
.plan .btn { margin-top: auto; }

.calc {
  margin-top: 26px; background: rgba(255,255,255,.035); border: 1px solid var(--line-dark);
  border-radius: var(--radius); padding: 24px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 26px;
}
.calc h3 { color: #fff; font-size: 18px; }
.calc .field { margin-bottom: 14px; }
.calc label { display: flex; justify-content: space-between; color: #9fb0c9; font-size: 12.5px; margin-bottom: 6px; }
.calc input[type=range] { width: 100%; accent-color: var(--accent); }
.calc .readout { background: rgba(4,18,31,.45); border: 1px solid rgba(148,163,184,.16); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; justify-content: center; }
.calc .readout b { font-size: 32px; color: #fff; letter-spacing: -.03em; display: block; }
.calc .readout small { color: #8ea0bb; }
.calc .readout .line { display: flex; justify-content: space-between; color: #b9c6da; font-size: 12.5px; padding: 4px 0; border-bottom: 1px dashed rgba(148,163,184,.16); }
.calc .readout .line:last-of-type { border: none; }

.cta-band {
  max-width: 1180px; margin: 0 auto 80px; border-radius: 26px; padding: 52px;
  background: linear-gradient(120deg, rgba(16,185,129,.16), rgba(99,102,241,.16));
  border: 1px solid rgba(52,211,153,.28);
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; font-size: 32px; margin-bottom: 6px; }
.cta-band p { color: #b9c6da; margin: 0; }

.footer { border-top: 1px solid var(--line-dark); padding: 46px 26px 34px; background: #08101f; }
.footer-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 30px; }
.footer h4 { color: #dbe5f4; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px; }
.footer a, .footer p { color: #8496b3; font-size: 13px; }
.footer a:hover { color: #fff; }
.footer ul { display: grid; gap: 7px; }
.footer .fine { max-width: 1180px; margin: 34px auto 0; padding-top: 20px; border-top: 1px solid rgba(148,163,184,.1); color: #5f708c; font-size: 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------ auth */
body.auth { background: #0a1120; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-brand { padding: 54px; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(120% 120% at 10% 10%, #12352f 0%, #0a1120 55%); border-right: 1px solid var(--line-dark); }
.auth-brand h1 { color: #fff; font-size: 40px; letter-spacing: -.03em; max-width: 470px; margin-top: 40px; }
.auth-brand p { color: #9fb0c9; max-width: 440px; }
.auth-brand .proof { display: grid; gap: 12px; margin-top: 30px; }
.auth-brand .proof div { color: #b9c6da; font-size: 13.5px; display: flex; gap: 10px; align-items: center; }
.auth-brand .proof span { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(52,211,153,.12); color: #6ee7b7; font-size: 13px; }
.auth-panel { display: grid; place-items: center; padding: 40px 26px; background: #f5f7fb; }
.auth-card { width: min(430px, 100%); background: #fff; border-radius: 22px; padding: 34px; box-shadow: var(--shadow-lg); }
.auth-card h2 { font-size: 26px; }
.auth-card .sub { color: var(--muted); margin-bottom: 22px; }
.auth-card .alt { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }
.demo-hint { background: #f0fdf4; border: 1px dashed #86efac; border-radius: 12px; padding: 12px 14px; font-size: 12.5px; color: #166534; margin-top: 18px; }
.demo-hint b { display: block; margin-bottom: 2px; }

/* ------------------------------------------------------------ forms */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 650; color: #354259; margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], select, textarea {
  width: 100%; border: 1px solid #d7deea; background: #fff; border-radius: 10px; padding: 10px 12px; color: var(--text); outline: none; transition: .15s;
}
input:focus, select:focus, textarea:focus { border-color: #34d399; box-shadow: 0 0 0 3px rgba(16,185,129,.15); }
textarea { min-height: 110px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
.form-grid .span-2 { grid-column: span 2; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #354259; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.validation { color: #b91c1c; font-size: 12.5px; margin-top: 8px; }
.toast { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; border-radius: 12px; padding: 11px 14px; margin-bottom: 18px; font-size: 13.5px; display: flex; gap: 9px; align-items: flex-start; }
.toast.warn { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.toast.bad { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.toast b { font-weight: 700; }

/* ------------------------------------------------------------ console shell */
body.console { background: var(--paper); }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 252px; background: #0b1526; color: #c6d2e5;
  display: flex; flex-direction: column; z-index: 30; border-right: 1px solid rgba(148,163,184,.1);
}
.side-head { padding: 20px 20px 14px; }
.side-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 18px; }
.side-brand .brand-mark { width: 32px; height: 32px; font-size: 14px; }
.side-org { margin-top: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(148,163,184,.12); border-radius: 12px; padding: 10px 12px; }
.side-org b { display: block; color: #eaf1fb; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-org small { color: #7f91ac; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; }
.side-nav { padding: 10px 12px; overflow-y: auto; flex: 1; }
.side-label { color: #637692; font-size: 10px; text-transform: uppercase; letter-spacing: .15em; font-weight: 700; padding: 16px 10px 6px; }
.side-nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px;
  color: #a9b8cf; font-size: 13.5px; font-weight: 550; margin-bottom: 2px;
}
.side-nav a .ico { width: 19px; text-align: center; opacity: .9; }
.side-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.side-nav a.active { background: linear-gradient(90deg, rgba(16,185,129,.2), rgba(16,185,129,.06)); color: #fff; box-shadow: inset 2px 0 0 #34d399; }
.side-foot { padding: 14px; border-top: 1px solid rgba(148,163,184,.1); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(140deg, #10b981, #0ea5e9); color: #04121f; display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.user-chip b { display: block; color: #eaf1fb; font-size: 12.5px; line-height: 1.2; }
.user-chip small { color: #7f91ac; font-size: 10.5px; }
.user-chip form { margin-left: auto; }
.icon-btn { background: none; border: none; color: #7f91ac; font-size: 16px; padding: 4px; }
.icon-btn:hover { color: #fff; }

.shell { margin-left: 252px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 16px 30px; background: rgba(255,255,255,.86);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 19px; margin: 0; }
.topbar .crumb { color: var(--muted); font-size: 12.5px; }
.topbar .spacer { flex: 1; }
.topbar .status-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #065f46; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 999px; padding: 5px 11px; }
.topbar .status-pill i { width: 6px; height: 6px; border-radius: 50%; background: #10b981; animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.content { padding: 26px 30px 48px; max-width: 1440px; width: 100%; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h2 { font-size: 24px; margin: 0; }
.page-head p { color: var(--muted); margin: 4px 0 0; font-size: 13.5px; }
.page-head .actions { display: flex; gap: 9px; flex-wrap: wrap; }

.trial-banner {
  background: linear-gradient(90deg, #0b1526, #14243d); color: #dbe5f4; border-radius: 14px;
  padding: 14px 18px; display: flex; align-items: center; gap: 14px; margin-bottom: 20px; font-size: 13px;
}
.trial-banner .badge { background: rgba(52,211,153,.16); color: #6ee7b7; }
.trial-banner .spacer { flex: 1; }

/* ------------------------------------------------------------ cards & data */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 5px rgba(15, 30, 60, .03); }
.card-head { display: flex; align-items: center; gap: 12px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 14.5px; margin: 0; }
.card-head .sub { color: var(--muted); font-size: 12px; margin: 2px 0 0; }
.card-head .spacer { flex: 1; }
.card-body { padding: 20px; }
.card-body.tight { padding: 12px 20px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--line); background: #fafbfd; border-radius: 0 0 var(--radius) var(--radius); font-size: 12.5px; color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 17px 18px; position: relative; overflow: hidden; }
.kpi .label { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 650; }
.kpi .value { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 3px 0 2px; color: #101c33; }
.kpi .value small { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.kpi .foot { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .spark { position: absolute; right: 12px; top: 14px; opacity: .7; }
.trend-up { color: #059669; font-weight: 700; }
.trend-down { color: #dc2626; font-weight: 700; }

.split { display: grid; grid-template-columns: 1.65fr 1fr; gap: 18px; align-items: start; }
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.split-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }

.chart-wrap { padding: 8px 4px 0; }
.chart-svg { width: 100%; height: 190px; display: block; }
.legend { display: flex; gap: 18px; padding: 6px 20px 18px; color: var(--muted); font-size: 12px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 6px; }

.bars { display: grid; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 48px; gap: 12px; align-items: center; font-size: 12.5px; }
.bar-track { height: 9px; border-radius: 99px; background: #edf1f7; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #10b981, #34d399); }
.bar-fill.indigo { background: linear-gradient(90deg, #6366f1, #818cf8); }
.bar-fill.amber { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.bar-fill.sky { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.bar-row .num { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.ring { --p: 0; width: 118px; height: 118px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), #e9eef6 0); display: grid; place-items: center; }
.ring::before { content: ""; width: 86px; height: 86px; border-radius: 50%; background: #fff; }
.ring .ring-label { position: absolute; text-align: center; }
.ring-wrap { position: relative; display: grid; place-items: center; }
.ring .ring-label b { font-size: 27px; letter-spacing: -.03em; display: block; color: #0f1c33; }
.ring .ring-label small { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; padding: 10px 20px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
td { padding: 11px 20px; border-bottom: 1px solid #eef2f7; font-size: 13px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafcff; }
td .sub { color: var(--muted); font-size: 11.5px; }
td .file { display: flex; align-items: center; gap: 10px; }
.file-ico { width: 32px; height: 32px; border-radius: 9px; background: #eef6ff; color: #0b65c2; display: grid; place-items: center; font-size: 14px; flex: none; }
.file-ico.green { background: #ecfdf5; color: #047857; }
.file-ico.amber { background: #fffbeb; color: #b45309; }
.file-ico.rose { background: #fff1f2; color: #be123c; }

.toolbar { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.toolbar .spacer { flex: 1; }
.toolbar input[type=text], .toolbar select { width: auto; min-width: 130px; padding: 7px 10px; font-size: 12.5px; border-radius: 9px; }
.toolbar .btn { padding: 7px 13px; font-size: 12.5px; }
.pager { display: flex; align-items: center; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.pager .spacer { flex: 1; }

.progress { height: 6px; border-radius: 99px; background: #edf1f7; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.progress.warn span { background: var(--amber); }
.progress.bad span { background: var(--danger); }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-row .progress { flex: 1; }
.progress-row b { font-size: 11.5px; color: var(--muted); width: 34px; text-align: right; }

.alert-item { display: flex; gap: 12px; padding: 14px 20px; border-bottom: 1px solid #eef2f7; }
.alert-item:last-child { border: none; }
.alert-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; flex: none; background: #fef3c7; color: #b45309; }
.alert-ico.critical { background: #fee2e2; color: #b91c1c; }
.alert-ico.info { background: #e0f2fe; color: #0369a1; }
.alert-item b { font-size: 13px; display: block; }
.alert-item p { color: var(--muted); font-size: 12.5px; margin: 2px 0 0; }
.alert-item .meta { color: #94a3b8; font-size: 11px; margin-top: 4px; }
.alert-item .act { margin-left: auto; }

.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty .ico { font-size: 30px; margin-bottom: 8px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 20px; }
.tabs a { padding: 12px 14px; font-size: 13px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.tabs a.active { color: #047857; border-color: var(--accent); }

.json { background: #0b1526; color: #c7d6ea; border-radius: 12px; padding: 16px; font-size: 12px; line-height: 1.6; overflow: auto; max-height: 360px; white-space: pre-wrap; word-break: break-word; }
.code { background: #f4f6fa; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font-size: 12px; overflow-x: auto; }

.connector-map { display: grid; gap: 10px; }
.flow-card { border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; background: #fff; }
.flow-card .top { display: flex; align-items: center; gap: 9px; }
.flow-card b { font-size: 13.5px; }
.flow-card .path { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11.5px; margin-top: 6px; flex-wrap: wrap; }
.flow-card .path .node { background: #f2f5fa; border: 1px solid #e3e9f2; border-radius: 7px; padding: 2px 8px; color: #354259; }
.flow-card .path .arrow { color: #94a3b8; }
.flow-card .tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.flow-card .tags span { font-size: 10.5px; background: #eef6ff; color: #0b65c2; padding: 2px 7px; border-radius: 5px; }
.flow-card.paused { opacity: .65; }

.device-card { display: flex; gap: 12px; align-items: center; padding: 13px 16px; border-bottom: 1px solid #eef2f7; }
.device-card:last-child { border-bottom: none; }
.device-card .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; background: #f0f5fc; flex: none; }
.device-card b { font-size: 13px; display: block; }
.device-card small { color: var(--muted); font-size: 11.5px; }
.device-card .side { margin-left: auto; text-align: right; }

/* ------------------------------------------------------------ designer */
.wizard-steps { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.step {
  flex: 1; min-width: 190px; background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px;
  display: flex; gap: 11px; align-items: flex-start;
}
.step .n { width: 26px; height: 26px; border-radius: 8px; background: #eef2f7; color: #526079; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.step.active { border-color: #a7f3d0; box-shadow: 0 0 0 3px rgba(16,185,129,.08); }
.step.active .n { background: var(--accent); color: #04281c; }
.step b { font-size: 12.5px; display: block; }
.step small { font-size: 11px; color: var(--muted); }

.select-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.select-card { position: relative; border: 1px solid #e1e7f0; border-radius: 12px; padding: 12px 13px; background: #fff; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; transition: .15s; }
.select-card:hover { border-color: #a7f3d0; }
.select-card input { position: absolute; opacity: 0; }
.select-card .tick { width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid #c8d2e2; flex: none; display: grid; place-items: center; color: #fff; font-size: 10px; margin-top: 1px; }
.select-card:has(input:checked) { border-color: var(--accent); background: #f0fdf7; box-shadow: 0 0 0 3px rgba(16,185,129,.08); }
.select-card:has(input:checked) .tick { background: var(--accent); border-color: var(--accent); }
.select-card .tick::after { content: "✓"; opacity: 0; font-weight: 800; }
.select-card:has(input:checked) .tick::after { opacity: 1; }
.select-card b { font-size: 12.5px; display: block; }
.select-card small { color: var(--muted); font-size: 10.5px; display: block; margin-top: 2px; }
.select-card .code { font-size: 9.5px; color: #64748b; background: #f1f5f9; padding: 1px 5px; border-radius: 4px; }

.design-hero { display: grid; grid-template-columns: 170px 1fr; gap: 26px; padding: 22px; align-items: center; }
.design-hero .verdict { font-size: 22px; color: #0f1c33; margin: 0 0 4px; }
.score-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.score-box { background: #f8fafc; border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; }
.score-box b { font-size: 20px; display: block; letter-spacing: -.02em; }
.score-box small { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; }

.rec { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.rec .top { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.rec .top b { font-size: 13.5px; }
.rec p { color: var(--muted); font-size: 12.5px; margin: 6px 0 0; }
.rec .why { color: #64748b; font-size: 12px; margin-top: 6px; border-left: 2px solid #e2e8f0; padding-left: 10px; }
.rec .missing { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.rec .missing span { font-size: 10.5px; background: #fffbeb; color: #92400e; border: 1px solid #fde68a; padding: 2px 7px; border-radius: 5px; }
.rec .prog { margin-top: 10px; }
.gap-item { border: 1px solid #fee2e2; background: #fff7f7; border-radius: 12px; padding: 13px 15px; }
.gap-item.high { border-color: #fde68a; background: #fffdf5; }
.gap-item b { font-size: 13px; }
.gap-item p { color: #7c5a1e; font-size: 12px; margin: 4px 0 0; }
.gap-item .missing { margin-top: 6px; font-size: 11px; color: #92400e; }

/* ------------------------------------------------------------ reports */
.report-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.sla-table td { font-variant-numeric: tabular-nums; }
.health-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.health-box { border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; background: #fbfcfe; }
.health-box b { font-size: 22px; display: block; letter-spacing: -.02em; }
.health-box small { color: var(--muted); font-size: 11px; }

.invoice { border: 1px solid var(--line); border-radius: 13px; padding: 15px 17px; background: #fff; display: flex; gap: 14px; align-items: center; }
.invoice .ico { width: 40px; height: 40px; border-radius: 11px; background: #eef6ff; display: grid; place-items: center; font-size: 17px; color: #0b65c2; }
.invoice b { font-size: 13.5px; display: block; }
.invoice small { color: var(--muted); font-size: 11.5px; }
.invoice .amt { margin-left: auto; text-align: right; }
.invoice .amt b { font-size: 15px; }
.pay-brand { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.pay-brand span { font-size: 10.5px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; color: var(--muted); background: #fbfcfe; }

.settings-block { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding: 22px; }
.settings-block h3 { font-size: 14.5px; }
.settings-block p { color: var(--muted); font-size: 12.5px; }
.keyrow { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #eef2f7; }
.keyrow:last-child { border-bottom: none; }
.keyrow .ico { width: 34px; height: 34px; border-radius: 9px; background: #f1f5f9; display: grid; place-items: center; }
.keyrow b { font-size: 13px; display: block; }
.keyrow code { font-size: 11.5px; color: var(--muted); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1120px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-panel { max-width: 620px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .split, .split-2, .split-3, .report-grid { grid-template-columns: 1fr; }
  .select-grid { grid-template-columns: repeat(2, 1fr); }
  .device-strip { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
/* ------------------------------------------------------------ docs */
.docs-main { background: var(--paper); color: var(--text); }
.docs-hero { background: #0a1120; border-bottom: 1px solid var(--line-dark); }
.docs-hero-inner { max-width: 1180px; margin: 0 auto; padding: 46px 26px 32px; }
.docs-hero h1 { color: #fff; font-size: clamp(30px, 4vw, 42px); margin: 14px 0 10px; letter-spacing: -.03em; }
.docs-hero p { color: #9fb0c9; font-size: 16px; max-width: 760px; margin: 0; }
.docs-tabs { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.docs-tabs a {
  padding: 8px 15px; border-radius: 9px; background: rgba(255,255,255,.05); color: #cfdbef;
  font-size: 13px; font-weight: 600; border: 1px solid rgba(148,163,184,.22);
}
.docs-tabs a:hover { background: rgba(255,255,255,.1); color: #fff; }
.docs-tabs a.active { background: var(--accent); border-color: transparent; color: #04281c; }
.docs-layout { max-width: 1180px; margin: 0 auto; padding: 32px 26px 72px; display: grid; grid-template-columns: 252px 1fr; gap: 30px; align-items: start; }
.docs-side { position: sticky; top: 86px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.docs-side h4 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #8a94a8; margin: 14px 8px 4px; }
.docs-side h4:first-child { margin-top: 2px; }
.docs-side a { display: block; padding: 6px 8px; border-radius: 7px; font-size: 12.5px; color: #526079; font-weight: 550; }
.docs-side a:hover { background: #f2f6fb; color: #047857; }
.docs-body { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 34px 38px; min-width: 0; box-shadow: 0 2px 5px rgba(15,30,60,.03); }
.docs-body h2 { font-size: 23px; color: #101c33; margin: 36px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.docs-body h2:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.docs-body h3 { font-size: 16px; color: #16213a; margin: 22px 0 8px; }
.docs-body p { font-size: 14px; color: #334155; }
.docs-body > ul, .docs-body > ol { margin: 0 0 16px; padding-left: 22px; }
.docs-body > ul { list-style: disc; }
.docs-body > ol { list-style: decimal; }
.docs-body li { font-size: 14px; color: #334155; margin-bottom: 7px; }
.docs-body a { color: #047857; font-weight: 600; }
.docs-body a:hover { text-decoration: underline; }
.docs-body code { background: #f1f5f9; padding: 1px 6px; border-radius: 5px; font-size: 12.5px; color: #0f172a; }
.docs-body pre { background: #0b1526; color: #c7d6ea; border-radius: 12px; padding: 16px 18px; overflow-x: auto; font-size: 12.5px; line-height: 1.55; margin: 10px 0 18px; }
.docs-body pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.docs-body table { margin: 10px 0 20px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.docs-body th { padding: 9px 14px; }
.docs-body td { padding: 9px 14px; font-size: 12.5px; }
.docs-body td code { white-space: nowrap; }
.docs-body .callout { background: #f0fdf4; border: 1px solid #bbf7d0; border-left: 3px solid #10b981; border-radius: 10px; padding: 14px 16px; margin: 0 0 20px; }
.docs-body .callout b { display: block; font-size: 13px; color: #065f46; margin-bottom: 3px; }
.docs-body .callout p { margin: 0; font-size: 13px; color: #166534; }
.docs-body .callout.warn { background: #fffbeb; border-color: #fde68a; border-left-color: #f59e0b; }
.docs-body .callout.warn b { color: #92400e; }
.docs-body .callout.warn p { color: #92400e; }
.docs-body .callout.info { background: #f0f9ff; border-color: #bae6fd; border-left-color: #0ea5e9; }
.docs-body .callout.info b { color: #075985; }
.docs-body .callout.info p { color: #075985; }

@media (max-width: 1000px) {
  .docs-layout { grid-template-columns: 1fr; padding: 24px 18px 56px; }
  .docs-side { position: static; }
  .docs-body { padding: 24px 20px; }
  .docs-body table { display: block; overflow-x: auto; }
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .shell { margin-left: 0; }
  .grid-3, .pricing-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .content { padding: 18px; }
  .topbar { padding: 12px 18px; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .arch { grid-template-columns: 1fr; }
  .calc { grid-template-columns: 1fr; }
  .section { padding: 56px 20px; }
  .cta-band { margin: 0 18px 56px; padding: 34px; }
  .nav-links { display: none; }
  .design-hero { grid-template-columns: 1fr; }
  .score-list { grid-template-columns: repeat(2, 1fr); }
  .settings-block { grid-template-columns: 1fr; }
  .device-strip { grid-template-columns: repeat(2, 1fr); }
  .health-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .select-grid { grid-template-columns: 1fr; }
}
