/* Trading Partner Portal
   Tokens, shell and components follow PBXperience2026 (and Texter2026's palette) so the
   portals read as one family. Portal-specific pieces are at the bottom. */

:root {
  --brand: #1f4bb5;
  --brand-600: #193e98;
  --brand-700: #143279;
  --brand-50: #eef3fd;
  --brand-100: #dce6fa;
  --accent: #e2262b;
  --accent-50: #fdeeee;

  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e3e8ef;
  --border-strong: #cfd6e1;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #647086;

  --good: #15803d;
  --good-50: #e9f7ee;
  --warn: #b45309;
  --warn-50: #fdf4e3;
  --bad: #c81e1e;
  --bad-50: #fdecec;

  --link: #1f4bb5;
  --on-brand: #ffffff;
  --topbar-bg: rgba(255, 255, 255, .9);
  --row-hover: #fafbfd;
  --scrim: rgba(15, 23, 42, .4);
  --good-border: #cdebd8;
  --warn-border: #f6e2bd;
  --bad-border: #f5cccc;
  --logo-bg: transparent;   /* the logo has dark lettering, so dark mode puts it on a light chip */

  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .14);
  --sidebar-w: 248px;
  --topbar-h: 64px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}
:root[data-theme="light"] { color-scheme: light; }

