/* Neuralogix — security console theme. First-party only: CSP forbids inline styles. */

:root {
  --bg: #04060c;
  --bg-2: #070b16;
  --panel: rgba(13, 20, 38, 0.72);
  --panel-solid: #0b1222;
  --panel-hover: rgba(22, 33, 60, 0.85);
  --line: rgba(56, 189, 248, 0.14);
  --line-strong: rgba(56, 189, 248, 0.32);
  --text: #e6edf7;
  --muted: #8b9ab3;
  --dim: #5b6782;
  --cyan: #22d3ee;
  --green: #34d399;
  --violet: #a78bfa;
  --amber: #f59e0b;
  --red: #f43f5e;
  --blue: #60a5fa;
  --glow: 0 0 0 1px var(--line-strong), 0 0 32px -6px rgba(34, 211, 238, 0.45);
  --radius: 14px;
  --radius-sm: 9px;
  --mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before { /* tech grid */
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #67e8f9; }
code, .mono { font-family: var(--mono); font-size: 0.88em; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; }
.hidden { display: none !important; }
.gradient-text {
  background: linear-gradient(92deg, var(--cyan), var(--green) 45%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2s infinite; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 30px; height: 30px; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes scan { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }
@keyframes dash { to { stroke-dashoffset: -40; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes stripes { to { background-position: 28px 0; } }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: rgba(34, 211, 238, 0.06); color: var(--text);
  font: 600 14px/1 var(--sans); cursor: pointer; transition: all 0.18s ease; white-space: nowrap;
}
.btn:hover { border-color: var(--cyan); box-shadow: var(--glow); color: #fff; }
.btn-primary { background: linear-gradient(135deg, #0891b2, #059669); border-color: transparent; color: #fff; }
.btn-primary:hover { filter: brightness(1.12); }
.btn-danger { border-color: rgba(244, 63, 94, 0.5); background: rgba(244, 63, 94, 0.08); color: #fda4af; }
.btn-danger:hover { border-color: var(--red); box-shadow: 0 0 24px -6px var(--red); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.04); box-shadow: none; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 12px; }
.btn[disabled], .btn.is-disabled { opacity: 0.4; pointer-events: none; }
.inline-form { display: inline; }

label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field { margin-bottom: 18px; }
.field-hint { font-size: 12px; color: var(--dim); margin-top: 6px; }
.field-error { font-size: 12.5px; color: #fda4af; margin-top: 6px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=url], input[type=search], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  background: rgba(3, 7, 18, 0.7); border: 1px solid var(--line); color: var(--text);
  font: 14px/1.4 var(--sans); transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 96px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18); }
input.code-input { font: 600 26px/1 var(--mono); letter-spacing: 0.5em; text-align: center; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 500; color: var(--text); margin: 0; }
.check input { margin-top: 3px; accent-color: var(--cyan); width: 16px; height: 16px; }
.check.is-disabled { opacity: 0.38; cursor: not-allowed; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.choice {
  position: relative; display: block; padding: 14px 14px 14px 44px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.5); cursor: pointer; transition: all 0.15s; margin: 0;
}
.choice input { position: absolute; left: 14px; top: 16px; accent-color: var(--cyan); width: 17px; height: 17px; }
.choice strong { display: block; color: var(--text); font-size: 14px; }
.choice span { display: block; color: var(--dim); font-size: 12.5px; font-weight: 400; margin-top: 2px; }
.choice:hover { border-color: var(--line-strong); }
.choice:has(input:checked) { border-color: var(--cyan); background: rgba(34, 211, 238, 0.07); box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.35); }
.choice.is-locked { opacity: 0.35; cursor: not-allowed; filter: grayscale(1); }
.choice.is-locked::after { content: "LOCKED"; position: absolute; right: 12px; top: 12px; font: 600 10px var(--mono); letter-spacing: 0.1em; color: var(--dim); }

/* ---------- Panels, cards, tables ---------- */
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-title h2, .panel-title h3 { margin: 0; font-size: 16px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
@media (max-width: 1100px) { .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }

.stat { padding: 18px 20px; }
.stat-label { font: 600 11.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.stat-value { font: 700 32px/1.1 var(--sans); margin-top: 10px; }
.stat-value.cyan { color: var(--cyan); } .stat-value.green { color: var(--green); } .stat-value.red { color: var(--red); } .stat-value.amber { color: var(--amber); } .stat-value.violet { color: var(--violet); }

.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font: 600 11.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); padding: 12px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid rgba(56, 189, 248, 0.07); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.12s; }
tbody tr:hover { background: rgba(34, 211, 238, 0.035); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty .icon { width: 36px; height: 36px; color: var(--dim); margin-bottom: 10px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font: 600 11.5px/1.2 var(--mono); letter-spacing: 0.04em; border: 1px solid currentColor; white-space: nowrap;
  background: rgba(255, 255, 255, 0.02);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-queued { color: var(--muted); }
.badge-ready { color: var(--blue); }
.badge-in_progress { color: var(--cyan); }
.badge-in_progress::before { animation: pulse 1s infinite; }
.badge-completed { color: var(--green); }
.badge-failed { color: var(--red); }
.badge-cancelled { color: var(--dim); }
.badge-plain::before { display: none; }
.sev { display: inline-block; min-width: 26px; padding: 2px 7px; border-radius: 6px; font: 700 12px/1.4 var(--mono); text-align: center; }
.sev-critical { background: rgba(244, 63, 94, 0.18); color: #fb7185; }
.sev-high { background: rgba(249, 115, 22, 0.18); color: #fb923c; }
.sev-medium { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }
.sev-low { background: rgba(96, 165, 250, 0.16); color: #93c5fd; }
.sev-info, .sev-unknown { background: rgba(148, 163, 184, 0.14); color: #cbd5e1; }

.progress { position: relative; height: 6px; border-radius: 999px; background: rgba(148, 163, 184, 0.14); overflow: hidden; min-width: 90px; }
.progress > span { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--green)); transition: width 0.5s ease; }
.progress.is-live > span { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.22) 0 7px, transparent 7px 14px), linear-gradient(90deg, var(--cyan), var(--green)); animation: stripes 0.8s linear infinite; }

.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 48px; align-items: center; gap: 12px; font-size: 13px; }
.bar-track { height: 10px; border-radius: 6px; background: rgba(148, 163, 184, 0.1); overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: inherit; transition: width 0.8s cubic-bezier(.2,.8,.2,1); }
.bar-fill.critical { background: #f43f5e; } .bar-fill.high { background: #f97316; } .bar-fill.medium { background: #f59e0b; } .bar-fill.low { background: #60a5fa; } .bar-fill.info { background: #94a3b8; } .bar-fill.cyan { background: var(--cyan); }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 12px; border: 1px solid; margin-bottom: 18px; font-size: 14px; }
.alert-success { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.08); color: #a7f3d0; }
.alert-error { border-color: rgba(244, 63, 94, 0.4); background: rgba(244, 63, 94, 0.08); color: #fecdd3; }
.alert-info { border-color: var(--line-strong); background: rgba(34, 211, 238, 0.06); color: #a5f3fc; }
.alert-warning { border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.08); color: #fde68a; }

.kv { display: grid; grid-template-columns: 170px 1fr; gap: 10px 18px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.copy { display: flex; gap: 8px; }
.copy input { font-family: var(--mono); font-size: 12.5px; }

/* ---------- Console shell ---------- */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  padding: 22px 14px; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(7, 11, 22, 0.94), rgba(4, 6, 12, 0.94));
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; color: var(--text); font: 700 17px/1 var(--sans); letter-spacing: 0.02em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 30px; height: 30px; }
.brand small { display: block; font: 600 10.5px/1 var(--mono); color: var(--cyan); letter-spacing: 0.16em; margin-top: 5px; text-transform: uppercase; }
.nav-label { font: 600 10.5px/1 var(--mono); letter-spacing: 0.16em; color: var(--dim); text-transform: uppercase; padding: 14px 12px 6px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: 14px; transition: all 0.15s; border: 1px solid transparent; }
.nav-link:hover { color: var(--text); background: rgba(34, 211, 238, 0.05); }
.nav-link.is-active { color: #fff; background: linear-gradient(90deg, rgba(34, 211, 238, 0.16), rgba(34, 211, 238, 0.02)); border-color: var(--line); }
.nav-link.is-active .icon { color: var(--cyan); }
.sidebar-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); }
.sidebar-foot .tenant { font-size: 12.5px; color: var(--muted); }
.sidebar-foot .tenant code { display: block; color: var(--dim); font-size: 10.5px; margin-top: 4px; word-break: break-all; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: rgba(4, 6, 12, 0.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.topbar h1 { font-size: 19px; margin: 0; }
.crumbs { font: 500 12px/1 var(--mono); color: var(--dim); margin-bottom: 4px; letter-spacing: 0.04em; }
.content { padding: 28px 32px 60px; width: 100%; max-width: 1400px; }
.live-dot { display: inline-flex; align-items: center; gap: 7px; font: 600 11px/1 var(--mono); color: var(--dim); letter-spacing: 0.08em; text-transform: uppercase; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.live-dot.is-live { color: var(--green); }
.live-dot.is-live::before { background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2s infinite; }
.live-dot.is-polling { color: var(--amber); }
.live-dot.is-polling::before { background: var(--amber); }

.bell { position: relative; }
.bell-btn { position: relative; width: 40px; height: 40px; padding: 0; border-radius: 10px; }
.bell-count { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font: 700 11px/19px var(--mono); text-align: center; box-shadow: 0 0 12px rgba(244, 63, 94, 0.7); }
.bell-panel { position: absolute; right: 0; top: calc(100% + 10px); width: 380px; max-height: 480px; overflow: auto; background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.8); z-index: 50; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
.notif { display: block; padding: 13px 16px; border-bottom: 1px solid rgba(56, 189, 248, 0.07); color: var(--text); }
.notif:hover { background: rgba(34, 211, 238, 0.05); color: var(--text); }
.notif.is-unread { background: rgba(34, 211, 238, 0.04); }
.notif-title { display: flex; gap: 9px; align-items: flex-start; font-weight: 600; font-size: 13.5px; }
.notif-title::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--cyan); }
.notif.level-success .notif-title::before { background: var(--green); }
.notif.level-warning .notif-title::before { background: var(--amber); }
.notif.level-danger .notif-title::before { background: var(--red); }
.notif-body { font-size: 12.5px; color: var(--muted); margin: 3px 0 0 17px; }
.notif-time { font: 11px var(--mono); color: var(--dim); margin: 4px 0 0 17px; }

.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 100; display: flex; flex-direction: column; gap: 10px; width: 360px; max-width: calc(100vw - 44px); }
.toast { padding: 14px 16px; border-radius: 12px; background: var(--panel-solid); border: 1px solid var(--line-strong); box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.8); animation: fadeUp 0.3s ease; font-size: 13.5px; }
.toast strong { display: block; margin-bottom: 2px; }
.toast.level-success { border-color: rgba(52, 211, 153, 0.5); }
.toast.level-danger { border-color: rgba(244, 63, 94, 0.55); }
.toast.level-warning { border-color: rgba(245, 158, 11, 0.5); }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; flex-direction: row; flex-wrap: wrap; padding: 12px; }
  .brand { padding-bottom: 8px; width: 100%; }
  .nav-label, .sidebar-foot { display: none; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .bell-panel { width: calc(100vw - 32px); right: -60px; }
}

/* ---------- Auth ---------- */
.auth-wrap { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 430px; padding: 34px; }
.auth-card .brand { justify-content: center; padding-bottom: 8px; }
.auth-card h1 { font-size: 22px; text-align: center; margin-top: 8px; }
.auth-card .lead { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.auth-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 24px; }
.auth-tabs a { text-align: center; padding: 8px 6px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.auth-tabs a.is-active { background: rgba(34, 211, 238, 0.12); color: #fff; }
.qr { display: grid; place-items: center; padding: 16px; background: #fff; border-radius: 12px; width: 232px; margin: 0 auto 16px; }
.qr svg { display: block; width: 200px; height: 200px; }
.scanline { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.scanline::after { content: ""; position: absolute; left: 0; right: 0; height: 40%; background: linear-gradient(180deg, transparent, rgba(34, 211, 238, 0.06), transparent); animation: scan 4.5s linear infinite; }

/* ---------- Hub tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 24px; min-height: 220px;
  border-radius: 18px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  overflow: hidden; transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s;
}
.tile::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 0%), rgba(34, 211, 238, 0.14), transparent 40%); opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.tile:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--glow); color: var(--text); }
.tile:hover::before { opacity: 1; }
.tile-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(167, 139, 250, 0.12)); border: 1px solid var(--line-strong); color: var(--cyan); }
.tile-icon .icon { width: 28px; height: 28px; }
.tile h3 { font-size: 20px; margin: 4px 0 0; }
.tile .tile-label { font: 600 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); }
.tile p { color: var(--muted); font-size: 14px; margin: 0; }
.tile-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font: 600 12px var(--mono); color: var(--dim); }
.tile-foot .go { color: var(--cyan); }
.tile.is-locked { filter: grayscale(1); opacity: 0.42; cursor: not-allowed; }
.tile.is-locked:hover { transform: none; box-shadow: none; border-color: var(--line); }
.tile.is-locked .tile-icon { color: var(--dim); }
.lock-chip { display: inline-flex; align-items: center; gap: 6px; font: 600 11px var(--mono); color: var(--dim); }

/* ---------- Landing ---------- */
.site-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; align-items: center; gap: 28px; padding: 16px 5vw; background: linear-gradient(180deg, rgba(4, 6, 12, 0.92), rgba(4, 6, 12, 0.6)); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(56, 189, 248, 0.08); }
.site-nav .brand { padding: 0; }
.site-nav nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav nav a { color: var(--muted); font-weight: 500; font-size: 14.5px; }
.site-nav nav a:hover { color: var(--text); }
.access { position: relative; }
.access-menu {
  position: absolute; right: 0; top: calc(100% + 12px); width: 560px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 12px; border-radius: 16px; background: var(--panel-solid); border: 1px solid var(--line-strong); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9), var(--glow);
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: all 0.2s ease;
}
.access-menu::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.access:hover .access-menu, .access:focus-within .access-menu, .access.is-open .access-menu { opacity: 1; transform: none; pointer-events: auto; }
.access-tile { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(3, 7, 18, 0.6); color: var(--text); transition: all 0.15s; }
.access-tile:hover { border-color: var(--cyan); background: rgba(34, 211, 238, 0.08); color: var(--text); transform: translateY(-2px); }
.access-tile .icon { color: var(--cyan); width: 26px; height: 26px; }
.access-tile strong { font-size: 14.5px; }
.access-tile span { font-size: 12px; color: var(--muted); line-height: 1.4; }

.hero { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; padding: 120px 5vw 60px; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.75; }
.hero h1 { font-size: clamp(38px, 5.2vw, 70px); line-height: 1.04; letter-spacing: -0.03em; margin: 20px 0 22px; }
.hero .lead { font-size: 18.5px; color: var(--muted); max-width: 580px; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 34px; margin-top: 44px; flex-wrap: wrap; }
.hero-meta div { font: 700 26px/1 var(--sans); }
.hero-meta span { display: block; font: 500 12px/1.4 var(--mono); color: var(--dim); margin-top: 6px; letter-spacing: 0.06em; text-transform: uppercase; }

.terminal { border-radius: 16px; border: 1px solid var(--line-strong); background: rgba(3, 6, 14, 0.88); box-shadow: 0 40px 90px -30px rgba(34, 211, 238, 0.35); overflow: hidden; font: 13px/1.75 var(--mono); }
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: 12px; }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: #334155; }
.terminal-bar i:nth-child(1) { background: #f43f5e; } .terminal-bar i:nth-child(2) { background: #f59e0b; } .terminal-bar i:nth-child(3) { background: #34d399; }
.terminal-bar span { margin-left: 8px; }
.terminal-body { padding: 18px 20px; min-height: 330px; white-space: pre-wrap; color: #cbd5e1; }
.terminal-body .t-cmd { color: var(--cyan); }
.terminal-body .t-ok { color: var(--green); }
.terminal-body .t-warn { color: var(--amber); }
.terminal-body .t-bad { color: var(--red); }
.terminal-body .t-dim { color: var(--dim); }
.cursor { display: inline-block; width: 8px; height: 15px; background: var(--cyan); vertical-align: -2px; animation: blink 1s steps(1) infinite; }

.section { position: relative; z-index: 1; padding: 110px 5vw; }
.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 46px); letter-spacing: -0.02em; margin: 16px 0 14px; }
.section-head p { color: var(--muted); font-size: 17px; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

.product-card .tile-icon { animation: float 6s ease-in-out infinite; }
.product-card:nth-child(2n) .tile-icon { animation-delay: -2s; }
.product-card:nth-child(3n) .tile-icon { animation-delay: -4s; }
.product-card .sub-url { font: 500 12px var(--mono); color: var(--dim); }

.service { padding: 24px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); transition: all 0.2s; }
.service:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.service .icon { color: var(--green); width: 28px; height: 28px; margin-bottom: 14px; }
.service h3 { font-size: 17px; }
.service p { color: var(--muted); font-size: 14px; margin: 0; }

.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; max-width: 1180px; margin: 0 auto; }
.trust .panel { text-align: center; }
.trust .icon { color: var(--cyan); width: 30px; height: 30px; margin-bottom: 10px; }
@media (max-width: 900px) { .trust { grid-template-columns: 1fr 1fr; } }

.cta-band { max-width: 1100px; margin: 0 auto; padding: 56px; border-radius: 24px; text-align: center; border: 1px solid var(--line-strong); background: radial-gradient(800px circle at 50% 0%, rgba(34, 211, 238, 0.14), transparent 60%), var(--panel); }
.cta-band h2 { font-size: clamp(26px, 3vw, 40px); }
.footer { position: relative; z-index: 1; padding: 40px 5vw; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--dim); font-size: 13px; }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; padding-top: 110px; }
  .site-nav nav { display: none; }
  .access-menu { width: min(560px, calc(100vw - 32px)); grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
.justify-center { justify-content: center; }
.w-full { width: 100%; }
.narrow { max-width: 760px; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.panel { margin: 0; min-width: 0; }
fieldset[disabled] { opacity: 0.55; }
form.row select, form.row input[type=search] { width: auto; min-width: 200px; flex: 0 1 260px; }
.danger-zone { border-color: rgba(244, 63, 94, 0.35); }
.span-3 { grid-column: 1 / -1; }

/* ---------- Admin overview ---------- */
.kpi-sub { font-size: 12px; color: var(--dim); margin-top: 8px; }
.stat-value-sm { font-size: 18px; margin-top: 4px; }
.text-green { color: var(--green); } .text-red { color: #fb7185; } .text-amber { color: #fbbf24; }
.d-block { display: block; }
.bar-link { color: inherit; border-radius: 8px; padding: 2px 4px; margin: -2px -4px; }
.bar-link:hover { color: inherit; background: rgba(34, 211, 238, 0.05); }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 6px; border-bottom: 1px solid var(--line); }
.spark-bar { position: relative; flex: 1; min-height: 2px; height: 0; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--cyan), rgba(34, 211, 238, 0.35)); transition: height 0.6s cubic-bezier(.2,.8,.2,1); }
.spark-bar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: inherit; background: var(--red); }
.spark-bar:hover { filter: brightness(1.3); }
.list-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(56, 189, 248, 0.07); color: var(--text); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { color: var(--text); background: rgba(34, 211, 238, 0.03); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 260px; }
.chip { padding: 2px 7px; border-radius: 6px; font: 600 10.5px/1.5 var(--mono); color: var(--dim); border: 1px dashed rgba(148, 163, 184, 0.25); }
.chip.is-on { color: #a5f3fc; border: 1px solid rgba(34, 211, 238, 0.45); background: rgba(34, 211, 238, 0.1); }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; background: var(--dim); }
.status-dot.is-active { background: var(--green); } .status-dot.is-lead { background: var(--blue); } .status-dot.is-suspended { background: var(--red); }
.sort-link { color: inherit; }
.sort-link:hover, .sort-link.is-active { color: var(--cyan); }
.sort-link.is-active::after { content: " ↓"; }
table.portfolio td { vertical-align: top; }
.panel-title .filters { flex: 0 0 auto; }
.panel-title .filters select { min-width: 170px; flex: 0 0 auto; }
table.portfolio td:first-child { min-width: 190px; }
table.portfolio .chips { max-width: 230px; }
.mode-intro { display: flex; align-items: center; gap: 10px; margin: -8px 0 20px; color: var(--muted); font-size: 14.5px; }
.mode-intro .icon { color: var(--cyan); }
.mode-intro strong { color: var(--text); }
.mode-hints { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12px; color: var(--dim); }
.mode-hints li + li { margin-top: 3px; }
.mode-hints strong { color: var(--muted); font-weight: 600; }
.flag-group { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.flag-group-title { font: 600 10.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 10px; }
.flag-group .check + .check { margin-top: 8px; }
.danger-banner p { color: #fecdd3; }

/* ---- Landing: compliance ecosystem ------------------------------------- */
.mt-6 { margin-top: 56px; }
.mx-auto { margin-left: auto; margin-right: auto; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes sheen { 0%, 100% { border-color: var(--line); } 50% { border-color: var(--line-strong); } }

.contrast { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 1180px; margin: 0 auto; }
.contrast-col { padding: 28px 30px; }
.contrast-col h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 16px; }
.contrast-col h3 .icon { width: 22px; height: 22px; flex: none; padding: 4px; border-radius: 50%; }
.contrast-col h3 .icon { color: var(--red); background: rgba(244, 63, 94, 0.12); }
.contrast-col.is-good { border-color: rgba(52, 211, 153, 0.32); }
.contrast-col.is-good h3 .icon { color: var(--green); background: rgba(52, 211, 153, 0.12); }
.contrast-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 11px; }
.contrast-col li { position: relative; padding-left: 20px; color: var(--muted); font-size: 14px; }
.contrast-col li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 2px; background: var(--dim); transform: rotate(45deg); }
.contrast-col.is-good li { color: var(--text); }
.contrast-col.is-good li::before { background: var(--green); box-shadow: 0 0 10px rgba(52, 211, 153, 0.7); }
@media (max-width: 900px) { .contrast { grid-template-columns: 1fr; } }

.loop { max-width: 860px; margin: 0 auto; }
.loop svg { width: 100%; height: auto; display: block; overflow: visible; }
.loop .track { stroke: rgba(56, 189, 248, 0.14); stroke-width: 14; fill: none; }
.loop .flow { stroke: url(#loopGrad); stroke-width: 2.5; fill: none; stroke-dasharray: 8 14; animation: dash 1.6s linear infinite; }
.loop .node rect { fill: #08101f; stroke: rgba(56, 189, 248, 0.45); stroke-width: 1.4; }
.loop .node text { fill: #e6edf7; font: 600 17px var(--sans); text-anchor: middle; }
.loop .node .no { fill: var(--cyan); font: 600 11px var(--mono); letter-spacing: 0.18em; }
.loop .node .sub { fill: #8b9ab3; font: 500 11.5px var(--sans); }
.loop .loop-core { fill: var(--dim); font: 600 13px var(--mono); letter-spacing: 0.3em; text-anchor: middle; }
.loop .packet { fill: #34d399; filter: drop-shadow(0 0 7px #34d399); }

.lifecycle { max-width: 1180px; margin: 0 auto; }
.lifecycle .stage { padding: 22px; }
.lifecycle .stage .icon { color: var(--cyan); width: 26px; height: 26px; margin-bottom: 12px; }
.lifecycle .stage h3 { margin: 0 0 8px; font-size: 16px; }
@media (max-width: 1000px) { .lifecycle { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .lifecycle { grid-template-columns: 1fr; } }

.frameworks { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 1000px; margin: 0 auto; }
.fw-chip { display: grid; gap: 3px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); transition: transform 0.2s, border-color 0.2s; animation: sheen 6s ease-in-out infinite; }
.fw-chip:nth-child(3n) { animation-delay: -2s; }
.fw-chip:nth-child(3n+1) { animation-delay: -4s; }
.fw-chip:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.fw-chip strong { font-size: 14px; letter-spacing: 0.01em; }
.fw-chip span { font: 500 11.5px var(--mono); color: var(--dim); }

.debt { max-width: 980px; margin: 0 auto; padding: 28px 30px 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.debt svg { width: 100%; height: auto; display: block; }
.debt .grid { stroke: rgba(56, 189, 248, 0.10); stroke-width: 1; }
.debt .area { fill: url(#debtFill); opacity: 0; transition: opacity 1.2s ease 0.6s; }
.debt .line { fill: none; stroke: url(#debtLine); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 840; stroke-dashoffset: 840; }
.debt.is-visible .line { animation: draw 1.8s ease forwards; }
.debt.is-visible .area { opacity: 1; }
.debt .head { fill: #34d399; filter: drop-shadow(0 0 8px #34d399); }
.debt .tick { fill: var(--dim); font: 500 11px var(--mono); text-anchor: middle; }
.debt .mark { fill: var(--muted); font: 600 12px var(--mono); }
.debt .mark.end { fill: var(--green); text-anchor: end; }
.debt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0 14px; }
.debt-stats .stat { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; text-align: center; }
.debt-stats .stat-value { display: block; margin-top: 0; color: var(--cyan); }
.debt-stats .stat-label { display: block; margin-top: 8px; letter-spacing: 0.08em; }
@media (max-width: 700px) { .debt-stats { grid-template-columns: 1fr; } .debt { padding: 22px 18px 16px; } }
@media (max-width: 700px) {
  .loop .node text { font-size: 20px; }
  .loop .node .sub { font-size: 13px; }
  .loop .node .no { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  /* The burn-down line is drawn by an animation; without it, show it finished. */
  .debt .line { stroke-dashoffset: 0; }
  .debt .area { opacity: 1; }
}

/* The loop reads as a diagram on desktop and as a list on a phone, where the SVG text would be unreadable. */
.loop-list { display: none; }
@media (max-width: 700px) {
  .loop svg { display: none; }
  .loop-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
  .loop-list li { display: grid; gap: 5px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
  .loop-list .no { font: 600 11px var(--mono); letter-spacing: 0.18em; color: var(--cyan); }
  .loop-list strong { font-size: 16px; }
  .loop-list li > span:last-child { color: var(--muted); font-size: 13.5px; }
  .debt .tick, .debt .mark { font-size: 26px; }
}

/* ---- Portal: the five motions ------------------------------------------ */
.motions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.motion { position: relative; display: grid; gap: 5px; padding: 16px 16px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(8, 16, 31, 0.6); opacity: 0.62; transition: opacity 0.2s, border-color 0.2s; }
.motion::after { content: ""; position: absolute; top: 50%; right: -13px; width: 13px; height: 1px; background: var(--line); }
.motion:last-child::after { display: none; }
.motion-no { font: 600 10.5px var(--mono); letter-spacing: 0.18em; color: var(--dim); }
.motion strong { font-size: 15px; }
.motion-body { color: var(--muted); font-size: 12.5px; }
.motion-by { display: flex; align-items: center; gap: 6px; margin-top: 4px; font: 500 11.5px var(--mono); color: var(--dim); }
.motion-by .icon { width: 13px; height: 13px; flex: none; }
.motion.is-covered { opacity: 1; border-color: rgba(52, 211, 153, 0.34); }
.motion.is-covered .motion-no { color: var(--green); }
.motion.is-covered .motion-by { color: var(--green); }
.motion.is-covered::after { background: rgba(52, 211, 153, 0.45); }
@media (max-width: 1100px) {
  .motions { grid-template-columns: 1fr 1fr; }
  .motion::after { display: none; }
}

.motion-tag { display: inline-block; margin-top: 6px; font: 500 11px var(--mono); letter-spacing: 0.04em; color: var(--dim); }
.motion-tag strong { color: var(--cyan); font-weight: 600; }
