:root {
  --color-accent: #0b192c;
  --color-accent-hover: #1e3e62;
  --color-accent-soft: #f2f5f9;
  --color-accent-contrast: #ffffff;
  --color-bg: #f8f9fa;
  --color-surface: #ffffff;
  --color-surface-2: #f4f6f8;
  --color-surface-sunken: #edf1f5;
  --color-border: #dce2eb;
  --color-border-strong: #cbd5e1;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-text-subtle: #64748b;
  --color-text-on-accent: #ffffff;
  --status-verified-fg: #0f7a4d;
  --status-verified-bg: #e5f5ec;
  --status-processing-fg: #1f5fbf;
  --status-processing-bg: #e6f0fe;
  --status-queued-fg: #5a6474;
  --status-queued-bg: #eceef2;
  --status-pending-fg: #9a6a00;
  --status-pending-bg: #fdf2d9;
  --demo-banner-bg: #0b192c;
  --demo-banner-stripe: #1e3e62;
  --demo-banner-fg: #c5a059;
  --sidebar-bg: #0b192c;
  --sidebar-fg: #cbd5e1;
  --sidebar-fg-muted: #94a3b8;
  --sidebar-active-bg: #1e3e62;
  --sidebar-active-fg: #ffffff;
  --sidebar-accent: #c5a059;
  --shadow-sm: 0 1px 2px rgba(11, 25, 44, 0.05);
  --shadow-md: 0 4px 14px rgba(11, 25, 44, 0.08);
  --shadow-lg: 0 12px 34px rgba(11, 25, 44, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px;
  --font-sans: "Inter", system-ui, sans-serif;
  --font-mono: monospace;
  --sidebar-width: 250px;
  --banner-height: 40px;
  --topbar-height: 64px;
  --content-max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-sans); font-size: 15px; line-height: 1.5; color: var(--color-text); background: var(--color-bg); }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }

