/* CBATexts site-wide style.
   Colors: navy (top bar, headings, main buttons) and greys. The schedule itself is
   greyscale so it reads the same on screen and on a black-and-white printer. */
:root {
  --navy: #1f3a5f;
  --navy-dark: #152a45;
  --grey: #eef0f2;
  --text: #1a1a1a;
  --muted: #5a6472;
  --font: "Segoe UI", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
body { font-family: var(--font); margin: 0; color: var(--text); background: #fff; }
main { padding: 16px 20px 32px; }

/* ---- Top bar ---- */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px;
          background: var(--navy); color: #fff; padding: 10px 20px; }
.brand { font-size: 24px; font-weight: bold; color: #fff; text-decoration: none; margin-right: 12px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { color: #fff; text-decoration: none; font-size: 17px; padding: 8px 14px; border-radius: 6px; }
.nav a:hover { background: var(--navy-dark); }
.nav a.active { background: #fff; color: var(--navy); font-weight: bold; }
.nav a.later { opacity: 0.75; }

/* ---- Headings ---- */
h1 { font-size: 26px; margin: 0 0 4px; color: var(--navy); }
h2 { font-size: 21px; margin: 18px 0 6px; color: var(--navy); }
.sub { font-size: 18px; margin: 0 0 14px; color: var(--muted); }

/* ---- Buttons (one style everywhere) ---- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.spacer { flex: 1; }
.btn { display: inline-block; font-family: var(--font); font-size: 19px; font-weight: bold;
       padding: 11px 20px; border: 2px solid var(--navy); border-radius: 8px;
       background: #fff; color: var(--navy); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--grey); }
.btn.main { background: var(--navy); color: #fff; }
.btn.main:hover { background: var(--navy-dark); }
.btn[disabled] { color: #999; border-color: #c4c9d0; background: #f6f7f9; cursor: not-allowed; }
.note { font-size: 14px; color: var(--muted); }

/* ---- Tables ---- */
.wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 900px; table-layout: fixed; }
th, td { border: 1px solid #b7bec8; padding: 6px 8px; font-size: 16px; vertical-align: top; }
thead th, th.job, td.job { background: var(--grey); }
thead th { text-align: center; }
th.job, td.job { width: 130px; text-align: left; font-weight: bold; }

/* ---- Schedule page ---- */
.hours { font-weight: normal; font-size: 17px; color: var(--muted); }
.date { font-size: 17px; display: block; }
.holiday-label { display: inline-block; margin-top: 4px; padding: 1px 6px; border: 2px solid var(--text);
                 font-weight: bold; font-size: 13px; letter-spacing: 1px; background: #fff; }

/* Crew changes in greyscale only, so they survive a black-and-white printer:
   crews alternate white / light grey, the crew row is dark with white text,
   and a thick black line marks each handoff. */
.crew-row th { font-size: 17px; text-align: center; letter-spacing: 1px; }
.crew-row th.shade-0 { background: #3a3a3a; color: #fff; }
.crew-row th.shade-1 { background: #767676; color: #fff; }
.shade-0 { background: #fff; }
.shade-1 { background: #e4e4e4; }
thead th.shade-0 { background: #f2f2f2; }
thead th.shade-1 { background: #d2d2d2; }
th.handoff, td.handoff { border-left: 4px solid #000; }
.extra { line-height: 1.35; }
.open { font-weight: bold; font-style: italic; }
.dup { font-weight: bold; }
tr.extras td { font-size: 15px; }
tr.extras td.job { font-style: italic; }
.none { color: var(--muted); }
.warn { font-size: 13px; font-weight: bold; border-top: 1px dashed var(--text); margin-top: 4px; padding-top: 3px; }
.print-only { display: none; }

/* ---- Top bar: who is entering ---- */
.who { margin-left: auto; color: #fff; font-size: 15px; }
.who form { display: flex; align-items: center; gap: 8px; margin: 0; }
.who input { font-size: 15px; padding: 5px 8px; border-radius: 6px; border: 0; margin-left: 6px; }
.link-btn { background: none; border: 0; color: #fff; text-decoration: underline; cursor: pointer; font-size: 15px; }
.btn.small { font-size: 15px; padding: 6px 12px; border-radius: 6px; }
.btn.light { background: #fff; color: var(--navy); border-color: #fff; }
.flash { background: #fff8d6; border: 2px solid #b08a00; border-radius: 8px; padding: 10px 14px;
         margin-bottom: 14px; font-size: 17px; }

/* ---- Names on the schedule ---- */
button.name { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
              text-align: left; text-decoration: underline dotted #8a8a8a; text-underline-offset: 3px; }
button.name:hover { text-decoration: underline; color: var(--navy); }
.person.struck button.name { text-decoration: line-through; color: #666; }
.mark { font-size: 12px; font-style: italic; color: var(--muted); }
.mark-box { font-style: normal; font-weight: bold; letter-spacing: 1px; color: var(--text);
            border: 1px solid var(--text); padding: 0 4px; white-space: nowrap; }
.undo-form { display: inline-flex; align-items: center; gap: 8px; }
.undo-what { max-width: 22em; }
.wrong-btn { font-size: 13px; background: none; border: 1px solid #aab1bb; border-radius: 5px;
             color: var(--muted); padding: 3px 7px; cursor: pointer; margin-left: 6px; }
.wrong-btn:hover { border-color: var(--navy); color: var(--navy); }
.wrong-col { width: 70px; }
.wd-line { background: var(--grey); padding: 8px 10px; border-radius: 6px; }
.wd-note { width: 100%; }
.wd-note textarea { width: 100%; font: inherit; font-size: 16px; }
.charges tr.flagged td { font-weight: bold; }
.bypass-panel { border: 3px solid #b08a00; background: #fff8d6; }
.add-person summary { cursor: pointer; font-size: 18px; }
.add-form { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; margin-top: 12px; }
.people-table .qual-col { text-align: center; width: 92px; font-size: 14px; }
.people-table td.pending { outline: 2px dashed #b08a00; outline-offset: -3px; }
.qual-box { width: 22px; height: 22px; cursor: pointer; }
.qual-form { margin: 0; }
.pending-note { font-size: 12px; font-style: italic; margin: 2px 0 4px; }
.ot-table .total-col { background: var(--grey); }
.footnote { font-size: 14px; border-top: 1px solid #c9ced6; padding-top: 6px; margin-top: 14px; }
.as-of { font-size: 13px; }
.rot-grid { border-collapse: collapse; min-width: 0; width: auto; table-layout: auto; margin: 10px 0; }
.rot-grid th, .rot-grid td { padding: 2px; font-size: 13px; text-align: center; }
.rot-grid th:first-child { text-align: left; white-space: nowrap; padding-right: 8px; }
.rot-grid select { font-size: 13px; padding: 2px; }
.rot-grid td.cell-D { background: #fff; }
.rot-grid td.cell-N { background: #cfd4da; }
.rot-grid td.cell-OFF { background: var(--grey); }
.preview-table { min-width: 0; }
.preview-table tr.bad td { font-weight: bold; background: #fff1c7; }
.warn-text { font-weight: bold; }
.holiday-list { columns: 3; padding-left: 20px; }
.link-btn.dark { color: var(--navy); font-size: 14px; }
.not-filled { color: var(--muted); font-style: italic; }
.history-tabs { margin-bottom: 12px; }
.history-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.records-table { min-width: 900px; table-layout: auto; }
.records-table td { font-size: 14px; }
.records-table tr.undone td { color: #777; }
.records-table tr.undone .what { text-decoration: line-through; }
.records-table tr.target td { background: #fff1c7; }
.type-tag { font-size: 12px; font-weight: bold; letter-spacing: 0.5px; white-space: nowrap; }

/* ---- Calendar ---- */
/* Pinned top: the month and one compact "Enter:" line. */
.cal-head { margin-bottom: 6px; }
.cal-monthbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.cal-month { margin: 0 6px; font-size: 30px; line-height: 1.1; min-width: 220px; text-align: center; }
.cal-monthbar .undo-form { font-size: 14px; display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.cal-monthbar .undo-what { display: inline-block; max-width: 340px; white-space: nowrap; overflow: hidden;
                           text-overflow: ellipsis; vertical-align: middle; }
.cal-monthbar .btn { padding-top: 6px; padding-bottom: 6px; }
.cal-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 15px;
             border: 2px solid #c9ced6; border-radius: 8px; padding: 5px 10px; background: #f7f8fa; }
.cal-tools label { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.cal-tools input[type=radio] { width: 17px; height: 17px; margin: 0; }
.cal-tools select { font-size: 14px; padding: 1px 2px; }
.whole-week { font-size: 13px; color: var(--muted); }
.cal-sep { border-left: 1px solid #c9ced6; align-self: stretch; }
.cal-count-text { font-weight: bold; }
.cal-hint { font-size: 13px; margin: 0; }
.cal-flags { margin-top: 6px; border: 2px solid #b08a00; background: #fff8d6; border-radius: 8px; padding: 4px 10px; font-size: 14px; }
.cal-flags summary { cursor: pointer; font-weight: bold; }
.cal-flags .flag-list { margin: 6px 0 2px; }
.cal-head .flash { margin: 6px 0 0; padding: 6px 10px; }
.flag-list { columns: 2; margin: 0; }

/* The grid scrolls in its own box (height set by the page script); headers and names stay put. */
.cal-wrap { overflow: auto; border: 1px solid #c9ced6; max-height: 70vh; }
.cal-grid { border-collapse: separate; border-spacing: 0; min-width: 0; width: auto; table-layout: fixed; user-select: none; }
.cal-grid th, .cal-grid td { border: 0; border-right: 1px solid #c9ced6; border-bottom: 1px solid #c9ced6;
                             padding: 1px 2px; font-size: 12px; text-align: center; width: 34px; }
.cal-grid thead th, .cal-grid thead td { position: sticky; top: 0; z-index: 2; background: #fff; }
.cal-grid thead tr:last-child > * { border-bottom: 2px solid #8a93a0; }
.cal-grid .cal-name-col { width: 190px; min-width: 190px; text-align: left; font-size: 14px; white-space: nowrap;
                          position: sticky; left: 0; background: var(--grey); z-index: 1;
                          border-right: 2px solid #8a93a0; }
.cal-grid thead .cal-name-col { z-index: 3; }
.cal-date { cursor: pointer; touch-action: none; background: var(--grey); }
.cal-date .wd { display: block; font-weight: normal; color: var(--muted); }
.cal-date .dn { display: block; font-size: 15px; }
.cal-date .hol { display: block; font-size: 10px; border: 1px solid var(--text); }
.cal-date.past { color: #888; }
.cal-crews td { font-size: 11px; color: var(--muted); }
.cal-count { cursor: pointer; font-size: 10px; line-height: 1.2; height: 34px; vertical-align: top; }
.cal-count.flagged { background: #fff1c7; }
.flag-mark { font-size: 13px; }
.cal-grid thead .cal-date { background: var(--grey); }
.cal-grid .cal-group > * { background: #dfe3e8; font-weight: bold; text-align: left; }
.cal-cell { cursor: pointer; touch-action: none; height: 26px; }
.cal-cell.works-D { background: #eef0f2; }
.cal-cell.works-N { background: #d7dbe0; }
.cal-cell .works { color: #999; font-size: 10px; }
.cal-grid .sel { outline: 2px solid var(--navy); outline-offset: -2px; background: #cfe0f5 !important; }
.tag { display: block; font-size: 9px; font-weight: bold; letter-spacing: 0.3px; border: 1px solid var(--text);
       margin: 1px 0; background: #fff; }
.tag.vac { background: #1a1a1a; color: #fff; }
.tag.trn { border-style: dashed; }
.cal-pop { position: absolute; z-index: 20; width: 320px; background: #fff; border: 2px solid var(--navy);
           border-radius: 8px; padding: 10px 12px; box-shadow: 0 4px 14px rgba(0,0,0,0.2); font-size: 14px; }
.cal-pop h4 { margin: 8px 0 2px; font-size: 14px; }
.cal-pop ul { margin: 0; padding-left: 18px; }
@media print {
  .cal-wrap { max-height: none !important; overflow: visible; border: 0; }
  .cal-month { font-size: 20px; text-align: left; margin: 0; }
  .cal-flags { border-width: 1px; background: #fff; }
  .cal-grid { width: 100%; table-layout: fixed; border-left: 1px solid #000; border-top: 1px solid #000; }
  .cal-grid th, .cal-grid td { font-size: 8px; padding: 0; width: auto; overflow: hidden; position: static !important;
                               border-color: #000; }
  .cal-grid .cal-name-col { width: 120px; min-width: 0; font-size: 10px; position: static; }
  .cal-date .dn { font-size: 11px; }
  .cal-count { font-size: 7px; height: auto; }
  .cal-cell { height: 12px; }
  .cal-wrap + .note { margin: 4px 0 0; font-size: 10px; }
  .tag { font-size: 7px; letter-spacing: 0; }
  .tag.vac { background: #fff !important; color: #000 !important; }
}
.bypass-text { font-size: 19px; font-weight: bold; }
.open-link { display: inline-block; font-weight: bold; font-style: italic; color: var(--navy); }

/* ---- Clickable empty space in a job cell, and on each extra's line ---- */
td.cell { position: relative; }
.cell-add { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; margin: 0; padding: 0;
            background: transparent; cursor: pointer; z-index: 0; display: block; }
.cell-body { position: relative; z-index: 1; pointer-events: none; }
.cell-body button.name, .cell-body a, .cell-body .grip { pointer-events: auto; }
/* 3.15: the grip handle for moving someone within a shift */
.grip { display: inline-block; cursor: grab; color: var(--navy); opacity: 0.45; font-weight: bold;
        letter-spacing: -3px; padding: 0 5px 0 0; user-select: none; }
.grip:hover { opacity: 1; }
.moving td[data-drop-job] { outline: 1px dashed #8aa3c2; outline-offset: -2px; }
td.drop-here { outline: 3px solid var(--navy) !important; outline-offset: -2px; background: #cfe0f5 !important; }
.plus { position: absolute; right: 6px; bottom: 2px; font-size: 20px; line-height: 1;
        color: var(--navy); opacity: 0.3; }
.cell-add:hover, .cell-add:focus-visible, .line-add:hover, .line-add:focus-visible {
  background: rgba(31, 58, 95, 0.10); outline: 2px solid var(--navy); outline-offset: -2px; }
.cell-add:hover .plus, .cell-add:focus-visible .plus,
.line-add:hover .plus, .line-add:focus-visible .plus { opacity: 1; }
.extra-line { display: flex; align-items: stretch; gap: 4px; }
.extra-line .person { white-space: nowrap; }
.line-add { flex: 1; min-width: 20px; min-height: 22px; border: 0; background: transparent;
            cursor: pointer; position: relative; border-radius: 4px; }
.line-add .plus { bottom: 1px; right: 4px; }
.history-row { margin-top: -6px; }
.history-form { display: flex; gap: 8px; align-items: center; }
.history-form input { font-size: 16px; padding: 4px 6px; }
.history-note { font-weight: bold; }

/* ---- Name pop-up ---- */
.popup { border: 2px solid var(--navy); border-radius: 10px; padding: 18px 22px; width: min(560px, 94vw); }
.popup::backdrop { background: rgba(0, 0, 0, 0.35); }
.popup-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.popup h2 { margin: 0; }
.popup h3 { margin: 14px 0 6px; font-size: 18px; color: var(--navy); }
.popup section { border-top: 1px solid #d0d4da; padding-top: 4px; }
/* "Before you approve" (RULES 3.13) */
.approve-box { border-color: #b45309; }
.approve-list { margin: 4px 0 10px; padding-left: 20px; }
.approve-list li { margin-bottom: 6px; }
.approve-box .field input { display: block; width: 100%; margin-top: 4px; font-size: 18px; padding: 8px; }
.approve-buttons { display: flex; gap: 12px; margin-top: 14px; }
.popup form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 6px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 18px; width: 100%; }
.choices label { display: flex; align-items: center; gap: 6px; }
.choices input[type=radio] { width: 20px; height: 20px; }
.field, .field input, .field select, select.field { font-size: 17px; padding: 6px 8px; }
.popup .note { width: 100%; margin: 0; }
.already { font-weight: bold; }
.nick-form { margin-top: 6px !important; }
.nick-form input { font-size: 16px; padding: 4px 6px; width: 10em; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 18px; margin: 12px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: bold; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { width: 22px; height: 22px; }
.od-who { font-size: 18px; }
.training-row { display: flex; gap: 10px; align-items: center; }

/* ---- Callout page ---- */
.panel { border: 2px solid #c9ced6; border-radius: 10px; padding: 12px 16px; margin: 12px 0; }
.panel h2 { margin-top: 0; }
.step0 { border-color: var(--navy); }
.warn-panel { border-color: #b08a00; background: #fff8d6; }
.done-panel { text-align: center; }
.option-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0; }
.option-text { font-size: 19px; font-weight: bold; }
.mode-toggle span { font-size: 18px; }
table.calls { min-width: 760px; table-layout: auto; }
table.calls td { vertical-align: middle; }
table.calls .num { width: 36px; text-align: right; }
table.calls .hrs { width: 80px; text-align: right; }
table.calls .crew-col { width: 60px; text-align: center; }
table.calls .buttons { white-space: nowrap; }
form.inline { display: inline; }
tr.struck .strike { text-decoration: line-through; color: #666; }
tr.struck td { background: #f1f1f1; }             /* screen only; print drops backgrounds */
.status { font-size: 15px; }
.note-tag { font-size: 13px; font-style: italic; color: var(--muted); }
.backfill-title { margin-top: 28px; }
.section { margin: 18px 0; }
.section h3 { font-size: 18px; margin: 0 0 4px; }
.list-header { margin: 0 0 6px; color: var(--muted); }
.tie-chain { font-weight: normal; }
.section.locked table { opacity: 0.45; }
.locked-note { border-style: dashed; }
/* 3.8: pick which backfill list to open */
.backfill-picks { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 14px; }
.backfill-pick { max-width: 330px; }
.backfill-pick .note { font-size: 13px; margin-top: 3px; }
.locked-btn { opacity: 0.45; cursor: not-allowed; }
/* 3.10: a set of two, offered inline on the person's row */
.set-note { font-size: 13px; font-weight: bold; color: var(--navy); margin-top: 3px; max-width: 360px; }
.set-answers form.inline { margin: 0 4px 4px 0; }
.set-only summary { font-size: 13px; cursor: pointer; text-decoration: underline; margin-top: 2px; }
.set-only-form { margin-top: 6px; }
/* 3.5: forcing a full shift */
.force-panel { border-style: dashed; margin-top: 24px; }
.force-panel select { font-size: 16px; max-width: 100%; }
.force-warn { font-weight: bold; }
.last-resort { border-style: dashed; margin-top: 30px; }

/* ---- Coming-later page ---- */
.later-box { max-width: 560px; margin: 40px auto; padding: 28px; border: 2px solid var(--navy);
             border-radius: 10px; text-align: center; }
.later-box p { font-size: 19px; }

/* ---- 7g: the call lists on the back of the 11x17 printout (printed only) ---- */
.call-sheet { display: none; }
.print-group { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.print-tip { font-size: 14px; color: var(--muted); max-width: 230px; line-height: 1.2; }
@media print {
  html[data-print="tabloid"] .call-sheet { display: block; break-before: page; }
  /* The front on 11x17: the whole week on one page, a little larger than on letter. */
  html[data-print="tabloid"] th, html[data-print="tabloid"] td { font-size: 14px; padding: 4px 5px; }
  html[data-print="tabloid"] h1 { font-size: 22px; }
  html[data-print="tabloid"] h2 { font-size: 18px; }
  html[data-print="tabloid"] .date, html[data-print="tabloid"] .crew-row th { font-size: 15px; }
  html[data-print="tabloid"] th.job, html[data-print="tabloid"] td.job { width: 100px; }
  html[data-print="tabloid"] .shift-block { break-inside: avoid; }
  .call-sheet { color: #000; }
  .cs-title { font-size: 18pt; margin: 0 0 0.12in; }
  .cs-columns { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); column-gap: 0.15in; align-items: start; }
  .cs-col h2 { font-size: 13pt; margin: 0 0 0.04in; padding-bottom: 2px; border-bottom: 2px solid #000; }
  .cs-count { font-weight: normal; font-size: 10pt; }
  .cs-col ol { list-style: none; margin: 0; padding: 0; }
  .cs-col li { display: grid; grid-template-columns: 1.7em minmax(0, 1fr) auto 2.6em; column-gap: 4px;
               align-items: baseline; break-inside: avoid; }
  .cs-rank { font-weight: bold; }
  .cs-name { overflow-wrap: anywhere; }
  .cs-hrs { text-align: right; }
  .cs-phone { grid-column: 1 / -1; border-bottom: 1px solid #000; }   /* write the phone number here */
  .cs-note { font-size: 10pt; margin: 0.1in 0 0; border-top: 1px solid #000; padding-top: 3px; }
  /* Font steps: the longest column picks the largest that still fits on one page (views.CALL_SHEET_STEPS). */
  /* The line under each name is room to write a phone number. */
  .size-1 li { font-size: 11pt; line-height: 1.2; }  .size-1 .cs-phone { height: 1.6em; }
  .size-2 li { font-size: 10pt; line-height: 1.2; }  .size-2 .cs-phone { height: 1.4em; }
  .size-3 li { font-size: 9pt; line-height: 1.15; }  .size-3 .cs-phone { height: 1.2em; }
  .size-4 li { font-size: 8pt; line-height: 1.1; }   .size-4 .cs-phone { height: 1.0em; }

  /* The schedule printouts: the page margin is zero (schedule.html), so Chrome and Edge have no room
     for their own header and footer. The margins are padding inside the page instead. */
  html[data-print] body { margin: 0; }
  html[data-print] main { position: relative; }
  html[data-print="letter"] main { padding: 10mm !important; }
  html[data-print="tabloid"] main { padding: 0.35in !important; }
  html[data-print="tabloid"] .call-sheet { padding-top: 0.35in; }       /* the back page's top margin */
  /* The week in large type in the top right corner (the space beside the title). */
  .print-only.print-week { position: absolute; top: 10mm; right: 10mm; margin: 0; text-align: right; }
  html[data-print="tabloid"] .print-only.print-week { top: 0.35in; right: 0.35in; }
  .pw-range { font-size: 26pt; font-weight: 900; letter-spacing: 1px; line-height: 1.1; }
  html[data-print="tabloid"] .pw-range { font-size: 34pt; }
  .pw-days { font-size: 10pt; margin-top: 2px; }
  html[data-print="tabloid"] .pw-days { font-size: 12pt; }
}

/* ---- Printout: black and white, no top bar, no buttons ---- */
@media print {
  @page { size: landscape; margin: 10mm; }
  main { padding: 0; }
  .topbar, .no-print { display: none !important; }
  .print-only { display: block; font-size: 11px; margin-top: 6px; }
  * { color: #000 !important; background: transparent !important; }
  body { background: #fff !important; }
  /* Keep the grey crew shading on paper (browsers drop backgrounds unless told). */
  .shade-0, .shade-1 { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  td.shade-1 { background: #e6e6e6 !important; }
  thead th.shade-1, .crew-row th.shade-1 { background: #cccccc !important; }
  .crew-row th { font-weight: bold; }
  h1 { font-size: 18px; }
  .sub { font-size: 13px; margin-bottom: 4px; }
  h2 { font-size: 15px; margin: 8px 0 3px; }
  .hours { font-size: 13px; }
  .wrap { overflow: visible; }
  table { min-width: 0; width: 100%; }
  th, td, tr.extras td { border-color: #000; font-size: 11px; padding: 3px 4px; }
  th.handoff, td.handoff { border-left: 4px solid #000; }
  td.cell { position: static; }                  /* click spots only matter on screen */
  .status, .note-tag { font-size: 11px; }
  .section h3 { font-size: 13px; }
  .section.locked table { opacity: 1; }          /* locked lists print full-strength */
  tr.struck .strike { color: #000 !important; }
  button.name { text-decoration: none !important; }
  .person.struck button.name { text-decoration: line-through !important; }
  .crew-row th { font-size: 13px; }
  th.job, td.job { width: 80px; }
  .date { font-size: 12px; }
  .holiday-label { font-size: 10px; border-color: #000; }
  .shift-block { break-inside: avoid; }
}

/* ---- Session 6: sign-in pages, accounts, backups ---- */
.narrow { max-width: 560px; }
.stack-form { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.stack-form .field { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.stack-form .field input { width: 100%; max-width: 360px; }
.person.struck span.name { text-decoration: line-through; color: #666; }
tr.struck-row td { background: #f1f1f1; color: #555; }
.who a.link-btn { color: #fff; }
.backup-ok { font-weight: bold; }
@media print {
  .person.struck span.name { text-decoration: line-through !important; color: #000 !important; }
}

/* ---- Keeping your place (static/stay.js) and "Next to call" ---- */
tr.next-row td { background: #fff1c7; border-top: 3px solid var(--navy); border-bottom: 3px solid var(--navy); }
tr.next-row td:first-child { border-left: 3px solid var(--navy); }
tr.next-row td:last-child { border-right: 3px solid var(--navy); }
.next-tag { display: block; font-size: 13px; font-weight: bold; color: var(--navy); text-transform: uppercase;
            letter-spacing: 0.3px; }
.stay-toast { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 50; max-width: 90vw;
              background: #fff8d6; border: 3px solid #b08a00; border-radius: 10px; padding: 10px 16px;
              font-size: 17px; font-weight: bold; box-shadow: 0 4px 14px rgba(0,0,0,0.25);
              display: flex; gap: 16px; align-items: center; }
body.saving main form button { opacity: 0.6; pointer-events: none; }
body.saving { cursor: progress; }
@media print {
  tr.next-row td { background: #fff !important; border-color: #000 !important; }
  .next-tag { color: #000 !important; }
}

/* ---- Practice copy (python app.py --practice) ---- */
.practice-banner { background: repeating-linear-gradient(-45deg, #ff7a00 0 18px, #ffb000 18px 36px); color: #000;
                   font-size: 22px; font-weight: 900; letter-spacing: 2px; text-align: center; padding: 6px 12px;
                   border-bottom: 4px solid #000; }
.practice-banner span { display: inline-block; margin-left: 14px; font-size: 15px; font-weight: bold; letter-spacing: 0; }
.practice-watermark { display: none; }
/* The online demo's banner: calmer than the practice copy's, same place. */
.demo-banner { background: #dfe9f5; font-size: 17px; letter-spacing: 0; border-bottom: 2px solid var(--navy); }
.demo-banner form { display: inline; margin-left: 12px; }
.practice-panel { border: 3px solid #ff7a00; background: #fff4e5; }
@media print {
  .practice-banner { background: #fff !important; border: 4px solid #000; font-size: 18px; padding: 4px; margin-bottom: 6px; }
  /* Repeats on every printed page, so no page of a practice printout can pass for the real thing. */
  .practice-watermark { display: block; position: fixed; top: 45%; left: 0; right: 0; text-align: center;
                        transform: rotate(-30deg); font-size: 90px; font-weight: 900; color: #d0d0d0 !important;
                        z-index: -1; pointer-events: none; letter-spacing: 6px; }   /* behind the page, so it never hides text */
}

/* ---- 7a: past the last week the schedule shows ---- */
.beyond-panel { border: 3px solid var(--navy); background: #eef3fb; display: flex; flex-wrap: wrap;
                align-items: center; gap: 12px 24px; }
.beyond-text { font-size: 19px; font-weight: bold; margin: 0; flex: 1 1 360px; }
.btn.big { font-size: 21px; padding: 12px 24px; }
.btn-sub { display: block; font-size: 14px; font-weight: normal; }
.cal-grid thead th.cal-date.focus { background: var(--navy); color: #fff; }
.cal-grid thead th.cal-date.focus .wd { color: #dfe7f3; }
.cal-focus-note { margin: 6px 0 0; font-size: 14px; font-weight: bold; color: var(--navy); }
@media print {
  .cal-grid thead th.cal-date.focus { background: #fff !important; color: #000 !important; }
}

/* ---- 7b: runs of call-offs and sets of two (RULES 3.10) ---- */
.run-panel { border-color: var(--navy); }
.run-shifts { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.blocked-panel h2 { margin: 0 0 4px; }
.handled-panel { border: 3px solid #555; background: #f1f1f1; }
.late-panel { border: 3px dashed #b08a00; background: #fff8d6; }    /* 3.14: entered after the fact */
table.calls.greyed { opacity: 0.55; }
.handled-form summary { cursor: pointer; }
.drag-run { outline: 3px solid var(--navy); outline-offset: -1px; background: #cfe0f5 !important; }
.out-through { display: block; margin-top: 8px; }
@media print {
  table.calls.greyed { opacity: 1; }
  .run-shifts .btn { border: 1px solid #000; }
}

/* Anything marked hidden stays hidden, even when another rule gives it a layout (e.g. .choices). */
[hidden] { display: none !important; }

/* Schedule cells you can drag across (RULES 3.10): a finger moving sideways drags instead of
   panning, while up-and-down still scrolls the page. No text selection while dragging. */
.shift-block table.can-mark td.cell, .shift-block table.can-mark tr.extras td { touch-action: pan-y; user-select: none; -webkit-user-select: none; }

/* ---- 7c: out long-term (RULES 3.11) ---- */
.lt-box { margin-top: 4px; padding: 4px 6px; border-left: 4px solid #555; background: #f1f1f1; font-size: 14px; }
.lt-return { margin-top: 4px; }
.lt-return summary { display: inline-block; list-style: none; cursor: pointer; }
.lt-return summary::-webkit-details-marker { display: none; }
.tag.lt { background: #fff; border: 2px solid #000; color: #000; }
