:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --bg-raised: #101012;
  --surface: #141416;
  --surface-2: #1a1a1e;
  --surface-3: #242428;
  --border: #2a2a30;
  --border-bright: #3a3a42;
  --text: #f7f7f8;
  --text-soft: #d1d1d6;
  --muted: #92929d;
  --muted-dim: #64646e;
  --amber: #f59e0b;
  --amber-warm: #fbbf24;
  --amber-deep: #d97706;
  --green: #34d399;
  --red: #fb7185;
  --orange: #fb923c;
  --blue: #60a5fa;
  --violet: #a78bfa;
  --sidebar-width: 276px;
  --radius-sm: 9px;
  --radius: 13px;
  --radius-lg: 17px;
  --shadow: 0 18px 60px rgb(0 0 0 / 0.34);
  --font-body: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Avenir Next", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgb(42 42 48 / 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgb(42 42 48 / 0.14) 1px, transparent 1px),
    var(--bg);
  background-size: 40px 40px;
  color: var(--text-soft);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
}

::selection {
  background: rgb(245 158 11 / 0.28);
  color: var(--amber-warm);
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: #3d3d45;
}

:focus-visible {
  outline: 2px solid var(--amber-warm);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  transform: translateY(-150%);
  border-radius: var(--radius-sm);
  background: var(--amber);
  color: #111;
  font-weight: 750;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.ambient-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 3%, rgb(245 158 11 / 0.065), transparent 33%),
    radial-gradient(circle at 90% 48%, rgb(59 130 246 / 0.025), transparent 30%);
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: var(--sidebar-width);
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: rgb(14 14 16 / 0.94);
  padding: 22px 18px 18px;
  backdrop-filter: blur(20px);
}

.brand-row,
.brand,
.demo-labels,
.view-heading__line,
.topbar-actions,
.panel-head,
.system-card__head,
.button,
.status-pill,
.reset-button,
.filter-bar,
.filter-actions,
.inline-actions,
.progress-copy,
.card-heading,
.dialog-head,
.setting-row,
.switch-row,
.pagination-note,
.hero-actions,
.field-row,
.summary-line,
.source-title,
.table-person,
.empty-state,
.mobile-card-head {
  display: flex;
  align-items: center;
}

.brand-row {
  justify-content: space-between;
}

