/* ============================================================
   DELEQATE — Quiet Luxury Design System
   Designer spec: DESIGN.md (June 2026)
   Palette: Warm Ivory · Metallic Gold · Off-Black
   Type: Playfair Display (headlines) · Inter (body/UI)
   ============================================================ */

:root {
  /* ── Core Surface Palette ── */
  --surface:           #fcf9f8;
  --surface-low:       #f6f3f2;
  --surface-mid:       #f0eded;
  --surface-high:      #eae7e7;
  --surface-highest:   #e5e2e1;
  --surface-white:     #ffffff;
  --warm-ivory:        #FAF9F6;
  --champagne:         #F2F2F2;
  --soft-sand:         #E5E1DA;

  /* ── Text ── */
  --text-primary:      #1b1c1c;
  --text-secondary:    #4d4635;
  --text-muted:        #7f7663;
  --text-dim:          #9e9b94;

  /* ── Gold System ── */
  --gold:              #C5A028;    /* metallic gold — main accent */
  --gold-dark:         #735c00;    /* dark gold — primary text/links */
  --gold-bright:       #e9c349;    /* hover / inverse primary */
  --gold-container:    #d4af37;    /* primary container */
  --gold-pale:         #ffe088;    /* primary-fixed — very light gold bg */

  /* ── Borders ── */
  --border:            #CCCCCC;
  --border-subtle:     #d0c5af;
  --border-soft:       #E5E1DA;

  /* ── Semantic ── */
  --success:           #2D7A4F;
  --danger:            #ba1a1a;
  --warning:           #92400E;
  --info:              #1e40af;

  /* ── Legacy aliases (keeps existing HTML classes working) ── */
  --navy:              #1b1c1c;
  --navy-dark:         #111111;
  --navy-light:        #2e2e2e;
  --cream:             #fcf9f8;
  --white:             #ffffff;
  --gray-50:           #fafafa;
  --gray-100:          #f6f3f2;
  --gray-200:          #e5e2e1;
  --gray-300:          #d0c5af;
  --gray-400:          #9e9b94;
  --gray-500:          #7f7663;
  --gray-600:          #4d4635;
  --gray-700:          #2e2b25;
  --gray-800:          #1b1c1c;

  /* ── Typography ── */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif:   'Playfair Display', Georgia, serif;

  /* ── Elevation (near-invisible) ── */
  --shadow-sm:  0 1px 4px rgba(34,34,34,0.04);
  --shadow:     0 4px 20px rgba(34,34,34,0.06);
  --shadow-lg:  0 8px 32px rgba(34,34,34,0.08);
  --shadow-xl:  0 16px 48px rgba(34,34,34,0.10);

  /* ── Radius (Soft Architectural) ── */
  --radius-xs:  2px;
  --radius:     4px;
  --radius-md:  6px;
  --radius-lg:  8px;
  --radius-xl:  12px;
  --radius-pill:9999px;

  /* ── Spacing ── */
  --section-gap: 120px;
  --gutter:       24px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--surface);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-dark); text-decoration: none; }
a:hover { color: var(--gold); }

/* ── TYPOGRAPHY ── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
}
h1 { font-size: 3rem; }
h2 { font-size: 2rem; letter-spacing: -0.015em; }
h3 { font-size: 1.5rem; letter-spacing: -0.01em; }
h4 { font-size: 1.0625rem; }
p  { color: var(--text-secondary); line-height: 1.7; }
small { font-size: 0.8125rem; }

.label-caps {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── NAVBAR ── */
.navbar {
  background: rgba(252, 249, 248, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  padding: 0 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}
.navbar-brand span { color: var(--gold); }
.navbar-nav { display: flex; align-items: center; gap: 2rem; }
.navbar-nav a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}
.navbar-nav a:hover { color: var(--text-primary); }
.navbar-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.2s;
}
.navbar-nav a:hover::after { transform: scaleX(1); }

