:root {
  --navy-950: #111827;
  --navy-900: #172033;
  --navy-850: #1d2940;
  --navy-800: #24324a;
  --ink-950: #201a18;
  --ink-800: #3a302c;
  --ink-650: #5e504a;
  --ink-500: #7b6d67;
  --ink-400: #9b8e87;
  --paper: #fbf9f7;
  --canvas: #f4f1ed;
  --surface: #ffffff;
  --surface-warm: #fff9f5;
  --line: #e8e1dc;
  --line-strong: #d9cec7;
  --terracotta: #e87455;
  --terracotta-dark: #c9573c;
  --terracotta-soft: #fff0e9;
  --blue: #3877d6;
  --blue-soft: #eaf2ff;
  --green: #16846b;
  --green-soft: #e8f7f2;
  --amber: #b66c13;
  --amber-soft: #fff5df;
  --red: #c53d43;
  --red-soft: #fff0f0;
  --purple: #7651b2;
  --purple-soft: #f3edff;
  --shadow-sm: 0 1px 2px rgba(37, 27, 23, .05), 0 2px 7px rgba(37, 27, 23, .04);
  --shadow-md: 0 18px 48px rgba(50, 34, 28, .12);
  --shadow-lg: 0 30px 90px rgba(30, 23, 20, .18);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --sidebar-width: 264px;
  --topbar-height: 72px;
  --font: Inter, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body {
  margin: 0;
  color: var(--ink-950);
  background: var(--canvas);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, [data-route], [data-action] { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(56, 119, 214, .28); outline-offset: 2px; }
.icon-sprite { position: fixed; width: 0; height: 0; overflow: hidden; }
svg { display: block; }

/* Brand */
.brand-symbol {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.11);
}
.brand-symbol i {
  position: absolute;
  width: 12px;
  height: 23px;
  border-radius: 999px;
  background: linear-gradient(150deg, #ff9a78, var(--terracotta));
  transform: rotate(39deg);
}
.brand-symbol i:first-child { left: 9px; top: 4px; }
.brand-symbol i:last-child { right: 9px; bottom: 4px; transform: rotate(39deg) scale(-1); }
.brand-symbol-large {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
  border-color: rgba(232,116,85,.18);
  background: var(--terracotta-soft);
}
.brand-symbol-large i { width: 16px; height: 31px; }
.brand-symbol-large i:first-child { left: 12px; top: 5px; }
.brand-symbol-large i:last-child { right: 12px; bottom: 5px; }

/* Login */
.login-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 28px;
  background:
    radial-gradient(circle at 15% 10%, rgba(232,116,85,.13), transparent 31rem),
    radial-gradient(circle at 88% 80%, rgba(56,119,214,.07), transparent 28rem),
    var(--paper);
}
.login-orbit {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(232,116,85,.15);
  pointer-events: none;
}
.login-orbit::before, .login-orbit::after {
  content: "";
  position: absolute;
  inset: 16%;
  border: inherit;
  border-radius: inherit;
}
.login-orbit::after { inset: 34%; }
.login-orbit-a { width: 620px; height: 620px; left: -330px; bottom: -340px; }
.login-orbit-b { width: 440px; height: 440px; right: -240px; top: -230px; }
.login-shell {
  position: relative;
  width: min(460px, 100%);
  padding: 38px;
  border: 1px solid rgba(81, 58, 50, .10);
  border-radius: 28px;
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}
.login-brand { display: flex; align-items: center; gap: 14px; }
.login-brand strong { display: block; font-size: 22px; letter-spacing: -.04em; }
.login-brand span { display: block; color: var(--ink-500); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.login-copy { margin: 34px 0 28px; }
.eyebrow {
  display: block;
  color: var(--terracotta-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.login-copy h1 {
  max-width: 380px;
  margin: 10px 0 10px;
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.04;
  letter-spacing: -.055em;
}
.login-copy p { margin: 0; color: var(--ink-500); font-size: 15px; }
.login-form { display: grid; gap: 9px; }
.login-form label { margin-top: 7px; color: var(--ink-650); font-size: 12px; font-weight: 750; }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink-950);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(232,116,85,.13);
}
textarea { min-height: 100px; resize: vertical; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 46px; }
.password-toggle { position: absolute !important; right: 5px; top: 5px; }
.login-submit { margin-top: 10px; }
.form-message { min-height: 20px; margin: 4px 0 0; color: var(--red); font-size: 12px; text-align: center; }
.form-message.success { color: var(--green); }
.password-recovery-panel { display: grid; gap: 18px; }
.password-recovery-panel[hidden] { display: none; }
.password-recovery-form { display: grid; gap: 9px; }
.password-recovery-form label { margin-top: 3px; color: var(--ink-650); font-size: 12px; font-weight: 750; }
.password-rules {
  display: grid;
  gap: 6px;
  margin: 5px 0 2px;
  padding: 11px 12px;
  color: var(--ink-500);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 11px;
}
.password-rule { display: flex; align-items: center; gap: 8px; }
.password-rule i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  background: var(--ink-400);
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(155,142,135,.12);
}
.password-rule.valid { color: var(--green); }
.password-rule.valid i { background: var(--green); box-shadow: 0 0 0 3px rgba(22,132,107,.12); }
.mfa-panel { display: grid; gap: 18px; }
.mfa-panel[hidden] { display: none; }
.mfa-heading { display: flex; align-items: flex-start; gap: 13px; }
.mfa-heading h2 { margin: 4px 0 5px; font-size: 22px; letter-spacing: -.035em; }
.mfa-heading p { margin: 0; color: var(--ink-500); font-size: 13px; line-height: 1.55; }
.mfa-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  color: var(--terracotta-dark);
  background: var(--terracotta-soft);
  border-radius: 12px;
}
.mfa-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.mfa-setup, .mfa-form { display: grid; gap: 9px; }
.mfa-setup[hidden], .mfa-form[hidden], .mfa-qr-card[hidden] { display: none; }
.mfa-recovery-actions { display: flex; justify-content: center; gap: 8px; }
.mfa-recovery-actions .button[hidden] { display: none; }
.mfa-form label { margin-top: 3px; color: var(--ink-650); font-size: 12px; font-weight: 750; }
.mfa-qr-card {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  padding: 14px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.mfa-qr-card.text-only { grid-template-columns: 1fr; }
.mfa-qr { width: 142px; height: 142px; padding: 7px; background: #fff; border-radius: 10px; }
.mfa-qr[hidden] { display: none; }
.mfa-qr-card strong { display: block; font-size: 13px; }
.mfa-qr-card p { margin: 5px 0 10px; color: var(--ink-500); font-size: 11px; line-height: 1.45; }
.mfa-qr-card span { display: block; color: var(--ink-400); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.mfa-secret { display: block; margin-top: 3px; color: var(--ink-800); font: 700 10px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
#mfa-code { text-align: center; font-size: 19px; font-weight: 800; letter-spacing: .22em; }
.login-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-500);
  font-size: 11px;
}
.login-security svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* Controls */
.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 760;
  font-size: 12px;
  transition: transform .12s, border-color .15s, background .15s, color .15s, box-shadow .15s;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .46; cursor: not-allowed; transform: none; }
.button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.button-primary { color: #fff; background: linear-gradient(135deg, var(--terracotta), #da6547); box-shadow: 0 7px 18px rgba(201,87,60,.19); }
.button-primary:hover { box-shadow: 0 10px 24px rgba(201,87,60,.25); }
.button-secondary { color: var(--ink-800); background: var(--surface); border-color: var(--line-strong); }
.button-secondary:hover { border-color: #cbbcb4; background: var(--paper); }
.button-dark { color: #fff; background: var(--navy-900); }
.button-danger { color: #fff; background: var(--red); }
.button-danger-soft { color: var(--red); background: var(--red-soft); border-color: #f2cfd0; }
.button-text { color: var(--ink-500); background: transparent; }
.button-text:hover { color: var(--ink-950); background: var(--canvas); }
.button-full { width: 100%; }
.button-small { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.icon-button {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s, transform .12s;
}
.icon-button:hover { background: rgba(100,77,69,.07); }
.icon-button:active { transform: scale(.96); }
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Shell */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  color: #dce4f0;
  background:
    radial-gradient(circle at 15% 0, rgba(232,116,85,.13), transparent 16rem),
    var(--navy-900);
  border-right: 1px solid rgba(255,255,255,.05);
}
.sidebar-brand {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.brand-copy { min-width: 0; flex: 1; }
.brand-copy strong { display: block; color: #fff; font-size: 18px; letter-spacing: -.04em; }
.brand-copy span { display: block; margin-top: 1px; color: #8390a7; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-close { display: none; color: #aab5c8; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px 22px; scrollbar-width: thin; }
.nav-section {
  display: block;
  padding: 18px 11px 7px;
  color: #65738c;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.nav-item {
  position: relative;
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 11px;
  color: #9dabbe;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  transition: color .15s, background .15s, border-color .15s;
}
.nav-item + .nav-item { margin-top: 2px; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(232,116,85,.24), rgba(232,116,85,.11));
  border-color: rgba(245,160,130,.20);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -10px;
  width: 3px;
  height: 20px;
  border-radius: 0 5px 5px 0;
  background: var(--terracotta);
}
.nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item svg use[href="#i-grid"] { fill: currentColor; stroke: none; }
.nav-count {
  min-width: 22px;
  margin-left: auto;
  padding: 2px 6px;
  color: #ffc8b5;
  background: rgba(232,116,85,.18);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
  text-align: center;
}
.nav-count-danger { color: #ffd9d9; background: rgba(197,61,67,.26); }
.sidebar-footer {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.staff-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  color: #fff;
  background: linear-gradient(145deg, var(--terracotta), #b84d36);
  border: 2px solid rgba(255,255,255,.13);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 850;
}
.staff-copy { min-width: 0; flex: 1; }
.staff-copy strong { display: block; overflow: hidden; color: #fff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.staff-copy span { color: #74829a; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.sidebar-logout { color: #7e8ba0; }
.sidebar-logout:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar-scrim { display: none; }

.main-shell { min-width: 0; margin-left: var(--sidebar-width); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 28px;
  background: rgba(251,249,247,.89);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.mobile-menu { display: none; }
.global-search-trigger {
  width: min(440px, 45vw);
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 13px;
  color: var(--ink-500);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: left;
}
.global-search-trigger:hover { color: var(--ink-800); border-color: var(--line-strong); }
.global-search-trigger svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.global-search-trigger span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
kbd {
  min-width: 28px;
  padding: 3px 6px;
  color: var(--ink-500);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: 6px;
  font: 10px/1.2 var(--font);
  text-align: center;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.connection-state { display: flex; align-items: center; gap: 6px; padding: 0 7px; color: var(--ink-500); font-size: 10px; font-weight: 750; }
.connection-state i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 3px var(--green-soft); }
.connection-state.offline i { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.language-switch { display: flex; padding: 3px; background: var(--canvas); border: 1px solid var(--line); border-radius: 9px; }
.language-switch button { min-width: 31px; height: 27px; padding: 0 7px; color: var(--ink-500); border: 0; border-radius: 6px; background: transparent; cursor: pointer; font-size: 9px; font-weight: 850; }
.language-switch button.active { color: var(--ink-950); background: var(--surface); box-shadow: var(--shadow-sm); }
.topbar-profile { display: flex; align-items: center; gap: 8px; padding: 2px 4px; border: 0; background: transparent; cursor: pointer; text-align: left; }
.staff-avatar-small { width: 32px; height: 32px; flex-basis: 32px; }
.topbar-profile strong, .topbar-profile small { display: block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-profile strong { font-size: 10px; }
.topbar-profile small { margin-top: 1px; color: var(--ink-400); font-size: 9px; }

.page-shell { width: min(1680px, 100%); margin: 0 auto; padding: 28px 30px 52px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.page-header h1 { margin: 6px 0 3px; font-size: clamp(27px, 2.4vw, 38px); line-height: 1.08; letter-spacing: -.045em; }
.page-header p { margin: 0; color: var(--ink-500); font-size: 13px; }
.page-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* Cards and data */
.workspace { min-height: 420px; }
.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.kpi-card {
  position: relative;
  min-height: 128px;
  overflow: hidden;
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.kpi-card::after {
  content: "";
  position: absolute;
  right: -25px;
  bottom: -38px;
  width: 90px;
  height: 90px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: .08;
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--ink-500); }
.kpi-icon { width: 28px; height: 28px; display: grid; place-items: center; color: var(--terracotta-dark); background: var(--terracotta-soft); border-radius: 8px; }
.kpi-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.kpi-trend { font-size: 9px; font-weight: 800; }
.kpi-value { display: block; margin-top: 14px; font-size: 27px; font-weight: 820; letter-spacing: -.045em; }
.kpi-label { display: block; margin-top: 1px; color: var(--ink-500); font-size: 10px; font-weight: 750; }
.kpi-card.critical .kpi-icon { color: var(--red); background: var(--red-soft); }
.kpi-card.warning .kpi-icon { color: var(--amber); background: var(--amber-soft); }
.kpi-card.info .kpi-icon { color: var(--blue); background: var(--blue-soft); }
.kpi-card.success .kpi-icon { color: var(--green); background: var(--green-soft); }
.kpi-card.purple .kpi-icon { color: var(--purple); background: var(--purple-soft); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr); gap: 14px; margin-top: 14px; }
.dashboard-stack { display: grid; gap: 14px; }
.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
}
.card-heading { min-width: 0; }
.card-heading h2 { margin: 0; font-size: 14px; letter-spacing: -.02em; }
.card-heading p { margin: 3px 0 0; color: var(--ink-500); font-size: 10px; }
.card-body { padding: 17px; }
.card-body.flush { padding: 0; }
.card-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.section-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.data-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 11px;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.toolbar-group { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.toolbar-search { position: relative; width: min(280px, 100%); }
.toolbar-search svg { position: absolute; left: 11px; top: 12px; width: 15px; height: 15px; fill: none; stroke: var(--ink-400); stroke-width: 1.8; pointer-events: none; }
.toolbar-search input { min-height: 39px; padding-left: 34px; }
.compact-select { width: auto; min-width: 126px; min-height: 38px; padding: 7px 31px 7px 10px; font-size: 11px; font-weight: 700; }
.filter-chip {
  min-height: 34px;
  padding: 6px 10px;
  color: var(--ink-500);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}
.filter-chip.active { color: var(--terracotta-dark); background: var(--terracotta-soft); border-color: #f0cabc; }
.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 9px 12px;
  color: #fff;
  background: var(--navy-900);
  border-radius: 10px;
}
.bulk-bar span { font-size: 11px; font-weight: 750; }

.table-wrap { width: 100%; overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.data-table th {
  height: 38px;
  padding: 8px 12px;
  color: var(--ink-500);
  background: #faf8f6;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .07em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table td {
  min-height: 52px;
  padding: 11px 12px;
  border-bottom: 1px solid #f0ebe7;
  color: var(--ink-650);
  font-size: 11px;
  vertical-align: middle;
}
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: #fdfaf8; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .row-clickable { cursor: pointer; }
.cell-primary { display: block; color: var(--ink-950); font-weight: 760; }
.cell-secondary { display: block; max-width: 280px; margin-top: 2px; overflow: hidden; color: var(--ink-400); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.cell-actions { display: flex; justify-content: flex-end; gap: 5px; }
.checkbox {
  width: 15px;
  height: 15px;
  min-height: 15px;
  padding: 0;
  accent-color: var(--terracotta);
  cursor: pointer;
}
.user-cell { display: flex; align-items: center; gap: 9px; min-width: 170px; }
.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  overflow: hidden;
  color: var(--terracotta-dark);
  background: var(--terracotta-soft);
  border: 1px solid #f3d8cd;
  border-radius: 10px;
  font-weight: 850;
}
.avatar.round { border-radius: 50%; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar { position: relative; }
.avatar.has-image .avatar-fallback { visibility: hidden; }
.avatar-large { width: 58px; height: 58px; flex-basis: 58px; border: 2px solid rgba(255,255,255,.76); box-shadow: 0 7px 20px rgba(0,0,0,.22); font-size: 15px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 3px 7px;
  color: var(--ink-650);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 820;
  white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .72; }
.badge-critical, .badge-banned, .badge-overdue { color: var(--red); background: var(--red-soft); border-color: #f1cdce; }
.badge-high, .badge-quarantined, .badge-due_soon { color: var(--amber); background: var(--amber-soft); border-color: #f0dec0; }
.badge-medium, .badge-pending, .badge-triage { color: var(--blue); background: var(--blue-soft); border-color: #d4e2fa; }
.badge-low, .badge-open, .badge-on_track, .badge-trusted, .badge-executed, .badge-approved { color: var(--green); background: var(--green-soft); border-color: #cce8df; }
.badge-restricted, .badge-investigating, .badge-pending_decision { color: var(--purple); background: var(--purple-soft); border-color: #dfd3f2; }
.badge-resolved, .badge-dismissed, .badge-rejected, .badge-closed, .badge-cancelled { color: var(--ink-500); background: var(--canvas); }
.badge-no-dot::before { display: none; }
.risk-meter { width: 92px; }
.risk-meter-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 5px; font-size: 9px; font-weight: 850; }
.risk-track { height: 5px; overflow: hidden; background: #eee8e4; border-radius: 99px; }
.risk-track i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.risk-meter.risk-medium i { background: var(--amber); }
.risk-meter.risk-high i { background: var(--red); }

.empty-state, .loading-state, .error-state {
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 30px;
  color: var(--ink-500);
  text-align: center;
}
.empty-state svg, .error-state svg { width: 28px; height: 28px; fill: none; stroke: var(--ink-400); stroke-width: 1.5; }
.empty-state strong, .error-state strong { color: var(--ink-800); font-size: 12px; }
.empty-state span, .error-state span { max-width: 360px; font-size: 10px; }
.skeleton { position: relative; overflow: hidden; background: #eee9e5; border-radius: 7px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: shimmer 1.35s infinite; }
.skeleton-row { height: 54px; margin: 1px 0; }
@keyframes shimmer { to { transform: translateX(100%); } }
.spinner { width: 22px; height: 22px; border: 2px solid #eadfd9; border-top-color: var(--terracotta); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.queue-health { display: grid; gap: 14px; }
.queue-bar { height: 12px; display: flex; overflow: hidden; background: var(--canvas); border-radius: 999px; }
.queue-bar i { display: block; min-width: 2px; }
.queue-bar .critical { background: var(--red); }
.queue-bar .high { background: #e79836; }
.queue-bar .medium { background: var(--blue); }
.queue-bar .low { background: var(--green); }
.queue-legend { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.queue-legend div { display: flex; align-items: center; gap: 7px; color: var(--ink-500); font-size: 10px; }
.queue-legend i { width: 7px; height: 7px; border-radius: 50%; }
.queue-legend strong { margin-left: auto; color: var(--ink-800); }
.signal-list { display: grid; gap: 2px; }
.signal-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0ebe7; }
.signal-item:last-child { border-bottom: 0; }
.signal-icon { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px; color: var(--amber); background: var(--amber-soft); border-radius: 9px; }
.signal-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.signal-copy { min-width: 0; flex: 1; }
.signal-copy strong { display: block; font-size: 10px; }
.signal-copy span { display: block; margin-top: 2px; overflow: hidden; color: var(--ink-400); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.signal-score { color: var(--red); font-size: 10px; font-weight: 850; }
.chart-wrap { min-height: 240px; }
.chart { width: 100%; min-height: 230px; }
.chart svg { width: 100%; height: 230px; overflow: visible; }
.chart-grid { stroke: #eee8e4; stroke-width: 1; }
.chart-area { fill: url(#chart-gradient); }
.chart-line { fill: none; stroke: var(--terracotta); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-dot { fill: #fff; stroke: var(--terracotta); stroke-width: 2; }
.chart-axis { fill: var(--ink-400); font: 8px var(--font); }

.metric-list { display: grid; gap: 11px; }
.metric-row { display: grid; grid-template-columns: minmax(100px, 1fr) auto; gap: 12px; align-items: center; }
.metric-row strong { font-size: 10px; }
.metric-row span { color: var(--ink-400); font-size: 9px; }
.metric-progress { grid-column: 1 / -1; height: 5px; overflow: hidden; background: #eee8e4; border-radius: 99px; }
.metric-progress i { display: block; height: 100%; background: var(--terracotta); border-radius: inherit; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.pagination span { color: var(--ink-500); font-size: 10px; }

/* Palette */
.command-palette { position: fixed; inset: 0; z-index: 120; display: grid; place-items: start center; padding-top: min(12vh, 110px); }
.palette-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(17,24,39,.54); backdrop-filter: blur(4px); cursor: default; }
.palette-dialog { position: relative; width: min(680px, calc(100% - 28px)); overflow: hidden; background: var(--surface); border: 1px solid rgba(255,255,255,.35); border-radius: 18px; box-shadow: var(--shadow-lg); }
.palette-input-wrap { height: 64px; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.palette-input-wrap svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: var(--ink-500); stroke-width: 1.8; }
.palette-input-wrap input { min-height: 42px; padding: 0; border: 0; box-shadow: none; font-size: 15px; }
.palette-results { max-height: min(560px, 68vh); overflow-y: auto; padding: 9px; }
.palette-empty { min-height: 240px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--ink-400); text-align: center; }
.palette-empty svg { width: 30px; height: 30px; fill: none; stroke: var(--ink-400); stroke-width: 1.5; }
.palette-empty strong { color: var(--ink-800); }
.palette-empty span { max-width: 360px; font-size: 11px; }
.result-group-title { padding: 9px 10px 5px; color: var(--ink-400); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.result-item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; }
.result-item:hover, .result-item.active { background: var(--terracotta-soft); }
.result-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--terracotta-dark); background: var(--surface-warm); border: 1px solid #f0d8ce; border-radius: 9px; }
.result-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.result-copy { min-width: 0; flex: 1; }
.result-copy strong, .result-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-copy strong { font-size: 11px; }
.result-copy span { margin-top: 2px; color: var(--ink-400); font-size: 9px; }
.result-item > svg { width: 16px; height: 16px; fill: none; stroke: var(--ink-400); stroke-width: 1.8; }

/* Drawer and modal */
.drawer-backdrop, .modal-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(17,24,39,.34); backdrop-filter: blur(2px); }
.detail-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 90;
  width: min(720px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  box-shadow: -24px 0 70px rgba(23,32,51,.18);
  transform: translateX(105%);
  transition: transform .24s cubic-bezier(.2,.8,.2,1);
}
.detail-drawer.open { transform: translateX(0); }
.drawer-header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
}
.drawer-heading-line { display: flex; align-items: center; gap: 9px; }
.drawer-heading-line h2 { margin: 0; font-size: 17px; letter-spacing: -.03em; }
.drawer-heading-meta { margin-top: 3px; color: var(--ink-400); font-size: 10px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 50px; }
.drawer-hero { padding: 18px; color: #fff; background: linear-gradient(145deg, var(--navy-900), var(--navy-800)); border-radius: 16px; box-shadow: var(--shadow-md); }
.drawer-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.drawer-hero h3 { margin: 4px 0 5px; font-size: 22px; letter-spacing: -.04em; }
.drawer-hero p { max-width: 560px; margin: 0; color: #aab7ca; font-size: 11px; }
.drawer-hero .badge { border-color: rgba(255,255,255,.12); }
.drawer-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 17px; }
.drawer-kpi { padding: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.07); border-radius: 10px; }
.drawer-kpi strong { display: block; font-size: 16px; }
.drawer-kpi span { display: block; margin-top: 2px; color: #93a1b5; font-size: 8px; font-weight: 750; text-transform: uppercase; }
.drawer-section { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.drawer-section-header { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 13px; border-bottom: 1px solid var(--line); }
.drawer-section-header h3 { margin: 0; font-size: 11px; }
.drawer-section-body { padding: 13px; }
.drawer-tabs { display: flex; gap: 3px; margin: 14px 0 0; padding: 3px; overflow-x: auto; background: #ebe6e2; border-radius: 10px; }
.drawer-tab { flex: 1; min-width: 90px; padding: 7px 10px; color: var(--ink-500); border: 0; border-radius: 7px; background: transparent; cursor: pointer; font-size: 9px; font-weight: 800; white-space: nowrap; }
.drawer-tab.active { color: var(--ink-950); background: var(--surface); box-shadow: var(--shadow-sm); }
.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; left: 14px; top: 17px; bottom: 17px; width: 1px; background: var(--line); }
.timeline-item { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 8px 0; }
.timeline-dot { z-index: 1; width: 29px; height: 29px; display: grid; place-items: center; color: var(--terracotta-dark); background: var(--terracotta-soft); border: 4px solid var(--surface); border-radius: 50%; }
.timeline-dot svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.timeline-copy { padding-top: 4px; }
.timeline-copy strong { display: block; font-size: 10px; }
.timeline-copy p { margin: 3px 0; color: var(--ink-500); font-size: 9px; }
.timeline-copy time { color: var(--ink-400); font-size: 8px; }
.timeline-meta { display: block; margin-top: 3px; color: var(--ink-400); font-size: 8px; font-weight: 700; }
.definition-list { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; margin: 0; }
.definition-list dt { color: var(--ink-400); font-size: 9px; }
.definition-list dd { margin: 0; color: var(--ink-800); font-size: 10px; font-weight: 650; overflow-wrap: anywhere; }
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 100;
  width: min(620px, calc(100% - 28px));
  max-height: min(820px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translate(-50%, -47%) scale(.98);
  transition: opacity .16s, transform .16s;
}
.modal.open { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.modal-header { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 4px 0 0; font-size: 17px; letter-spacing: -.03em; }
.modal-body { overflow-y: auto; padding: 18px; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 13px 18px; background: #faf8f6; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-field { display: grid; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: var(--ink-650); font-size: 10px; font-weight: 780; }
.form-field small { color: var(--ink-400); font-size: 9px; }
.form-field .required { color: var(--red); }
.callout { display: flex; align-items: flex-start; gap: 9px; padding: 11px; color: var(--ink-650); background: var(--blue-soft); border: 1px solid #d8e6fa; border-radius: 10px; font-size: 10px; }
.callout.warning { background: var(--amber-soft); border-color: #efddbd; }
.callout.danger { background: var(--red-soft); border-color: #f0cecf; }
.callout svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* Context-rich investigation details */
.private-media { position: relative; overflow: hidden; background: #eee8e4; }
.private-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.private-media.has-image > .private-media-placeholder,
.private-media.has-image > span:not(.eyebrow),
.private-media.has-image > .place-hero-placeholder { visibility: hidden; }
.place-cell { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.place-thumb { width: 46px; height: 38px; display: grid; place-items: center; flex: 0 0 46px; color: var(--terracotta-dark); border: 1px solid #eadbd4; border-radius: 9px; }
.place-thumb svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.user-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.user-photo-card { min-height: 165px; margin: 0; border: 1px solid var(--line); border-radius: 12px; }
.user-photo-card > img { height: calc(100% - 43px); }
.private-media-placeholder { min-height: 122px; display: grid; place-items: center; color: var(--ink-400); }
.private-media-placeholder svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.user-photo-card figcaption { position: absolute; inset: auto 0 0; z-index: 2; min-height: 43px; display: grid; align-content: center; padding: 7px 9px; background: rgba(255,255,255,.94); border-top: 1px solid var(--line); }
.user-photo-card figcaption strong, .user-photo-card figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-photo-card figcaption strong { font-size: 9px; }
.user-photo-card figcaption span { margin-top: 1px; color: var(--ink-400); font-size: 8px; }
.note-list { display: grid; gap: 9px; }
.note-card { padding: 12px; background: #fffaf7; border: 1px solid #efdcd3; border-left: 3px solid var(--terracotta); border-radius: 10px; }
.note-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.note-card header strong { font-size: 10px; }
.note-card time, .note-card footer { color: var(--ink-400); font-size: 8px; }
.note-card p { margin: 9px 0; color: var(--ink-800); font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.hero-icon { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 46px; color: #fff; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.1); border-radius: 13px; }
.hero-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.access-hero p { max-width: 520px; line-height: 1.55; }
.code-block { max-height: 360px; margin: 0; padding: 12px; overflow: auto; color: #e7edf7; background: var(--navy-900); border-radius: 10px; font: 9px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.mono-value { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 9px !important; }
.drawer-hero .hero-long-copy { max-width: 500px; color: #fff; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.place-hero { min-height: 290px; display: flex; align-items: flex-end; color: #fff; border-radius: 16px; box-shadow: var(--shadow-md); }
.place-hero::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 30%, rgba(16,24,39,.88)); pointer-events: none; }
.place-hero-placeholder { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--ink-400); background: linear-gradient(145deg, #efe8e3, #e1d7d1); }
.place-hero-placeholder svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.place-hero-placeholder span { font-size: 10px; font-weight: 750; }
.place-hero-overlay { position: relative; z-index: 2; width: 100%; padding: 22px; }
.place-hero-overlay h3 { margin: 5px 0 3px; font-size: 25px; letter-spacing: -.04em; }
.place-hero-overlay p { margin: 0; color: #d6dde8; font-size: 10px; }
.detail-copy { margin: 0 0 14px; color: var(--ink-650); font-size: 11px; line-height: 1.65; white-space: pre-wrap; }
.detail-definition { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.place-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.place-map-card { min-height: 112px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 18px; color: var(--ink-800); background: radial-gradient(circle at 30% 30%, #fff 0 5%, transparent 6%), linear-gradient(135deg, #f3e8e2, #e9efe9); border: 1px solid #dfd7d1; border-radius: 12px; }
.place-map-pin { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; background: var(--terracotta); border-radius: 50% 50% 50% 12px; transform: rotate(-45deg); box-shadow: 0 8px 20px rgba(205,88,56,.24); }
.place-map-pin svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; transform: rotate(45deg); }
.place-map-card strong, .place-map-card span { display: block; }
.place-map-card strong { font-size: 11px; }
.place-map-card span { margin-top: 3px; color: var(--ink-500); font-size: 9px; }
.user-profile-line { display: flex; align-items: center; gap: 12px; }
.user-profile-line strong, .user-profile-line span { display: block; }
.user-profile-line strong { font-size: 12px; }
.user-profile-line span { margin-top: 3px; color: var(--ink-400); font-size: 9px; }

.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 140; display: grid; gap: 8px; }
.toast { width: min(360px, calc(100vw - 36px)); display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px; color: var(--ink-800); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 10px; box-shadow: var(--shadow-md); animation: toast-in .2s ease-out; }
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--blue); }
.toast.warning { border-left-color: var(--amber); }
.toast svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.toast strong { display: block; font-size: 10px; }
.toast span { display: block; margin-top: 2px; color: var(--ink-500); font-size: 9px; }
.dashboard-notice { margin-bottom: 12px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Guided report investigation */
.help-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  color: var(--ink-650);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}
.help-button:hover { color: var(--ink-950); border-color: var(--line-strong); }
.help-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.drawer-section-header > div { min-width: 0; }
.drawer-section-header p { margin: 3px 0 0; color: var(--ink-400); font-size: 9px; }
.report-statement-section { border-color: #ecd6cc; box-shadow: 0 8px 24px rgba(102, 64, 48, .05); }
.report-reason-row { display: flex; align-items: center; gap: 11px; }
.report-reason-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  color: var(--terracotta-dark);
  background: var(--terracotta-soft);
  border: 1px solid #f0d8ce;
  border-radius: 11px;
}
.report-reason-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.report-reason-row small, .report-reason-row strong { display: block; }
.report-reason-row small { color: var(--ink-400); font-size: 9px; }
.report-reason-row strong { margin-top: 2px; color: var(--ink-950); font-size: 12px; }
.reporter-quote {
  margin: 13px 0;
  padding: 13px 14px;
  color: var(--ink-800);
  background: #fff8f4;
  border: 1px solid #efdbd1;
  border-left: 4px solid var(--terracotta);
  border-radius: 0 11px 11px 0;
}
.reporter-quote span { color: var(--terracotta-dark); font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.reporter-quote p { margin: 7px 0 0; font-size: 13px; font-weight: 650; line-height: 1.5; white-space: pre-wrap; }
.reporter-quote.compact { margin-bottom: 12px; padding: 10px 12px; }
.reporter-quote.compact p { font-size: 11px; }
.definition-list.compact { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.evidence-count { min-width: 42px; padding: 4px 8px; color: var(--ink-500); background: var(--canvas); border: 1px solid var(--line); border-radius: 999px; font-size: 9px; font-weight: 800; text-align: center; }
.chat-context-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 12px;
}
.chat-context-strip div { padding: 9px; background: var(--canvas); border: 1px solid var(--line); border-radius: 9px; }
.chat-context-strip strong, .chat-context-strip span { display: block; }
.chat-context-strip strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.chat-context-strip span { margin-top: 2px; color: var(--ink-400); font-size: 8px; }
.evidence-provenance {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 12px;
  padding: 10px;
  color: #245c50;
  background: var(--green-soft);
  border: 1px solid #cce9df;
  border-radius: 10px;
  font-size: 9px;
  line-height: 1.5;
}
.evidence-provenance > svg { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.evidence-provenance strong { display: block; margin-bottom: 2px; font-size: 10px; }
.evidence-scope-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.evidence-scope-card.incident { background: #fff9f5; border-color: #edd9cf; }
.evidence-scope-card.full { background: #f3f6fb; border-color: #d4deec; }
.evidence-scope-card .scope-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--terracotta-dark);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.evidence-scope-card.full .scope-icon { color: var(--navy-700); }
.evidence-scope-card .scope-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.evidence-scope-card small, .evidence-scope-card strong, .evidence-scope-card p { display: block; }
.evidence-scope-card small { color: var(--ink-400); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.evidence-scope-card strong { margin-top: 3px; color: var(--ink-950); font-size: 11px; }
.evidence-scope-card p { margin: 4px 0 0; color: var(--ink-500); font-size: 8px; line-height: 1.45; }
.restricted-role { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-400); font-size: 8px; font-weight: 800; }
.restricted-role svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.privacy-boundary {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  color: #2d4567;
  background: #edf3fc;
  border: 1px solid #d4e0f2;
  border-radius: 11px;
}
.privacy-boundary > svg { width: 22px; height: 22px; flex: 0 0 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.privacy-boundary strong { display: block; font-size: 11px; }
.privacy-boundary p { margin: 5px 0 0; color: #536987; font-size: 9px; line-height: 1.55; }
.full-chat-section .callout { margin-top: 10px; }
.full-chat-access-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 11px;
  color: #245c50;
  background: var(--green-soft);
  border: 1px solid #cce9df;
  border-radius: 10px;
}
.full-chat-access-banner > svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.full-chat-access-banner strong { display: block; font-size: 10px; }
.full-chat-access-banner p { margin: 3px 0 0; font-size: 8px; line-height: 1.5; }
.full-chat-thread { max-height: 620px; margin-top: 10px; overflow-y: auto; }
.full-chat-message { width: min(94%, 620px); }
.full-chat-load-more { margin-top: 9px; }
.full-chat-end { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; padding: 9px; color: var(--green); background: var(--green-soft); border-radius: 9px; font-size: 9px; font-weight: 800; }
.full-chat-end svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.consent-check { display: flex !important; align-items: flex-start; gap: 8px; padding: 10px; background: var(--canvas); border: 1px solid var(--line); border-radius: 9px; }
.consent-check input { margin-top: 1px; }
.consent-check span { font-size: 9px; line-height: 1.45; }
.moderation-chat { display: grid; gap: 8px; padding: 12px; background: #f3f0ed; border: 1px solid var(--line); border-radius: 13px; }
.moderation-message {
  width: min(88%, 500px);
  margin-right: auto;
  padding: 10px 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px 13px 13px;
  box-shadow: var(--shadow-sm);
}
.moderation-message.reporter { margin-right: 0; margin-left: auto; background: #fff7f2; border-radius: 13px 5px 13px 13px; }
.moderation-message.reported { border: 2px solid var(--terracotta); box-shadow: 0 0 0 3px var(--terracotta-soft); }
.moderation-message header, .moderation-message footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.moderation-message header strong { font-size: 9px; }
.moderation-message header span { display: inline-flex; align-items: center; gap: 4px; color: var(--terracotta-dark); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.moderation-message header span svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; }
.moderation-message header small, .moderation-message footer { color: var(--ink-400); font-size: 8px; }
.moderation-message p { margin: 8px 0; color: var(--ink-950); font-size: 12px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.moderation-message footer code { color: var(--ink-400); font-size: 8px; }
.evidence-missing { display: flex; align-items: flex-start; gap: 13px; padding: 16px; background: var(--amber-soft); border: 1px solid #ead5ae; border-radius: 12px; }
.evidence-missing > svg { width: 24px; height: 24px; flex: 0 0 24px; color: var(--amber); fill: none; stroke: currentColor; stroke-width: 1.7; }
.evidence-missing strong { display: block; font-size: 12px; }
.evidence-missing p { margin: 6px 0 8px; color: var(--ink-650); font-size: 10px; line-height: 1.55; }
.evidence-missing span { color: var(--amber); font-size: 9px; font-weight: 750; }
.workflow-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.workflow-steps li { min-width: 0; display: flex; align-items: flex-start; gap: 8px; padding: 9px; background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; }
.workflow-steps li > b { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 22px; color: var(--ink-500); background: var(--surface); border: 1px solid var(--line); border-radius: 50%; font-size: 9px; }
.workflow-steps li.done > b { color: #fff; background: var(--green); border-color: var(--green); }
.workflow-steps li.warning > b { color: #fff; background: var(--amber); border-color: var(--amber); }
.workflow-steps strong, .workflow-steps small { display: block; }
.workflow-steps strong { font-size: 9px; }
.workflow-steps small { margin-top: 3px; color: var(--ink-400); font-size: 8px; line-height: 1.35; }
.decision-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.decision-button { min-height: 118px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.decision-button:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.decision-button > span { width: 30px; height: 30px; display: grid; place-items: center; margin-bottom: 4px; border-radius: 9px; }
.decision-button > span svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.decision-button strong { font-size: 10px; }
.decision-button small { color: var(--ink-400); font-size: 8px; line-height: 1.4; }
.decision-button.neutral > span { color: var(--ink-650); background: var(--canvas); }
.decision-button.caution > span { color: var(--amber); background: var(--amber-soft); }
.decision-button.confirm > span { color: var(--green); background: var(--green-soft); }
.technical-details { overflow: hidden; }
.technical-details details > summary { display: flex; align-items: center; gap: 8px; padding: 12px 13px; color: var(--ink-500); cursor: pointer; font-size: 10px; font-weight: 750; list-style: none; }
.technical-details details > summary::-webkit-details-marker { display: none; }
.technical-details details > summary svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.technical-details details[open] > summary { border-bottom: 1px solid var(--line); }
.selected-source { display: flex; align-items: flex-start; gap: 10px; padding: 12px; background: var(--green-soft); border: 1px solid #cce9df; border-radius: 10px; }
.selected-source > svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--green); fill: none; stroke: currentColor; stroke-width: 1.8; }
.selected-source strong, .selected-source small { display: block; }
.selected-source strong { font-size: 11px; }
.selected-source small { margin-top: 3px; color: #396c61; font-size: 9px; line-height: 1.45; }
.help-intro { display: flex; align-items: flex-start; gap: 13px; padding: 15px; color: #fff; background: linear-gradient(145deg, var(--navy-900), var(--navy-800)); border-radius: 13px; }
.help-intro > svg { width: 28px; height: 28px; flex: 0 0 28px; fill: none; stroke: var(--terracotta); stroke-width: 1.7; }
.help-intro strong { font-size: 13px; }
.help-intro p { margin: 5px 0 0; color: #b6c0d0; font-size: 10px; line-height: 1.55; }
.help-workflow { display: grid; gap: 8px; margin: 14px 0; padding: 0; list-style: none; }
.help-workflow li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 10px; background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; }
.help-workflow li > b { width: 26px; height: 26px; display: grid; place-items: center; color: #fff; background: var(--terracotta); border-radius: 50%; font-size: 10px; }
.help-workflow strong { font-size: 10px; }
.help-workflow p { margin: 3px 0 0; color: var(--ink-500); font-size: 9px; line-height: 1.45; }
.help-glossary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.help-glossary > div { padding: 11px; border: 1px solid var(--line); border-radius: 10px; }
.help-glossary strong { display: flex; align-items: center; gap: 6px; font-size: 10px; }
.help-glossary strong svg { width: 14px; height: 14px; fill: none; stroke: var(--terracotta-dark); stroke-width: 1.8; }
.help-glossary p { margin: 5px 0 0; color: var(--ink-500); font-size: 9px; line-height: 1.45; }
.callout span strong { display: block; margin-bottom: 2px; color: var(--ink-800); font-size: 10px; }

/* Responsive */
@media (max-width: 1420px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .dashboard-grid { grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr); }
}
@media (max-width: 1120px) {
  :root { --sidebar-width: 232px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .section-grid.three { grid-template-columns: repeat(2, 1fr); }
  .topbar-profile span:last-child { display: none; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-105%); transition: transform .22s cubic-bezier(.2,.8,.2,1); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-close { display: inline-grid; }
  body.sidebar-open .sidebar-scrim { position: fixed; inset: 0; z-index: 55; display: block; background: rgba(17,24,39,.38); }
  .main-shell { margin-left: 0; }
  .mobile-menu { display: inline-grid; }
  .topbar { padding: 12px 16px; }
  .global-search-trigger { flex: 1; width: auto; }
  .connection-state, .language-switch { display: none; }
  .help-button span { display: none; }
  .page-shell { padding: 22px 17px 44px; }
  .page-header { align-items: flex-start; flex-direction: column; gap: 14px; }
  .page-actions { justify-content: flex-start; }
  .section-grid, .section-grid.three { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .login-screen { padding: 14px; }
  .login-shell { padding: 26px 20px; border-radius: 22px; }
  .mfa-qr-card { grid-template-columns: 1fr; text-align: center; }
  .mfa-qr { margin: 0 auto; }
  .mfa-recovery-actions { align-items: stretch; flex-direction: column; }
  .topbar { gap: 8px; }
  .global-search-trigger { min-height: 38px; }
  .global-search-trigger span { display: none; }
  .global-search-trigger kbd { margin-left: auto; }
  .topbar-profile { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-card { min-height: 112px; padding: 14px; }
  .data-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-group { width: 100%; }
  .toolbar-search { width: 100%; }
  .compact-select { min-width: 0; flex: 1; }
  .card-header { align-items: flex-start; flex-direction: column; }
  .drawer-body { padding: 14px 12px 38px; }
  .drawer-kpis { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .modal-footer { align-items: stretch; flex-direction: column-reverse; }
  .modal-footer .button { width: 100%; }
  .action-grid { grid-template-columns: 1fr; }
  .chat-context-strip, .workflow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evidence-scope-card { grid-template-columns: 34px minmax(0, 1fr); }
  .evidence-scope-card > :last-child { grid-column: 1 / -1; justify-self: stretch; }
  .decision-grid { grid-template-columns: 1fr; }
  .decision-button { min-height: auto; }
  .help-glossary { grid-template-columns: 1fr; }
  .definition-list { grid-template-columns: 110px 1fr; }
  .user-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .place-hero { min-height: 230px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
