/* ==========================================================================
   Labor Pro by Titletown Digital — Hybrid A + C Restrained SaaS Design System
   ~95% Crisp Monochrome Neutral Surfaces · ~5% Crimson & Navy Accents
   ========================================================================== */

:root {
  /* Titletown Digital Brand Accents (~5% budget) */
  --brand-red: #D91E36;
  --brand-red-hover: #B8172C;
  --brand-red-soft: rgba(217, 30, 54, 0.08);
  --brand-red-text: #C8102E;

  --brand-navy: #13294B;
  --brand-navy-2: #1E293B;
  --brand-navy-3: #334155;

  /* Crisp Light Neutral Surfaces (~95% budget) */
  --bg-page: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --bg-input: #FFFFFF;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;

  /* Restrained Status Tokens */
  --success: #0F766E;
  --success-soft: rgba(15, 118, 110, 0.09);
  --amber: #475569;
  --amber-soft: #F1F5F9;
  --danger: #C8102E;
  --danger-soft: rgba(200, 16, 46, 0.08);

  /* Chart & Data Bar Palette */
  --bar-peak: #1E293B;
  --bar-early: #94A3B8;
  --chart-bar: #CBD5E1;
  --chart-bar-peak: #1E293B;
  --chart-weekend-band: rgba(15, 23, 42, 0.035);
  --chart-grid: #E2E8F0;
  --chart-halo: #FFFFFF;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.10);
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="dark"] {
  /* Neutral Zinc Dark Mode (Linear / Vercel style) */
  --bg-page: #09090B;
  --bg-surface: #121215;
  --bg-subtle: #18181B;
  --bg-input: #09090B;
  --border: #27272A;
  --border-strong: #3F3F46;

  --text-primary: #FAFAFA;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;

  --brand-red: #E5384F;
  --brand-red-hover: #F43F5E;
  --brand-red-soft: rgba(229, 56, 79, 0.14);
  --brand-red-text: #FB7185;

  --brand-navy: #E4E4E7;
  --brand-navy-2: #D4D4D8;
  --brand-navy-3: #A1A1AA;

  --success: #2DD4BF;
  --success-soft: rgba(45, 212, 191, 0.12);
  --amber: #A1A1AA;
  --amber-soft: #27272A;
  --danger: #FB7185;
  --danger-soft: rgba(251, 113, 133, 0.14);

  --bar-peak: #E4E4E7;
  --bar-early: #52525B;
  --chart-bar: #3F3F46;
  --chart-bar-peak: #D4D4D8;
  --chart-weekend-band: rgba(255, 255, 255, 0.03);
  --chart-grid: #27272A;
  --chart-halo: #121215;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-page);
  min-height: 100vh;
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 1024px) {
  body {
    padding-bottom: 36px;
  }
}

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

.muted {
  color: var(--text-muted);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--brand-red);
  color: #FFFFFF;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  z-index: 1000;
}
.skip-link:focus {
  left: 8px;
}

/* ==========================================================================
   Top Shell Header & Guided 4-Step Tab Bar
   ========================================================================== */

.app-shell {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.top-shell {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 35;
}

.topbar {
  max-width: 1380px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (min-width: 1024px) {
  .topbar {
    padding: 12px 28px;
    flex-wrap: nowrap;
  }
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-badge {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 8px;
  background: #FFFFFF;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.brand-mark {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-eyebrow {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.2;
}

/* Header Controls: HOH/FOH Department Toggle + Forecast Week */
.header-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  order: 3;
  width: 100%;
}

@media (min-width: 1024px) {
  .header-controls {
    order: 0;
    width: auto;
    flex-wrap: nowrap;
  }
}

.dept-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  gap: 3px;
}

.dept-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.dept-btn:hover {
  color: var(--text-primary);
}

.dept-btn.is-active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.dept-code {
  font-size: 12.5px;
  font-weight: 700;
}

.dept-btn.is-active .dept-code {
  color: var(--brand-red-text);
}

.dept-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.context-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  flex: 1;
}

@media (min-width: 1024px) {
  .context-box {
    flex: initial;
  }
}

.context-field {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 140px;
}

.context-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  flex-shrink: 0;
}