.navbar-nav .btn-nav {
  background: var(--gold);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background 0.2s, transform 0.15s;
  border: none;
}
.navbar-nav .btn-nav:hover {
  background: var(--gold-dark);
  color: #fff;
  transform: translateY(-1px);
}
.navbar-nav .btn-nav::after { display: none; }
.navbar-nav .btn-nav-pilot {
  background: transparent;
  color: var(--navy);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 2px solid var(--navy);
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.navbar-nav .btn-nav-pilot:hover {
  background: var(--navy);
  color: #fff;
  transform: translateY(-1px);
}
.navbar-nav .btn-nav-pilot::after { display: none; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Primary — gold fill */
.btn-primary { background: var(--gold); color: #ffffff; }
.btn-primary:hover:not(:disabled) {
  background: var(--gold-dark);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(197,160,40,0.25);
}
/* Gold alias */
.btn-gold { background: var(--gold); color: #1b1c1c; }
.btn-gold:hover:not(:disabled) { background: var(--gold-dark); color: #fff; transform: translateY(-1px); }

/* Outline — 1px gold border */
.btn-outline {
  background: transparent;
  color: var(--gold-dark);
  border: 1px solid var(--gold);
}
.btn-outline:hover:not(:disabled) { background: var(--gold-pale); color: var(--gold-dark); }

.btn-outline-gold {
  background: transparent;
  color: var(--gold-dark);
  border: 1px solid var(--gold);
}
.btn-outline-gold:hover:not(:disabled) { background: var(--gold); color: #fff; }

.btn-danger  { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.75rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 0.9375rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 50%; }

/* ── CARDS ── */
.card {
  background: var(--surface-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-body { padding: 1.5rem; }
.card-header {
  background: var(--surface-low);
  color: var(--text-primary);
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--font-sans);
}
.card-header.gold { background: var(--gold); color: #fff; }

/* ── FORMS ── */
.form-group { margin-bottom: 1.375rem; }
.form-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 0.625rem 0;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: transparent;
  transition: border-color 0.2s;
  font-family: var(--font-sans);
}
.form-control:focus { outline: none; border-color: var(--gold); }
.form-control::placeholder { color: var(--text-dim); }
textarea.form-control { min-height: 100px; resize: vertical; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.625rem 0.875rem; }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237f7663' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
  padding-left: 0.625rem;
}
.form-hint { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.35rem; }
.form-error { font-size: 0.8125rem; color: var(--danger); margin-top: 0.35rem; }

/* ── UPLOAD ZONE ── */
.upload-zone {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--surface-low);
  position: relative;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--gold);
  background: var(--gold-pale);
}
.upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-zone-icon { font-size: 2rem; margin-bottom: 0.5rem; color: var(--text-muted); }
.upload-zone-text { font-weight: 600; color: var(--text-primary); font-size: 0.9rem; }
.upload-zone-hint { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.25rem; }
.upload-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.upload-preview-item { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; background: var(--surface-high); }
.upload-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview-item .remove-btn { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.55); color: white; border: none; border-radius: 50%; width: 22px; height: 22px; font-size: 0.75rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* ── CHIP SELECTORS ── */
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.5rem; }
.option-card { position: relative; }
.option-card input[type="radio"], .option-card input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.option-card-label {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.625rem 0.875rem;
  cursor: pointer;
  text-align: center;
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: all 0.15s;
  user-select: none;
  background: var(--surface-white);
}
.option-card input:checked + .option-card-label {
  border-color: var(--gold);
  background: var(--gold-pale);
  color: var(--gold-dark);
}
.option-card-label:hover { border-color: var(--gold); color: var(--gold-dark); }

/* chip-suggest-btn (carousel quick-pick) */
.chip-suggest-btn {
  background: var(--surface-high);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.chip-suggest-btn:hover { border-color: var(--gold); color: var(--gold-dark); background: var(--gold-pale); }

/* ── BADGE / STATUS PILLS ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.badge-pending   { background: #fef3c7; color: #92400e; }
.badge-assigned  { background: #dbeafe; color: #1e40af; }
.badge-in_progress { background: #ede9fe; color: #4c1d95; }
.badge-under_review{ background: #ffedd5; color: #7c2d12; }
.badge-submitted { background: #ffedd5; color: #7c2d12; }
.badge-delivered { background: #d1fae5; color: #065f46; }
.badge-approved  { background: #d1fae5; color: #065f46; }
.badge-rejected  { background: #fee2e2; color: #991b1b; }
.badge-revision  { background: #fee2e2; color: #991b1b; }
.badge-pass      { background: #d1fae5; color: #065f46; }
.badge-fail      { background: #fee2e2; color: #991b1b; }

/* ── STEP INDICATOR ── */
.steps-bar { display: flex; align-items: center; margin-bottom: 2rem; }
.step-item { display: flex; align-items: center; flex: 1; }
.step-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.8125rem;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--surface-white);
  flex-shrink: 0;
  transition: all 0.3s;
}
.step-item.active .step-circle { border-color: var(--gold); color: var(--gold-dark); background: var(--gold-pale); }
.step-item.done .step-circle { border-color: var(--success); background: var(--success); color: #fff; }
.step-label { margin-left: 0.5rem; font-size: 0.75rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0.03em; }
.step-item.active .step-label { color: var(--text-primary); }
.step-item.done .step-label { color: var(--success); }
.step-line { flex: 1; height: 1px; background: var(--border-soft); margin: 0 0.5rem; }
.step-item.done + .step-item .step-line { background: var(--success); }

/* ── LAYOUT ── */
.container    { max-width: 1200px; margin: 0 auto; padding: 0 64px; }
.container-sm { max-width: 640px; margin: 0 auto; padding: 0 var(--gutter); }
.container-md { max-width: 860px; margin: 0 auto; padding: 0 var(--gutter); }
.page-body    { padding: 3rem 0; }
.section      { padding: var(--section-gap) 0; }
.section-sm   { padding: 3rem 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { display: flex; align-items: center; gap: 1rem; }
.gap-sm { gap: 0.5rem; } .gap-md { gap: 1rem; } .gap-lg { gap: 1.5rem; }
.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}.mt-4{margin-top:2rem}
.mb-1{margin-bottom:.5rem}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.5rem}.mb-4{margin-bottom:2rem}
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-gold   { color: var(--gold); }
.text-navy   { color: var(--text-primary); }
.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: 0.875rem; }
.fw-bold     { font-weight: 700; }
.fw-semibold { font-weight: 600; }

/* ── ALERT / TOAST ── */
.alert {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  margin-bottom: 1rem;
}
.alert-success { background: #f0fdf4; border-color: var(--success); color: #065f46; }
.alert-danger  { background: #fff5f5; border-color: var(--danger); color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: var(--warning); color: #92400e; }
.alert-info    { background: #eff6ff; border-color: var(--info); color: #1e40af; }

.toast-container {
  position: fixed; top: 76px; right: 1.5rem;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 0.5rem;
  max-width: 360px;
}
.toast {
  background: var(--surface-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.25rem;
  display: flex; align-items: flex-start; gap: 0.75rem;
  border-left: 3px solid var(--text-primary);
  animation: slideIn 0.25s ease;
}
.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(120%); } }

/* ── PRICING CARD ── */
.pricing-display {
  background: var(--surface-low);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  margin-top: 1.5rem;
}
.price-amount { font-family: var(--font-display); font-size: 2.5rem; font-weight: 600; color: var(--gold-dark); line-height: 1; }
.price-breakdown { font-size: 0.875rem; color: var(--text-muted); margin-top: 0.5rem; }
.price-sla { font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }

/* ── PILOT EXECUTION PANEL ── */
.exec-layout { display: grid; grid-template-columns: 380px 1fr; gap: 1.5rem; min-height: calc(100vh - 64px); }
.exec-sidebar { background: var(--surface-white); border-right: 1px solid var(--border-soft); padding: 1.5rem; overflow-y: auto; }
.exec-main { padding: 1.5rem; overflow-y: auto; }
.file-viewer { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-soft); margin-bottom: 1rem; background: var(--surface-low); }
.file-viewer img { width: 100%; height: 220px; object-fit: contain; background: var(--surface-low); }
.file-viewer-label { padding: 0.5rem 0.875rem; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); background: var(--surface-high); border-top: 1px solid var(--border-soft); }

.pov-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.pov-tab {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 0.8125rem;
  cursor: pointer;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface-white);
  transition: all 0.2s;
}
.pov-tab.active { border-color: var(--gold); background: var(--gold-pale); color: var(--gold-dark); }
.pov-tab.done { border-color: var(--success); color: var(--success); }
.pov-tab.done.active { background: var(--success); color: #fff; }

.spatial-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; }
.spatial-item label { font-size: 0.6875rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; display: block; margin-bottom: 0.3rem; }
.spatial-item select { font-size: 0.875rem; padding: 0.5rem 0.75rem; }