.brand {
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid rgb(251 191 36 / 0.45);
  border-radius: 12px;
  background: linear-gradient(145deg, var(--amber-warm), var(--amber-deep));
  box-shadow: 0 0 28px rgb(245 158 11 / 0.16);
  color: #131313;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-name {
  display: block;
  margin-top: 1px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.eyebrow {
  display: block;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.demo-labels {
  flex-wrap: wrap;
  gap: 7px;
}

.status-pill,
.sample-chip,
.badge {
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgb(26 26 30 / 0.78);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.status-pill {
  gap: 6px;
  padding: 6px 8px;
}

.status-pill--amber {
  border-color: rgb(245 158 11 / 0.32);
  background: rgb(245 158 11 / 0.09);
  color: var(--amber-warm);
}

.status-pill--green {
  border-color: rgb(52 211 153 / 0.28);
  background: rgb(52 211 153 / 0.08);
  color: var(--green);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  padding: 7px 9px;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}

.nav-item:hover {
  border-color: rgb(42 42 48 / 0.88);
  background: rgb(26 26 30 / 0.58);
  color: var(--text-soft);
}

.nav-item[aria-current="page"] {
  border-color: var(--border-bright);
  background: linear-gradient(145deg, rgb(29 29 33 / 0.98), rgb(18 18 20 / 0.98));
  box-shadow: 0 11px 24px rgb(0 0 0 / 0.3);
  color: var(--text);
}

.nav-item[aria-current="page"]::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -1px;
  width: 3px;
  border-radius: 10px;
  background: linear-gradient(var(--amber-warm), rgb(245 158 11 / 0.08));
  box-shadow: 0 0 13px rgb(245 158 11 / 0.6);
  content: "";
}

.nav-icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid #2a2a2f;
  border-radius: 8px;
  background: #121214;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 15px;
}

.nav-item[aria-current="page"] .nav-icon {
  border-color: rgb(245 158 11 / 0.32);
  background: rgb(245 158 11 / 0.06);
  color: var(--amber-warm);
}

.nav-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.nav-copy > span {
  font-size: 13px;
  font-weight: 660;
}

.nav-copy small {
  overflow: hidden;
  color: var(--muted-dim);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-badge {
  min-width: 21px;
  border: 1px solid rgb(251 113 133 / 0.24);
  border-radius: 999px;
  background: rgb(251 113 133 / 0.12);
  padding: 4px 6px;
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.nav-badge--amber {
  border-color: rgb(245 158 11 / 0.28);
  background: rgb(245 158 11 / 0.1);
  color: var(--amber-warm);
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.system-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgb(18 18 20 / 0.8);
  padding: 13px;
}

.system-card__head {
  justify-content: space-between;
}

.system-list {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
}

.system-list div {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.system-list dt {
  color: var(--muted-dim);
}

.system-list dd {
  margin: 0;
  color: var(--text-soft);
  font-family: var(--font-mono);
}

.amber-text {
  color: var(--amber-warm) !important;
}

.reset-button {
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgb(26 26 30 / 0.58);
  padding: 9px 12px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
  transition: 160ms ease;
}

.reset-button:hover {
  border-color: var(--border-bright);
  color: var(--text);
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 94px;
  border-bottom: 1px solid var(--border);
  background: rgb(10 10 11 / 0.82);
  padding: 16px clamp(18px, 3vw, 38px);
  backdrop-filter: blur(18px);
}

.view-heading {
  min-width: 0;
}

.view-heading__line {
  gap: 10px;
}

.view-heading h1 {
  overflow: hidden;
  margin: 1px 0 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(21px, 2.4vw, 27px);
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-heading p {
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--muted-dim);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sample-chip {
  display: inline-block;
  flex: 0 0 auto;
  padding: 5px 7px;
}

.topbar-actions {
  gap: 9px;
}

.button {
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  transition: 160ms ease;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button--primary {
  border-color: var(--amber-warm);
  background: linear-gradient(140deg, var(--amber-warm), var(--amber-deep));
  box-shadow: 0 5px 22px rgb(245 158 11 / 0.17);
  color: #17130b;
}

.button--primary:hover:not(:disabled) {
  box-shadow: 0 7px 29px rgb(245 158 11 / 0.28);
  transform: translateY(-1px);
}

.button--quiet,
.button--secondary {
  border-color: var(--border);
  background: rgb(26 26 30 / 0.82);
  color: var(--text-soft);
}

.button--quiet:hover,
.button--secondary:hover:not(:disabled) {
  border-color: var(--border-bright);
  background: var(--surface-3);
  color: var(--text);
}

.button--danger {
  border-color: rgb(251 113 133 / 0.3);
  background: rgb(251 113 133 / 0.08);
  color: #fda4af;
}

.button--small {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 11px;
}

.button--text {
  min-height: 30px;
  background: transparent;
  padding: 6px 8px;
  color: var(--amber-warm);
}

.button--text:hover {
  background: rgb(245 158 11 / 0.08);
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 18px;
}

.icon-button:hover {
  border-color: var(--border-bright);
  color: var(--text);
}

.menu-button,
.sidebar-close {
  display: none;
}

.demo-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid rgb(245 158 11 / 0.24);
  background: rgb(245 158 11 / 0.065);
  padding: 9px clamp(18px, 3vw, 38px);
  color: #d8c59b;
  font-size: 11px;
  line-height: 1.5;
}

.demo-notice strong {
  color: var(--amber-warm);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.demo-notice__icon {
  color: var(--amber-warm);
}

.main-content {
  width: min(100%, 1460px);
  margin: 0 auto;
  padding: clamp(22px, 3.2vw, 42px);
}

.page-section {
  animation: view-in 260ms ease-out both;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-card,
.panel,
.metric-card,
.record-card,
.source-card,
.setting-group,
.scan-engine {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgb(25 25 29 / 0.96), rgb(17 17 19 / 0.98));
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.17);
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, 0.6fr);
  gap: 24px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 42px);
}

.hero-card::after {
  position: absolute;
  inset: auto -9% -70% 38%;
  height: 180%;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(245 158 11 / 0.09), transparent 62%);
  pointer-events: none;
  content: "";
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  color: var(--amber-warm);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-card h2,
.scan-engine h2 {
  max-width: 760px;
  margin: 10px 0 11px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 680;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.hero-card h2 em {
  color: var(--amber-warm);
  font-style: normal;
}

.hero-card p,
.scan-engine p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-visual {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 200px;
}

.pulse-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  border: 1px solid rgb(255 255 255 / 0.05);
  border-radius: 10px;
  background: rgb(9 9 10 / 0.45);
  padding: 11px 13px;
}

.pulse-line span {
  color: var(--muted);
  font-size: 11px;
}

.pulse-line strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
}

.pulse-line--accent {
  border-color: rgb(245 158 11 / 0.2);
  background: rgb(245 158 11 / 0.055);
}

.pulse-line--accent strong {
  color: var(--amber-warm);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 16px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 133px;
  border-radius: var(--radius);
  padding: 18px;
}

.metric-card::before {
  position: absolute;
  top: 0;
  right: 12%;
  left: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(245 158 11 / 0.72), transparent);
  content: "";
}

.metric-label {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.metric-value {
  margin-top: 10px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(25px, 3vw, 35px);
  font-weight: 650;
  letter-spacing: -0.05em;
}

.metric-note {
  margin: 6px 0 0;
  color: var(--muted-dim);
  font-size: 10px;
  line-height: 1.4;
}

.metric-note strong {
  color: var(--green);
  font-weight: 650;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.75fr);
  gap: 16px;
  margin-top: 16px;
}

.content-grid--equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  min-width: 0;
  border-radius: var(--radius-lg);
  padding: clamp(18px, 2.4vw, 25px);
}

