/* ==========================================================================
   HAWK AI DESIGN SYSTEM  ·  hawkai.ai-sns.io
   Shared by: index.html (marketing), auth.html, verify.html (applicant flow),
   admin.html (compliance dashboard), console.html (client console)
   --------------------------------------------------------------------------
   Tokens are theme-level custom properties. Light is the default on :root;
   dark is re-declared under prefers-color-scheme (guarded) and [data-theme].
   Marketing pages lock light with body.lock-light.
   ========================================================================== */

/* ---------- 1. TOKENS ---------- */
:root {
  color-scheme: light;
  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Ink (always-dark surfaces: sidebars, dark sections) */
  --ink: #0B1020;
  --ink-2: #121A2E;
  --ink-3: #1B2540;
  --ink-line: rgba(255,255,255,.09);
  --ink-text: #EEF2FA;
  --ink-text-2: #A9B3C7;
  --ink-text-3: #6F7B94;

  /* Themed surfaces */
  --paper: #FFFFFF;
  --paper-2: #F4F6FA;
  --paper-3: #E9EDF4;
  --line: #E3E7EF;
  --line-strong: #CBD2DE;
  --text: #0F1424;
  --text-2: #4B5568;
  --text-3: #7B8497;
  --overlay: rgba(11,16,32,.55);

  /* Brand */
  --brand: #0FD37F;
  --brand-strong: #08B56B;
  --brand-ink: #046A40;
  --brand-soft: #E3FBF0;
  --brand-glow: rgba(15,211,127,.35);
  --iris: #6D5DFC;
  --iris-strong: #5A4AE8;
  --iris-soft: #EEEBFF;
  --iris-glow: rgba(109,93,252,.35);

  /* Semantic (status — never used as chart series) */
  --ok: #12B76A;      --ok-soft: #E6F8EF;     --ok-ink: #0B7A46;
  --warn: #F79009;    --warn-soft: #FEF3E2;   --warn-ink: #9A5A00;
  --danger: #F04438;  --danger-soft: #FEECEB; --danger-ink: #A8261D;
  --info: #2E90FA;    --info-soft: #E8F2FF;   --info-ink: #175CD3;

  /* Charts (validated categorical order — never cycle past 6) */
  --chart-1: #6D5DFC;
  --chart-2: #EB6834;
  --chart-3: #1BAF7A;
  --chart-4: #EDA100;
  --chart-5: #E87BA4;
  --chart-6: #2A78D6;
  --chart-grid: #ECEFF4;
  --chart-axis: #C9D0DC;

  /* Shape & depth */
  --radius-xs: 6px;
  --radius-s: 8px;
  --radius: 12px;
  --radius-l: 18px;
  --radius-xl: 28px;
  --shadow-s: 0 1px 2px rgba(11,16,32,.06), 0 1px 3px rgba(11,16,32,.05);
  --shadow: 0 10px 28px -10px rgba(11,16,32,.20), 0 2px 6px rgba(11,16,32,.06);
  --shadow-l: 0 30px 70px -24px rgba(11,16,32,.38), 0 8px 20px -10px rgba(11,16,32,.12);
  --ring: 0 0 0 3px rgba(15,211,127,.35);

  --ease: cubic-bezier(.2,.7,.2,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --dur: .28s;

  --sidebar-w: 248px;
  --topbar-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0F1526;
    --paper-2: #0A0F1D;
    --paper-3: #182137;
    --line: #202B45;
    --line-strong: #2E3B5C;
    --text: #EEF2FA;
    --text-2: #AEB8CC;
    --text-3: #7B879F;
    --overlay: rgba(2,5,14,.7);
    --brand-strong: #19E08C;
    --brand-ink: #7CF0BE;
    --brand-soft: rgba(15,211,127,.14);
    --iris-soft: rgba(109,93,252,.18);
    --iris-strong: #8B7DFF;
    --ok-soft: rgba(18,183,106,.16);   --ok-ink: #5FE3A4;
    --warn-soft: rgba(247,144,9,.16);  --warn-ink: #FFC46B;
    --danger-soft: rgba(240,68,56,.16);--danger-ink: #FF8A80;
    --info-soft: rgba(46,144,250,.16); --info-ink: #7FB9FF;
    --chart-1: #8B7DFF; --chart-2: #D95926; --chart-3: #199E70;
    --chart-4: #C98500; --chart-5: #D55181; --chart-6: #3987E5;
    --chart-grid: #1C2640; --chart-axis: #2E3B5C;
    --shadow-s: 0 1px 2px rgba(0,0,0,.4);
    --shadow: 0 10px 28px -10px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.3);
    --shadow-l: 0 30px 70px -24px rgba(0,0,0,.8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0F1526;
  --paper-2: #0A0F1D;
  --paper-3: #182137;
  --line: #202B45;
  --line-strong: #2E3B5C;
  --text: #EEF2FA;
  --text-2: #AEB8CC;
  --text-3: #7B879F;
  --overlay: rgba(2,5,14,.7);
  --brand-strong: #19E08C;
  --brand-ink: #7CF0BE;
  --brand-soft: rgba(15,211,127,.14);
  --iris-soft: rgba(109,93,252,.18);
  --iris-strong: #8B7DFF;
  --ok-soft: rgba(18,183,106,.16);   --ok-ink: #5FE3A4;
  --warn-soft: rgba(247,144,9,.16);  --warn-ink: #FFC46B;
  --danger-soft: rgba(240,68,56,.16);--danger-ink: #FF8A80;
  --info-soft: rgba(46,144,250,.16); --info-ink: #7FB9FF;
  --chart-1: #8B7DFF; --chart-2: #D95926; --chart-3: #199E70;
  --chart-4: #C98500; --chart-5: #D55181; --chart-6: #3987E5;
  --chart-grid: #1C2640; --chart-axis: #2E3B5C;
  --shadow-s: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 10px 28px -10px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.3);
  --shadow-l: 0 30px 70px -24px rgba(0,0,0,.8);
}
/* Marketing pages commit to the light world regardless of host theme */
body.lock-light {
  color-scheme: light;
  --paper: #FFFFFF; --paper-2: #F4F6FA; --paper-3: #E9EDF4;
  --line: #E3E7EF; --line-strong: #CBD2DE;
  --text: #0F1424; --text-2: #4B5568; --text-3: #7B8497;
  --brand-strong: #08B56B; --brand-ink: #046A40; --brand-soft: #E3FBF0;
  --iris-soft: #EEEBFF; --iris-strong: #5A4AE8;
  --ok-soft: #E6F8EF; --ok-ink: #0B7A46; --warn-soft: #FEF3E2; --warn-ink: #9A5A00;
  --danger-soft: #FEECEB; --danger-ink: #A8261D; --info-soft: #E8F2FF; --info-ink: #175CD3;
  --chart-grid: #ECEFF4; --chart-axis: #C9D0DC;
  --shadow-s: 0 1px 2px rgba(11,16,32,.06), 0 1px 3px rgba(11,16,32,.05);
  --shadow: 0 10px 28px -10px rgba(11,16,32,.20), 0 2px 6px rgba(11,16,32,.06);
  --shadow-l: 0 30px 70px -24px rgba(11,16,32,.38), 0 8px 20px -10px rgba(11,16,32,.12);
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code, kbd, .mono { font-family: var(--font-mono); font-size: .92em; }
:focus-visible { outline: 2px solid var(--brand-strong); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(15,211,127,.35); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 3. TYPE SCALE ---------- */
.display-xl { font-family: var(--font-display); font-size: clamp(2.6rem, 6.2vw, 5rem); line-height: .98; letter-spacing: -.035em; font-weight: 800; }
.display    { font-family: var(--font-display); font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.02; letter-spacing: -.03em; font-weight: 800; }
.h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); font-weight: 700; }
.h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 700; }
.h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.015em; }
.h4 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.lead { font-size: 1.15rem; line-height: 1.6; color: var(--text-2); max-width: 62ch; }
.eyebrow { font-family: var(--font-body); font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-strong); }
.eyebrow.iris { color: var(--iris-strong); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: .84rem; }
.xs { font-size: .76rem; }
.num { font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; }
.balance { text-wrap: balance; }
.gradient-text { background: linear-gradient(95deg, var(--brand-strong), var(--iris)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 4. LAYOUT ---------- */
.container { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.container-wide { width: min(1360px, calc(100% - 48px)); margin-inline: auto; }
.container-narrow { width: min(760px, calc(100% - 48px)); margin-inline: auto; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.grid { display: grid; gap: var(--gap, 20px); }
.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-12 { grid-template-columns: repeat(12, minmax(0,1fr)); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; } .span-12 { grid-column: span 12; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-12 > [class*="span-"] { grid-column: span 12; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container, .container-wide, .container-narrow { width: calc(100% - 32px); }
  .hide-mobile { display: none !important; }
}

/* ---------- 5. BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px;
  font-weight: 600; font-size: .92rem; white-space: nowrap; line-height: 1;
  border: 1px solid transparent; transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s, border-color .2s;
  user-select: none;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--brand); color: #052E1C; border-color: var(--brand); box-shadow: 0 6px 18px -6px var(--brand-glow); }
.btn-primary:hover { background: #1AE68F; box-shadow: 0 10px 26px -8px var(--brand-glow); transform: translateY(-1px); }
.btn-ink { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.btn-ink:hover { background: var(--ink-3); transform: translateY(-1px); }
.btn-iris { background: var(--iris); color: #fff; border-color: var(--iris); box-shadow: 0 6px 18px -6px var(--iris-glow); }
.btn-iris:hover { background: var(--iris-strong); transform: translateY(-1px); }
.btn-secondary { background: var(--paper); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--text-3); background: var(--paper-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--paper-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { filter: brightness(1.08); }
.btn-soft { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
.btn-soft:hover { background: rgba(15,211,127,.28); }
.btn-on-ink { background: rgba(255,255,255,.08); color: var(--ink-text); border-color: rgba(255,255,255,.16); }
.btn-on-ink:hover { background: rgba(255,255,255,.14); }
.btn-sm { height: 34px; padding: 0 14px; font-size: .84rem; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 1rem; }
.btn-xs { height: 28px; padding: 0 10px; font-size: .78rem; gap: 6px; }
.btn-xs svg { width: 14px; height: 14px; }
.btn-square { border-radius: var(--radius-s); }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: var(--radius-s); color: var(--text-2); }
.btn-icon:hover { background: var(--paper-2); color: var(--text); }
.btn-icon svg { width: 18px; height: 18px; }
.btn-block { width: 100%; }

/* ---------- 6. CHIPS / BADGES ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  border-radius: 999px; font-size: .76rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  background: var(--paper-3); color: var(--text-2);
}
.chip svg { width: 13px; height: 13px; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.chip.nodot::before { display: none; }
.chip.ok { background: var(--ok-soft); color: var(--ok-ink); }
.chip.warn { background: var(--warn-soft); color: var(--warn-ink); }
.chip.danger { background: var(--danger-soft); color: var(--danger-ink); }
.chip.info { background: var(--info-soft); color: var(--info-ink); }
.chip.brand { background: var(--brand-soft); color: var(--brand-ink); }
.chip.iris { background: var(--iris-soft); color: var(--iris-strong); }
.chip.ink { background: var(--ink); color: var(--ink-text); }
.chip.outline { background: transparent; border: 1px solid var(--line-strong); }
.chip.lg { height: 30px; padding: 0 12px; font-size: .84rem; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: .72rem; font-weight: 600; background: var(--paper-3); color: var(--text-2); font-family: var(--font-mono); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.danger { background: var(--danger); } .dot.info { background: var(--info); } .dot.brand { background: var(--brand); }
.dot.live { box-shadow: 0 0 0 0 var(--brand-glow); animation: pulse-ring 1.8s infinite; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 700; }

/* ---------- 7. CARDS & PANELS ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); }
.card-pad { padding: 22px; }
.card-hover { transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card-ink { background: var(--ink); color: var(--ink-text); border-color: var(--ink-line); }
.card-ink .muted { color: var(--ink-text-2); }
.card-soft { background: var(--paper-2); border-color: transparent; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h3, .panel-head .h4 { font-size: .95rem; font-weight: 700; letter-spacing: -.01em; }
.panel-body { padding: 18px; }
.panel-foot { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--paper-2); border-radius: 0 0 var(--radius) var(--radius); }
.glass { background: rgba(255,255,255,.72); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border: 1px solid rgba(255,255,255,.6); }

/* ---------- 8. FORMS ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: .82rem; font-weight: 600; color: var(--text-2); }
.label .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 12px; border-radius: var(--radius-s);
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-strong); box-shadow: var(--ring); }
.input.error { border-color: var(--danger); }
.input-sm { height: 36px; font-size: .88rem; }
.input-lg { height: 50px; font-size: 1rem; padding: 0 16px; }
.select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237B8497' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.help { font-size: .78rem; color: var(--text-3); }
.error-text { font-size: .78rem; color: var(--danger-ink); }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.input-wrap > .input { padding-left: 38px; }
.input-wrap .kbd-hint { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.checkbox, .radio { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .9rem; }
.checkbox input, .radio input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; flex: none; margin-top: 2px; border: 1.5px solid var(--line-strong); border-radius: 5px; background: var(--paper); display: grid; place-content: center; transition: background .15s, border-color .15s; }
.radio input { border-radius: 50%; }
.checkbox input::before { content: ""; width: 10px; height: 10px; transform: scale(0); transition: transform .15s var(--ease-spring); clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); background: #052E1C; }
.radio input::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #052E1C; transform: scale(0); transition: transform .15s var(--ease-spring); }
.checkbox input:checked, .radio input:checked { background: var(--brand); border-color: var(--brand); }
.checkbox input:checked::before, .radio input:checked::before { transform: scale(1); }
.toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .9rem; }
.toggle input { appearance: none; -webkit-appearance: none; width: 40px; height: 22px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .2s; flex: none; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s var(--ease-spring); }
.toggle input:checked { background: var(--brand-strong); }
.toggle input:checked::after { transform: translateX(18px); }
.kbd { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px; border: 1px solid var(--line-strong); background: var(--paper-2); color: var(--text-3); font-family: var(--font-mono); font-size: .68rem; }
.segmented { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--paper-3); gap: 2px; }
.segmented button { height: 32px; padding: 0 14px; border-radius: 999px; font-size: .84rem; font-weight: 600; color: var(--text-2); transition: background .2s, color .2s, box-shadow .2s; }
.segmented button.active { background: var(--paper); color: var(--text); box-shadow: var(--shadow-s); }

/* ---------- 9. TABLES ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th { text-align: left; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--paper-2); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--paper-2); }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.selected { background: var(--brand-soft); }
.table .td-num { font-variant-numeric: tabular-nums; text-align: right; }
.table .td-actions { text-align: right; white-space: nowrap; }
.table-compact td, .table-compact th { padding: 8px 12px; }

/* ---------- 10. AVATARS ---------- */
.avatar { --size: 36px; width: var(--size); height: var(--size); border-radius: 50%; flex: none; display: inline-grid; place-content: center; overflow: hidden; background: var(--iris-soft); color: var(--iris-strong); font-weight: 700; font-size: calc(var(--size) * .38); letter-spacing: -.02em; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { --size: 28px; } .avatar.lg { --size: 48px; } .avatar.xl { --size: 64px; } .avatar.xxl { --size: 96px; }
.avatar.square { border-radius: var(--radius-s); }
.avatar.h1 { background: #E3FBF0; color: #046A40; } .avatar.h2 { background: #FEF3E2; color: #9A5A00; } .avatar.h3 { background: #E8F2FF; color: #175CD3; } .avatar.h4 { background: #FDE9F1; color: #A8266A; }
.avatar-stack { display: inline-flex; } .avatar-stack .avatar { border: 2px solid var(--paper); margin-left: -8px; } .avatar-stack .avatar:first-child { margin-left: 0; }

/* ---------- 11. APP SHELL ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; background: var(--paper-2); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--ink); color: var(--ink-text); display: flex; flex-direction: column; border-right: 1px solid var(--ink-line); overflow: hidden; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; height: var(--topbar-h); padding: 0 18px; border-bottom: 1px solid var(--ink-line); }
.sidebar-section { padding: 14px 10px 6px; font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-text-3); }
.sidebar-nav { padding: 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 9px; color: var(--ink-text-2); font-size: .9rem; font-weight: 500; transition: background .15s, color .15s; position: relative; }
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav-item:hover { background: rgba(255,255,255,.06); color: var(--ink-text); }
.nav-item.active { background: rgba(15,211,127,.14); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: -8px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--brand); }
.nav-item .count { margin-left: auto; }
.nav-item .count.soft { background: rgba(255,255,255,.12); color: var(--ink-text); }
.sidebar-foot { padding: 12px; border-top: 1px solid var(--ink-line); }
.tenant-switch { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--ink-line); cursor: pointer; }
.tenant-switch:hover { background: rgba(255,255,255,.09); }
.tenant-switch .avatar { --size: 28px; background: var(--brand); color: #052E1C; }
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 22px; background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar .search { flex: 1; max-width: 560px; }
.env-switch { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; border: 1px solid var(--line-strong); cursor: pointer; }
.env-switch.sandbox { color: var(--warn-ink); background: var(--warn-soft); border-color: transparent; }
.env-switch.production { color: var(--ok-ink); background: var(--ok-soft); border-color: transparent; }
.page { padding: 24px 22px 60px; display: flex; flex-direction: column; gap: 20px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-header h1 { font-size: 1.5rem; letter-spacing: -.02em; }
.page-header .sub { color: var(--text-2); font-size: .9rem; margin-top: 4px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--text-3); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb svg { width: 14px; height: 14px; }
.mobile-nav-toggle { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; width: min(280px, 84vw); transform: translateX(-100%); transition: transform .25s var(--ease); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-l); }
  .mobile-nav-toggle { display: inline-flex; }
  .page { padding: 18px 16px 48px; }
}

/* KPI tiles */
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.kpi .kpi-label { font-size: .78rem; font-weight: 600; color: var(--text-3); letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.kpi .kpi-value { font-family: var(--font-body); font-size: 1.9rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; color: var(--text); }
.kpi .kpi-delta { font-size: .78rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.kpi .kpi-delta.up { color: var(--ok-ink); } .kpi .kpi-delta.down { color: var(--danger-ink); }
.kpi .kpi-delta svg { width: 12px; height: 12px; }
.kpi .spark { margin-top: 6px; height: 34px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { position: relative; height: 40px; padding: 0 14px; font-size: .88rem; font-weight: 600; color: var(--text-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; transition: color .15s; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); }
.tab.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--brand-strong); border-radius: 2px; }
.tab .count { background: var(--paper-3); color: var(--text-2); }
.tab-panel { display: none; } .tab-panel.active { display: block; animation: fade-in .25s var(--ease); }

/* Drawer, Modal, Toast, Dropdown */
.scrim { position: fixed; inset: 0; background: var(--overlay); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 96vw); background: var(--paper); z-index: 90; transform: translateX(104%); transition: transform .32s var(--ease); display: flex; flex-direction: column; box-shadow: var(--shadow-l); border-left: 1px solid var(--line); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.drawer-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: var(--paper-2); }
.modal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card { width: min(560px, 100%); background: var(--paper); border-radius: var(--radius-l); border: 1px solid var(--line); box-shadow: var(--shadow-l); transform: translateY(12px) scale(.98); transition: transform .25s var(--ease); max-height: 90vh; display: flex; flex-direction: column; }
.modal.open .modal-card { transform: none; }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-width: 260px; max-width: 380px; background: var(--ink); color: var(--ink-text); border-radius: var(--radius); box-shadow: var(--shadow-l); font-size: .88rem; animation: toast-in .3s var(--ease-spring); border: 1px solid var(--ink-line); }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.ok svg { color: var(--brand); } .toast.warn svg { color: var(--warn); } .toast.danger svg { color: var(--danger); }
.toast.out { animation: toast-out .25s var(--ease) forwards; }
.dropdown { position: relative; }
.menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 200px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-l); padding: 6px; z-index: 50; display: none; }
.menu.open { display: block; animation: pop-in .18s var(--ease); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; font-size: .88rem; color: var(--text); text-align: left; }
.menu-item:hover { background: var(--paper-2); }
.menu-item svg { width: 16px; height: 16px; color: var(--text-3); }
.menu-item.danger { color: var(--danger-ink); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 0; }
.tooltip { position: absolute; z-index: 40; padding: 8px 10px; background: var(--ink); color: var(--ink-text); border-radius: 8px; font-size: .78rem; pointer-events: none; box-shadow: var(--shadow); white-space: nowrap; }

/* Progress / meters */
.progress { height: 6px; border-radius: 999px; background: var(--paper-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--brand-strong); transition: width .6s var(--ease); }
.progress.thin { height: 4px; }
.meter-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; font-size: .84rem; }
.risk-score { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 600; }
.risk-score .bar { width: 56px; height: 6px; border-radius: 999px; background: var(--paper-3); overflow: hidden; }
.risk-score .bar > span { display: block; height: 100%; border-radius: 999px; }
.risk-low .bar > span { background: var(--ok); } .risk-medium .bar > span { background: var(--warn); } .risk-high .bar > span { background: var(--danger); }
.risk-low { color: var(--ok-ink); } .risk-medium { color: var(--warn-ink); } .risk-high { color: var(--danger-ink); }
.gauge { position: relative; width: 132px; height: 132px; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.gauge .track { stroke: var(--paper-3); }
.gauge .val { transition: stroke-dashoffset 1s var(--ease); }
.gauge .gauge-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gauge .gauge-label b { font-size: 1.9rem; letter-spacing: -.03em; line-height: 1; }
.gauge .gauge-label span { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }

/* Timeline */
.timeline { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding-bottom: 18px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-content: center; background: var(--paper-3); color: var(--text-2); }
.tl-icon svg { width: 12px; height: 12px; }
.tl-icon.ok { background: var(--ok-soft); color: var(--ok-ink); } .tl-icon.warn { background: var(--warn-soft); color: var(--warn-ink); } .tl-icon.danger { background: var(--danger-soft); color: var(--danger-ink); } .tl-icon.info { background: var(--info-soft); color: var(--info-ink); } .tl-icon.brand { background: var(--brand-soft); color: var(--brand-ink); }
.tl-body { font-size: .88rem; }
.tl-body .time { font-size: .74rem; color: var(--text-3); margin-top: 2px; }

/* Social network tiles (lettermarks, not brand logos) */
.net { display: inline-grid; place-content: center; width: 32px; height: 32px; border-radius: 9px; font-size: .74rem; font-weight: 700; color: #fff; letter-spacing: -.02em; flex: none; font-family: var(--font-display); }
.net.sm { width: 24px; height: 24px; font-size: .62rem; border-radius: 7px; }
.net.lg { width: 44px; height: 44px; font-size: .95rem; border-radius: 12px; }
.net-instagram { background: linear-gradient(135deg, #F58529, #DD2A7B 60%, #8134AF); }
.net-linkedin { background: #0A66C2; }
.net-x { background: #111111; }
.net-facebook { background: #1877F2; }
.net-tiktok { background: #161616; box-shadow: inset 0 0 0 2px #25F4EE33; }
.net-github { background: #24292F; }
.net-youtube { background: #E62117; }
.net-telegram { background: #229ED9; }
.net-reddit { background: #FF4500; }
.net-threads { background: #000; }
.net-generic { background: var(--text-3); }

/* Code blocks */
.code { background: var(--ink); color: #D7DEEA; border-radius: var(--radius); padding: 18px 20px; font-family: var(--font-mono); font-size: .82rem; line-height: 1.6; overflow-x: auto; border: 1px solid var(--ink-line); }
.code .c { color: #6F7B94; } .code .k { color: #8B7DFF; } .code .s { color: #7CF0BE; } .code .n { color: #FFC46B; } .code .f { color: #7FB9FF; }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 8px 16px; background: var(--ink-2); border: 1px solid var(--ink-line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; color: var(--ink-text-3); font-size: .74rem; font-family: var(--font-mono); }
.code-head + .code { border-radius: 0 0 var(--radius) var(--radius); }

/* Empty state */
.empty { text-align: center; padding: 48px 20px; color: var(--text-2); }
.empty svg { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--text-3); }

/* ---------- 12. MOTION ---------- */
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 var(--brand-glow); } 70% { box-shadow: 0 0 0 10px rgba(15,211,127,0); } 100% { box-shadow: 0 0 0 0 rgba(15,211,127,0); } }
@keyframes float-y { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes scan { 0% { top: 0; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * { transition-delay: calc(var(--i, 0) * 70ms); }
.float { animation: float-y 6s ease-in-out infinite; }
.spin { animation: spin 1s linear infinite; }
.skeleton { background: linear-gradient(90deg, var(--paper-3) 25%, var(--paper-2) 37%, var(--paper-3) 63%); background-size: 800px 100%; animation: shimmer 1.4s infinite linear; border-radius: 6px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: marquee 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--brand-strong); animation: spin .8s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 13. CHARTS (SVG rendered by hawkai.js) ---------- */
.chart { position: relative; width: 100%; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid-line { stroke: var(--chart-grid); stroke-width: 1; }
.chart .axis-line { stroke: var(--chart-axis); stroke-width: 1; }
.chart .axis-label { fill: var(--text-3); font-size: 11px; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.chart .series-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .series-area { opacity: .12; }
.chart .endpoint { stroke: var(--paper); stroke-width: 2; }
.chart .bar { rx: 3; }
.chart .crosshair { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 0; opacity: 0; }
.chart .hover-dot { opacity: 0; stroke: var(--paper); stroke-width: 2; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--ink-text); padding: 8px 10px; border-radius: 8px; font-size: .76rem; box-shadow: var(--shadow); opacity: 0; transition: opacity .12s; white-space: nowrap; }
.chart-tip b { display: block; font-size: .72rem; color: var(--ink-text-2); font-weight: 500; margin-bottom: 4px; }
.chart-tip .row { gap: 8px; font-variant-numeric: tabular-nums; }
.chart-tip .sw { width: 8px; height: 8px; border-radius: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .78rem; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.line { height: 2px; width: 14px; border-radius: 1px; }

/* ---------- 14. UTILITIES ---------- */
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 28px; } .mt-6 { margin-top: 44px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; } .mb-4 { margin-bottom: 28px; }
.gap-1 { --gap: 6px; } .gap-2 { --gap: 12px; } .gap-3 { --gap: 18px; } .gap-4 { --gap: 28px; }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pointer { cursor: pointer; }
.hidden { display: none !important; }
.brand-mark { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -.03em; }
.brand-mark svg { width: 28px; height: 28px; }
.brand-mark .suffix { font-family: var(--font-body); font-weight: 500; font-size: .8rem; color: var(--text-3); letter-spacing: 0; margin-left: 2px; }