.prompt-box {
  background: #1b1c1c;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.8125rem;
  color: #e5e2e1;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow-y: auto;
  position: relative;
  margin-bottom: 0.75rem;
}
.copy-btn-wrap { text-align: right; margin-bottom: 1rem; }

.qc-checklist { display: flex; flex-direction: column; gap: 0.625rem; }
.qc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface-white);
}
.qc-item.pass { border-color: var(--success); background: #f0fdf4; }
.qc-item.fail { border-color: var(--danger); background: #fff5f5; }
.qc-question { font-size: 0.875rem; font-weight: 500; color: var(--text-primary); flex: 1; padding-right: 1rem; }
.qc-buttons { display: flex; gap: 0.5rem; }
.qc-btn {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.qc-btn.yes { border-color: var(--success); color: var(--success); background: transparent; }
.qc-btn.yes.selected { background: var(--success); color: #fff; }
.qc-btn.no { border-color: var(--danger); color: var(--danger); background: transparent; }
.qc-btn.no.selected { background: var(--danger); color: #fff; }

/* ── RENDER UPLOAD ZONE ── */
.render-upload-zone { border: 1px dashed var(--border); border-radius: var(--radius-lg); padding: 2rem; text-align: center; position: relative; transition: all 0.2s; background: var(--surface-low); }
.render-upload-zone:hover { border-color: var(--gold); }
.render-upload-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.render-preview-wrap { margin-top: 1rem; }
.render-preview-wrap img { border-radius: var(--radius); max-height: 240px; object-fit: contain; margin: 0 auto; border: 1px solid var(--border-soft); }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--border-soft); }
table { width: 100%; border-collapse: collapse; background: var(--surface-white); }
thead tr { background: var(--surface-low); }
thead th { padding: 0.75rem 1rem; text-align: left; font-size: 0.6875rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; white-space: nowrap; border-bottom: 1px solid var(--border-soft); }
tbody tr { border-bottom: 1px solid var(--surface-high); transition: background 0.15s; }
tbody tr:hover { background: var(--surface-low); }
tbody td { padding: 0.875rem 1rem; font-size: 0.875rem; color: var(--text-secondary); }
tbody tr:last-child { border-bottom: none; }

/* ── STAT CARD ── */
.stat-card { background: var(--surface-white); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 1rem; }
.stat-icon { width: 48px; height: 48px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.stat-icon.navy   { background: var(--surface-high); }
.stat-icon.gold   { background: var(--gold-pale); }
.stat-icon.success{ background: #d1fae5; }
.stat-value { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }

/* ── HERO ── */
.hero {
  background: var(--surface);
  padding: 3.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}
/* Subtle warm texture */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -5%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197,160,40,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold-pale);
  border: 1px solid var(--border-subtle);
  color: var(--gold-dark);
  padding: 0.3rem 0.875rem;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.75rem;
}

.hero h1 {
  color: var(--text-primary);
  font-size: 3.5rem;
  line-height: 1.12;
  margin-bottom: 1.25rem;
  letter-spacing: -0.025em;
}
.hero h1 span { color: var(--gold); }
.hero p { color: var(--text-secondary); font-size: 1rem; max-width: 460px; margin-bottom: 2rem; line-height: 1.75; }
.hero-actions { display: flex; gap: 0.875rem; flex-wrap: wrap; align-items: center; }
.hero-trust {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1.25rem;
}
.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.775rem;
  white-space: nowrap;
}
.hero-trust-item strong { color: var(--text-primary); font-weight: 500; }

/* ── HERO FLOATING CARD ── */
.hero-card {
  background: var(--surface-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 1.5rem;
  width: 320px;
  position: relative;
}
.hero-card-overline {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.hero-card-id   { font-size: 0.9375rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.15rem; }
.hero-card-sku  { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem; }

.hero-card-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.status-dot-row { display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: var(--success); font-weight: 600; }
.status-dot-row::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--success); display: block; animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1}50%{opacity:.35} }
.in-progress-chip { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: var(--gold-pale); color: var(--gold-dark); border: 1px solid var(--border-subtle); padding: 0.2rem 0.5rem; border-radius: var(--radius-pill); }

.sla-label { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.3rem; }
.sla-bar-track { height: 3px; background: var(--surface-high); border-radius: 2px; overflow: hidden; margin-bottom: 0.25rem; }
.sla-bar-fill  { height: 100%; border-radius: 2px; background: var(--gold); }
.sla-time { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 1rem; }

.hero-card-pilot {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}
.pilot-av { width: 28px; height: 28px; border-radius: 50%; background: var(--soft-sand); display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; color: var(--gold-dark); flex-shrink: 0; }
.pilot-meta { font-size: 0.75rem; }
.pilot-meta .name { font-weight: 600; color: var(--text-primary); }
.pilot-meta .rating { color: var(--gold); font-size: 0.7rem; }

.hero-badge-float {
  position: absolute;
  background: var(--surface-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow);
  white-space: nowrap;
  animation: badge-float 4s ease-in-out infinite;
}
.hero-badge-float.top   { top: -16px; right: -16px; }
.hero-badge-float.bottom { bottom: -16px; left: -24px; color: var(--gold-dark); }
@keyframes badge-float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-5px)} }