.panel-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}

.panel-head h2,
.panel-head h3,
.card-heading h3,
.dialog-head h2,
.section-heading h2 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.panel-head p,
.section-heading p {
  margin: 4px 0 0;
  color: var(--muted-dim);
  font-size: 11px;
}

.panel-label {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.action-card {
  position: relative;
  min-height: 106px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgb(12 12 14 / 0.6);
  padding: 15px;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: 170ms ease;
}

.action-card:hover {
  border-color: rgb(245 158 11 / 0.32);
  background: rgb(245 158 11 / 0.035);
  transform: translateY(-1px);
}

.action-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.action-card strong {
  color: var(--text);
  font-size: 12px;
}

.action-card .arrow {
  color: var(--muted-dim);
  transition: 160ms ease;
}

.action-card:hover .arrow {
  color: var(--amber-warm);
  transform: translateX(2px);
}

.action-card p {
  margin: 9px 0 0;
  color: var(--muted-dim);
  font-size: 10px;
  line-height: 1.5;
}

.risk-list,
.activity-list,
.record-list,
.settings-stack {
  display: grid;
  gap: 9px;
}

.risk-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid rgb(42 42 48 / 0.75);
  padding: 10px 2px;
}

.risk-row:last-child {
  border-bottom: 0;
}

.risk-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 9px rgb(245 158 11 / 0.38);
}

.risk-dot--red { background: var(--red); box-shadow: 0 0 9px rgb(251 113 133 / 0.38); }
.risk-dot--green { background: var(--green); box-shadow: 0 0 9px rgb(52 211 153 / 0.32); }
.risk-dot--blue { background: var(--blue); box-shadow: 0 0 9px rgb(96 165 250 / 0.32); }

.risk-row span {
  color: var(--muted);
  font-size: 11px;
}

.risk-row strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
}

.activity-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgb(12 12 14 / 0.54);
  padding: 10px;
}

.activity-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--amber-warm);
  font-family: var(--font-mono);
  font-size: 12px;
}

