/* ── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  --navy:          #0f1340;
  --navy-mid:      #1a1f5e;
  --navy-light:    #252a7a;
  --teal:          #00bcd4;
  --teal-dark:     #0097a7;
  --green:         #2e7d32;
  --bg:            #f4f5f9;
  --surface:       #ffffff;
  --border:        #e2e4ed;
  --border-strong: #c5cae9;
  --text:          #1a1c2e;
  --text-mid:      #374151;
  --text-muted:    #6b7280;
  --text-faint:    #9ca3af;
  --radius-sm:     4px;
  --radius:        6px;
  --radius-lg:     10px;
  --shadow-sm:     0 1px 2px rgba(15,19,64,.06);
  --shadow:        0 1px 4px rgba(15,19,64,.08), 0 4px 16px rgba(15,19,64,.04);
  --shadow-lg:     0 4px 24px rgba(15,19,64,.12);
  --font-body:     'Barlow', system-ui, sans-serif;
  --font-cond:     'Barlow Condensed', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', monospace;
  --nav-h:         56px;
  --banner-h:      28px;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-bottom: var(--banner-h);
}
a { color: var(--navy-mid); }
button { font-family: var(--font-body); }

/* ── Classification Banners ────────────────────────────────────────────────── */
.banner {
  background: var(--green);
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2.5px;
  padding: 5px 0;
  height: var(--banner-h);
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 300;
  user-select: none;
}
.banner--bottom {
  position: fixed;
  bottom: 0; left: 0; right: 0; top: auto;
}

@media print {
  .banner, .topnav { display: none !important; }
}