/* ── SKU CARDS ── */
.sku-card {
  background: var(--surface-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
  transition: all 0.25s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.sku-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.sku-card::after {
  content: '→';
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  font-size: 1rem;
  color: var(--border);
  transition: color 0.2s, transform 0.2s;
}
.sku-card:hover::after { color: var(--gold); transform: translateX(3px); }

.sku-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface-low);
  border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
  transition: background 0.2s;
}
.sku-card:hover .sku-icon { background: var(--gold-pale); border-color: var(--border-subtle); }
.sku-card h4 { font-size: 0.9375rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.4rem; font-family: var(--font-sans); }
.sku-card p  { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1.25rem; }
.sku-price {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--gold-dark);
  margin-bottom: 0;
}
.sku-price-note { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.sku-sla {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-low);
  border: 1px solid var(--border-soft);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
}
.sku-features { margin-top: 1rem; list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.sku-features li { font-size: 0.8125rem; color: var(--text-secondary); display: flex; align-items: center; gap: 0.5rem; }
.sku-features li::before { content: '✓'; color: var(--success); font-weight: 700; font-size: 0.8rem; }

/* ── CLUSTER HEADING ── */
.cluster-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 3rem 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-soft);
}

/* ── STAT STRIP ── */
.stat-strip {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-low);
  padding: 2rem 0;
  display: flex;
  justify-content: center;
  gap: 5rem;
}
.stat-strip-item { text-align: center; }
.stat-strip-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-strip-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* ── HOW IT WORKS ── */
.how-step-card {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--surface-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: box-shadow 0.25s, transform 0.25s;
}
.how-step-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.how-step-num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 1.25rem;
  background: var(--gold-pale);
  border: 1px solid var(--border-subtle);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
}
.how-step-icon { font-size: 1.75rem; margin-bottom: 1rem; display: block; }
.how-step-title { font-size: 1.0625rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.5rem; font-family: var(--font-display); }
.how-step-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.65; }