.activity-copy strong,
.table-person strong {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
}

.activity-copy span,
.table-person span {
  display: block;
  margin-top: 2px;
  color: var(--muted-dim);
  font-size: 9px;
}

.activity-time {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 9px;
}

.section-heading {
  margin-bottom: 17px;
}

.section-heading h2 {
  font-size: 22px;
}

.filter-bar {
  justify-content: space-between;
  gap: 13px;
  margin-bottom: 14px;
}

.filter-actions,
.inline-actions,
.field-row {
  flex-wrap: wrap;
  gap: 8px;
}

.segment-group {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgb(12 12 14 / 0.65);
  padding: 3px;
}

.segment-button {
  flex: 0 0 auto;
  border-radius: 7px;
  background: transparent;
  padding: 7px 10px;
  color: var(--muted-dim);
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
}

.segment-button[aria-pressed="true"] {
  background: var(--surface-3);
  color: var(--amber-warm);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.28);
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #101012;
  padding: 9px 11px;
  color: var(--text-soft);
  font-size: 11px;
  outline: none;
  transition: 150ms ease;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted-dim);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgb(245 158 11 / 0.66);
  box-shadow: 0 0 0 3px rgb(245 158 11 / 0.1);
}

.input--search {
  width: min(260px, 100%);
  padding-left: 33px;
  background-image: radial-gradient(circle, transparent 5px, var(--muted-dim) 5.5px, var(--muted-dim) 6.5px, transparent 7px), linear-gradient(45deg, transparent 47%, var(--muted-dim) 48%, var(--muted-dim) 55%, transparent 56%);
  background-position: 12px 10px, 22px 22px;
  background-repeat: no-repeat;
  background-size: 14px 14px, 7px 7px;
}

.textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.55;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgb(12 12 14 / 0.5);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.data-table th {
  border-bottom: 1px solid var(--border);
  background: rgb(25 25 28 / 0.84);
  padding: 11px 13px;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  border-bottom: 1px solid rgb(42 42 48 / 0.56);
  padding: 12px 13px;
  color: var(--muted);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: 140ms ease;
}

.data-table tbody tr:hover {
  background: rgb(255 255 255 / 0.018);
}

.table-primary {
  color: var(--text-soft);
  font-weight: 620;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.text-right { text-align: right !important; }
.text-center { text-align: center !important; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  white-space: nowrap;
}

.badge--green { border-color: rgb(52 211 153 / 0.25); background: rgb(52 211 153 / 0.08); color: var(--green); }
.badge--amber { border-color: rgb(245 158 11 / 0.28); background: rgb(245 158 11 / 0.08); color: var(--amber-warm); }
.badge--red { border-color: rgb(251 113 133 / 0.27); background: rgb(251 113 133 / 0.08); color: #fda4af; }
.badge--blue { border-color: rgb(96 165 250 / 0.25); background: rgb(96 165 250 / 0.08); color: #93c5fd; }
.badge--violet { border-color: rgb(167 139 250 / 0.25); background: rgb(167 139 250 / 0.08); color: #c4b5fd; }
.badge--muted { color: var(--muted); }

.scan-engine {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: clamp(23px, 3.5vw, 35px);
}

.scan-engine__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}

.scan-engine h2 {
  margin-top: 7px;
  font-size: clamp(25px, 3.6vw, 38px);
}

.scan-control {
  min-width: 180px;
  min-height: 49px;
}

.progress-block {
  margin-top: 22px;
}

.progress-copy {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
}

.progress-copy span:last-child {
  color: var(--amber-warm);
  font-family: var(--font-mono);
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #0d0d0f;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber-deep), var(--amber-warm));
  box-shadow: 0 0 13px rgb(245 158 11 / 0.45);
  transition: width 180ms ease;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-top: 16px;
}

.source-card {
  border-radius: var(--radius);
  padding: 16px;
}

.source-title {
  gap: 10px;
}

.source-glyph {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-3);
  color: var(--amber-warm);
  font-family: var(--font-mono);
}

.source-title strong {
  color: var(--text);
  font-size: 12px;
}

.source-title span {
  display: block;
  margin-top: 2px;
  color: var(--muted-dim);
  font-size: 9px;
}

.source-card p {
  min-height: 36px;
  margin: 12px 0;
  color: var(--muted-dim);
  font-size: 10px;
  line-height: 1.6;
}

.record-card {
  position: relative;
  overflow: hidden;
  border-radius: 13px;
  padding: 17px;
  transition: 170ms ease;
}

.record-card:hover {
  border-color: var(--border-bright);
}

.record-card--approved { border-color: rgb(52 211 153 / 0.32); background: linear-gradient(145deg, rgb(52 211 153 / 0.055), #111113); }
.record-card--dismissed { opacity: 0.58; }
.record-card--urgent { border-color: rgb(251 113 133 / 0.27); }

.card-heading {
  justify-content: space-between;
  gap: 16px;
}

.card-heading__copy {
  min-width: 0;
}

.card-heading h3 {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-heading p,
.record-meta {
  margin: 4px 0 0;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 9px;
}

.record-description {
  margin: 14px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.record-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgb(42 42 48 / 0.65);
  padding-top: 13px;
}

.record-stat {
  display: grid;
  gap: 3px;
}

.record-stat span {
  color: var(--muted-dim);
  font-size: 9px;
}

.record-stat strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
}

.confidence {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--confidence-color, var(--amber)) calc(var(--confidence) * 1%), var(--surface-3) 0);
}

.confidence::after {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--surface);
  content: "";
}

.confidence span {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
}

.range-block {
  width: min(300px, 100%);
}

.range-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  color: var(--muted-dim);
  font-size: 9px;
}

