/* ================================================================
   PEKRYON — Where Digital Defense Begins.
   Design System v1.0
   
   Primary:  Deep Navy #0B132B · Cyber Blue #0052FF · Steel Blue #2A3B5F
   Accents:  Neon Cyan #00E5FF · Emerald #00C47A · Orange #FF6A00 · Red #E30613
   Type:     Orbitron (display) · Raleway (body) · JetBrains Mono (data)
   Mark:     Concentric targeting rings with blue orb center
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Raleway:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  /* Primary Palette */
  --navy:       #0B132B;
  --navy-deep:  #060C1A;
  --navy-mid:   #0F1A38;
  --steel:      #2A3B5F;
  --steel2:     #1E2E4E;
  --steel3:     #364A72;
  --slate:      #687280;
  --slate2:     #4A5568;
  --white:      #FFFFFF;

  /* Cyber Blue — primary CTA */
  --blue:       #0052FF;
  --blue-light: #3373FF;
  --blue-dark:  #003ACC;
  --blue-dim:   rgba(0,82,255,0.12);
  --blue-glow:  rgba(0,82,255,0.25);

  /* Accent Palette */
  --cyan:       #00E5FF;
  --cyan-dim:   rgba(0,229,255,0.10);
  --cyan-glow:  rgba(0,229,255,0.22);

  --emerald:    #00C47A;
  --em-dim:     rgba(0,196,122,0.10);
  --em-glow:    rgba(0,196,122,0.20);

  --orange:     #FF6A00;
  --orange-dim: rgba(255,106,0,0.12);
  --orange-glow:rgba(255,106,0,0.25);

  --red:        #E30613;
  --red-dim:    rgba(227,6,19,0.10);

  --purple:     #7B61FF;
  --pur-dim:    rgba(123,97,255,0.12);

  /* Text */
  --text:       #FFFFFF;
  --text-2:     #A8B8CC;
  --text-3:     #687280;
  --text-4:     #3A4A5C;

  /* Typography */
  --orbitron: 'Orbitron', sans-serif;
  --raleway:  'Raleway', sans-serif;
  --mono:     'JetBrains Mono', monospace;

  /* Radii */
  --r-xs: 3px;
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-2xl:32px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t:    all 0.18s var(--ease);
  --ts:   all 0.35s var(--ease);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  background: var(--navy);
  color: var(--text-2);
  font-family: var(--raleway);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
::selection { background: var(--blue); color: #fff; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--navy-deep); }
::-webkit-scrollbar-thumb { background: var(--steel); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

/* ── Layout ─────────────────────────────────────────────────── */
.container    { max-width: 1240px; margin: 0 auto; padding: 0 36px; }
.container-sm { max-width: 900px;  margin: 0 auto; padding: 0 32px; }
.container-xs { max-width: 500px;  margin: 0 auto; padding: 0 24px; }

/* ── Typography helpers ─────────────────────────────────────── */
.orbitron { font-family: var(--orbitron); }

/* ── Gradient text ──────────────────────────────────────────── */
.grad-blue {
  background: linear-gradient(135deg, var(--cyan), var(--blue-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.grad-steel {
  background: linear-gradient(180deg, #FFFFFF 0%, #A8B8CC 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Eyebrow ────────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--orbitron); font-size: 10px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--cyan);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: ''; width: 20px; height: 1px; background: var(--cyan); flex-shrink: 0;
}

/* ── PEKRYON Logo SVG (built inline) ────────────────────────── */
/* The targeting ring mark is rendered as inline SVG in each template */

/* ── Navbar ─────────────────────────────────────────────────── */
.nav-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(6,12,26,0.95); backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,82,255,0.15);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 84px; padding: 0 40px; max-width: 1240px; margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 14px;
}
.brand-name {
  font-family: var(--orbitron); font-size: 20px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--white);
}
.brand-tagline {
  font-family: var(--orbitron); font-size: 7px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--cyan);
  display: block; margin-top: -2px;
}
.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links a {
  font-family: var(--raleway); font-size: 13px; font-weight: 500;
  color: var(--text-2); letter-spacing: 0.04em; transition: color 0.15s;
}
.nav-links a:hover { color: var(--cyan); }
.nav-cta { display: flex; align-items: center; gap: 12px; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--r);
  font-family: var(--orbitron); font-size: 13px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; border: none; transition: var(--t);
  white-space: nowrap; position: relative;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff; box-shadow: 0 4px 20px var(--blue-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--blue-light), var(--blue));
  transform: translateY(-2px); box-shadow: 0 8px 32px var(--blue-glow);
}
.btn-cyan {
  background: var(--cyan); color: var(--navy-deep); font-weight: 800;
}
.btn-cyan:hover {
  background: #33EAFF; transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--cyan-glow);
}
.btn-outline {
  background: transparent; color: var(--cyan);
  border: 1px solid var(--cyan);
}
.btn-outline:hover {
  background: var(--cyan-dim); transform: translateY(-2px);
  box-shadow: 0 0 24px var(--cyan-dim);
}
.btn-ghost {
  background: var(--steel2); color: var(--text-2);
  border: 1px solid var(--steel);
  font-family: var(--raleway); font-size: 13px; font-weight: 500;
  letter-spacing: 0; text-transform: none; padding: 9px 18px;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--cyan); background: var(--blue-dim); }