/* ── PILOT SECTION ── */
.pilot-section {
  background: var(--text-primary);
  color: rgba(252,249,248,0.9);
}
.pilot-section h2 { color: #fcf9f8; font-size: 1.875rem; }
.pilot-section p  { color: rgba(252,249,248,0.65); }
.pilot-section .btn-gold { background: var(--gold); color: #1b1c1c; }
.pilot-section .btn-gold:hover { background: var(--gold-bright); }
.pilot-stat-val { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--gold-bright); }
.pilot-stat-lbl { font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(252,249,248,0.45); margin-top: 0.2rem; }
.pilot-stat-divider { width: 1px; background: rgba(252,249,248,0.12); align-self: stretch; }

/* ── FOOTER ── */
.footer {
  background: var(--surface-low);
  border-top: 1px solid var(--border-soft);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.footer a { color: var(--gold-dark); }
.footer a:hover { color: var(--gold); }

/* ── SIDEBAR (dashboards) ── */
.app-layout { display: flex; min-height: calc(100vh - 64px); }
.sidebar {
  width: 240px;
  background: var(--surface-white);
  border-right: 1px solid var(--border-soft);
  flex-shrink: 0;
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.15s;
  border-left: 2px solid transparent;
  text-decoration: none;
}
.sidebar-item:hover { color: var(--text-primary); background: var(--surface-low); }
.sidebar-item.active { color: var(--gold-dark); border-color: var(--gold); background: var(--gold-pale); }
.sidebar-section { padding: 1rem 1.5rem 0.35rem; font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-dim); }
.main-content { flex: 1; overflow-y: auto; background: var(--surface); }
.page-header { padding: 1.75rem 2rem 0; }
.page-header h2 { font-size: 1.375rem; margin-bottom: 0.25rem; }
.page-content { padding: 1.5rem 2rem 2.5rem; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(27,28,28,0.4);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface-white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-xl);
  max-width: 540px; width: 100%; max-height: 90vh; overflow-y: auto;
  transform: scale(0.97);
  transition: transform 0.25s;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 1rem; font-family: var(--font-display); }
.modal-close { background: none; border: none; font-size: 1.125rem; cursor: pointer; color: var(--text-muted); }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-soft); display: flex; justify-content: flex-end; gap: 0.75rem; }