.context-field input {
  width: 100%;
  min-width: 120px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 3px 4px;
  border-radius: 4px;
}

.context-field input:focus {
  outline: none;
  background: var(--bg-surface);
  box-shadow: 0 0 0 1px var(--brand-red);
}

/* Topbar Utilities */
.topbar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.status-pill {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .status-pill {
    display: inline-flex;
  }
}

.status-dot,
.saved-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

.status-pill.is-offline .status-dot {
  background: var(--brand-red);
}

.saved-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

@media (max-width: 639px) {
  .saved-label-long { display: none; }
}
@media (min-width: 640px) {
  .saved-label-short { display: none; }
}

.install-pill-btn {
  appearance: none;
  border: 0;
  background: var(--brand-red);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.util-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}
.icon-btn .icon {
  width: 15px;
  height: 15px;
}

[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }

/* Guided 4-Step Top Tab Bar */
.step-nav-wrap {
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  display: none;
}

@media (min-width: 1024px) {
  .step-nav-wrap {
    display: block;
  }
}

.step-nav {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.step-tab {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.step-tab:hover {
  color: var(--text-primary);
  background: var(--bg-page);
}

.step-tab.is-active {
  color: var(--text-primary);
  border-bottom-color: var(--brand-red);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-tab.is-active .step-num {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
  color: var(--bg-surface);
}

.step-copy {
  min-width: 0;
  flex: 1;
}

.step-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-sub {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Workspace Canvas, Update Banner & Hybrid C+A Plan Cockpit Card
   ========================================================================== */

.workspace-canvas {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 640px) {
  .workspace-canvas {
    padding: 22px 24px;
  }
}

@media (min-width: 1024px) {
  .workspace-canvas {
    padding: 24px 28px;
  }
}

.update-banner {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--brand-red);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
}

.update-banner .btn-light {
  background: var(--brand-red);
  color: #FFFFFF;
}

/* Hybrid C+A Answer-First Plan Hero + 4-Col KPI Cockpit */
.plan-cockpit-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.verdict-top {
  padding: 18px 20px;
}

@media (min-width: 640px) {
  .verdict-top {
    padding: 20px 24px;
  }
}

.verdict-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.verdict-eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.verdict-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

.verdict-pill.is-action {
  background: var(--brand-red-soft);
  color: var(--brand-red-text);
}

.verdict-pill.is-caution {
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.verdict-pill.is-good {
  background: var(--success-soft);
  color: var(--success);
}

.brief-context {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.brief-headline {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--text-primary);
}

@media (min-width: 640px) {
  .brief-headline {
    font-size: 17.5px;
  }
}

.brief-headline strong {
  font-weight: 700;
}

/* 4-Column Hairline KPI Strip */
.cockpit-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

@media (min-width: 1024px) {
  .cockpit-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.cockpit-kpi {
  padding: 14px 20px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 640px) {
  .cockpit-kpi {
    padding: 16px 24px;
  }
}

@media (max-width: 1023px) {
  .cockpit-kpi:nth-child(2n) { border-right: 0; }
  .cockpit-kpi:nth-child(n+3) { border-bottom: 0; }
}

@media (min-width: 1024px) {
  .cockpit-kpi { border-bottom: 0; }
  .cockpit-kpi:last-child { border-right: 0; }
}

.kpi-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.kpi-val {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 3px;
  line-height: 1.2;
}

.kpi-val.kpi-accent {
  color: var(--brand-red-text);
}

.kpi-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ==========================================================================
   Surfaces, Buttons, Semantic Badges & Hairline Dividers
   ========================================================================== */

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.tab-panel.is-active {
  display: flex;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 640px) {
  .card {
    padding: 24px;
  }
}

.card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.card-desc {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.grid-12 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

@media (min-width: 1120px) {
  .grid-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .col-span-6 { grid-column: span 6 / span 6; }
  .col-span-5 { grid-column: span 5 / span 5; }
  .col-span-7 { grid-column: span 7 / span 7; }
}

.stack-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.eyebrow-muted {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.eyebrow-crimson {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-red-text);
}

/* Buttons */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-sm {
  font-size: 12px;
  padding: 5px 10px;
}

.btn-primary {
  background: var(--brand-red);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--brand-red-hover);
}

.btn-outline {
  background: var(--bg-surface);
  border-color: var(--border);
  color: var(--text-primary);
}
.btn-outline:hover {
  background: var(--bg-subtle);
}

.btn-outline.is-selected {
  background: var(--brand-red-soft);
  border-color: var(--brand-red);
  color: var(--brand-red-text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.btn-block {
  width: 100%;
}

.inline-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.inline-link:hover {
  color: var(--text-primary);
}

.inline-btn {
  appearance: none;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text-primary);
  cursor: pointer;
}
.inline-btn:hover {
  border-color: var(--border-strong);
}

/* ==========================================================================
   Panel 1: Forecast Inputs + Drivers + Unified Benchmark Studio
   ========================================================================== */

.mix-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.mix-labels {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.mix-label-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot-peak { width: 8px; height: 8px; border-radius: 50%; background: var(--bar-peak); }
.dot-early { width: 8px; height: 8px; border-radius: 50%; background: var(--bar-early); }

.mix-track {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  background: var(--bg-subtle);
}

.mix-fill-peak { background: var(--bar-peak); height: 100%; transition: width 0.25s ease; }
.mix-fill-early { background: var(--bar-early); height: 100%; transition: width 0.25s ease; }

/* Hairline Thu-Wed Sales Rows */
.sales-rows {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.day-row {
  padding: 8px 0;
  display: grid;
  grid-template-columns: 1fr 132px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.day-row:last-child {
  border-bottom: 0;
}

@media (min-width: 640px) {
  .day-row {
    grid-template-columns: 126px 1fr 48px 132px;
  }
}

.day-label-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.day-label {
  font-size: 13px;
  font-weight: 600;
}

.peak-tag {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.day-bar-wrap {
  display: none;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-subtle);
  overflow: hidden;
}

@media (min-width: 640px) {
  .day-bar-wrap {
    display: block;
  }
}

.day-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--bar-early);
  transition: width 0.2s ease;
}

.day-bar.is-peak {
  background: var(--bar-peak);
}

.day-share {
  display: none;
  font-size: 12px;
  text-align: right;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .day-share {
    display: block;
  }
}

/* Unified Input Box */
.input-group {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-group:focus-within {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 2px var(--brand-red-soft);
}

.input-affix {
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border-right: 1px solid var(--border);
}

.input-group input + .input-affix {
  border-right: 0;
  border-left: 1px solid var(--border);
}

.input-group input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 9px;
  text-align: right;
}

.input-group input:focus {
  outline: none;
}

.sales-total-strip {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 0 4px;
}

.sales-total-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.sales-total-val {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Integrated Drivers section below hairline */
.drivers-section {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.drivers-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.param-list {
  margin-top: 8px;
}

.param-row {
  padding: 11px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

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

@media (min-width: 640px) {
  .param-row {
    grid-template-columns: 1fr 138px;
  }
}

.param-label-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.param-label {
  font-size: 13.5px;
  font-weight: 600;
}

.param-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.param-row-floor {
  grid-template-columns: 1fr !important;
}

.floor-switch-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.floor-switch-pill input {
  margin: 0;
  accent-color: var(--brand-red);
}

.floor-dual-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.floor-mini-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.floor-mini-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
}

.floor-rebalance-card {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.floor-rebalance-card.is-active {
  border-color: rgba(200, 16, 46, 0.28);
  background: linear-gradient(135deg, var(--brand-red-soft) 0%, var(--bg-subtle) 100%);
}

.floor-rebalance-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.floor-rebalance-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.floor-rebalance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.floor-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.floor-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.floor-stat-val {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.floor-stat-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.floor-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--brand-red-soft);
  color: var(--brand-red-text);
  border: 1px solid rgba(200, 16, 46, 0.3);
  margin-left: 4px;
}

.peak-offset-tag {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  margin-left: 4px;
}

/* Unified Benchmark Studio Card */
.studio-hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 640px) {
  .studio-hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.gauge-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.gauge-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

/* User Custom Target Strip inside Benchmark Studio */
.custom-target-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.custom-target-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.custom-target-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.custom-target-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .custom-target-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.custom-target-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.custom-target-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 2-Column Selectable Benchmark Cards (Directions A & C) */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 16px 0;
}

@media (min-width: 640px) {
  .compare-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.tier-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tier-card.is-selected {
  border: 2px solid var(--brand-red);
  padding: 15px;
}

.tier-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.tier-card.is-selected .tier-pill {
  background: var(--brand-red-soft);
  color: var(--brand-red-text);
}

.tier-name {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 700;
}

.big-hours {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.big-hours-unit {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.metric-dl {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
}

.metric-dl-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.metric-dl-row dt {
  color: var(--text-secondary);
}

.metric-dl-row dd {
  margin: 0;
  font-weight: 600;
}

/* Neutral Slate Savings Callout (Replaces Dark Navy Box Inside Light Card) */
.spread-banner {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.spread-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.spread-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.spread-amt {
  font-size: 18px;
  font-weight: 700;
}

.house-summary-strip {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.house-summary-strip strong {
  color: var(--text-primary);
}

/* Synthetic Playbook Diagrams */
.synthetic-diagram {
  margin-top: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  overflow: hidden;
  font-size: 12px;
}

.diag-bar {
  padding: 7px 12px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.diag-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  padding: 10px 6px;
  gap: 4px;
}

.diag-grid span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.diag-grid strong {
  display: block;
  font-size: 11.5px;
  margin-top: 2px;
}

.diag-rows {
  padding: 6px 12px;
}

.diag-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

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

.diag-row.is-highlight {
  color: var(--brand-red-text);
  font-weight: 600;
}

/* Formulas Accordion */
.formula-details {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.formula-details summary {
  padding: 6px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.formula-details summary:hover {
  color: var(--text-primary);
}

.formula-details-body {
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.formula-details-body p { margin: 0; }

/* Next Step Guided Bar */
.next-step-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.next-step-title {
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 2px;
}

/* ==========================================================================
   Panel 2: Daily Scheduling & Improvement Roadmap
   ========================================================================== */

.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
}

.seg-btn:hover {
  color: var(--text-primary);
}

.seg-btn.is-active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Flat 4-Col Hairline Stat Strip */
.stat-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  gap: 12px;
}

@media (min-width: 1024px) {
  .stat-band {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }
  .stat-band-cell {
    padding: 4px 16px;
    border-right: 1px solid var(--border);
  }
  .stat-band-cell:first-child { padding-left: 0; }
  .stat-band-cell:last-child { padding-right: 0; border-right: 0; }
}

.stat-band-label {
  font-size: 12px;
  color: var(--text-muted);
}

.stat-band-val {
  font-size: 16px;
  font-weight: 700;
  margin-top: 2px;
}

.chart-container {
  margin: 18px 0 8px;
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Clean Hairline Table */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--border);
  margin-top: 14px;
  padding-top: 6px;
}

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

.data-table th,
.data-table td {
  padding: 10px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--text-muted);
}

.data-table th.num,
.data-table td.num {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.data-table tbody tr:hover {
  background: var(--bg-page);
}

.data-table tfoot td {
  font-weight: 700;
  border-top: 2px solid var(--border);
  border-bottom: 0;
}

.data-table tbody tr.is-completed {
  opacity: 0.6;
}

.plan-check {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-red);
  cursor: pointer;
}

/* Improvement Baseline/Target/CvT Band */
.imp-band {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
  .imp-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }
  .imp-cell {
    padding: 0 18px;
    border-right: 1px solid var(--border);
  }
  .imp-cell:first-child { padding-left: 0; }
  .imp-cell:last-child { padding-right: 0; border-right: 0; }
}

.imp-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.imp-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.imp-cvt-val {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Sprint Horizon Buttons */
.pace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

@media (min-width: 640px) {
  .pace-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.pace-card-btn {
  appearance: none;
  text-align: left;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.pace-card-btn:hover {
  background: var(--bg-page);
}

.pace-card-btn.is-active {
  border: 2px solid var(--brand-red);
  padding: 11px;
}

.pace-card-title {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
}

.pace-card-btn.is-active .pace-card-title {
  color: var(--brand-red-text);
}

.pace-card-sub {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.plan-progress-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: 12px;
}

.progress-track {
  width: 144px;
  height: 7px;
  border-radius: 999px;
  background: var(--bg-subtle);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--brand-navy);
  width: 0%;
  transition: width 0.25s ease;
}

/* ==========================================================================
   Panel 3: Staffing & Roster Readiness
   ========================================================================== */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chip-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.chip-btn:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.chip-btn.is-active {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
  color: var(--bg-surface);
}

.synced-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.roster-visual {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
  font-size: 12.5px;
}

.roster-row {
  display: grid;
  grid-template-columns: 130px 1fr 40px;
  align-items: center;
  gap: 12px;
}

.roster-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-subtle);
  overflow: hidden;
}

.roster-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.util-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12.5px;
}

.util-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.util-meter-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.util-sweet-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 48%;
  width: 12%;
  background: var(--success-soft);
  border-left: 1px solid var(--success);
  border-right: 1px solid var(--success);
}

.util-marker {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-red);
  border: 2px solid var(--bg-surface);
  transform: translateX(-50%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  transition: left 0.25s ease;
}

.util-copy {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   Panel 4: R365 & HotSchedules Playbook
   ========================================================================== */

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.guide-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-step-num {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.guide-steps {
  margin: 0;
  padding-left: 20px;
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-secondary);
}
.guide-steps strong {
  color: var(--text-primary);
}

.formula-callout {
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-thumb-btn {
  position: relative;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-subtle);
  cursor: zoom-in;
  margin-top: auto;
}

.guide-thumb-btn img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 210px;
  object-fit: cover;
  object-position: top left;
}

.zoom-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(15, 23, 42, 0.82);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

/* ==========================================================================
   Mobile Bottom Dock Navigation (< 1024px)
   ========================================================================== */

.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.06);
}

@media (min-width: 1024px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.mob-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.mob-tab svg {
  width: 18px;
  height: 18px;
}

.mob-tab.is-active {
  color: var(--brand-red-text);
  background: var(--brand-red-soft);
}

/* ==========================================================================
   Modals, Lightbox & Toast Pill
   ========================================================================== */

.modal-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 440px;
  width: calc(100% - 24px);
  margin: auto;
}

.modal-dialog.modal-wide {
  max-width: 580px;
}

.modal-dialog.modal-lightbox {
  max-width: 960px;
}

.modal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.modal-card,
.lightbox-card {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.lightbox-card img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-top: 10px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
}

.modal-close-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0;
}

.field-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
}

.field-stack input,
.snapshot-save-bar input {
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 14px;
}

.snapshot-save-bar input {
  font-family: var(--font-sans);
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
}

.wc-result {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
}

.wc-result strong {
  font-size: 18px;
  color: var(--brand-red-text);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.snapshot-save-bar {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.snapshot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 14px;
}

.snapshot-item {
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.snapshot-meta {
  min-width: 0;
}

.snapshot-meta strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.snapshot-meta span {
  font-size: 12px;
  color: var(--text-muted);
}

.snapshot-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.modal-footer-split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.backup-btns {
  display: flex;
  gap: 8px;
}

.toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--bg-surface);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
  z-index: 90;
  max-width: calc(100vw - 32px);
}

.toast::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-red);
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .toast {
    bottom: 24px;
  }
}

/* ==========================================================================
   Print Stylesheet
   ========================================================================== */

.print-only {
  display: none;
}

@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    padding: 0 !important;
  }
  .app-shell {
    display: block !important;
  }
  .top-shell,
  .mobile-bottom-nav,
  .no-print,
  .btn,
  .inline-btn,
  .inline-link,
  .segmented-control,
  .chip-row,
  .next-step-bar,
  .pace-grid,
  .toast {
    display: none !important;
  }
  .print-only {
    display: flex !important;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0F172A;
  }
  .print-header h2 { margin: 0; font-size: 16px; }
  .print-header p { margin: 2px 0 0; font-size: 12px; color: #475569; }
  .tab-panel {
    display: flex !important;
    margin-bottom: 20px;
    break-inside: avoid;
  }
  #panel-info {
    display: none !important;
  }
  .card,
  .plan-cockpit-card {
    box-shadow: none !important;
    border-color: #CBD5E1 !important;
    break-inside: avoid;
  }
}