.btn-orange {
  background: linear-gradient(135deg, var(--orange), #FF8C00);
  color: #fff; box-shadow: 0 4px 20px var(--orange-glow);
}
.btn-orange:hover { transform: translateY(-2px); box-shadow: 0 8px 32px var(--orange-glow); }

.btn-sm  { padding: 9px 20px; font-size: 11px; }
.btn-lg  { padding: 15px 36px; font-size: 14px; border-radius: var(--r-lg); }
.btn-xs  {
  padding: 6px 12px; font-size: 11px;
  font-family: var(--raleway); text-transform: none;
  letter-spacing: 0; font-weight: 500; border-radius: var(--r-sm);
}
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px;
}
.form-input {
  width: 100%; background: var(--navy-mid); border: 1px solid var(--steel2);
  border-radius: var(--r); padding: 13px 16px;
  color: var(--white); font-size: 14px; font-family: var(--raleway); outline: none;
  transition: var(--t);
}
.form-input::placeholder { color: var(--text-4); }
.form-input:focus { border-color: var(--blue); background: var(--steel2); box-shadow: 0 0 0 3px var(--blue-dim); }
.form-input.has-icon { padding-left: 44px; }
.form-input.error { border-color: var(--red); }
.form-error { font-size: 11px; color: var(--red); margin-top: 5px; font-family: var(--mono); letter-spacing: 0.06em; display: none; }
.form-error.visible { display: block; }
.input-wrap { position: relative; }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.show-pw { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-3); cursor: pointer; transition: color 0.15s; }
.show-pw:hover { color: var(--cyan); }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--navy-mid);
  border: 1px solid var(--steel2);
  border-radius: var(--r-lg); padding: 24px;
}
.card-hover { transition: var(--ts); }
.card-hover:hover {
  border-color: rgba(0,82,255,0.4);
  transform: translateY(-3px);
  box-shadow: 0 20px 56px rgba(0,0,0,0.4), 0 0 40px rgba(0,82,255,0.08);
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.10em; text-transform: uppercase; border: 1px solid transparent;
}
.badge-pass   { background: var(--em-dim);     color: var(--emerald); border-color: rgba(0,196,122,0.25); }
.badge-warn   { background: var(--orange-dim); color: var(--orange);  border-color: rgba(255,106,0,0.25); }
.badge-fail   { background: var(--red-dim);    color: var(--red);     border-color: rgba(227,6,19,0.25); }
.badge-blue   { background: var(--blue-dim);   color: var(--cyan);    border-color: rgba(0,82,255,0.25); }
.badge-purple { background: var(--pur-dim);    color: var(--purple);  border-color: rgba(123,97,255,0.25); }