/* ── RANGE SLIDER ── */
.range-wrap { position: relative; }
input[type="range"] { width: 100%; appearance: none; height: 3px; background: var(--surface-high); border-radius: 2px; outline: none; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); cursor: pointer; border: 2px solid var(--surface-white); box-shadow: var(--shadow-sm); }
.range-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.375rem; }
.range-value { text-align: center; font-weight: 600; color: var(--gold-dark); margin-top: 0.25rem; font-family: var(--font-display); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .container { padding: 0 var(--gutter); }
  .navbar { padding: 0 var(--gutter); }
  .exec-layout { grid-template-columns: 1fr; }
  .exec-sidebar { border-right: none; border-bottom: 1px solid var(--border-soft); }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .sidebar { width: 200px; }
  :root { --section-gap: 80px; }
}
@media (max-width: 768px) {
  h1 { font-size: 2rem; letter-spacing: -0.01em; }
  h2 { font-size: 1.5rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: 2.25rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .spatial-grid { grid-template-columns: 1fr 1fr; }
  .app-layout { flex-direction: column; }
  .sidebar { width: 100%; padding: 0.75rem 0; flex-direction: row; overflow-x: auto; }
  .sidebar-item { padding: 0.5rem 1rem; white-space: nowrap; border-left: none; border-bottom: 2px solid transparent; }
  .sidebar-item.active { border-bottom-color: var(--gold); border-left-color: transparent; }
  .navbar { padding: 0 1rem; }
  .steps-bar { overflow-x: auto; }
  .stat-strip { gap: 2rem; flex-wrap: wrap; padding: 1.5rem var(--gutter); }
  :root { --section-gap: 60px; }
}

/* ════════════════════════════════════════════════════════
   FULL MOBILE / RESPONSIVE SYSTEM
   Breakpoints: 1024 · 768 · 600 · 480 · 375
   Covers: iOS notch, Android tap targets, tables → cards,
           hamburger nav, touch-friendly inputs, all pages
   ════════════════════════════════════════════════════════ */

/* ── iOS & Android baseline fixes ── */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}
input, select, textarea, button {
  /* Prevent iOS from zooming in on focus — keep >= 16px */
  font-size: max(16px, 1rem);
}
/* Restore small size for non-form elements that inherit */
.btn-sm, .badge, .label-caps, .form-hint, .form-error,
.sku-sla, .step-label, .sidebar-section {
  font-size: revert;
}
/* iOS momentum scroll on overflow containers */
.table-wrap, .exec-sidebar, .exec-main,
.sidebar, .steps-bar, .pov-tabs {
  -webkit-overflow-scrolling: touch;
}
/* iOS safe-area (notch / home-bar) */
.navbar {
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}
.footer {
  padding-bottom: max(2rem, calc(1.5rem + env(safe-area-inset-bottom)));
}