/* ── Top Navigation ────────────────────────────────────────────────────────── */
.topnav {
  background: var(--navy);
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: var(--nav-h);
  position: sticky;
  top: var(--banner-h);
  z-index: 200;
  border-bottom: 1px solid rgba(255,255,255,.06);
  gap: 0;
}
.topnav__brand {
  display: flex; align-items: center; gap: 10px;
  margin-right: 32px; text-decoration: none; color: #fff;
  padding: 0; background: none; border: none; cursor: pointer;
  flex-shrink: 0;
}
.topnav__logo {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  border: 1px solid rgba(255,255,255,.15);
}
.topnav__wordmark {
  font-family: var(--font-cond);
  font-size: 22px; font-weight: 700; letter-spacing: 1.5px; color: #fff;
}
.topnav__nav { display: flex; align-items: stretch; gap: 0; height: 100%; }
.topnav__link {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  padding: 0 14px;
  border: none; background: none; cursor: pointer;
  display: flex; align-items: center;
  border-bottom: 3px solid transparent;
  transition: color .12s, border-color .12s, background .12s;
  white-space: nowrap;
}
.topnav__link:hover { color: #fff; background: rgba(255,255,255,.06); }
.topnav__link--active { color: #fff; border-bottom-color: var(--teal); }
.topnav__right {
  margin-left: auto; display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: rgba(255,255,255,.6);
}
.topnav__right a,
.topnav__right button {
  color: rgba(255,255,255,.6); background: none; border: none;
  cursor: pointer; font-size: 13px; text-decoration: none;
  transition: color .12s;
}
.topnav__right a:hover,
.topnav__right button:hover { color: #fff; }
.topnav__badge {
  background: rgba(0,188,212,.15); color: var(--teal);
  border: 1px solid rgba(0,188,212,.3);
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
}
.topnav__divider { color: rgba(255,255,255,.2); }
.topnav__group {
  display: flex; align-items: stretch; height: 100%;
  border-left: 1px solid rgba(255,255,255,.1);
  margin-left: 4px; padding-left: 4px;
}
.topnav__group-label {
  display: flex; align-items: center;
  font-size: 11px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: rgba(255,255,255,.3);
  padding: 0 8px 0 6px; white-space: nowrap;
}
.topnav__group-links { display: flex; align-items: stretch; gap: 0; }

/* ── Page Containers ───────────────────────────────────────────────────────── */
.page        { max-width: 1120px; margin: 0 auto; padding: 28px 24px; }
.page--kiosk { max-width: 640px;  margin: 0 auto; padding: 32px 20px; }
.page-fade   { animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:translateY(0); } }

/* ── Page Header ───────────────────────────────────────────────────────────── */
.page-header { display:flex; align-items:flex-end; gap:16px; margin-bottom:28px; }
.page-header__main { flex:1; min-width:0; }
.page-header__eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 3px;
}
.page-header h1 { font-family:var(--font-cond); font-size:26px; font-weight:700; color:var(--navy); line-height:1.1; }
.page-header__sub { font-size:14px; color:var(--text-muted); margin-top:4px; }
.page-header__actions { display:flex; gap:10px; align-items:center; flex-shrink:0; }

/* ── Breadcrumb ────────────────────────────────────────────────────────────── */
.breadcrumb { font-size:13px; color:var(--text-muted); margin-bottom:6px; }
.breadcrumb a { color:var(--navy-mid); text-decoration:none; }
.breadcrumb a:hover { text-decoration:underline; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-sm); margin-bottom:16px; }
.card:last-child { margin-bottom: 0; }
.card__header {
  padding:14px 20px; border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
}
.card__title { font-size:11px; font-weight:700; color:var(--text-muted); letter-spacing:.5px; text-transform:uppercase; }
.card__body  { padding:20px; }
.card__footer { padding:14px 20px; border-top:1px solid var(--border); display:flex; gap:10px; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:8px 18px; border-radius:var(--radius-sm);
  font-family:var(--font-body); font-size:14px; font-weight:600;
  cursor:pointer; text-decoration:none; border:none;
  transition:background .12s, box-shadow .12s, transform .08s;
  white-space:nowrap; line-height:1.4;
}
.btn:active:not(:disabled) { transform:translateY(1px); }
.btn--primary   { background:var(--navy-mid); color:#fff; }
.btn--primary:hover:not(:disabled) { background:var(--navy-light); box-shadow:0 2px 8px rgba(26,31,94,.3); }
.btn--secondary { background:var(--surface); color:var(--navy-mid); border:1px solid var(--border-strong); }
.btn--secondary:hover:not(:disabled) { background:#f0f1f8; }
.btn--danger    { background:var(--surface); color:#c62828; border:1px solid #ef9a9a; }
.btn--danger:hover:not(:disabled) { background:#fce4ec; }
.btn--sm  { padding:5px 12px; font-size:13px; }
.btn--lg  { padding:13px 28px; font-size:16px; }
.btn--full{ width:100%; }
.btn:disabled { opacity:.4; cursor:not-allowed; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-stack { display:flex; flex-direction:column; gap:18px; }
.form-grid  { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-group { display:flex; flex-direction:column; gap:5px; }
.form-label { font-size:13px; font-weight:600; color:var(--text-mid); }
.req        { color:#c62828; margin-left:2px; }
.form-input {
  padding:9px 12px; border:1px solid var(--border-strong); border-radius:var(--radius-sm);
  font-family:var(--font-body); font-size:14px; color:var(--text);
  background:var(--surface); outline:none;
  transition:border-color .15s, box-shadow .15s;
  width:100%;
}
.form-input:focus { border-color:var(--navy-mid); box-shadow:0 0 0 3px rgba(26,31,94,.11); }
select.form-input { appearance:auto; }
.form-input--mono { font-family:var(--font-mono); font-size:26px; letter-spacing:12px; text-align:center; }
.form-input--lg   { padding:13px 14px; font-size:16px; }
.form-hint { font-size:12px; color:var(--text-faint); }

/* ── Error list ────────────────────────────────────────────────────────────── */
.error-list { background:#fce4ec; border:1px solid #ef9a9a; border-radius:var(--radius-sm); padding:12px 16px; margin-bottom:20px; }
.error-list li { color:#c62828; font-size:13px; margin-left:16px; }

/* ── Tables ────────────────────────────────────────────────────────────────── */
.table-wrap   { overflow-x:auto; }
.data-table   { width:100%; border-collapse:collapse; font-size:14px; }
.data-table th {
  background:#f8f9fb; text-align:left; padding:10px 16px;
  font-size:11px; font-weight:700; color:var(--text-muted);
  letter-spacing:.5px; text-transform:uppercase;
  border-bottom:1px solid var(--border); white-space:nowrap;
}
.data-table td {
  padding:12px 16px; border-bottom:1px solid #f3f4f7;
  color:var(--text-mid); vertical-align:middle;
}
.data-table tbody tr:hover td { background:#f8f9fb; }
.data-table tbody tr:last-child td { border-bottom:none; }

/* ── Badges ────────────────────────────────────────────────────────────────── */
.badge {
  display:inline-flex; align-items:center; padding:3px 9px;
  border-radius:20px; font-size:11px; font-weight:700;
  letter-spacing:.3px; white-space:nowrap; text-transform:uppercase;
}
.s-checked-out      { background:#e3f2fd; color:#0277bd; }
.s-awaiting-extract { background:#fff3e0; color:#e65100; }
.s-extracting       { background:#fff8e1; color:#f57f17; }
.s-awaiting-burn    { background:#fce4ec; color:#c62828; }
.s-burning          { background:#e8e9f5; color:#1a1f5e; }
.s-ready            { background:#e8f5e9; color:#2e7d32; }
.r-admin  { background:#fce4ec; color:#c62828; }
.r-tu     { background:#e8e9f5; color:#1a1f5e; }
.r-su     { background:#e3f2fd; color:#0277bd; }
.r-viewer { background:#f5f5f5; color:#616161; }

/* ── Alerts ────────────────────────────────────────────────────────────────── */
.alert { padding:12px 16px; border-radius:var(--radius-sm); font-size:14px; margin-bottom:20px; }
.alert--success { background:#e8f5e9; border:1px solid #a5d6a7; color:#2e7d32; }
.alert--error   { background:#fce4ec; border:1px solid #ef9a9a; color:#c62828; }
.alert--info    { background:#e0f7fa; border:1px solid #80deea; color:#00838f; }

/* ── Auth ──────────────────────────────────────────────────────────────────── */
.auth-shell {
  display:flex; align-items:center; justify-content:center;
  min-height:calc(100vh - var(--banner-h) * 2 - var(--nav-h));
  padding:40px 24px;
}
.auth-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:44px 40px;
  width:100%; max-width:420px; box-shadow:var(--shadow-lg);
}
.auth-card--info { border-color: var(--navy-mid); }
.auth-logo { text-align:center; margin-bottom:28px; }
.auth-logo img { height:90px; }
.auth-logo__name { font-family:var(--font-cond); font-size:28px; font-weight:700; color:var(--navy); letter-spacing:1.5px; margin-top:6px; }
.auth-logo__sub  { font-size:12px; color:var(--text-muted); margin-top:3px; letter-spacing:.4px; }
.auth-divider { display:flex; align-items:center; gap:12px; margin:20px 0; color:var(--text-faint); font-size:12px; }
.auth-divider::before, .auth-divider::after { content:''; flex:1; border-top:1px solid var(--border); }
.auth-help { font-size:13px; color:var(--text-muted); text-align:center; margin-top:20px; }
.auth-help a { color:var(--navy-mid); }

/* ── Stats Strip ───────────────────────────────────────────────────────────── */
.stats-strip { display:grid; grid-template-columns:repeat(6,1fr); gap:10px; margin-bottom:24px; }
.stat-card {
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:16px 12px; text-align:center; box-shadow:var(--shadow-sm);
}
.stat-count { font-family:var(--font-cond); font-size:32px; font-weight:700; line-height:1; margin-bottom:5px; }
.stat-label { font-size:11px; font-weight:600; color:var(--text-muted); letter-spacing:.3px; text-transform:uppercase; line-height:1.3; }

/* ── Detail Grid ───────────────────────────────────────────────────────────── */
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:16px; }
.detail-list { display:grid; grid-template-columns:140px 1fr; }
.detail-list dt {
  font-size:11px; font-weight:700; color:var(--text-muted); text-transform:uppercase;
  letter-spacing:.4px; padding:11px 0; border-bottom:1px solid #f3f4f7; display:flex; align-items:center;
}
.detail-list dd {
  font-size:14px; color:var(--text-mid); padding:11px 0;
  border-bottom:1px solid #f3f4f7; display:flex; align-items:center; flex-wrap:wrap; gap:6px;
}
.detail-list dt:last-of-type, .detail-list dd:last-of-type { border-bottom:none; }

/* ── Action links ──────────────────────────────────────────────────────────── */
.action-link { color:var(--navy-mid); font-size:13px; font-weight:600; cursor:pointer; background:none; border:none; font-family:inherit; padding:0; text-decoration:none; }
.action-link:hover { text-decoration:underline; }
.action-link--danger { color:#c62828; }

/* ── Kiosk ─────────────────────────────────────────────────────────────────── */
.kiosk-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); overflow:hidden; }
.kiosk-header { background:var(--navy); padding:26px 28px; color:#fff; }
.kiosk-header--dropoff { background:linear-gradient(135deg, #0f1340 0%, #1a1f5e 100%); }
.kiosk-header--pickup  { background:linear-gradient(135deg, #00251a 0%, #00695c 100%); }
.kiosk-header__step { font-size:11px; font-weight:700; letter-spacing:1.5px; text-transform:uppercase; color:var(--teal); margin-bottom:6px; }
.kiosk-title    { font-family:var(--font-cond); font-size:30px; font-weight:700; letter-spacing:.5px; }
.kiosk-subtitle { font-size:15px; color:rgba(255,255,255,.75); margin-top:4px; }
.kiosk-body     { padding:28px; }
.kiosk-footer   { padding:16px 28px; border-top:1px solid var(--border); background:#f8f9fb; display:flex; justify-content:space-between; align-items:center; }

/* Kiosk Steps */
.kiosk-steps { display:flex; margin-bottom:20px; }
.kiosk-step  { flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; position:relative; }
.kiosk-step:not(:last-child)::after {
  content:''; position:absolute; top:13px; left:55%; right:-45%;
  height:2px; background:var(--border); z-index:0;
}
.kiosk-step__dot {
  width:28px; height:28px; border-radius:50%; border:2px solid var(--border);
  background:var(--surface); display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:700; color:var(--text-muted); z-index:1; position:relative;
  font-family:var(--font-cond);
}
.kiosk-step--done .kiosk-step__dot   { background:var(--teal);     border-color:var(--teal);     color:#fff; }
.kiosk-step--active .kiosk-step__dot { background:var(--navy-mid); border-color:var(--navy-mid); color:#fff; }
.kiosk-step__label { font-size:10px; font-weight:700; color:var(--text-faint); text-transform:uppercase; letter-spacing:.5px; text-align:center; }
.kiosk-step--active .kiosk-step__label { color:var(--navy-mid); }
.kiosk-step--done .kiosk-step__label   { color:var(--teal-dark); }

/* Review rows */
.review-row { display:flex; align-items:center; padding:12px 0; border-bottom:1px solid var(--border); gap:16px; }
.review-row:last-child { border-bottom:none; }
.review-label { font-size:11px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.4px; width:120px; flex-shrink:0; }
.review-value { font-size:14px; font-weight:500; color:var(--text); }

/* Kiosk success */
.kiosk-success { text-align:center; padding:44px 28px; }
.kiosk-success__icon {
  width:68px; height:68px; border-radius:50%;
  background:#e8f5e9; border:2px solid #a5d6a7; color:#2e7d32; font-size:32px;
  display:flex; align-items:center; justify-content:center;
  margin:0 auto 18px;
}
.kiosk-success__title { font-family:var(--font-cond); font-size:28px; font-weight:700; color:var(--navy); margin-bottom:6px; }
.kiosk-success__sub   { font-size:15px; color:var(--text-muted); margin-bottom:28px; }

/* Kiosk search suggestions */
.suggestions-wrap { position:relative; }
.suggestions-list {
  position:absolute; top:100%; left:0; right:0;
  background:var(--surface); border:1px solid var(--border-strong);
  border-top:none; border-radius:0 0 var(--radius) var(--radius);
  box-shadow:0 8px 24px rgba(15,19,64,.12); z-index:50;
  max-height:240px; overflow-y:auto;
}
.suggestion-item { padding:12px 16px; cursor:pointer; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid #f3f4f7; }
.suggestion-item:hover, .suggestion-item.active { background:#eef0fa; }
.suggestion-item:last-child { border-bottom:none; }
.suggestion-item__num  { font-weight:700; font-family:var(--font-mono); font-size:16px; color:var(--navy); }
.suggestion-item__meta { font-size:12px; color:var(--text-muted); }

/* ── Drive rows (media set form) ───────────────────────────────────────────── */
.drive-row { display:grid; grid-template-columns:160px 1fr 1fr auto; gap:8px; align-items:center; padding:8px 0; border-bottom:1px solid #f3f4f7; }
.drive-row:last-child { border-bottom:none; }
.btn-icon  { background:none; border:none; cursor:pointer; color:#c62828; font-size:20px; padding:4px 8px; line-height:1; border-radius:var(--radius-sm); }
.btn-icon:hover { background:#fce4ec; }

/* ── SF-153 notice ─────────────────────────────────────────────────────────── */
.sf153-notice { background:#f0f4ff; border:1px solid #c5cae9; border-radius:var(--radius); padding:14px 18px; margin-bottom:24px; font-size:14px; color:var(--navy-mid); }

/* ── Status transition form ────────────────────────────────────────────────── */
.transition-form { display:flex; flex-direction:column; gap:14px; margin-top:18px; padding-top:18px; border-top:1px solid var(--border); }

/* ── Provisioning contact ──────────────────────────────────────────────────── */
.provisioning-contact { background:#f8f9fb; border:1px solid var(--border); border-radius:var(--radius); padding:16px; margin:20px 0; }
.provisioning-contact__label { font-size:11px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:1px; margin-bottom:4px; }

/* ── Org badge ─────────────────────────────────────────────────────────────── */
.org-badge { display:inline-block; background:#f0f1f8; color:var(--navy-mid); padding:2px 8px; border-radius:4px; font-family:var(--font-mono); font-size:12px; font-weight:600; }

/* ── Empty state ───────────────────────────────────────────────────────────── */
.empty-state { text-align:center; padding:48px 24px; color:var(--text-muted); }
.empty-state h3 { font-size:16px; font-weight:600; color:var(--text-mid); margin-bottom:6px; }
.empty-state p  { font-size:14px; }

/* ── Error pages ───────────────────────────────────────────────────────────── */
.error-shell { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:calc(100vh - var(--banner-h)*2 - var(--nav-h)); text-align:center; padding:40px 24px; }
.error-code  { font-family:var(--font-cond); font-size:96px; font-weight:700; color:var(--navy); line-height:1; }
.error-title { font-family:var(--font-cond); font-size:28px; font-weight:700; color:var(--navy-mid); margin:8px 0 12px; }
.error-desc  { font-size:15px; color:var(--text-muted); margin-bottom:28px; max-width:400px; }

/* ── Misc helpers ──────────────────────────────────────────────────────────── */
.mono       { font-family:var(--font-mono); font-size:13px; }
.text-muted { color:var(--text-muted); }
.text-sm    { font-size:13px; }
.text-xs    { font-size:11px; }
.fw-bold    { font-weight:700; }
.fw-600     { font-weight:600; }
.link       { color:var(--navy-mid); cursor:pointer; background:none; border:none; font-family:inherit; font-size:inherit; padding:0; text-decoration:underline; }
.row-inactive td { opacity:.5; }