.range-label strong {
  color: var(--amber-warm);
  font-family: var(--font-mono);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--amber);
  cursor: pointer;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 15px;
}

.summary-tile {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgb(18 18 20 / 0.76);
  padding: 13px;
}

.summary-tile strong {
  display: block;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 21px;
}

.summary-tile span {
  display: block;
  margin-top: 3px;
  color: var(--muted-dim);
  font-size: 9px;
}

.response-preview {
  border-left: 2px solid rgb(245 158 11 / 0.32);
  margin: 14px 0;
  padding: 2px 0 2px 13px;
  color: var(--muted);
  font-size: 11px;
  font-style: italic;
  line-height: 1.6;
}

.deadline-date {
  display: grid;
  min-width: 64px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #101012;
  padding: 9px;
}

.deadline-date strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1;
}

.deadline-date span {
  margin-top: 4px;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.record-card--horizontal {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.client-avatar {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--amber-warm);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 750;
}

.health-bar {
  width: 94px;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-3);
}

.health-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.empty-state {
  min-height: 180px;
  flex-direction: column;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
}

.empty-state__glyph {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--green);
  font-size: 20px;
}

.empty-state h3 {
  margin: 12px 0 5px;
  color: var(--text);
  font-size: 13px;
}

.empty-state p {
  max-width: 390px;
  margin: 0;
  color: var(--muted-dim);
  font-size: 10px;
  line-height: 1.55;
}

.setting-group {
  border-radius: var(--radius);
  padding: 19px;
}

.setting-group h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 13px;
}

.setting-group > p {
  margin: 0 0 16px;
  color: var(--muted-dim);
  font-size: 10px;
  line-height: 1.5;
}

.setting-row,
.switch-row {
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgb(42 42 48 / 0.7);
  padding: 14px 0;
}

.setting-row:first-of-type,
.switch-row:first-of-type {
  border-top: 0;
}

.setting-copy strong {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
}

.setting-copy span {
  display: block;
  max-width: 510px;
  margin-top: 3px;
  color: var(--muted-dim);
  font-size: 9px;
  line-height: 1.45;
}

.setting-control {
  width: min(260px, 42%);
}

.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border: 1px solid var(--border-bright);
  border-radius: 99px;
  background: var(--surface-3);
  cursor: pointer;
  transition: 170ms ease;
}

.switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
  transition: 170ms ease;
  content: "";
}