.score-chip {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 600; font-size: 13px;
  padding: 4px 12px; border-radius: var(--r-sm); border: 1px solid;
}
.score-excellent { background: var(--em-dim);     color: var(--emerald); border-color: rgba(0,196,122,0.3); }
.score-good      { background: var(--blue-dim);   color: var(--cyan);    border-color: rgba(0,229,255,0.3); }
.score-warn      { background: var(--orange-dim); color: var(--orange);  border-color: rgba(255,106,0,0.3); }
.score-critical  { background: var(--red-dim);    color: var(--red);     border-color: rgba(227,6,19,0.3); }

/* ── Status dot ─────────────────────────────────────────────── */
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.dot-pass  { background: var(--emerald); }
.dot-warn  { background: var(--orange); }
.dot-fail  { background: var(--red); }
.dot-blue  { background: var(--blue); }
.dot-live  { background: var(--emerald); animation: live-dot 1.8s infinite; }
@keyframes live-dot {
  0%  { box-shadow: 0 0 0 0 rgba(0,196,122,0.7); }
  70% { box-shadow: 0 0 0 7px rgba(0,196,122,0); }
  100%{ box-shadow: 0 0 0 0 rgba(0,196,122,0); }
}

/* ── Divider ────────────────────────────────────────────────── */
.divider     { height: 1px; background: var(--steel2); margin: 24px 0; }
.divider-blue { background: linear-gradient(90deg, transparent, var(--blue), transparent); }

/* ── Progress ───────────────────────────────────────────────── */
.progress-track { height: 3px; background: var(--steel2); border-radius: 2px; overflow: hidden; }
.progress-fill  {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--blue-dark), var(--cyan));
  transition: width 0.4s var(--ease);
}

/* ── Spinner ────────────────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: currentColor;
  border-radius: 50%; animation: spin 0.65s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ──────────────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 28px; right: 28px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--navy-mid); border: 1px solid var(--steel2);
  border-radius: var(--r); padding: 14px 18px;
  font-size: 14px; min-width: 300px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6); animation: toast-in 0.2s var(--ease);
}
.toast.success { border-left: 3px solid var(--emerald); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--cyan); }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Table ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--steel2); }
table { width: 100%; border-collapse: collapse; }
thead th {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-3); padding: 12px 20px; text-align: left;
  border-bottom: 1px solid var(--steel2); background: var(--navy-deep);
}
tbody td { padding: 14px 20px; font-size: 13.5px; border-bottom: 1px solid var(--steel2); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.12s; }
tbody tr:hover td { background: rgba(0,82,255,0.04); }

/* ── App shell ──────────────────────────────────────────────── */
.app-shell { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--navy-deep); border-right: 1px solid rgba(0,82,255,0.12);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-top { padding: 16px 18px; border-bottom: 1px solid rgba(0,82,255,0.12); display: flex; align-items: center; min-height: 80px; }
.sidebar-top a, .sidebar-brand a { cursor: pointer; }
.sidebar-top a:hover img, .sidebar-brand a:hover img { opacity: 0.85; transition: opacity 0.15s; }
.sidebar-nav { padding: 14px 10px; flex: 1; }
.nav-section {
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-3); padding: 0 12px; margin: 18px 0 8px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r);
  font-family: var(--raleway); font-size: 13.5px; font-weight: 500;
  color: var(--text-3); transition: var(--t); cursor: pointer;
  margin-bottom: 2px; border: none; background: none; width: 100%; text-align: left;
}
.nav-link:hover { background: var(--steel2); color: var(--text); }
.nav-link.active { background: var(--blue-dim); color: var(--cyan); border: 1px solid rgba(0,82,255,0.2); }
.sidebar-footer { padding: 12px; border-top: 1px solid rgba(0,82,255,0.12); }
.user-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); cursor: pointer; transition: var(--t); }
.user-row:hover { background: var(--steel2); }

/* Target avatar */
.target-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  display: grid; place-items: center; position: relative;
  border: 1px solid rgba(0,82,255,0.4);
}
.target-avatar::before {
  content: ''; position: absolute; inset: 3px;
  border-radius: 50%; border: 1px solid rgba(0,229,255,0.3);
}
.target-avatar span {
  font-family: var(--orbitron); font-size: 11px; font-weight: 700;
  color: var(--white); position: relative; z-index: 1;
}
.user-name { font-size: 13px; font-weight: 500; color: var(--white); font-family: var(--raleway); }
.user-plan { font-family: var(--mono); font-size: 9px; color: var(--text-3); letter-spacing: 0.10em; text-transform: uppercase; }