/* ── HAMBURGER MENU ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.25s;
}
/* Animated X when open */
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── TOUCH TARGETS — minimum 44×44px ── */
.btn, .nav-toggle, .sidebar-item,
.tab, .qc-btn, .pov-tab {
  min-height: 44px;
}
.btn-sm { min-height: 36px; }
.chip label, .check-chip label, .option-card-label, .chip-suggest-btn {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════
   TABLET LANDSCAPE — 1024px
   ═══════════════════════════ */
@media (max-width: 1024px) {
  .container { padding: 0 2rem; }
  .navbar { padding: 0 2rem; }
  .hero .container > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem !important;
  }
  .pilot-section .container > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ═══════════════════════════
   TABLET PORTRAIT — 768px
   iPad Mini, most Android tablets
   ═══════════════════════════ */
@media (max-width: 768px) {
  /* ── Variables ── */
  :root {
    --section-gap: 64px;
  }

  /* ── Typography scale ── */
  h1 { font-size: 2rem !important; letter-spacing: -0.01em; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  /* ── Container ── */
  .container, .container-sm, .container-md {
    padding: 0 1.25rem;
  }

  /* ── Navbar: show hamburger, hide links ── */
  .nav-toggle { display: flex; }
  .navbar-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: rgba(252,249,248,0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 1rem;
    border-bottom: 1px solid var(--border-soft);
    z-index: 99;
    box-shadow: 0 8px 24px rgba(27,28,28,0.08);
  }
  .navbar-nav.open { display: flex; }
  .navbar-nav a {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--surface-high);
    width: 100%;
  }
  .navbar-nav a::after { display: none; }
  .navbar-nav .btn-nav {
    margin: 0.75rem 1.5rem 0;
    border-radius: var(--radius-pill);
    text-align: center;
    justify-content: center;
    width: calc(100% - 3rem);
  }
  /* Dark-navbar variants (admin / pilot pages) */
  .navbar.navbar-dark .navbar-nav {
    background: rgba(27,28,28,0.97);
  }
  .navbar.navbar-dark .navbar-nav a { color: rgba(252,249,248,0.85); border-color: rgba(255,255,255,0.07); }

  /* ── Hero: stack columns ── */
  .hero { padding: 3rem 0 2.5rem; }
  .hero .container > div[style*="grid-template-columns"] {
    display: block !important;
  }
  .hero-card-wrap { display: flex; justify-content: center; margin-top: 2.5rem; }
  .hero-card { width: 100%; max-width: 360px; }
  .hero-badge-float.top { top: -12px; right: 0; font-size: 0.7rem; }
  .hero-badge-float.bottom { bottom: -12px; left: 0; font-size: 0.7rem; }

  /* ── Grids ── */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }

  /* ── Stat strip ── */
  .stat-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 2rem 1.25rem; }
  .stat-strip-num { font-size: 1.5rem; }

  /* ── Exec layout (pilot workflow) ── */
  .exec-layout { grid-template-columns: 1fr; min-height: auto; }
  .exec-sidebar { border-right: none; border-bottom: 1px solid var(--border-soft); max-height: none; overflow-y: visible; }

  /* ── App layout (dashboard) ── */
  .app-layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding: 0;
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
    height: auto;
    flex-shrink: 0;
  }
  .sidebar-item {
    flex-direction: row;
    padding: 0.75rem 1rem;
    white-space: nowrap;
    border-left: none;
    border-bottom: 2px solid transparent;
    min-height: 44px;
  }
  .sidebar-item.active {
    border-left-color: transparent;
    border-bottom-color: var(--gold);
  }
  .sidebar-section { display: none; }
  .page-header { padding: 1.25rem 1.25rem 0; }
  .page-content { padding: 1rem 1.25rem 2rem; }

  /* ── Tables → horizontal scroll ── */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 600px; }
  thead th, tbody td { padding: 0.75rem 0.875rem; font-size: 0.8125rem; }

  /* ── Admin grid-4 stats ── */
  .grid-4.mb-4 { grid-template-columns: 1fr 1fr !important; gap: 0.875rem; }

  /* ── Pilot section ── */
  .pilot-section .container > div[style*="grid-template-columns"] {
    display: block !important;
  }
  .pilot-section [style*="aspect-ratio"] {
    display: none !important; /* hide decorative image panel */
  }

  /* ── Spatial grid ── */
  .spatial-grid { grid-template-columns: 1fr 1fr; }

  /* ── Steps bar ── */
  .steps-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 0.25rem; }

  /* ── Order wizard SKU grid ── */
  .sku-grid { grid-template-columns: 1fr 1fr !important; }

  /* ── Page body padding ── */
  .page-body { padding: 1.5rem 0; }
  .wizard-wrap, .page-wrap { padding: 1rem 1rem 3rem !important; }

  /* ── Form sections ── */
  .form-section { padding: 1.25rem !important; }
  .encourage-box { flex-direction: column; gap: 0.5rem; }

  /* ── Auth box ── */
  .auth-box { padding: 1.75rem 1.25rem !important; }
}

/* ═══════════════════════════
   PHONE LANDSCAPE / SMALL TABLET — 600px
   ═══════════════════════════ */