/* Public Landing Styles */
.public-header { background: var(--color-surface); border-bottom: 1px solid var(--color-border); padding: var(--space-4) var(--space-5); position: sticky; top: var(--banner-height); z-index: 90; }
.public-header__inner { max-width: var(--content-max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.public-nav { display: flex; align-items: center; gap: var(--space-4); }
.hero { padding: var(--space-7) var(--space-5); background: linear-gradient(135deg, #0b192c, #1e3e62); color: #fff; text-align: center; }
.hero__content { max-width: 750px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-4); align-items: center; }
.hero__title { font-size: 2.4rem; font-weight: 800; line-height: 1.2; }
.hero__desc { color: #cbd5e1; font-size: 1.05rem; max-width: 65ch; }
.hero__actions { display: flex; gap: var(--space-3); margin-top: var(--space-2); }
.login-section { max-width: 480px; margin: var(--space-7) auto; padding: 0 var(--space-4); }
.contact-section { max-width: var(--content-max); margin: var(--space-7) auto; padding: 0 var(--space-5); }
.form-group { display: flex; flex-direction: column; gap: var(--space-2); }
.form-label { font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); }
.form-input { padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text); font-size: 0.95rem; width: 100%; }
.login-error { color: #b91c1c; font-size: 0.85rem; font-weight: 600; text-align: center; }
.w-full { width: 100%; }
.text-center { text-align: center; }

/* Dashboard Shell Styles */
.demo-banner { position: sticky; top: 0; z-index: 100; min-height: var(--banner-height); display: flex; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-2) var(--space-4); text-align: center; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--demo-banner-fg); background-color: var(--demo-banner-bg); background-image: repeating-linear-gradient(45deg, transparent, transparent 14px, var(--demo-banner-stripe) 14px, var(--demo-banner-stripe) 28px); border-bottom: 2px solid var(--demo-banner-fg); }
.demo-banner__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--demo-banner-fg); flex: none; }
.app { display: grid; grid-template-columns: var(--sidebar-width) 1fr; min-height: calc(100vh - var(--banner-height)); }
.sidebar { grid-row: 1 / -1; background: var(--sidebar-bg); color: var(--sidebar-fg); display: flex; flex-direction: column; padding: var(--space-5) var(--space-4); gap: var(--space-5); position: sticky; top: var(--banner-height); height: calc(100vh - var(--banner-height)); overflow-y: auto; border-right: 1px solid var(--color-border); }
.brand { display: flex; align-items: center; gap: var(--space-3); }
.brand__mark { width: 40px; height: 40px; border-radius: var(--radius-md); background: linear-gradient(135deg, #1e3e62, #c5a059); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 0.95rem; flex: none; }
.brand__name { font-weight: 700; font-size: 1.05rem; color: #fff; line-height: 1.1; }
.brand__tag { font-size: 0.75rem; color: var(--sidebar-accent); letter-spacing: 0.04em; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: var(--space-1); }
.nav__label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--sidebar-fg-muted); padding: 0 var(--space-3); margin-bottom: var(--space-2); }
.nav__link { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-md); color: var(--sidebar-fg); font-weight: 500; font-size: 0.92rem; }
.nav__link:hover { background: var(--sidebar-active-bg); color: var(--sidebar-active-fg); text-decoration: none; }
.nav__link[aria-current="page"] { background: var(--sidebar-active-bg); color: var(--sidebar-active-fg); box-shadow: inset 3px 0 0 var(--sidebar-accent); }
.nav__icon { width: 20px; height: 20px; flex: none; stroke: currentColor; stroke-width: 1.8; fill: none; }
.sidebar__footer { margin-top: auto; font-size: 0.74rem; color: var(--sidebar-fg-muted); border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: var(--space-4); line-height: 1.5; }
.topbar { display: flex; align-items: center; gap: var(--space-4); min-height: var(--topbar-height); padding: var(--space-3) var(--space-5); background: var(--color-surface); border-bottom: 1px solid var(--color-border); position: sticky; top: var(--banner-height); z-index: 90; }
.topbar__menu-btn { display: none; }
.topbar__titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.topbar__title { font-size: 1.12rem; font-weight: 700; }
.topbar__subtitle { font-size: 0.82rem; color: var(--color-text-muted); }
.topbar__spacer { flex: 1 1 auto; }
.topbar__actions { display: flex; align-items: center; gap: var(--space-3); }
.env-chip { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); background: var(--status-verified-bg); color: var(--status-verified-fg); font-size: 0.74rem; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.env-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.user-chip { display: flex; align-items: center; gap: var(--space-3); }
.user-chip__avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--color-accent-soft); color: var(--color-accent); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; flex: none; }
.user-chip__meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-chip__name { font-weight: 600; font-size: 0.88rem; }
.user-chip__role { font-size: 0.74rem; color: var(--color-text-muted); }
.main { display: flex; flex-direction: column; min-width: 0; }
.content { padding: var(--space-5); width: 100%; max-width: var(--content-max); margin: 0 auto; }
.view[hidden] { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); border: 1px solid transparent; font-weight: 600; font-size: 0.88rem; background: var(--color-surface); color: var(--color-text); white-space: nowrap; }
.btn--primary { background: var(--color-accent); color: var(--color-text-on-accent); }
.btn--primary:hover { background: var(--color-accent-hover); text-decoration: none; }
.btn--ghost { background: transparent; border-color: var(--color-border-strong); color: var(--color-text); }
.btn--lg { padding: var(--space-3) var(--space-6); font-size: 1rem; }
.btn--icon { padding: var(--space-2); width: 42px; height: 42px; border-color: var(--color-border); }
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card__header { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-border); }
.card__title { font-size: 0.95rem; font-weight: 700; }
.card__subtitle { font-size: 0.8rem; color: var(--color-text-muted); }
.card__header-actions { margin-left: auto; display: flex; gap: var(--space-2); }
.card__body { padding: var(--space-5); }
.metric { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); }
.metric__label { font-size: 0.8rem; color: var(--color-text-muted); font-weight: 600; }
.metric__value { font-size: 1.85rem; font-weight: 800; line-height: 1.05; }
.metric__foot { display: flex; align-items: center; gap: var(--space-2); font-size: 0.8rem; color: var(--color-text-muted); }
.metric__delta { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.metric__delta--up { color: var(--status-verified-fg); }
.metric__delta--down { color: #b91c1c; }
.metric__delta--flat { color: var(--color-text-subtle); }
.status-card { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-5); }
.status-card__icon { width: 52px; height: 52px; border-radius: var(--radius-md); display: grid; place-items: center; flex: none; }
.status-card__icon svg { width: 26px; height: 26px; stroke-width: 2; fill: none; }
.status-card__icon--processing { background: var(--status-processing-bg); color: var(--status-processing-fg); }
.status-card__body { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.status-card__headline { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.status-card__title { font-size: 1.05rem; font-weight: 700; }
.status-card__desc { color: var(--color-text-muted); font-size: 0.88rem; }
.status-card__meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-top: var(--space-2); font-size: 0.8rem; color: var(--color-text-subtle); }
.status-card__meta b { color: var(--color-text); font-weight: 600; }
.progress { margin-top: var(--space-3); }
.progress__track { height: 8px; border-radius: var(--radius-pill); background: var(--color-surface-sunken); overflow: hidden; border: 1px solid var(--color-border); }
.progress__fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--color-accent), #c5a059); }
.progress__caption { margin-top: var(--space-2); font-size: 0.78rem; color: var(--color-text-muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 0.76rem; font-weight: 700; white-space: nowrap; line-height: 1.4; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill--verified { color: var(--status-verified-fg); background: var(--status-verified-bg); }
.pill--processing { color: var(--status-processing-fg); background: var(--status-processing-bg); }
.pill--queued { color: var(--status-queued-fg); background: var(--status-queued-bg); }
.pill--pending { color: var(--status-pending-fg); background: var(--status-pending-bg); }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 560px; }
.data-table caption { text-align: left; padding: 0 var(--space-5) var(--space-3); color: var(--color-text-subtle); font-size: 0.78rem; }
.data-table thead th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); font-weight: 700; padding: var(--space-3) var(--space-5); background: var(--color-surface-2); border-bottom: 1px solid var(--color-border); }
.data-table th.is-numeric, .data-table td.is-numeric { text-align: right; }
.data-table tbody td { padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.cell-primary { font-weight: 600; }
.cell-sub { display: block; font-size: 0.78rem; color: var(--color-text-subtle); margin-top: 2px; }
.ref-code { font-family: var(--font-mono); font-size: 0.82rem; color: var(--color-text-muted); }
.def-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4) var(--space-6); margin: 0; }
.def-list__row { display: flex; flex-direction: column; gap: 4px; }
.def-list__key { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-subtle); font-weight: 600; }
.def-list__val { font-size: 0.95rem; color: var(--color-text); font-weight: 600; word-break: break-word; }
.section-head { display: flex; align-items: baseline; gap: var(--space-3); margin-bottom: var(--space-4); flex-wrap: wrap; }
.section-head__title { font-size: 1.1rem; font-weight: 700; }
.section-head__hint { font-size: 0.82rem; color: var(--color-text-muted); }
.note { display: flex; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); background: var(--color-accent-soft); border: 1px solid var(--color-border); color: var(--color-text-muted); font-size: 0.85rem; align-items: flex-start; }
.note__icon { flex: none; width: 20px; height: 20px; color: var(--color-accent); stroke-width: 2; fill: none; }
.page-footer { padding: var(--space-5); text-align: center; color: var(--color-text-subtle); font-size: 0.78rem; border-top: 1px solid var(--color-border); margin-top: var(--space-6); }
@media (max-width: 900px) {
  :root { --sidebar-width: 0px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: 260px; height: 100vh; z-index: 150; transform: translateX(-100%); transition: transform 0.25s ease; box-shadow: var(--shadow-lg); }
  .app.is-nav-open .sidebar { transform: translateX(0); }
  .public-nav { display: none; }
}