/* ── Topbar ─────────────────────────────────────────────────── */
.app-main { display: flex; flex-direction: column; min-height: 100vh; }
.app-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 36px; height: 80px;
  border-bottom: 1px solid rgba(0,82,255,0.12);
  background: var(--navy-deep);
  position: sticky; top: 0; z-index: 50; flex-shrink: 0;
}
.topbar-title { font-family: var(--orbitron); font-size: 16px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--white); }
.topbar-sub   { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin-top: 2px; }
.app-content  { padding: 36px; flex: 1; }

/* ── Stat cards ─────────────────────────────────────────────── */
.stat-card {
  background: linear-gradient(135deg, var(--navy-mid), var(--steel2));
  border: 1px solid var(--steel2); border-radius: var(--r-lg);
  padding: 22px 24px; position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--stat-line, var(--steel2));
}
.stat-card::after {
  content: ''; position: absolute; bottom: -30px; right: -20px;
  width: 90px; height: 90px; background: var(--stat-bg, transparent);
  border-radius: 50%; filter: blur(30px); pointer-events: none;
}
.stat-label { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.stat-value { font-family: var(--orbitron); font-size: 38px; font-weight: 800; line-height: 1; letter-spacing: 0.04em; color: var(--white); }
.stat-sub   { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* ── Score ring ─────────────────────────────────────────────── */
.ring-wrap  { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.ring-svg   { transform: rotate(-90deg); }
.ring-label { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; }
.ring-num   { font-family: var(--orbitron); font-size: 26px; font-weight: 800; line-height: 1; letter-spacing: 0.04em; }
.ring-grade { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; }

/* ── Check row ──────────────────────────────────────────────── */
.check-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--steel2); font-size: 13.5px; }
.check-row:last-child { border-bottom: none; }
.check-label { flex: 1; color: var(--text-2); }
.check-val { font-family: var(--mono); font-size: 12px; color: var(--text-3); }

/* ── Result card ────────────────────────────────────────────── */
.result-card { background: var(--navy-mid); border: 1px solid var(--steel2); border-radius: var(--r-lg); margin-bottom: 14px; overflow: hidden; }
.result-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; cursor: pointer; user-select: none;
  background: var(--navy-deep); transition: background 0.15s;
}
.result-card-header:hover { background: var(--steel2); }
.result-card-title { display: flex; align-items: center; gap: 10px; font-family: var(--orbitron); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--white); }
.result-card-body { padding: 20px 22px; }
.result-card-body.collapsed { display: none; }
.chevron { transition: transform 0.2s; color: var(--text-3); }
.result-card-header.open .chevron { transform: rotate(180deg); }

/* ── Recs ───────────────────────────────────────────────────── */
.rec-item {
  background: var(--navy-deep); border: 1px solid var(--steel2);
  border-left: 3px solid var(--steel2); border-radius: var(--r);
  padding: 13px 16px; margin-bottom: 10px;
  display: flex; align-items: flex-start; gap: 12px;
}
.rec-item.high   { border-left-color: var(--red); }
.rec-item.medium { border-left-color: var(--orange); }
.rec-item.low    { border-left-color: var(--emerald); }
.rec-badge {
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  padding: 3px 8px; border-radius: var(--r-xs); white-space: nowrap;
  letter-spacing: 0.12em; text-transform: uppercase; flex-shrink: 0; margin-top: 2px;
}
.rec-badge.high   { background: var(--red-dim);    color: var(--red); }
.rec-badge.medium { background: var(--orange-dim); color: var(--orange); }
.rec-badge.low    { background: var(--em-dim);     color: var(--emerald); }
.rec-text   { font-size: 13.5px; color: var(--text-2); }
.rec-detail { font-size: 12px; color: var(--text-3); margin-top: 4px; line-height: 1.5; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(6,12,26,0.9); backdrop-filter: blur(8px); z-index: 300; display: grid; place-items: center; padding: 24px; }
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--navy-mid); border: 1px solid rgba(0,82,255,0.3);
  border-radius: var(--r-xl); padding: 36px; width: 100%; max-width: 520px; position: relative;
  box-shadow: 0 0 80px rgba(0,82,255,0.1), 0 32px 80px rgba(0,0,0,0.7);
}
.modal::before {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
}