.switch input:checked + span {
  border-color: rgb(245 158 11 / 0.44);
  background: rgb(245 158 11 / 0.15);
}

.switch input:checked + span::after {
  background: var(--amber-warm);
  box-shadow: 0 0 8px rgb(245 158 11 / 0.45);
  transform: translateX(16px);
}

.switch input:focus-visible + span {
  outline: 2px solid var(--amber-warm);
  outline-offset: 3px;
}

.demo-dialog {
  width: min(600px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  overflow: auto;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  background: #151518;
  box-shadow: 0 28px 90px rgb(0 0 0 / 0.68);
  padding: 0;
  color: var(--text-soft);
}

.demo-dialog::backdrop {
  background: rgb(0 0 0 / 0.72);
  backdrop-filter: blur(4px);
}

.dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  background: rgb(21 21 24 / 0.96);
  padding: 17px 19px;
  backdrop-filter: blur(12px);
}

.dialog-head h2 {
  margin-top: 2px;
  font-size: 18px;
}

.dialog-content {
  padding: 20px;
}

.dialog-content p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.dialog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 15px 0;
}

.dialog-stat {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #101012;
  padding: 12px;
}

.dialog-stat span {
  display: block;
  color: var(--muted-dim);
  font-size: 9px;
}

.dialog-stat strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 11px;
}

.form-field {
  display: grid;
  gap: 6px;
  margin-top: 13px;
}

.form-field label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 17px;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  border: 1px solid rgb(245 158 11 / 0.34);
  border-radius: 11px;
  background: rgb(24 24 27 / 0.97);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.45;
  animation: toast-in 190ms ease-out both;
}

.toast strong {
  color: var(--amber-warm);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.sidebar-scrim {
  display: none;
}

.mobile-card-list {
  display: none;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.muted { color: var(--muted-dim); }
.green-text { color: var(--green) !important; }
.red-text { color: var(--red) !important; }
.blue-text { color: var(--blue) !important; }
.nowrap { white-space: nowrap; }

@media (max-width: 1180px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    transform: translateX(-102%);
    transition: transform 210ms ease;
  }

  body.menu-open {
    overflow: hidden;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 45;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgb(0 0 0 / 0.63);
    cursor: pointer;
  }

  body.menu-open .sidebar-scrim {
    display: block;
  }

  .sidebar-close,
  .menu-button {
    display: grid;
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 13px;
  }

  .content-grid,
  .content-grid--equal {
    grid-template-columns: 1fr;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    grid-template-columns: repeat(3, 1fr);
    min-height: auto;
  }

  .pulse-line {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 78px;
    padding: 12px 14px;
  }

  .view-heading .eyebrow,
  .view-heading p,
  .sample-chip,
  .sign-in-link {
    display: none;
  }

  .topbar-actions .button {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 10px;
  }

  .demo-notice {
    align-items: flex-start;
    padding: 8px 14px;
  }

  .main-content {
    padding: 18px 14px 36px;
  }

  .hero-card {
    padding: 22px 18px;
  }

  .hero-card h2 {
    font-size: 29px;
  }

  .hero-visual {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .summary-strip,
  .action-grid,
  .source-grid,
  .dialog-grid {
    grid-template-columns: 1fr 1fr;
  }

  .scan-engine__layout {
    grid-template-columns: 1fr;
  }

  .scan-control {
    width: 100%;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .input--search {
    width: 100%;
  }

  .data-table--responsive {
    display: none;
  }

  .mobile-card-list {
    display: grid;
    gap: 9px;
  }

  .mobile-card-head {
    justify-content: space-between;
    gap: 10px;
  }

  .record-card--horizontal {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .record-card--horizontal > .inline-actions {
    grid-column: 1 / -1;
  }

  .record-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .range-block {
    width: 100%;
  }

  .setting-row,
  .switch-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .setting-control {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .metric-grid,
  .summary-strip,
  .action-grid,
  .source-grid,
  .dialog-grid {
    grid-template-columns: 1fr;
  }

  .view-heading h1 {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