/* Dark theme: follows the system unless the user picked Light or Dark (html[data-theme]). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand: #3567d6;
    --brand-600: #4a79e0;
    --brand-700: #b3c8f7;
    --brand-50: #1a2645;
    --brand-100: #27396a;
    --accent: #cf3439;
    --accent-50: #33171a;
    --bg: #0d1220;
    --surface: #151b2b;
    --surface-2: #1b2234;
    --border: #262f45;
    --border-strong: #36405b;
    --text: #e7ebf3;
    --text-2: #b0b9cb;
    --muted: #8590a6;
    --good: #4ade80;
    --good-50: #11281c;
    --warn: #fbbf24;
    --warn-50: #2b210b;
    --bad: #f87171;
    --bad-50: #2f1518;
    --link: #8fb0f5;
    --topbar-bg: rgba(21, 27, 43, .9);
    --row-hover: #1a2133;
    --scrim: rgba(0, 0, 0, .55);
    --good-border: #1d4630;
    --warn-border: #4a3a12;
    --bad-border: #5a2428;
    --logo-bg: #ffffff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .25);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #3567d6;
  --brand-600: #4a79e0;
  --brand-700: #b3c8f7;
  --brand-50: #1a2645;
  --brand-100: #27396a;
  --accent: #cf3439;
  --accent-50: #33171a;
  --bg: #0d1220;
  --surface: #151b2b;
  --surface-2: #1b2234;
  --border: #262f45;
  --border-strong: #36405b;
  --text: #e7ebf3;
  --text-2: #b0b9cb;
  --muted: #8590a6;
  --good: #4ade80;
  --good-50: #11281c;
  --warn: #fbbf24;
  --warn-50: #2b210b;
  --bad: #f87171;
  --bad-50: #2f1518;
  --link: #8fb0f5;
  --topbar-bg: rgba(21, 27, 43, .9);
  --row-hover: #1a2133;
  --scrim: rgba(0, 0, 0, .55);
  --good-border: #1d4630;
  --warn-border: #4a3a12;
  --bad-border: #5a2428;
  --logo-bg: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .25);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 12px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ic { flex-shrink: 0; vertical-align: middle; }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.small { font-size: 13px; }
.mb { margin-bottom: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Shell ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 40;
  transition: transform .2s ease;
}
.sidebar-brand { height: var(--topbar-h); display: flex; align-items: center; padding: 0 20px; border-bottom: 1px solid var(--border); }
.sidebar-brand a { display: inline-flex; background: var(--logo-bg); border-radius: 8px; }
.sidebar-brand img { height: 38px; width: auto; display: block; }
.tenant {
  margin: 14px 14px 6px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface-2);
  display: flex; align-items: center; gap: 10px;
}
.tenant-logo { width: 32px; height: 32px; border-radius: 8px; background: var(--brand-100); color: var(--brand-700); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.tenant-name { font-weight: 600; font-size: 13px; line-height: 1.2; }
.tenant-sub { font-size: 12px; color: var(--muted); }
.nav { padding: 8px 12px 16px; overflow-y: auto; flex: 1; }
.nav-section { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; margin: 1px 0;
  border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--brand-50); color: var(--brand-700); }
.nav a.active .ic { color: var(--link); }
.sidebar-foot { border-top: 1px solid var(--border); padding: 12px; }
.help-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: var(--radius-sm); color: var(--text-2); font-size: 13px; }
.help-card .ic { margin-top: 2px; }
.help-card:hover { background: var(--surface-2); text-decoration: none; }
.help-card strong { display: block; color: var(--text); font-weight: 600; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.mockbar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 16px; font-size: 12.5px; font-weight: 500; background: var(--warn-50); color: var(--warn); border-bottom: 1px solid var(--warn-border); }
.topbar {
  height: var(--topbar-h); position: sticky; top: 0; z-index: 30;
  background: var(--topbar-bg); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 24px;
}
.topbar .menu-btn { display: none; }
.search {
  flex: 1; min-width: 0; max-width: 440px; display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 0 14px; height: 38px; color: var(--muted);
}
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; color: var(--text); font-variant-numeric: tabular-nums; }
.search kbd { font-size: 11px; border: 1px solid var(--border-strong); border-radius: 4px; padding: 0 5px; color: var(--muted); font-family: inherit; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center;
  color: var(--text-2); cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; }
.user-btn:hover { background: var(--surface-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex-shrink: 0; }
.avatar.soft { background: var(--brand-50); color: var(--brand-700); }
.user-meta { text-align: left; line-height: 1.2; }
.user-meta strong { display: block; font-size: 13px; }
.user-meta span { font-size: 12px; color: var(--muted); }

.dropdown { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 50;
}
.dropdown.open .menu { display: block; }
.menu a, .menu button.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 6px; color: var(--text); border: 0; background: none; cursor: pointer; text-align: left; }
.menu a:hover, .menu button.menu-item:hover { background: var(--surface-2); text-decoration: none; }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.menu-head { padding: 8px 10px; font-size: 12px; color: var(--muted); }
.menu form { margin: 0; }

.content { padding: 28px 32px 48px; width: 100%; max-width: 1440px; margin: 0 auto; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.scrim { display: none; }

/* ---------- Components ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head > div:first-child { flex: 1; min-width: 0; }
.card-head h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card-head .sub { font-size: 13px; color: var(--muted); font-weight: 400; }
.card-body { padding: 20px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface);
  font-weight: 500; cursor: pointer; color: var(--text); white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-600); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-50); border-color: var(--bad-border); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn.lg { height: 46px; font-size: 15px; }
.btn.icon { width: 34px; height: 34px; padding: 0; }
.btn.icon.sm { width: 30px; height: 30px; }
.btn.block { width: 100%; }
.btn .ic { width: 16px; height: 16px; }
.linkish { border: 0; background: none; padding: 0; color: var(--link); cursor: pointer; }
.linkish:hover { text-decoration: underline; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; letter-spacing: 0; }
.badge.info { background: var(--brand-50); color: var(--brand-700); border-color: transparent; }
.badge.good { background: var(--good-50); color: var(--good); border-color: transparent; }
.badge.warn { background: var(--warn-50); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-50); color: var(--bad); border-color: transparent; }
.badge.accent { background: var(--accent); color: var(--on-brand); border-color: transparent; }

.input, .select {
  height: 38px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
  padding: 0 12px; outline: none; min-width: 0; width: 100%;
}
.input:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.input[readonly] { background: var(--surface-2); color: var(--text-2); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 500; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.field .hint { font-size: 12px; color: var(--muted); }
.field.wide { grid-column: 1 / -1; }
.field.narrow .input { max-width: 120px; letter-spacing: .15em; }
.field.upper .input { text-transform: uppercase; letter-spacing: .06em; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid > .wide, .form-grid > .check, .form-grid > .attest { grid-column: 1 / -1; }
.pw { position: relative; }
.pw .input { padding-right: 44px; }
.pw button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--brand); flex-shrink: 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--row-hover); }
table.data td.actions { text-align: right; white-space: nowrap; }
table.data tr.is-off td { color: var(--muted); }

.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who strong { display: block; font-weight: 600; }
.who > div > span { display: block; color: var(--muted); font-size: 13px; }
.dir { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.dir .ic { width: 16px; height: 16px; }
.dir.in { background: var(--brand-50); color: var(--link); }
.dir.good { background: var(--good-50); color: var(--good); }
.dir.warn { background: var(--warn-50); color: var(--warn); }
.dir.bad { background: var(--bad-50); color: var(--bad); }

.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty .ic { width: 32px; height: 32px; margin-bottom: 8px; }
.empty p { margin: 4px 0 16px; }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { padding: 18px 20px; color: inherit; }
a.stat:hover { border-color: var(--brand-100); text-decoration: none; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--text-2); font-weight: 500; }
.stat-value { font-size: 30px; font-weight: 650; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-delta { margin-top: 6px; font-size: 13px; color: var(--muted); display: block; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.list > li:last-child { border-bottom: 0; }
.list .meta { margin-left: auto; text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; }

.kv { margin: 0; padding: 4px 20px; }
.kv div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.kv dd { margin: 0; font-weight: 500; text-align: right; }

.flash { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; background: var(--good-50); color: var(--good); border: 1px solid var(--good-border); }
.flash.bad { background: var(--bad-50); color: var(--bad); border-color: var(--bad-border); }
.callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); }
.callout .ic { margin-top: 2px; }
.callout.warn { background: var(--warn-50); color: var(--warn); border-color: var(--warn-border); }
.callout.bad { background: var(--bad-50); color: var(--bad); border-color: var(--bad-border); }

/* ---------- Sign-in and registration ---------- */
body.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: var(--surface); position: relative; }
.hero { position: sticky; top: 0; height: 100vh; background: radial-gradient(1200px 600px at -10% -10%, #2e62d9 0%, transparent 60%), linear-gradient(160deg, #1f4bb5 0%, #143279 100%); color: var(--on-brand); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255,255,255,.05); }
.hero .logo-chip { background: #fff; border-radius: 12px; padding: 10px 16px; display: inline-flex; align-self: flex-start; }
.hero .logo-chip img { height: 44px; display: block; }
.hero h2 { font-size: 34px; line-height: 1.15; letter-spacing: -.02em; max-width: 440px; font-weight: 650; }
.hero p { color: rgba(255,255,255,.8); max-width: 420px; font-size: 15px; margin-top: 12px; }
.features { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.features li { display: flex; gap: 12px; align-items: center; color: rgba(255,255,255,.92); }
.features .ic-wrap { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.12); display: grid; place-items: center; }
.hero small { color: rgba(255,255,255,.6); }
.form-side { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.form-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.form-box.wide { max-width: 600px; }
.form-box h1 { font-size: 26px; }
.form-box h1 + p { margin: -10px 0 4px; color: var(--text-2); }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form .input { height: 44px; }
.login-help { font-size: 13px; text-align: center; color: var(--muted); margin: 8px 0 0; }
.login-notice { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 12px; line-height: 1.5; color: var(--muted); }
.login-notice p { margin: 0 0 8px; }
.login-notice p:last-child { margin-bottom: 0; }
.login-notice span { white-space: nowrap; }
.mobile-logo { display: none; background: var(--logo-bg); border-radius: 8px; width: fit-content; }
.mobile-logo img { height: 44px; display: block; }
.theme-corner { position: absolute; top: 16px; right: 16px; z-index: 5; }
.form-section { border-top: 1px solid var(--border); padding-top: 16px; }
.form-section h2 { font-size: 15px; margin-bottom: 4px; }
.form-section > p { color: var(--muted); font-size: 13px; }

/* Logo sits on a light chip in dark mode */
:root[data-theme="dark"] .sidebar-brand a, :root[data-theme="dark"] .mobile-logo { padding: 4px 8px; }
:root[data-theme="dark"] .sidebar-brand img { height: 32px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sidebar-brand a, :root:not([data-theme="light"]) .mobile-logo { padding: 4px 8px; }
  :root:not([data-theme="light"]) .sidebar-brand img { height: 32px; }
}

/* Theme toggle */
.theme-btn .ic { display: none; }
:root[data-theme-pref="system"] .theme-btn .ti-system,
:root[data-theme-pref="light"] .theme-btn .ti-light,
:root[data-theme-pref="dark"] .theme-btn .ti-dark { display: inline; }
.menu .menu-item[aria-checked="true"] { color: var(--brand-700); background: var(--brand-50); font-weight: 600; }
.menu .menu-item .check { margin-left: auto; visibility: hidden; }
.menu .menu-item[aria-checked="true"] .check { visibility: visible; }
.theme-menu { min-width: 180px; }

/* ---------- Portal ---------- */
.tn { font-weight: 600; white-space: nowrap; }
.code { font-size: 10.5px; font-weight: 600; color: var(--brand-700); background: var(--brand-50); border-radius: 4px; padding: 1px 6px; letter-spacing: .02em; }
.cpni { display: flex; align-items: center; gap: 8px; margin: 32px 0 0; font-size: 12.5px; color: var(--muted); }

/* Number lookup card */
.lookup { display: flex; gap: 10px; flex-wrap: wrap; }
.lookup .input { flex: 1 1 200px; height: 46px; font-size: 18px; font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.lookup .btn { height: 46px; }

/* Port orders grouped by due date */
.due { display: flex; flex-direction: column; line-height: 1.25; }
.due strong { font-weight: 600; }
.due span { font-size: 12.5px; color: var(--muted); }
.due span.soon { color: var(--accent); font-weight: 600; }
table.data tr.group-start td { border-top: 1px solid var(--border-strong); }
table.data td.cont { color: transparent; }

/* Progress steps on the number page */
.steps { list-style: none; margin: 0; padding: 18px 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 500; font-size: 13px; }
.steps li::before {
  content: counter(step); width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 600; font-size: 12px;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--muted);
}
.steps li::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: var(--border); min-width: 12px; }
.steps li:last-child::after { display: none; }
.steps .is-done { color: var(--text-2); }
.steps .is-done::before { content: "✓"; background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.steps .is-done::after { background: var(--brand); }
.steps .is-now { color: var(--brand-700); font-weight: 600; }
.steps .is-now::before { background: var(--brand-50); border-color: var(--brand); color: var(--brand-700); box-shadow: 0 0 0 3px var(--brand-100); }

.grid-csr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 20px; align-items: start; }
.attest { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.attest legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
.cpni-tag { color: var(--accent); font-weight: 600; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }

.order-date { font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.danger-zone { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 16px; }
.danger-zone summary { cursor: pointer; color: var(--bad); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.danger-zone[open] summary { margin-bottom: 12px; }
.inline-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.inline-form .field { flex: 0 1 220px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-csr { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: var(--scrim); z-index: 35; }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; gap: 8px; }
  .topbar .menu-btn { display: grid; }
  .user-meta, .search kbd { display: none; }
  .content { padding: 20px 16px 40px; }
  .form-grid { grid-template-columns: 1fr; }
  body.login-page { grid-template-columns: 1fr; }
  .hero { display: none; }
  .mobile-logo { display: block; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 14px; }
  .steps li:nth-child(2)::after { display: none; }
}
@media (max-width: 600px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 24px; }
  .page-head h1 { font-size: 21px; }
  .hide-sm { display: none !important; }
  table.data td, table.data th { padding: 10px 12px; }
  .search { padding: 0 10px; }
  .kv div { flex-direction: column; gap: 2px; }
  .kv dd { text-align: left; }
}