/* ── Scan module pills ──────────────────────────────────────── */
.module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.module-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--navy-deep); border: 1px solid var(--steel);
  border-radius: var(--r); padding: 9px 12px;
  font-family: var(--mono); font-size: 11px; color: var(--text-3);
  transition: var(--t); letter-spacing: 0.04em;
}
.module-item.checking { border-color: var(--blue); color: var(--cyan); background: var(--blue-dim); }
.module-item.done     { border-color: var(--emerald); color: var(--emerald); background: var(--em-dim); }

/* ── Quick scan bar ─────────────────────────────────────────── */
.quick-scan {
  display: flex; overflow: hidden; background: var(--navy-mid);
  border: 1px solid var(--steel2); border-radius: var(--r-lg); margin-bottom: 28px;
  transition: border-color 0.2s;
}
.quick-scan:focus-within { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-dim); }
.quick-scan-prefix { font-family: var(--mono); font-size: 12px; color: var(--text-3); padding: 14px 4px 14px 18px; white-space: nowrap; background: var(--navy-deep); border-right: 1px solid var(--steel2); letter-spacing: 0.06em; }
.quick-scan-field  { flex: 1; background: transparent; border: none; padding: 14px; color: var(--white); font-family: var(--mono); font-size: 14px; outline: none; }
.quick-scan-field::placeholder { color: var(--text-4); }

/* ── Auth layout ────────────────────────────────────────────── */
.auth-split { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-panel-left { background: var(--navy-deep); border-right: 1px solid rgba(0,82,255,0.12); display: flex; flex-direction: column; justify-content: center; padding: 64px; position: relative; overflow: hidden; }
.auth-panel-right { background: var(--navy); display: flex; align-items: center; justify-content: center; padding: 64px 48px; }
.auth-form-wrap { width: 100%; max-width: 420px; }
.auth-title { font-family: var(--orbitron); font-size: clamp(22px, 3vw, 34px); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--white); margin-bottom: 8px; }
.auth-sub   { font-size: 14px; color: var(--text-2); margin-bottom: 28px; }
.auth-footer { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-3); }
.auth-footer a { color: var(--cyan); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }
.error-banner { background: var(--red-dim); border: 1px solid rgba(227,6,19,0.2); border-radius: var(--r); padding: 12px 14px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--red); margin-bottom: 18px; display: none; }
.error-banner.visible { display: block; }
.pw-bar   { height: 3px; border-radius: 2px; margin-top: 8px; background: var(--steel); transition: all 0.3s; }
.pw-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; margin-top: 4px; }

/* ── Breakdown bar ──────────────────────────────────────────── */
.breakdown-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.breakdown-name { font-size: 12px; color: var(--text-2); width: 148px; flex-shrink: 0; font-family: var(--mono); letter-spacing: 0.04em; }
.breakdown-track { flex: 1; height: 4px; background: var(--steel2); border-radius: 2px; overflow: hidden; }
.breakdown-bar { height: 100%; border-radius: 2px; transition: width 0.9s var(--ease); }
.breakdown-pts { font-family: var(--mono); font-size: 11px; color: var(--text-3); width: 56px; text-align: right; flex-shrink: 0; }

/* ── Header check grid ──────────────────────────────────────── */
.header-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.header-item { display: flex; align-items: flex-start; gap: 10px; background: var(--navy-deep); border: 1px solid var(--steel2); border-radius: var(--r); padding: 12px 14px; }
.header-name { font-family: var(--mono); font-size: 11px; color: var(--text-2); }
.header-val  { font-size: 11px; color: var(--text-3); margin-top: 2px; word-break: break-all; }

/* ── Back button ────────────────────────────────────────────── */
.back-btn { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 20px; cursor: pointer; background: none; border: none; transition: color 0.15s; }
.back-btn:hover { color: var(--cyan); }

