/* ==========================================================================
   PromptCorner Lite — Exact Pro Show Report Sheet Styling
   Matches Pro Top Banner + Timings + Padded Rounded Notes + Signed Footer
   ========================================================================== */

:root,
html[data-theme="sheet"] {
  --canvas-bg: #07090e;
  --topbar-bg: #0b0e16;
  --topbar-border: #1d2436;

  /* Sheet Surface */
  --sheet-bg: #ffffff;
  --sheet-outer-border: #2c3548;
  --sheet-divider: #cbd5e1;
  --sheet-row-border: #e2e8f0;

  /* Navy Bars */
  --navy-bar: #0c1220;
  --navy-inset: #101729;
  --navy-inset-border: #273249;

  /* Subheaders & Shading */
  --subhead-bg: #e2e8f0;
  --subhead-border: #cbd5e1;
  --shaded-cell: #f4f6f9;
  --total-val-bg: #eef2ff;
  --total-val-text: #1e1b4b;

  /* Inputs */
  --input-bg: #ffffff;
  --input-border: #cbd5e1;

  /* Text */
  --ink: #0f172a;
  --ink-mid: #475569;
  --ink-muted: #94a3b8;

  /* Accents */
  --indigo: #5b5bf6;
  --indigo-hover: #4f46e5;
  --amber: #f59e0b;
  --amber-hover: #d97706;
  --emerald: #10b981;
  --danger: #ef4444;
  --danger-soft: #fee2e2;

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

/* Optional Wing-Dark Sheet Mode (Toggled via ☾ in Topbar) */
html[data-theme="dark"] {
  --canvas-bg: #06070a;
  --topbar-bg: #0b0d13;
  --topbar-border: #1c2230;

  --sheet-bg: #111520;
  --sheet-outer-border: #262f45;
  --sheet-divider: #232c40;
  --sheet-row-border: #1d2436;

  --navy-bar: #080c14;
  --navy-inset: #0e1422;
  --navy-inset-border: #253047;

  --subhead-bg: #1a2132;
  --subhead-border: #263046;
  --shaded-cell: #151b29;
  --total-val-bg: rgba(91, 91, 246, 0.18);
  --total-val-text: #c7d2fe;

  --input-bg: #0c1018;
  --input-border: #283248;

  --ink: #f1f5f9;
  --ink-mid: #94a3b8;
  --ink-muted: #64748b;

  --danger-soft: rgba(239, 68, 68, 0.2);
}

/* ==================== RESET & BASE ==================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--canvas-bg);
  color: #f1f5f9;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

.cursor-pointer { cursor: pointer; }

/* ==================== TOP APP BAR ==================== */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 48px;
  padding: 6px 18px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.brand-icon { width: 22px; height: 22px; border-radius: 5px; }
.brand-name { font-weight: 700; font-size: 13.5px; letter-spacing: -0.02em; color: #f8fafc; }

.badge-lite {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(91, 91, 246, 0.2);
  color: #818cf8;
  border: 1px solid rgba(91, 91, 246, 0.35);
}

.topbar-divider { width: 1px; height: 18px; background: var(--topbar-border); margin: 0 2px; }

.view-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: #07090e;
  border: 1px solid var(--topbar-border);
  border-radius: 7px;
}

.view-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.view-tab:hover { color: #ffffff; }
.view-tab.active { background: #171e2e; color: #ffffff; }

.tab-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 0 6px;
  border-radius: 99px;
  background: rgba(91, 91, 246, 0.22);
  color: #a5b4fc;
}

.desk-timer-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  background: #07090e;
  border: 1px solid var(--topbar-border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.desk-clock { color: #94a3b8; font-weight: 600; }
.timer-sep { color: #334155; }
.sw-readout { color: var(--amber); font-weight: 700; min-width: 58px; }

.sw-mini-btn {
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.14);
  color: var(--amber);
  cursor: pointer;
}
.sw-mini-btn.muted { border-color: var(--topbar-border); background: transparent; color: #94a3b8; }

.save-chip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 99px;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.14);
}

.cmd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.cmd-amber { background: var(--amber); color: #090a0d; font-weight: 700; }
.cmd-amber:hover { background: var(--amber-hover); color: #ffffff; }
.cmd-indigo { background: var(--indigo); color: #ffffff; }
.cmd-indigo:hover { background: var(--indigo-hover); }
.cmd-ghost { background: #141926; border-color: var(--topbar-border); color: #e2e8f0; }
.cmd-ghost:hover { border-color: #3b4663; background: #1c2334; }

.cmd-icon-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #141926;
  border: 1px solid var(--topbar-border);
  border-radius: 6px;
  color: #cbd5e1;
  cursor: pointer;
}

/* ==================== WORKSPACE CANVAS ==================== */
.workspace-canvas {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 18px 64px;
}

.view-pane { display: none; }
.view-pane.active { display: block; }

.sheet-utility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.utility-hint { font-size: 11.5px; color: #64748b; }
.utility-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.slot-pills {
  display: inline-flex;
  background: #0d111b;
  border: 1px solid var(--topbar-border);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
  flex-wrap: wrap;
}

.slot-pill {
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}
.slot-pill:hover { color: #e2e8f0; }
.slot-pill.active { background: var(--indigo); color: #ffffff; }

.util-link {
  background: transparent;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 5px;
}
.util-link:hover { color: #ffffff; }
.util-link.danger { color: #f87171; }

/* ==================== UNIFIED PRO SHOW REPORT DOCUMENT ==================== */
.report-document {
  background: var(--sheet-bg);
  color: var(--ink);
  border: 1.5px solid var(--sheet-outer-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

/* 1. Navy Top Banner */
.doc-banner {
  background: var(--navy-bar);
  color: #ffffff;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.banner-left { display: flex; align-items: center; gap: 16px; }

.banner-logo-box {
  width: 66px;
  height: 52px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner-logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }

.banner-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #818cf8;
  margin-bottom: 2px;
}

.banner-title {
  margin: 0;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 1.1;
  cursor: pointer;
}

.banner-venue { margin-top: 3px; font-size: 13px; color: #94a3b8; }

.banner-meta-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 15px;
  background: var(--navy-inset);
  border: 1px solid var(--navy-inset-border);
  border-radius: 12px;
  flex-wrap: wrap;
}

.banner-field { display: flex; flex-direction: column; gap: 4px; }
.banner-field.w-show { width: 88px; }
.banner-field.w-date { width: 136px; }
.banner-field.w-perf { width: 112px; }

.banner-field label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}

.banner-field input {
  height: 35px;
  padding: 0 10px;
  background: #ffffff;
  color: #0f172a;
  border: none;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  outline: none;
}

/* ==================== 2. SPLIT RUNNING TIMES & HOUSE ==================== */
.doc-split-top {
  display: grid;
  grid-template-columns: 1.92fr 1fr;
  border-bottom: 1px solid var(--sheet-divider);
}

.doc-timings-pane {
  padding: 18px 22px 20px;
  border-right: 1px solid var(--sheet-divider);
}

.doc-house-pane {
  padding: 18px 22px 20px;
}

.pane-heading-row { margin-bottom: 12px; }
.pane-heading {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.timings-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: center;
}

.timings-head { margin-bottom: 7px; }

.t-pill-head {
  background: var(--subhead-bg);
  color: var(--ink);
  font-weight: 700;
  font-size: 12.5px;
  text-align: center;
  padding: 7px 6px;
  border-radius: 6px;
}

.timings-rows-wrap { display: flex; flex-direction: column; gap: 7px; }

.t-act-cell {
  background: var(--shaded-cell);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.t-act-cell.italic-int {
  font-style: italic;
  font-weight: 500;
  color: var(--ink-mid);
}

.t-dash-cell {
  background: var(--shaded-cell);
  color: var(--ink-muted);
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-family: var(--font-mono);
}

.t-dur-cell {
  background: var(--shaded-cell);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.timings-totals-wrap { margin-top: 8px; display: flex; flex-direction: column; gap: 7px; }

.timings-total-row {
  display: grid;
  grid-template-columns: calc(80% - 1.6px) calc(20% - 6.4px);
  gap: 8px;
  align-items: center;
}

.t-total-label {
  background: var(--shaded-cell);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  height: 36px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  border-radius: 6px;
}

.t-total-val {
  background: var(--total-val-bg);
  color: var(--total-val-text);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

/* Shared Rounded Inputs & Textareas */
.stamp-wrap { position: relative; display: flex; align-items: center; }

.rounded-inp,
.t-time-inp {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  background: var(--input-bg);
  color: var(--ink);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.t-time-inp {
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 500;
}

.rounded-inp::placeholder,
.t-time-inp::placeholder,
.rounded-textarea::placeholder {
  color: var(--ink-muted);
  font-weight: 400;
}

.rounded-inp:focus,
.t-time-inp:focus,
.rounded-textarea:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 2px rgba(91, 91, 246, 0.15);
}

.rounded-textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--input-bg);
  color: var(--ink);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  font-size: 13.5px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  display: block;
}

.mini-now {
  position: absolute;
  right: 5px;
  height: 23px;
  padding: 0 5px;
  border: none;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease;
}
html[data-theme="dark"] .mini-now { color: var(--amber); }
.stamp-wrap:hover .mini-now,
.stamp-wrap:focus-within .mini-now { opacity: 1; }

/* House & Environment Grid */
.house-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sheet-field { display: flex; flex-direction: column; gap: 5px; }
.sheet-field.span-full { grid-column: span 2; }
.sheet-field label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mid);
}

/* ==================== NAVY SECTION BARS ==================== */
.doc-bar {
  background: var(--navy-bar);
  color: #ffffff;
  padding: 9px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.doc-bar-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.doc-bar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.doc-bar-hint {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}

.bar-action {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid #334155;
  background: transparent;
  color: #e2e8f0;
  cursor: pointer;
}
.bar-action:hover { border-color: #64748b; background: rgba(255, 255, 255, 0.07); }
.bar-action.indigo { background: var(--indigo); border-color: var(--indigo); color: #ffffff; }
.bar-action.indigo:hover { background: var(--indigo-hover); }

/* ==================== 3. COMPANY & SHOW STAFF ON DUTY ==================== */
.staff-duty-grid {
  display: flex;
  flex-direction: column;
}

.staff-pair-row {
  display: grid;
  grid-template-columns: 215px 1fr 215px 1fr;
  border-bottom: 1px solid var(--sheet-row-border);
  align-items: stretch;
}
.staff-pair-row:last-child { border-bottom: none; }

.staff-role-cell {
  background: var(--shaded-cell);
  border-right: 1px solid var(--sheet-row-border);
  padding: 10px 18px;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  display: flex;
  align-items: center;
  cursor: pointer;
}
.staff-role-cell:hover { background: var(--subhead-bg); }
.staff-role-cell.col-3 { border-left: 1px solid var(--sheet-divider); }

.staff-input-cell {
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.row-ctrl-group { display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0; }

.ctrl-sq {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  border: 1px solid var(--sheet-row-border);
  background: var(--shaded-cell);
  color: var(--ink-mid);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.ctrl-sq.del { background: var(--danger-soft); border-color: transparent; color: var(--danger); }

/* ==================== 4. CAST & BAND ABSENCES / COVERS ==================== */
.pro-subhead-table {
  width: 100%;
  border-collapse: collapse;
}

.pro-subhead-table thead th {
  background: var(--subhead-bg);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 18px;
  text-align: left;
  border-bottom: 1px solid var(--subhead-border);
  border-right: 1px solid var(--subhead-border);
}

.pro-subhead-table thead th:last-child {
  border-right: none;
}

.pro-subhead-table tbody td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--sheet-row-border);
  border-right: 1px solid var(--sheet-row-border);
  vertical-align: middle;
}

.pro-subhead-table tbody td:last-child {
  border-right: none;
}

.pro-centered-empty {
  padding: 13px 18px;
  text-align: center;
  font-size: 13.5px;
  font-style: italic;
  color: var(--ink-mid);
  background: var(--sheet-bg);
}

/* ==================== 5, 6 & 7. PADDED ROUNDED BANDS ==================== */
.pro-padded-band {
  padding: 14px 18px;
  background: var(--sheet-bg);
}

/* ==================== 8. SIGNED FOOTER BAR ==================== */
.signed-footer-grid {
  display: grid;
  grid-template-columns: 205px 1.25fr 1fr;
  border-top: 1px solid var(--sheet-divider);
  border-bottom: 1px solid var(--sheet-row-border);
  align-items: stretch;
}

.signed-label-cell {
  background: var(--shaded-cell);
  border-right: 1px solid var(--sheet-divider);
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
}

.signed-input-cell {
  padding: 10px 14px;
  border-right: 1px solid var(--sheet-divider);
  display: flex;
  align-items: center;
}

.signed-input-cell:last-child {
  border-right: none;
}

.signed-name-bold {
  text-align: center;
  font-weight: 800;
  font-size: 14px;
}

.doc-credit-strip {
  padding: 7px 20px;
  background: var(--shaded-cell);
  color: var(--ink-muted);
  font-size: 10.5px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}

/* ==================== ARCHIVE & MODAL VIEWS ==================== */
.archive-shell { display: flex; flex-direction: column; gap: 14px; }

.archive-vault-card,
.archive-search-card {
  background: #10141f;
  border: 1px solid var(--topbar-border);
  border-radius: 12px;
  padding: 16px 20px;
}

.archive-vault-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.vault-eyebrow { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: #818cf8; }
.vault-desc { margin: 4px 0 0; font-size: 12.5px; color: #94a3b8; }
.vault-btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

.archive-filter-bar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.arch-field { display: flex; flex-direction: column; gap: 5px; }
.arch-field label, .depts-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.arch-field input,
.arch-field select {
  height: 36px;
  padding: 0 10px;
  background: #090c14;
  border: 1px solid var(--topbar-border);
  border-radius: 6px;
  color: #f8fafc;
  outline: none;
}

.arch-field input:focus,
.arch-field select:focus {
  border-color: var(--indigo);
}

.archive-count-line { margin: 14px 0 10px; font-family: var(--font-mono); font-size: 11px; color: #64748b; }
.archive-cards-list { display: flex; flex-direction: column; gap: 8px; }

.arch-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  background: #151a28;
  border: 1px solid var(--topbar-border);
  border-radius: 8px;
}
.arch-row.active { border-color: var(--indigo); box-shadow: inset 3px 0 0 var(--indigo); }
.arch-row-title { font-weight: 700; font-size: 14px; color: #f8fafc; display: flex; gap: 8px; align-items: center; }
.arch-row-sub { margin-top: 3px; font-family: var(--font-mono); font-size: 11.5px; color: #94a3b8; }
.arch-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.arch-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #0b0e17;
  border: 1px solid var(--topbar-border);
  color: #cbd5e1;
}
.arch-snippet {
  margin-top: 8px;
  padding: 6px 10px;
  background: #0b0e17;
  border-left: 2px solid var(--amber);
  font-size: 12px;
  color: #cbd5e1;
}
mark { background: rgba(245, 158, 11, 0.35); color: #ffffff; padding: 0 2px; }

/* ==================== SHOW SETUP MODAL & WELCOME GUIDE ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(4, 6, 12, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-card {
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #10141f;
  border: 1px solid #2a344d;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.75);
}

.modal-head, .modal-foot {
  padding: 14px 20px;
  background: #0c1019;
  border-bottom: 1px solid var(--topbar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-foot { border-bottom: none; border-top: 1px solid var(--topbar-border); justify-content: flex-end; gap: 8px; }
.modal-title { margin: 2px 0 0; font-size: 16px; font-weight: 700; color: #ffffff; }
.modal-body { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 12px; }

/* Onboarding Instructions Banner */
.setup-guide-box {
  background: linear-gradient(135deg, rgba(91, 91, 246, 0.14), rgba(15, 23, 42, 0.8));
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 10px;
  padding: 13px 15px;
}

.setup-guide-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: #e0e7ff;
  font-size: 13px;
  margin-bottom: 8px;
}

.setup-guide-steps {
  margin: 0;
  padding-left: 18px;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setup-guide-steps strong {
  color: #ffffff;
}

.logo-upload-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px;
  background: #0b0e17;
  border: 1px solid var(--topbar-border);
  border-radius: 8px;
}
.logo-thumb-frame {
  width: 80px;
  height: 56px;
  border-radius: 6px;
  border: 1px dashed #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #64748b;
  flex-shrink: 0;
  overflow: hidden;
}
.logo-thumb-frame img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-upload-text p { margin: 3px 0 7px; font-size: 11.5px; color: #94a3b8; }
.logo-btn-row { display: flex; gap: 6px; }

/* Staff & Cast Roster Builders */
.roster-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.roster-modal-hint {
  margin: 4px 0 8px;
  font-size: 11.5px;
  color: #94a3b8;
}

.tpl-roster-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tpl-roster-pair {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  padding: 10px;
  background: #0b0e17;
  border: 1px solid var(--topbar-border);
  border-radius: 8px;
  align-items: start;
}

.tpl-role-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tpl-role-box input,
.tpl-cast-track-row input {
  height: 32px;
  padding: 0 9px;
  background: #07090f;
  border: 1px solid var(--topbar-border);
  border-radius: 5px;
  color: #f8fafc;
  font-size: 12px;
  outline: none;
  width: 100%;
}

.tpl-role-box input.role-title-inp { font-weight: 700; color: #a5b4fc; }
.tpl-cast-track-row input.track-role-inp { font-weight: 700; color: #fbbf24; }
.tpl-role-box input:focus,
.tpl-cast-track-row input:focus { border-color: var(--indigo); }

.tpl-cast-track-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr auto;
  gap: 8px;
  padding: 9px 10px;
  background: #0b0e17;
  border: 1px solid var(--topbar-border);
  border-radius: 8px;
  align-items: center;
}

.has-roster-options {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-muted) 50%),
    linear-gradient(135deg, var(--ink-muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 26px !important;
}

.toast-stack { position: fixed; bottom: 18px; right: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.pro-toast {
  padding: 9px 14px;
  background: #141926;
  border: 1px solid var(--indigo);
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
  .doc-split-top,
  .signed-footer-grid,
  .archive-filter-bar,
  .modal-grid-3 {
    grid-template-columns: 1fr;
  }
  .doc-timings-pane { border-right: none; border-bottom: 1px solid var(--sheet-divider); }
  .staff-pair-row { grid-template-columns: 180px 1fr; }
  .staff-role-cell.col-3 { border-left: none; border-top: 1px solid var(--sheet-row-border); }
  .signed-label-cell { justify-content: flex-start; border-right: none; border-bottom: 1px solid var(--sheet-row-border); }
  .signed-input-cell { border-right: none; border-bottom: 1px solid var(--sheet-row-border); }
}

@media (max-width: 720px) {
  .modal-grid-2,
  .tpl-roster-pair,
  .tpl-cast-track-row {
    grid-template-columns: 1fr;
  }
}

/* ==================== CRISP A4 PRINT / PDF STYLING ==================== */
.print-only { display: none; }

@media print {
  @page {
    size: A4 portrait;
    margin: 9mm 10mm;
  }

  html, body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 8.8pt;
    line-height: 1.35;
  }

  .no-print { display: none !important; }
  .print-only { display: block !important; }

  .ps-doc {
    border: 1.5px solid #0c1220;
    border-radius: 8px;
    overflow: hidden;
  }

  .ps-banner {
    background: #0c1220 !important;
    color: #ffffff !important;
    padding: 11px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .ps-eyebrow { font-size: 7pt; letter-spacing: 0.12em; text-transform: uppercase; color: #a5b4fc !important; }
  .ps-title { font-size: 15.5pt; font-weight: 800; text-transform: uppercase; margin: 1px 0; }
  .ps-venue { font-size: 8.5pt; color: #cbd5e1 !important; }
  .ps-meta-pills { display: flex; gap: 8px; align-items: center; }

  .ps-pill {
    background: #ffffff !important;
    color: #0f172a !important;
    padding: 4px 9px;
    border-radius: 5px;
    min-width: 64px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .ps-pill span { display: block; font-size: 6.5pt; font-weight: 700; text-transform: uppercase; color: #64748b; }
  .ps-pill strong { font-size: 9.5pt; font-family: var(--font-mono); }

  .ps-split { display: grid; grid-template-columns: 1.85fr 1fr; border-bottom: 1px solid #cbd5e1; }
  .ps-pane { padding: 8px 12px; }
  .ps-pane:first-child { border-right: 1px solid #cbd5e1; }
  .ps-pane-h { font-size: 7.5pt; font-weight: 800; text-transform: uppercase; margin-bottom: 5px; }

  .ps-bar {
    background: #0c1220 !important;
    color: #ffffff !important;
    font-size: 7.5pt;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 12px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .ps-table { width: 100%; border-collapse: collapse; font-size: 8.4pt; }
  .ps-table th, .ps-table td { border: 1px solid #cbd5e1; padding: 3.5px 7px; text-align: left; }
  .ps-table th {
    background: #e2e8f0 !important;
    font-size: 7.2pt;
    font-weight: 800;
    text-transform: uppercase;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .ps-staff-grid { display: grid; grid-template-columns: 22% 28% 22% 28%; font-size: 8.2pt; }
  .ps-staff-cell { padding: 4px 8px; border-bottom: 1px solid #e2e8f0; border-right: 1px solid #e2e8f0; }
  .ps-staff-cell.role {
    background: #f8fafc !important;
    font-weight: 700;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .ps-band {
    padding: 6px 12px;
    font-size: 8.5pt;
    white-space: pre-wrap;
  }

  .ps-signed {
    display: grid;
    grid-template-columns: 18% 46% 36%;
    border-top: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
    font-size: 8.5pt;
  }
  .ps-signed > div { padding: 5px 10px; border-right: 1px solid #cbd5e1; }
  .ps-signed > div:last-child { border-right: none; }
  .ps-signed-lbl {
    background: #f8fafc !important;
    font-weight: 800;
    text-align: right;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .ps-foot {
    padding: 4px 12px;
    display: flex;
    justify-content: space-between;
    font-size: 7pt;
    color: #64748b;
    background: #f8fafc !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
/* ==================== MULTI-SHOW SWITCHER & HANDOVER GUIDE ==================== */
.prod-switcher-wrap {
  display: inline-flex;
  align-items: center;
  background: #07090e;
  border: 1px solid var(--topbar-border);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
}

.prod-switcher-select {
  height: 26px;
  max-width: 195px;
  padding: 0 8px;
  background: transparent;
  border: none;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.prod-switcher-select option {
  background: #0f1420;
  color: #f8fafc;
}

.prod-New-btn {
  height: 26px;
  padding: 0 8px;
  border: none;
  border-radius: 5px;
  background: rgba(91, 91, 246, 0.18);
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.prod-New-btn:hover {
  background: var(--indigo);
  color: #ffffff;
}

.handover-steps {
  margin-top: 8px;
  padding: 7px 10px;
  background: #090c14;
  border: 1px solid var(--topbar-border);
  border-radius: 6px;
  font-size: 11.5px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.handover-steps strong {
  color: #a5b4fc;
}