@media (max-width: 600px) {
  /* ── Admin stat cards: 2 wide ── */
  .grid-4.mb-4 { grid-template-columns: 1fr 1fr !important; }

  /* ── Hero trust bar ── */
  .hero-trust { flex-direction: column; gap: 0.75rem; }

  /* ── Status timeline: horizontal scroll ── */
  .status-track {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    gap: 0;
    /* Keep 5-column but allow scroll */
    min-width: 480px;
    width: 100%;
  }
  .status-track-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  /* ── Wizard grid: 1 col ── */
  .sku-grid { grid-template-columns: 1fr !important; }

  /* ── QC items ── */
  .qc-item { flex-direction: column; align-items: flex-start; gap: 0.625rem; }
  .qc-buttons { align-self: flex-end; }

  /* ── Pilot dashboard stats ── */
  .grid-4 { grid-template-columns: 1fr 1fr !important; }

  /* ── Pricing display ── */
  .price-amount { font-size: 2rem; }

  /* ── Order card top ── */
  .order-card-top { flex-wrap: wrap; }
  .order-meta { margin-left: 0; text-align: left; }

  /* ── Order actions ── */
  .order-actions { flex-direction: column; align-items: stretch; }
  .order-actions a, .order-actions button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* ═══════════════════════════
   PHONE — 480px
   iPhone XR / 11 / 12 / 13 / 14
   Most Android mid-range
   ═══════════════════════════ */
@media (max-width: 480px) {
  :root { --section-gap: 48px; }

  .container, .container-sm, .container-md {
    padding: 0 1rem;
  }

  /* ── Navbar ── */
  .navbar { height: 60px; padding: 0 1rem; }
  .navbar-brand { font-size: 1.125rem; }
  .navbar-nav { top: 60px; }

  /* ── Hero ── */
  .hero { padding: 2.5rem 0 2rem; }
  .hero h1 { font-size: 1.875rem !important; }
  .hero p { font-size: 0.9375rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-badge { font-size: 0.625rem; }

  /* ── Stat strip: 2×2 ── */
  .stat-strip { grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1.5rem 1rem; }
  .stat-strip-num { font-size: 1.375rem; }
  .stat-strip-label { font-size: 0.6rem; }

  /* ── SKU cards ── */
  .sku-card { padding: 1.25rem; }
  .sku-sla { font-size: 0.6rem; }

  /* ── How it works ── */
  .how-step-card { padding: 1.5rem 1.25rem; }

  /* ── Grid all 1-col ── */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; gap: 0.875rem; }

  /* ── Tables: card-style on mobile ── */
  .table-wrap.mobile-cards table,
  .table-wrap.mobile-cards thead,
  .table-wrap.mobile-cards tbody,
  .table-wrap.mobile-cards th,
  .table-wrap.mobile-cards td,
  .table-wrap.mobile-cards tr { display: block; }
  .table-wrap.mobile-cards thead tr { display: none; }
  .table-wrap.mobile-cards tbody tr {
    background: var(--surface-white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    min-width: auto;
  }
  .table-wrap.mobile-cards tbody td {
    padding: 0.3rem 0;
    font-size: 0.875rem;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--surface-high);
  }
  .table-wrap.mobile-cards tbody td:last-child { border-bottom: none; }
  .table-wrap.mobile-cards tbody td::before {
    content: attr(data-label);
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-right: 0.5rem;
  }

  /* ── Modal ── */
  .modal { max-width: 100%; margin: 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }

  /* ── Pilot section stats ── */
  [class*="pilot-stat"] { flex-wrap: wrap; gap: 1.5rem; }

  /* ── Step indicator ── */
  .steps-bar { gap: 0; }
  .step-label { display: none; }
  .step-circle { width: 28px; height: 28px; font-size: 0.75rem; }

  /* ── QC / workflow ── */
  .spatial-grid { grid-template-columns: 1fr; }

  /* ── Assign row in admin ── */
  .assign-row { flex-wrap: wrap; }
  .assign-select { width: 100%; }

  /* ── Tab bar overflow ── */
  .tab-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .tab { white-space: nowrap; padding: 0.75rem 1rem; font-size: 0.875rem; }

  /* ── Comparison slider ── */
  .slider-wrap { touch-action: none; }

  /* ── Exec sidebar pov tabs ── */
  .pov-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }

  /* ── Page wrap ── */
  .wizard-wrap, .page-wrap { padding: 0.75rem 0.75rem 3rem !important; }
  .form-section { padding: 1rem !important; }
}

/* ═══════════════════════════
   SMALL PHONE — 375px
   iPhone SE, Galaxy S series
   ═══════════════════════════ */
@media (max-width: 375px) {
  .hero h1 { font-size: 1.625rem !important; }
  .container, .container-sm, .container-md { padding: 0 0.875rem; }
  .wizard-wrap, .page-wrap { padding: 0.5rem 0.5rem 3rem !important; }
  .stat-strip { grid-template-columns: 1fr 1fr; gap: 0.75rem; padding: 1.25rem 0.875rem; }
  .stat-strip-num { font-size: 1.25rem; }
  .sku-card { padding: 1rem; }
  .sku-price { font-size: 1.125rem; }
  .btn-lg { padding: 0.75rem 1.5rem; font-size: 0.875rem; }
  .navbar-brand { font-size: 1rem; }
  /* ── Stat cards 1 col on tiny phones ── */
  .grid-4.mb-4 { grid-template-columns: 1fr !important; }
}

/* ═══════════════════════════
   LANDSCAPE PHONE OVERRIDE
   Prevent overflow when rotated
   ═══════════════════════════ */
@media (max-width: 812px) and (orientation: landscape) {
  .hero { padding: 2rem 0; }
  .hero h1 { font-size: 1.75rem !important; }
  .navbar-nav { max-height: calc(100vh - 60px); overflow-y: auto; }
  :root { --section-gap: 40px; }
}

/* ═══════════════════════════
   HIGH-DPI / RETINA
   ═══════════════════════════ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Ensure 1px borders render crisp on retina */
  .sku-card, .card, .glass-card, .hero-card {
    border-width: 0.5px;
  }
}

/* ═══════════════════════════
   PRINT
   ═══════════════════════════ */
@media print {
  .navbar, .footer, .btn, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .container { max-width: 100%; padding: 0; }
}