/* ── Filter bar ─────────────────────────────────────────────── */
.filter-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.filter-input { background: var(--navy-mid); border: 1px solid var(--steel2); border-radius: var(--r); padding: 9px 14px; color: var(--white); font-family: var(--mono); font-size: 13px; outline: none; transition: var(--t); }
.filter-input:focus { border-color: var(--blue); }
.filter-input::placeholder { color: var(--text-4); }
.count-tag { margin-left: auto; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); background: var(--navy-mid); padding: 6px 14px; border-radius: 20px; border: 1px solid var(--steel2); }

/* ── AdSense / Ad slots ─────────────────────────────────────── */
.ad-slot {
  background: linear-gradient(135deg, var(--navy-deep), var(--steel2));
  border: 1px solid rgba(0,82,255,0.15); border-radius: var(--r-lg);
  overflow: hidden; position: relative;
}
.ad-slot::before {
  content: 'ADVERTISEMENT';
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 8px; letter-spacing: 0.2em;
  color: var(--text-4); z-index: 1;
}
.ad-slot-banner { min-height: 90px; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ad-slot-rect   { min-height: 250px; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ad-slot-side   { min-height: 600px; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ad-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--text-4); text-align: center; width: 100%;
}
.ad-placeholder svg { opacity: 0.3; }
.ad-placeholder p { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }

/* ── Affiliate cards ────────────────────────────────────────── */
.affiliate-card {
  background: linear-gradient(135deg, var(--navy-mid), rgba(0,82,255,0.08));
  border: 1px solid rgba(0,82,255,0.2); border-radius: var(--r-lg);
  padding: 18px 20px; position: relative; overflow: hidden;
  transition: var(--ts);
}
.affiliate-card:hover { border-color: rgba(0,82,255,0.4); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,82,255,0.1); }
.affiliate-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}
.affiliate-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--blue-dim); border: 1px solid rgba(0,82,255,0.2);
  border-radius: var(--r-xs); padding: 2px 8px;
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan);
  margin-bottom: 10px;
}
.affiliate-title { font-family: var(--orbitron); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--white); margin-bottom: 6px; }
.affiliate-desc  { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-bottom: 14px; }
.affiliate-context { font-family: var(--mono); font-size: 11px; color: var(--cyan); margin-bottom: 12px; letter-spacing: 0.04em; }

/* ── Empty state ────────────────────────────────────────────── */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 24px; text-align: center; gap: 12px; }

/* ── Layout helpers ─────────────────────────────────────────── */
.hidden     { display: none !important; }
.flex       { display: flex; }
.flex-col   { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.flex-1     { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-wrap  { flex-wrap: wrap; }
.gap-2{gap:8px}.gap-3{gap:12px}.gap-4{gap:16px}.gap-6{gap:24px}.gap-8{gap:32px}
.grid-2     { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3     { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4     { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.mt-2{margin-top:8px}.mt-3{margin-top:12px}.mt-4{margin-top:16px}
.mt-6{margin-top:24px}.mt-8{margin-top:32px}.mt-12{margin-top:48px}
.mb-2{margin-bottom:8px}.mb-4{margin-bottom:16px}.mb-6{margin-bottom:24px}
.mb-8{margin-bottom:32px}.mb-12{margin-bottom:48px}
.w-full     { width: 100%; }
.text-center{ text-align: center; }
.text-white { color: var(--white); }
.text-dim   { color: var(--text-2); }
.text-faint { color: var(--text-3); }
.text-cyan  { color: var(--cyan); }
.text-blue  { color: var(--blue-light); }
.text-emerald { color: var(--emerald); }
.text-orange { color: var(--orange); }
.text-red   { color: var(--red); }
.truncate   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relative   { position: relative; }
.overflow-hidden { overflow: hidden; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .app-content { padding: 20px; }
  .app-topbar { padding: 0 20px; }
  .nav-links { display: none; }
  .auth-split { grid-template-columns: 1fr; }
  .auth-panel-left { display: none; }
  .auth-panel-right { padding: 40px 24px; }
  .container { padding: 0 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Alias for sidebar logo area */
.sidebar-brand { padding: 16px 18px; border-bottom: 1px solid rgba(0,82,255,0.12); display: flex; align-items: center; min-height: 80px; }