:root { color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f7f8fa; color: #1c1e21; font-size: 14px;
}
.wrap { display: flex; flex-direction: column; height: 100vh; min-height: 560px; }

/* Use the laptop screen better: scale the chrome (toolbar, week strip, sidebar,
   popups) up ~15%. The board area is intentionally left at 1 so its own zoom and
   drag math are untouched; station tiles get their text bumped directly. */
.toolbar, .weekstrip, .side, .modal, .picker, .fontpop, .scopepop { zoom: 1.15; }

/* Toolbar */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; background: #fff; border-bottom: 1px solid #e3e6ea;
}
.toolbar h1 { font-size: 15px; font-weight: 650; margin: 0 6px 0 0; }
/* Title doubles as the account button (who am I + sign out) */
.acctwrap { position: relative; }
.acctbtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; background: none;
  font-family: inherit; font-size: 15px; font-weight: 700; color: #1c1e21; cursor: pointer; padding: 5px 8px; border-radius: 8px; }
.acctbtn:hover { background: #f0f2f5; }
.acctcaret { font-size: 10px; color: #9aa0a6; }
.acctmenu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 80; min-width: 190px; display: none;
  background: #fff; border: 1px solid #e3e6ea; border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.16); padding: 11px; }
.acctmenu.show { display: block; }
.acctmenu .acctwho { font-size: 13px; color: #374151; font-weight: 700; margin-bottom: 9px; line-height: 1.35; }
.acctmenu .acctwho .arole { display: block; color: #8a909a; font-weight: 600; font-size: 11.5px; margin-top: 2px; }
.acctmenu .btn { width: 100%; }
.remotesync { display: none; align-items: center; gap: 8px; margin-left: 4px; padding: 4px 8px 4px 10px;
  background: #fff7e0; border: 1px solid #e6c84d; border-radius: 8px; font-size: 12px; font-weight: 700; color: #7a5c0a; }
.remotesync.show { display: flex; }
.remotesync .rsmsg { white-space: nowrap; }
.remotesync .btn { padding: 4px 10px; font-size: 11px; width: auto; }

.pwfoot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.pwfoot .btn { width: auto; flex: 1; }
.pwfoot .btn.primary { flex: 1.2; }
.mode-pill { display: inline-flex; border: 1px solid #d4d8dd; border-radius: 8px; overflow: hidden; }
.mode-pill button { border: 0; background: #fff; padding: 7px 13px; cursor: pointer; font-size: 13px; font-weight: 600; color: #555; }
.mode-pill button.active { background: #2f6fed; color: #fff; }
.datebox { display: inline-flex; align-items: center; gap: 4px; }
.datebox button.nav { border: 1px solid #d4d8dd; background: #fff; width: 30px; height: 32px; border-radius: 7px; cursor: pointer; font-size: 15px; }
.datebox input { border: 1px solid #d4d8dd; border-radius: 7px; padding: 6px 8px; font-size: 13px; }
.btn { border: 1px solid #d4d8dd; background: #fff; color: #1c1e21; padding: 7px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.btn:hover { background: #f0f2f5; }
.btn.primary { background: #2f6fed; border-color: #2f6fed; color: #fff; }
.btn.primary:hover { background: #285fd0; }
.btn.green { background: #2fae6b; border-color: #2fae6b; color: #fff; }
.btn.green:hover { background: #279a5d; }
.btn.dark { background: #2b3242; border-color: #2b3242; color: #fff; }
.btn.dark:hover { background: #1f2532; }
.btn.danger { color: #c0392b; }
.spacer { flex: 1; }
.statusmsg { color: #2fae6b; font-size: 12px; font-weight: 600; min-height: 16px; }
.hint { color: #6b7280; font-size: 12px; }

/* Layout */
.main { flex: 1; display: flex; min-height: 0; }

/* Left panel */
.side { width: 248px; flex: 0 0 248px; background: #fff; border-right: 1px solid #e3e6ea; display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  transition: width .18s ease, flex-basis .18s ease; }
.side.rail { width: 40px; flex-basis: 40px; }
.side.rail .section { display: none !important; }
.side.rail .filedot, .side.rail .filestat { display: none; }
.side.rail .side-foot { margin-top: auto; padding: 8px 5px 10px; border-top: none; }
.side.rail .filerow { justify-content: center; }
.sidetoggle { flex: none; margin-left: auto; width: 26px; height: 26px; border: 1px solid #d4d8dd; background: #fff;
  border-radius: 7px; cursor: pointer; font-size: 16px; font-weight: 700; color: #555; line-height: 1; padding: 0; }
.sidetoggle:hover { background: #f0f2f5; }
.side.rail .sidetoggle { margin-left: 0; width: 28px; height: 32px; }
.side h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; margin: 14px 14px 8px; }
.add-row { display: flex; gap: 6px; padding: 0 14px 10px; }
.add-row input { flex: 1; border: 1px solid #d4d8dd; border-radius: 7px; padding: 7px 9px; font-size: 13px; min-width: 0; }
.add-worker-wrap { padding: 0 14px 10px; display: flex; justify-content: center; }
.add-worker-wrap .add-worker-btn { width: 100%; margin: 0; }
.modal.addworker { width: 380px; }
.modal.addworker .awlabel { display: block; font-size: 12px; font-weight: 700; color: #5c6370; margin: 0 0 6px; }
.modal.addworker .awinput { width: 100%; box-sizing: border-box; border: 1px solid #d4d8dd; border-radius: 8px; padding: 9px 11px; font-size: 14px; font-family: inherit; margin-bottom: 14px; }
.modal.addworker .awshifts { display: flex; flex-direction: column; gap: 6px; }
.modal.addworker .awshift { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 1px solid #d4d8dd; background: #fff; border-radius: 8px; padding: 9px 11px; cursor: pointer; font: inherit; }
.modal.addworker .awshift:hover { background: #f5f7fa; }
.modal.addworker .awshift.on { border-color: #2f6fed; background: #eef3ff; }
.modal.addworker .awdot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.modal.addworker .awmeta { font-size: 12px; color: #6b7280; margin-left: auto; }
.wlist { overflow-y: auto; padding: 0 14px 10px; flex: 1; }
.worker { background: #eef3ff; border: 1px solid #cfe0ff; color: #1d3f8a; border-radius: 8px; padding: 7px 9px; margin-bottom: 7px; font-weight: 600; }
.worker .top { display: flex; align-items: center; gap: 8px; cursor: grab; }
.worker.assigned { background: #eef0f2; border-color: #dcdfe3; color: #6b7280; }
.worker .tag { margin-left: auto; font-size: 11px; font-weight: 600; color: #8a93a0; }
.worker .x { cursor: pointer; color: #b4b9c0; font-weight: 700; padding-left: 4px; }
.worker .x:hover { color: #c0392b; }
.worker .note { font-size: 11.5px; font-style: italic; color: #b8742a; margin-top: 4px; font-weight: 500; line-height: 1.3; }
.worker .notebtn { font-size: 11px; color: #2f6fed; cursor: pointer; margin-top: 4px; font-weight: 600; display: inline-block; }
.worker.dragging { opacity: .4; }
.empty { color: #9aa0a6; font-size: 12px; padding: 4px 2px; }
.section { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.tlist { overflow-y: auto; padding: 0 14px 8px; flex: 1; }
#typesSection { overflow-y: auto; }
#typesSection .tlist { flex: none; overflow: visible; padding: 0 0 4px; max-height: none; }
#typesSection .add-row { padding: 0 0 10px; }
#typesSection .fbody { padding: 0 14px 12px; }
.trow { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid #e6e9ed; border-radius: 8px; margin-bottom: 7px; cursor: pointer; }
.trow:hover { background: #f6f8fb; }
.trow .sw { width: 20px; height: 20px; min-width: 20px; border: 1px solid #d4d8dd; border-radius: 5px; padding: 0; cursor: pointer; background: none; }
.trow .tname { font-weight: 600; font-size: 13px; word-break: break-word; }
.trow .cnt { margin-left: auto; font-size: 11px; color: #9aa0a6; }
.trow .addbtn { border: 1px solid #d4d8dd; background: #fff; border-radius: 6px; width: 26px; height: 26px; min-width: 26px; cursor: pointer; font-weight: 700; font-size: 15px; color: #2f6fed; line-height: 1; }
.trow .addbtn:hover { background: #eef3ff; }
.trow .x { cursor: pointer; color: #b4b9c0; font-weight: 700; padding-left: 2px; }
.trow .x:hover { color: #c0392b; }
.grow { margin-bottom: 8px; border: 1px solid #e6e9ed; border-radius: 8px; overflow: hidden; }
.grow .growhead { margin-bottom: 0; border: 0; border-radius: 0; }
.grow.open .growhead { border-bottom: 1px solid #e6e9ed; background: #f6f8fb; }
.growbody { padding: 6px 8px 8px; max-height: 220px; overflow-y: auto; background: #fafbfc; }
.growpick { display: flex; align-items: center; gap: 8px; padding: 5px 4px; font-size: 12.5px; color: #374151; cursor: pointer; border-radius: 5px; }
.growpick:hover { background: #eef3ff; }
.growpick input { margin: 0; flex-shrink: 0; }
.growpick .growsw { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; border: 1px solid rgba(0,0,0,.08); }
.palhint { padding: 4px 14px 12px; font-size: 11.5px; color: #9aa0a6; line-height: 1.4; }
.noterow { background: #fff3bf; border: 1px solid #f0d271; border-radius: 8px; padding: 7px 9px; margin-bottom: 7px; color: #4a3d12; }
.noterow-text { font-size: 12.5px; font-weight: 600; word-break: break-word; white-space: pre-wrap; outline: none; line-height: 1.3; overflow: visible; min-height: 1.3em; }
.noterow-text[contenteditable="true"] { background: #fffdf3; border-radius: 4px; box-shadow: 0 0 0 2px #e6c95a inset; }
.noterow-tag { display: inline-block; margin-top: 5px; font-size: 11px; font-weight: 700; color: #a8842a; }
.noterow-ctrls { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.seg { display: inline-flex; border: 1px solid #e6c95a; border-radius: 6px; overflow: hidden; }
.seg button { border: 0; background: #fff7e0; color: #7a611a; font-size: 11px; font-weight: 700; padding: 3px 8px; cursor: pointer; }
.seg button.on { background: #e6b800; color: #fff; }
.noterow-del { margin-left: auto; border: 1px solid #e2b7a4; background: #fff; color: #b4642a; border-radius: 6px; font-size: 11px; font-weight: 700; padding: 3px 8px; cursor: pointer; }
.noterow-del.confirm { background: #c0392b; color: #fff; border-color: #c0392b; }
#workersSection { overflow-y: auto; }
.btn.wide { width: 100%; margin-bottom: 8px; }
.folder { border-bottom: 1px solid #eceef1; }
.fhead { display: flex; align-items: center; gap: 7px; padding: 11px 14px; cursor: pointer; user-select: none;
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #4b5563; font-weight: 700; }
.fhead:hover { background: #f6f8fb; }
.fhead .caret { font-size: 10px; color: #9aa0a6; transition: transform .15s; }
.fhead.collapsed .caret { transform: rotate(-90deg); }
.fhead .fcount { margin-left: auto; background: #eef0f2; color: #6b7280; border-radius: 10px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.fbody { padding: 0 14px 12px; }
.fbody.hidden { display: none; }

/* Sticky notes on the board */
.sticky { position: absolute; width: 156px; height: 76px; background: #fff3bf; border: 1px solid #f0d271;
  border-radius: 9px; box-shadow: 0 2px 6px rgba(120,95,10,.18); padding: 9px 10px 8px; font-size: 12.5px; color: #4a3d12;
  display: flex; flex-direction: column; box-sizing: border-box; overflow: visible; }
.sticky.perm { box-shadow: 0 0 0 2px #f0c200, 0 3px 8px rgba(150,115,0,.28); }
.sticky .stext { outline: none; white-space: pre-wrap; word-break: normal; overflow-wrap: normal;
  line-height: 1.3; flex: 0 0 auto; overflow: visible; min-height: 1.3em; font-weight: 600; }
.sticky .sbadge { position: absolute; top: -9px; left: 9px; background: #e6b800; color: #fff; font-size: 9px; font-weight: 800;
  letter-spacing: .04em; padding: 1px 7px; border-radius: 8px; text-transform: uppercase; }
.sticky .sfoot { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex: 0 0 auto; padding-right: 14px; }
.sticky.sticky-ro { padding-bottom: 12px; }
.sticky .pin { cursor: pointer; font-size: 13px; opacity: .45; }
.sticky .pin.on { opacity: 1; }
.sticky .scol { width: 16px; height: 16px; min-width: 16px; border: 1px solid rgba(0,0,0,.15); border-radius: 4px; padding: 0; background: none; cursor: pointer; }
.sticky .sdel { margin-left: auto; cursor: pointer; color: #b48a00; font-weight: 700; }
.sticky .sdel:hover { color: #c0392b; }
.sticky .sresize { position: absolute; right: 1px; bottom: 1px; width: 15px; height: 15px; cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 45%, #d9b94e 45%, #d9b94e 60%, transparent 60%, transparent 72%, #d9b94e 72%, #d9b94e 86%, transparent 86%);
  border-bottom-right-radius: 8px; }
.sticky.dragsticky { cursor: move; }
.sticky.blocked { box-shadow: 0 0 0 2px rgba(192,57,43,.55), 0 2px 6px rgba(120,95,10,.18); }

/* Free-floating group labels (effective-dated overlays) */
.board-label { position: absolute; z-index: 4; pointer-events: none; user-select: none;
  font-family: "Segoe UI Semibold", "Segoe UI", system-ui, sans-serif; font-weight: 700;
  letter-spacing: .02em; line-height: 1.15; white-space: nowrap; color: #2b3242;
  text-shadow: 0 1px 0 rgba(255,255,255,.85), 0 0 8px rgba(251,252,253,.9);
  opacity: .92; }
.board-label.editable { pointer-events: auto; cursor: grab; opacity: 1; }
.board-label.editable:active { cursor: grabbing; }
.board-label .bl-text { padding: 0; }
.label-tag-row { display: flex; gap: 6px; margin-bottom: 6px; }
.label-tag-row .btn.wide { flex: 1; text-align: left; }
.label-tag-chips { padding: 0 0 8px; max-height: 100px; overflow-y: auto; flex: 0 0 auto; }
.label-placed-head { padding: 4px 0 6px; font-size: 11px; font-weight: 700; color: #6b7280;
  text-transform: uppercase; letter-spacing: .04em; }
.label-placed-list { padding: 0; max-height: 180px; overflow-y: auto; flex: 0 0 auto; }
.label-placed-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px;
  padding-bottom: 8px; border-bottom: 1px solid #eef0f2; }
.label-placed-row:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.label-placed-text { width: 100%; box-sizing: border-box; border: 1px solid #d4d8dd; border-radius: 7px;
  padding: 6px 8px; font-size: 13px; font-family: inherit; }
.label-placed-tools { display: flex; gap: 4px; }
.label-placed-tools .btn { padding: 2px 7px; font-size: 11px; min-height: 0; }
.section h2.subhead { margin-top: 16px; }

.fontpop { position: fixed; display: none; align-items: center; gap: 7px; z-index: 60;
  background: #2b3242; color: #fff; border-radius: 9px; padding: 5px 8px; box-shadow: 0 6px 18px rgba(0,0,0,.3); font-size: 12px; }
.fontpop.show { display: inline-flex; }
.fontpop .fplabel { font-weight: 600; color: #c7cdd9; }
.fontpop button { border: 0; background: #3c4456; color: #fff; border-radius: 6px; width: 30px; height: 26px; cursor: pointer; font-weight: 700; }
.fontpop button:hover { background: #4a5468; }
.fontpop #fpVal { min-width: 22px; text-align: center; font-weight: 700; }
.scopepop button { width: auto; padding: 0 10px; }
.scopepop button.active { background: #2f6fed; }

/* Board */
.board-area { flex: 1; position: relative; overflow: auto; padding: 18px; background: #fbfcfd; cursor: grab; }
.board-area.panning { cursor: grabbing; }
.board { position: relative; width: 4000px; height: 2800px; transform-origin: 0 0;
  border: 1px dashed #d7dbe0; border-radius: 10px;
  background-color: #fbfcfd;
  background-image: linear-gradient(#e6e9ed 1px, transparent 1px), linear-gradient(90deg, #e6e9ed 1px, transparent 1px);
  background-position: 0 0, 0 0; }
.board.live { background-color: #f3faf6; }

/* Zoom + data controls */
.zoom { display: inline-flex; align-items: center; gap: 2px; border: 1px solid #d4d8dd; border-radius: 8px; overflow: hidden; }
.zoom button { border: 0; background: #fff; width: 30px; height: 32px; cursor: pointer; font-size: 16px; font-weight: 700; color: #444; }
.zoom button.fit { width: auto; padding: 0 10px; font-size: 12px; font-weight: 600; border-left: 1px solid #eceef1; }
.zoom button:hover { background: #f0f2f5; }
.zoom .pct { min-width: 44px; text-align: center; font-size: 12px; font-weight: 600; color: #444; }
.side-foot { border-top: 1px solid #eceef1; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.side-foot .footbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.side-foot .btn { padding: 6px 9px; font-size: 12px; }
.filerow { display: flex; align-items: center; gap: 7px; font-size: 12px; width: 100%; }
.filedot { width: 9px; height: 9px; border-radius: 50%; background: #c4cad2; flex: none; }
.filedot.live { background: #2fae6b; }
.filedot.warn { background: #e6a417; }
.filestat { color: #6b7280; font-weight: 600; word-break: break-word; flex: 1; min-width: 0; }

.pos { position: absolute; width: 167px; height: 131px; background: #fff; border: 2px solid #c9ced4;
  border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 6px 8px; user-select: none;
  display: flex; flex-direction: column; overflow: hidden; }   /* fixed height = exactly one grid cell (wider than tall) */
.pos.has-check { overflow: visible; }
.pos.editing-mode { cursor: move; z-index: 3; }             /* above empty-grid cells so tiles always receive the drag */
.pos:hover { z-index: 30; }                              /* a hovered tile is never hidden behind a tight neighbor */
.pos.filled { box-shadow: 0 2px 8px rgba(0,0,0,.12); }   /* filled tiles read as stacked cards if rows are tight */
.pos .label { font-weight: 650; font-size: 15px; color: #374151; line-height: 1.12; word-break: break-word; outline: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-right: 36px; }
.pos .slot { margin-top: auto; min-height: 30px; border-radius: 7px; border: 1.5px dashed #cdd2d8;
  display: flex; align-items: center; justify-content: center; font-size: 13.5px; color: #9aa0a6; padding: 4px 6px; text-align: center; }
.pos .slot .snote { font-size: 11.5px; font-weight: 650; color: #b8742a; line-height: 1.2; text-align: left;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; width: 100%; }
.pos:not(.filled) .slot:has(.snote) { flex-direction: column; gap: 2px; align-items: stretch; }
.pos.filled .slot .snote { color: #9a5a18; font-weight: 700; margin-bottom: 1px; }
.pos .slot .emptyhint { font-size: 13px; color: #9aa0a6; font-weight: 600; }
.pos .srename { position: absolute; top: 3px; right: 26px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 1px solid #d4d8dd; color: #374151; font-size: 11px; line-height: 18px;
  text-align: center; cursor: pointer; display: none; padding: 0; }
.pos.editing-mode .srename { display: block; }
.pos .srename:hover { background: #f0f2f5; border-color: #2f6fed; color: #1d5fbf; }
.pos.filled { border-color: #2fae6b; }
.pos.filled.partial { border-color: #e6a417; box-shadow: 0 2px 8px rgba(230,164,23,.25); }
.pos.filled .slot { border: 0; background: #e7f7ee; color: #1c7a48; font-weight: 700; flex-direction: column; gap: 1px; align-items: stretch; text-align: left; }
.pos.filled.partial .slot { background: #fff3d0; color: #7a5c0a; }
.pos.filled.partial .slot .nm { color: #7a5c0a; }
.pos.filled.partial .slot .win { color: #9a7020; opacity: 1; }
.pos.filled .slot .nm { display: flex; align-items: center; gap: 4px; font-size: 17.5px; }
.pos.filled .slot .nm .nmtx { flex: 1; word-break: break-word; }
.pos.filled .slot .win { font-size: 12px; color: #1c7a48; font-weight: 700; line-height: 1.15; opacity: .85; }
.pos.filled .slot .win.winwarn { color: #a8650a; opacity: 1; }
.pos.filled .slot .handoff { font-size: 12px; color: #5b6470; font-weight: 600; line-height: 1.2; }
.pos.filled .slot .handoff.depart { color: #1d5fbf; font-weight: 700; }
.pos.filled .slot .handoff.arrive { color: #1d5fbf; font-weight: 700; }
.board.live .pos.filled .slot .handoff.depart,
.board.live .pos.filled .slot .handoff.arrive { font-size: 13px; }
.pos.filled.cover-in { border-color: #2f6fed; box-shadow: 0 2px 8px rgba(47,111,237,.2); }
.pos.filled.cover-in .slot { background: #e8f0fe; color: #1d5fbf; }
.pos.filled.cover-in.partial { border-color: #e6a417; box-shadow: 0 2px 8px rgba(230,164,23,.25); }
.pos.filled.cover-in.partial .slot { background: #fff3d0; color: #7a5c0a; }
.pos.filled.cover-in.partial .slot .handoff.arrive { color: #1d5fbf; }
.pos.filled .slot .sub { font-size: 12px; font-style: italic; color: #b8742a; font-weight: 600; line-height: 1.2; }
.pos.filled .slot .gapwarn { font-size: 12px; background: #ffe48a; color: #7a5c0a; font-weight: 800; line-height: 1.2;
  border-radius: 5px; padding: 2px 6px; margin-top: 2px; align-self: flex-start; }
.pos.filled .slot .overwarn { font-size: 12px; background: #ede9fe; color: #6d28d9; font-weight: 800; line-height: 1.2;
  border-radius: 5px; padding: 2px 6px; margin-top: 2px; align-self: flex-start; }
.pos .checkhead {
  position: absolute; left: 2px; right: 2px; bottom: calc(100% + 2px);
  font-size: 10px; font-weight: 700; line-height: 1.15; color: #5f6368;
  text-align: center; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(255,255,255,.94); border-radius: 4px; padding: 1px 4px;
}
.pos.check-on .checkhead { color: #e67e22; }
.pos .checkbtn {
  position: absolute; right: 4px; top: 4px; z-index: 4;
  width: 18px; height: 18px; padding: 0; margin: 0;
  border: 1.5px solid #9aa0a6; border-radius: 4px; background: #fff;
  color: #1c7a48; font-size: 13px; font-weight: 800; line-height: 15px; text-align: center;
  cursor: default;
}
.pos.plan-mode .checkbtn { cursor: pointer; }
.pos.plan-mode .checkbtn:hover { border-color: #2f6fed; }
.pos .checkbtn.on { background: #e7f7ee; border-color: #2fae6b; color: #1c7a48; }
.board.live .pos .checkbtn { pointer-events: none; }
.pos.filled.overstaffed:not(.partial) { border-color: #7c3aed; box-shadow: 0 2px 8px rgba(124,58,237,.22); }
.pos.plan-mode.filled .slot { cursor: pointer; }
.pos.drop-target { border-color: #2f6fed; box-shadow: 0 0 0 3px rgba(47,111,237,.18); }
.pos.blocked { box-shadow: 0 0 0 3px rgba(192,57,43,.45); }
.pos .del { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 1px solid #d4d8dd; color: #c0392b; font-weight: 700; font-size: 13px;
  line-height: 18px; text-align: center; cursor: pointer; display: none; }
.pos.editing-mode .del { display: block; }
.board.edit-mode .grid-cell { position: absolute; width: 167px; height: 131px; border: 2px dashed #cfd4da; border-radius: 10px;
  background: rgba(255,255,255,.45); cursor: pointer; z-index: 1; box-sizing: border-box; }
.board.edit-mode .grid-cell:hover { border-color: #2f6fed; background: rgba(47,111,237,.08); }
.board-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #aab0b7; font-size: 14px; pointer-events: none; }

/* Modal */
.overlay { position: fixed; inset: 0; background: rgba(20,24,31,.45); display: none; align-items: center; justify-content: center; z-index: 50; }
.overlay.show { display: flex; }
.modal { background: #fff; border-radius: 12px; width: 440px; max-width: 92vw; max-height: 86vh; overflow: auto; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.modal .mhead { padding: 16px 18px; border-bottom: 1px solid #eceef1; font-weight: 700; font-size: 15px; }
.modal .mbody { padding: 16px 18px; }
.modal .mbody textarea { width: 100%; border: 1px solid #d4d8dd; border-radius: 8px; padding: 9px; font-size: 13px; font-family: inherit; resize: vertical; min-height: 80px; }
.modal .mfoot { padding: 12px 18px; border-top: 1px solid #eceef1; display: flex; gap: 8px; justify-content: flex-end; }
.sum-line { padding: 7px 0; border-bottom: 1px solid #f1f3f5; font-size: 13px; }
.sum-line:last-child { border: 0; }
.sum-k { color: #6b7280; }
.sum-note { color: #b8742a; font-style: italic; }
.badge { display: inline-block; background: #eef3ff; color: #1d3f8a; border-radius: 6px; padding: 1px 7px; font-size: 12px; font-weight: 700; }
.eod-datebox { display: flex; align-items: center; gap: 8px; padding: 0 18px 14px; font-size: 13px; font-weight: 600; color: #374151; }
.eod-datebox input { border: 1px solid #d4d8dd; border-radius: 7px; padding: 6px 8px; font-size: 13px; }

/* Presence (who's on this hub) */
.presbar { position: fixed; right: 12px; top: 112px; z-index: 45; background: rgba(255,255,255,.96);
  border: 1px solid #e3e6ea; border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.08);
  padding: 8px 11px; font-size: 12px; max-width: 200px; display: none;
  cursor: move; user-select: none; touch-action: none; }
.presbar:active { box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.presbar.show { display: block; }
.presbar .ptitle { font-weight: 800; color: #6b7280; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px; }
.presbar .prow { display: flex; align-items: center; gap: 6px; padding: 2px 0; font-weight: 600; color: #374151; }
.presbar .prow .pwho { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presbar .prow .pmode { margin-left: auto; font-size: 10.5px; color: #9aa0a6; font-weight: 700; padding-left: 8px; }
.presbar .prow.editing .pmode { color: #1c7a48; }
body.tv .presbar { display: none !important; }

/* Change ticker */
.tickbar { position: fixed; left: 12px; bottom: 12px; z-index: 45; background: rgba(255,255,255,.96);
  border: 1px solid #e3e6ea; border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.08);
  padding: 8px 11px; font-size: 11.5px; max-width: 320px; display: none;
  cursor: move; user-select: none; touch-action: none; }
.tickbar.show { display: block; }
.tickbar .ptitle { font-weight: 800; color: #6b7280; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px; }
.tickbar .trow2 { display: flex; align-items: baseline; gap: 6px; padding: 2px 0; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tickbar .tt { color: #9aa0a6; font-weight: 700; font-size: 10.5px; min-width: 44px; }
.tickbar .tw { font-weight: 700; }
.tickbar .tmove { color: #4b5563; overflow: hidden; text-overflow: ellipsis; }
.tickbar .tfrom { color: #9aa0a6; }
.tickbar .tby { color: #9aa0a6; font-size: 10.5px; }
.tickbar .tdate { background: #eef3ff; color: #1d3f8a; border-radius: 5px; padding: 0 5px; font-size: 10px; font-weight: 700; }
body.tv .tickbar { display: none !important; }

/* Live-map rundown card (staffed/total per station type) */
.statsbar { position: fixed; right: 12px; top: 112px; z-index: 45; background: rgba(255,255,255,.96);
  border: 1px solid #e3e6ea; border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.10);
  padding: 9px 12px; font-size: 13px; min-width: 168px; max-width: 260px; display: none;
  cursor: grab; user-select: none; }
.statsbar.show { display: block; }
.statsbar:active { cursor: grabbing; }
.statsbar .ptitle { font-weight: 800; color: #6b7280; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.statsbar .srow { display: flex; align-items: center; gap: 7px; padding: 3px 0; font-weight: 600; color: #374151; }
.statsbar .srow .sdot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.statsbar .srow .sname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statsbar .srow .scount { margin-left: auto; font-weight: 800; padding-left: 10px; }
.statsbar .srow .scount.sfull { color: #1c7a48; }
.statsbar .srow .scount.spart { color: #b06a00; }
.statsbar .srow .scount.sempty { color: #c0392b; }
.statsbar .srow.stot { border-top: 1px solid #eceef1; margin-top: 5px; padding-top: 6px; color: #1c1e21; font-weight: 800; }
.statsbar .srow.sout-hd { border-top: 1px solid #eceef1; margin-top: 5px; padding-top: 6px; }
.statsbar.min { padding: 6px 11px; }
.statsbar.min .ptitle { margin-bottom: 0; }

/* Double-click shrinks a floating card to a tiny bar (and back) */
.presbar.min, .tickbar.min { padding: 5px 10px; opacity: .9; border-radius: 8px; }
.presbar.min .ptitle, .tickbar.min .ptitle { margin-bottom: 0; }
.tickbar.min .ptitle { white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }

.tickbar .trow2.tpast { opacity: .55; }
.tickbar .trow2.tpast .tt,
.tickbar .trow2.tpast .tmove { color: #b4b9c0; }
.tickbar .trow2.tpast .twarn { color: #c9b88a; }
.tickbar .ticklist { max-height: min(42vh, 420px); overflow-y: auto; }
.tickbar .twarn { color: #a8650a; font-weight: 700; }

/* Live map: upcoming-moves card reads bigger; rundown card unchanged.
   --tick-scale (1 = auto live size) shrinks fonts + padding together. */
.tickbar.live-big {
  --tick-scale: 1;
  font-size: calc(23px * var(--tick-scale));
  max-width: min(92vw, calc(680px * var(--tick-scale)));
  padding: calc(12px * var(--tick-scale)) calc(16px * var(--tick-scale)) calc(12px * var(--tick-scale)) calc(30px * var(--tick-scale));
}
.tickbar.live-big .ptitle { font-size: calc(21px * var(--tick-scale)); margin-bottom: calc(8px * var(--tick-scale)); }
.tickbar.live-big .trow2 { padding: calc(4px * var(--tick-scale)) 0; gap: calc(10px * var(--tick-scale)); }
.tickbar.live-big .tt { font-size: calc(21px * var(--tick-scale)); min-width: calc(88px * var(--tick-scale)); }
.tickbar.live-big .tmove { font-size: calc(23px * var(--tick-scale)); font-weight: 600; }
.tickbar.live-big .tby { font-size: calc(19px * var(--tick-scale)); }
.tickbar.live-big .ticklist { max-height: min(50vh, calc(520px * var(--tick-scale))); }
.tickbar.live-big.min .ptitle { max-width: min(88vw, calc(560px * var(--tick-scale))); font-size: calc(19px * var(--tick-scale)); }
.tickbar.live-big.min { padding: 5px 10px 5px 28px; }

.tick-resize {
  display: none;
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #9aa0a6;
  cursor: nwse-resize;
  z-index: 2;
  touch-action: none;
  align-items: center;
  justify-content: center;
}
.tickbar.live-big:not(.min) .tick-resize { display: flex; }
.tick-resize:hover, .tick-resize:focus { color: #374151; background: #eef0f2; outline: none; }
.tick-resize svg { width: 14px; height: 14px; pointer-events: none; display: block; }

/* Worker search */
.wsearch { padding: 10px 14px 4px; position: relative; z-index: 8; }
.wsearch input { width: 100%; border: 1px solid #d4d8dd; border-radius: 7px; padding: 7px 9px; font-size: 13px; }
.wsearchdrop { margin-top: 6px; background: #fff; border: 1px solid #d4d8dd; border-radius: 8px;
  max-height: 240px; overflow-y: auto; }
.wsearchhit { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%;
  border: 0; background: #fff; padding: 8px 10px; cursor: pointer; font: inherit; text-align: left; }
.wsearchhit + .wsearchhit { border-top: 1px solid #f0f2f5; }
.wsearchhit:hover, .wsearchhit.on { background: #eef3ff; }
.wsearchhit .wn { font-weight: 700; color: #1d3f8a; }
.wsearchhit .wn mark { background: #dbe7ff; color: #1d3f8a; font-weight: 800; padding: 0; }
.wsearchhit .where { font-size: 11px; font-weight: 600; color: #8a93a0; white-space: nowrap; }
.wsearchmiss { padding: 10px; font-size: 12px; color: #9aa0a6; }

/* Station-first picker */
.picker { width: 390px; }
.pos.filled .slot .nmtx.draghandle { cursor: grab; }
.pos.filled .slot .nmtx.draghandle:active { cursor: grabbing; }
.livedate { font-size: 19px; font-weight: 800; color: #1c1e21; letter-spacing: .2px; }
.picker .mbody { padding: 12px 14px; }
.picker .psearch { width: 100%; border: 1px solid #d4d8dd; border-radius: 7px; padding: 8px 10px; font-size: 14px; margin-bottom: 10px; }
.picker .picktimes { align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; padding: 9px 10px;
  background: #f7f8fa; border: 1px solid #e1e4e8; border-radius: 7px; color: #5f6368; font-size: 12px; font-weight: 700; }
.picker .picktimes .picktime { width: 5.2em; border: 1px solid #cfd4da; border-radius: 6px; padding: 5px 6px;
  font: inherit; text-align: center; background: #fff; }
.picker .picktimes .pickend { margin-right: 2px; }
.picker .picktimes .pickend::placeholder { font-size: 10px; color: #9aa0a6; }
.picker .pickpreview { margin-bottom: 10px; padding: 8px 10px; border-radius: 7px; background: #eef3ff;
  color: #1d3f8a; font-size: 12px; font-weight: 700; line-height: 1.35; }
.picker .pickpreview.warn { background: #ffe48a; color: #7a5c0a; }
.pickrow.sel { background: #e8f0fe; box-shadow: inset 3px 0 0 #2f6fed; }
.picklist { max-height: 46vh; overflow-y: auto; }
.pickrow { display: flex; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid #e6e9ed;
  border-radius: 9px; margin-bottom: 7px; cursor: pointer; font-weight: 600; color: #1d3f8a; background: #eef3ff; }
.pickrow:hover { background: #dbe7ff; border-color: #cfe0ff; }
.pickrow .swatch { width: 14px; height: 14px; border-radius: 4px; flex: none; border: 1px solid rgba(0,0,0,.12); }
.pickrow .pname { flex: 1; }
.pickrow .pnote { margin-left: auto; font-size: 11px; font-style: italic; color: #b8742a; font-weight: 500;
  max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Station schedule editor */
.modal.sched { width: 720px; max-width: 94vw; }
.modal.sched .mhead { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 18px 22px; }
.modal.sched .mbody { padding: 18px 22px 20px; }
.modal.sched .mfoot { padding: 14px 22px; }
.modal.wprofile { width: 460px; }
.wpmeta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.wpshift { display: flex; align-items: center; gap: 7px; font-weight: 700; color: #374151; }
.wpdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.wpday { font-size: 12.5px; font-weight: 700; color: #6b7280; }
.wphours { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid #eceef1; }
.wphoursrow { display: flex; align-items: center; gap: 8px; margin: 8px 0 8px; flex-wrap: wrap; }
.wplbl { font-size: 12px; font-weight: 700; color: #5c6370; }
.wphint { font-size: 12px; color: #6b7280; line-height: 1.35; margin-bottom: 8px; }
.wphoursbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.wphoursbtns .btn { flex: 1; min-width: 120px; }
.wptoday { margin-bottom: 16px; }
.wptodayval { font-weight: 650; color: #1c1e21; margin-top: 4px; }
.wphisthead { display: flex; align-items: center; gap: 7px; width: 100%; margin: 4px 0 0; padding: 10px 0;
  border: 0; background: none; cursor: pointer; font: inherit; font-size: 11px; text-transform: uppercase;
  letter-spacing: .05em; color: #4b5563; font-weight: 700; text-align: left; }
.wphisthead:hover { color: #1c1e21; }
.wphisthead .caret { font-size: 10px; color: #9aa0a6; transition: transform .15s; }
.wphisthead.collapsed .caret { transform: rotate(-90deg); }
.wphist { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.wphist.hidden { display: none; }
.wphistrow { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; text-align: left;
  border: 1px solid #e6e9ed; background: #fff; border-radius: 8px; padding: 8px 10px; cursor: pointer; font: inherit; }
.wphistrow:hover { background: #f6f8fb; }
.wphistrow.cur { border-color: #2f6fed; background: #eef3ff; }
.wphistwhen { font-size: 12.5px; font-weight: 700; color: #374151; flex: none; }
.wphistwhat { font-size: 12px; font-weight: 600; color: #6b7280; text-align: right; }
.wphistrow.assigned .wphistwhat { color: #1d7a4a; }
.wphistrow.out .wphistwhat { color: #b8742a; }
.modal.report { width: 760px; max-width: 94vw; }
.modal.report .reporthead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.reporttabs { display: flex; gap: 6px; }
.reporttab { border: 1px solid #d4d8dd; background: #fff; color: #4b5563; border-radius: 8px; padding: 6px 12px;
  font-size: 13px; font-weight: 700; cursor: pointer; }
.reporttab:hover { background: #f0f2f5; }
.reporttab.on { border-color: #2f6fed; background: #eef3ff; color: #1d3f8a; }
.reportmeta { margin-bottom: 12px; color: #6b7280; font-size: 12px; font-weight: 600; }
.reportlist { display: flex; flex-direction: column; gap: 10px; }
.reportsection { display: flex; flex-direction: column; gap: 8px; }
.reportsection-title { font-size: 12px; font-weight: 800; color: #4b5563; text-transform: uppercase; letter-spacing: .04em; padding: 2px 2px 0; }
.reportsection-title .reporthours { font-weight: 700; text-transform: none; letter-spacing: 0; opacity: .85; }
.reportmeta .reporthours { color: #374151; }
.reportfootnote { margin: -4px 0 12px; color: #6b7280; font-size: 11px; font-weight: 600; line-height: 1.35; }
.reportrow { border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px 12px; background: #fafbfc; }
.reporttop { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.reportname { font-weight: 800; color: #1f2937; }
.reportshift { color: #6b7280; font-size: 12px; font-weight: 700; }
.reportstatus { margin-left: auto; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; }
.reportstatus.out { color: #b45309; }
.reportstatus.unassigned { color: #7c3aed; }
.reportstatus.assigned { color: #1c7a48; }
.reportsegs { display: flex; flex-direction: column; gap: 4px; }
.reportseg { color: #374151; }
.reportseg .rtime { font-weight: 800; color: #1f2937; }
.reportseg .rplace { font-weight: 700; }
.reportseg .rwarn { color: #a8650a; font-weight: 700; }
.reportnote { margin-top: 6px; color: #4b5563; font-size: 12px; }
.reportempty { color: #6b7280; font-weight: 600; }
.crewrow { border: 1px solid #e5e7eb; border-radius: 10px; background: #fafbfc; }
.crewrow summary { list-style: none; cursor: pointer; padding: 10px 12px; display: flex; align-items: baseline; gap: 8px; }
.crewrow summary::-webkit-details-marker { display: none; }
.crewrow summary::before { content: "▸"; color: #6b7280; font-size: 12px; font-weight: 800; }
.crewrow[open] summary::before { content: "▾"; }
.crewbody { padding: 0 12px 12px; }
.crewmeta { color: #6b7280; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.crewdays { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.crewday { min-width: 102px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; padding: 7px 8px; }
.crewday .cdaynum { font-size: 10.5px; font-weight: 800; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.crewday .cdayloc { font-size: 11.5px; font-weight: 700; color: #1f2937; word-break: break-word; line-height: 1.25; }
.crewday .cdayloc + .cdayloc { margin-top: 3px; }
.crewday.out .cdayloc { color: #b45309; }
.crewday.unassigned .cdayloc, .crewday.empty .cdayloc { color: #6b7280; }
.schedhours { font-size: 12px; font-weight: 600; color: #8a93a0; }
.schedrow-wrap { border-bottom: 1px solid #f1f3f5; }
.schedrow-wrap:last-child { border-bottom: 0; }
.schedrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; flex-wrap: wrap; }
.schedrow .snm { font-weight: 700; font-size: 14px; color: #1c1e21; flex: 1; min-width: 160px; word-break: break-word; }
.schedrow .stime { border: 1px solid #d4d8dd; border-radius: 6px; padding: 5px 8px; font-size: 13px; font-family: inherit; width: 5.2em; text-align: center; }
.schedrow .sdash { color: #9aa0a6; font-weight: 700; }
.schedrow .sshift { border: 0; background: #eef3ff; color: #1d3f8a; border-radius: 6px; padding: 4px 8px; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.schedrow .sshift.warn { background: #ffe48a; color: #7a5c0a; }
.schedrow .shubwarn { font-size: 11px; font-weight: 800; color: #7a5c0a; background: #ffe48a; border-radius: 5px; padding: 3px 7px; white-space: nowrap; }
.placechoice-msg { margin: 0 0 12px; font-size: 14px; line-height: 1.45; color: #2b3242; }
.placechoice-splitrow { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.placechoice-lbl { font-size: 12px; font-weight: 700; color: #5f6368; }
.modal.placechoice { width: 420px; max-width: calc(100vw - 32px); }
.schedrow .ssplit { border: 0; background: #e8f4fd; color: #1a5f8a; border-radius: 6px; padding: 4px 9px; font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.schedrow .ssplit:hover { background: #d0e8fa; }
.schedrow .ssplit.active { background: #c5dff5; }
.schedrow .ssplittag { font-size: 11px; font-weight: 700; color: #1a5f8a; background: #e8f4fd; border-radius: 5px; padding: 3px 7px; white-space: nowrap; }
.splitform { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 0 12px 0; margin-left: 2px; }
.splitform .splitlbl { font-size: 12px; font-weight: 700; color: #5f6368; }
.splitform .splitsta { border: 1px solid #d4d8dd; border-radius: 6px; padding: 5px 8px; font-size: 13px; font-family: inherit; min-width: 200px; flex: 1; }
.splitform .splittime { width: 5.2em; }
.splitform .splitend { width: 6em; }
.splitform .splitend::placeholder { font-size: 11px; color: #9aa0a6; }
.splitform .splitapply { padding: 5px 12px; font-size: 12px; }
.splitform .splitundo, .splitform .splitcancel { padding: 5px 10px; font-size: 12px; }
.splitpreview { flex-basis: 100%; font-size: 12px; font-weight: 700; color: #7a5c0a; background: #ffe48a; border-radius: 6px; padding: 6px 10px; margin-top: 2px; }
.schedrow .sgapwarn { font-size: 11px; font-weight: 800; color: #7a5c0a; background: #ffe48a; border-radius: 5px; padding: 3px 7px; white-space: nowrap; }
.soverstaff { margin-top: 8px; padding: 7px 9px; border-radius: 7px; background: #ede9fe; color: #6d28d9;
  font-size: 12px; font-weight: 800; }
.schedrow .srm { border: 0; background: rgba(0,0,0,.06); color: #b4b9c0; border-radius: 6px; width: 24px; height: 24px; font-weight: 800; cursor: pointer; }
.schedrow .srm:hover { background: #c0392b; color: #fff; }

/* Weekly shifts chip + editor */
.hourschip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #d4d8dd; border-radius: 8px;
  padding: 5px 10px; font-size: 12px; font-weight: 700; color: #374151; cursor: pointer; }
.hourschip:hover { background: #f0f2f5; }
/* Crew (shift) filter — focus the board on one shift while planning */
.crewfilter { display: inline-flex; align-items: center; gap: 4px; }
.shiftTabs { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.shiftTabs .sftlabel { font-size: 12px; font-weight: 700; color: #8a909a; margin-right: 2px; }
.shiftTabs .sftab { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #d4d8dd; background: #fff;
  border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer; color: #374151; }
.shiftTabs .sftab:hover { background: #f0f2f5; }
.shiftTabs .sftab.on { border-color: #2f6fed; background: #eef3ff; color: #1d3f8a; }
.shiftTabs .sfdot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.shiftTabs .sftimes { font-weight: 600; color: #6b7280; font-size: 11px; }
.crewfilter .cflabel { font-size: 12px; font-weight: 700; color: #8a909a; margin-right: 2px; }
.crewfilter button { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #d4d8dd; background: #fff;
  color: #374151; border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
.crewfilter button:hover { background: #f0f2f5; }
.crewfilter button.on { border-color: #2f6fed; background: #eef3ff; color: #1d3f8a; }
.crewfilter .cfdot { width: 9px; height: 9px; border-radius: 50%; }
.pos.dimcrew { opacity: .3; }
.pos.dimcrew:hover { opacity: 1; }            /* hover to peek at the other crew's station */
.modal.shifts { width: 520px; }
.shscope-banner { margin-bottom: 12px; padding: 10px 12px; border-radius: 8px; font-size: 12.5px; line-height: 1.5; border: 1px solid #e6e9ed; background: #f8f9fa; color: #4b5563; }
.shscope-banner .shscope-current { margin-bottom: 8px; font-weight: 600; color: #2b3242; }
.shscope-banner .shscope-actions { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.shscope-banner .shscope-save { color: #8a5a10; }
.shscope-banner .shscope-save strong { color: #b45309; }
.shscope-banner .shscope-def { color: #1d3f8a; }
.shscope-banner .shscope-def strong { color: #2f6fed; }
.shscope-banner.kind-day { border-color: #f5d7a8; background: #fff8ed; }
.shscope-banner.kind-forward { border-color: #cfe0ff; background: #eef3ff; }
.shrow { display: flex; align-items: center; gap: 7px; padding: 7px 0; border-bottom: 1px solid #f1f3f5; }
.shrow .shdot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.shrow .shname { flex: 1; min-width: 0; border: 1px solid #d4d8dd; border-radius: 7px; padding: 6px 8px; font-size: 13.5px; font-weight: 600; font-family: inherit; }
.shrow .shtime { border: 1px solid #d4d8dd; border-radius: 6px; padding: 4px 5px; font-size: 12.5px; font-family: inherit; width: 4.2em; text-align: center; }
.shrow .sdash { color: #9aa0a6; font-weight: 700; }
.shrow .srm { border: 0; background: rgba(0,0,0,.06); color: #b4b9c0; border-radius: 6px; width: 24px; height: 24px; font-weight: 800; cursor: pointer; flex: none; }
.shrow .srm:hover { background: #c0392b; color: #fff; }
.shtplbar { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #e6e9ed; flex-wrap: wrap; }
.shtplbar select, .shtplbar input { border: 1px solid #d4d8dd; border-radius: 7px; padding: 6px 8px; font-size: 12.5px; font-family: inherit; }
.shtplbar select { max-width: 160px; }
.shtplbar input { width: 130px; }
/* Shift badge on worker rows / picker rows */
.shtag { display: inline-flex; align-items: center; border-radius: 6px; padding: 1px 7px; font-size: 10px; font-weight: 800;
  color: #fff; white-space: nowrap; flex: none; }
.shtag.click { cursor: pointer; }
.shtag.click:hover { filter: brightness(1.12); }
.worker.selected .shtag { outline: 1px solid rgba(255,255,255,.6); }
/* Shift group subheads in lists */
.shsub { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 800; color: #6b7280;
  text-transform: uppercase; letter-spacing: .4px; margin: 10px 0 6px; }
.shsub .shdot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.shsub .shtimes { font-weight: 600; text-transform: none; letter-spacing: 0; color: #9aa0a6; }

/* Click-to-assign */
.worker.selectable .top { cursor: grab; }
.worker .whours { font-size: 10.5px; font-weight: 800; color: #1d7a4a; background: #e7f7ee; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.worker.selected { background: #2f6fed; border-color: #2f6fed; color: #fff; box-shadow: 0 0 0 3px rgba(47,111,237,.25); }
.worker.selected .tag, .worker.selected .x, .worker.selected .notebtn, .worker.selected .outbtn { color: #cfe0ff; }
@keyframes pulseGlow { 0%,100% { box-shadow: 0 0 0 3px rgba(47,111,237,.35); } 50% { box-shadow: 0 0 0 8px rgba(47,111,237,.10); } }
@keyframes pulseGlowAmber { 0%,100% { box-shadow: 0 0 0 3px rgba(230,164,23,.45); } 50% { box-shadow: 0 0 0 8px rgba(230,164,23,.12); } }
.pos.glow { border-color: #2f6fed; animation: pulseGlow 1.2s ease-in-out infinite; cursor: pointer; }
.pos.glow.filled { border-color: #e6a417; animation: pulseGlowAmber 1.2s ease-in-out infinite; }
.pos.flash { box-shadow: 0 0 0 6px rgba(230,164,23,.6) !important; }
.slot .clr { border: 0; background: rgba(0,0,0,.08); color: #1c7a48; border-radius: 5px; width: 18px; height: 18px;
  line-height: 16px; font-size: 12px; font-weight: 800; cursor: pointer; padding: 0; }
.slot .clr:hover { background: #c0392b; color: #fff; }
.slot .nm.removed { font-style: italic; color: #9aa0a6; font-weight: 600; }

/* Out today */
.worker.out { background: #f7ecec; border-color: #e6caca; color: #9a5050; }
.worker.out .wname { text-decoration: line-through; }
.outbtn { font-size: 11px; color: #b4642a; cursor: pointer; font-weight: 600; margin-top: 4px; display: inline-block; }
.outbtn:hover { color: #c0392b; }

/* Week strip + coverage HUD */
.weekstrip { display: flex; align-items: center; gap: 10px; padding: 6px 14px; background: #fff; border-bottom: 1px solid #e3e6ea; flex-wrap: wrap; }
.hud { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; color: #374151; flex-wrap: wrap; }
.weekcurdate { flex: 1 1 280px; text-align: center; font-size: 21px; font-weight: 800; color: #2b3242; letter-spacing: .01em; white-space: nowrap; }
.typetoggle { border: 1px solid #d4d8dd; background: #fff; color: #374151; border-radius: 8px;
  padding: 5px 10px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.typetoggle:hover { background: #f0f2f5; }
.typetoggle.on { border-color: #2f6fed; background: #eef3ff; color: #1d3f8a; }
.typestrip { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; max-width: 52vw; }
.typestrip .tchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e3e6ea;
  background: #fff; border-radius: 8px; padding: 4px 9px; font-size: 12px; font-weight: 700; color: #374151; }
.typestrip .tchip .tdot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.typestrip .tchip .tcnt { background: #eef0f2; border-radius: 6px; padding: 1px 7px; font-weight: 800; min-width: 1.4em; text-align: center; }
.hud .h-item { display: inline-flex; align-items: center; gap: 5px; }
.hud .h-num { background: #eef0f2; border-radius: 7px; padding: 2px 8px; }
.hud .h-warn .h-num { background: #fdecec; color: #c0392b; }
.hud .h-ok .h-num { background: #e7f7ee; color: #1c7a48; }
.hud .h-jump { cursor: pointer; }
.hud .h-jump:hover .h-num { outline: 2px solid #e6a417; }
.wk { display: flex; gap: 3px; align-items: center; margin-left: auto; }
.wk .wnav { border: 1px solid #d4d8dd; background: #fff; width: 26px; height: 32px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.wk .wnav:hover { background: #f0f2f5; }
.wk .chip { border: 1px solid transparent; background: none; border-radius: 8px; padding: 2px 9px 3px; cursor: pointer;
  text-align: center; font-size: 10.5px; font-weight: 600; color: #4b5563; line-height: 1.25; }
.wk .chip .dnum { display: block; font-size: 13px; font-weight: 700; }
.wk .chip:hover { background: #f0f2f5; }
.wk .chip.cur { border-color: #2f6fed; background: #eef3ff; color: #1d3f8a; }
.wk .chip.istoday { text-decoration: underline; text-underline-offset: 3px; }
.wk .chip .dots { display: block; height: 6px; line-height: 6px; }
.wk .chip .dt { display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin: 0 1px; }
.wk .chip .dt.pub { background: #2fae6b; }
.wk .chip .dt.dr { background: #c4cad2; }
.wk .chip .dt.shday { background: #e67e22; }   /* custom shifts — this day only */
.wk .chip .dt.shfwd { background: #8e44ad; }   /* hub default starts here */
.wk .today { border: 1px solid #d4d8dd; background: #fff; border-radius: 7px; padding: 6px 10px; cursor: pointer; font-size: 12px; font-weight: 600; margin-left: 4px; }
.wk .today:hover { background: #f0f2f5; }

/* Templates */
.tmplrow { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border: 1px solid #e6e9ed; border-radius: 8px; margin-bottom: 7px; font-size: 12.5px; }
.tmplrow .tn { font-weight: 600; word-break: break-word; flex: 1; }
.tmplrow .tc { color: #9aa0a6; font-size: 11px; white-space: nowrap; }
.tmplrow .apply { border: 1px solid #cfe0ff; background: #eef3ff; color: #1d3f8a; border-radius: 6px; padding: 3px 9px; cursor: pointer; font-size: 11.5px; font-weight: 700; }
.tmplrow .apply:hover { background: #dbe7ff; }
.tmplrow .x { cursor: pointer; color: #b4b9c0; font-weight: 700; }
.tmplrow .x:hover { color: #c0392b; }

/* TV mode */
.appupdate {
  display: none; position: fixed; inset: 0; z-index: 220;
  align-items: center; justify-content: center;
  background: rgba(20, 24, 31, .48);
}
.appupdate.show { display: flex; }
.appupdate-card {
  background: #fff; border-radius: 14px; padding: 22px 28px 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,.28); text-align: center; min-width: 280px;
}
.appupdate-title { font-weight: 800; font-size: 22px; color: #1c1e21; }
.appupdate-msg { margin: 10px 0 16px; font-size: 16px; font-weight: 600; color: #4b5563; }
#appUpdateCount { font-variant-numeric: tabular-nums; font-weight: 800; color: #2f6fed; }
.appupdate-card .btn { width: auto; min-width: 140px; margin: 0 auto; }
body.tv .appupdate-card { padding: 32px 42px; min-width: 360px; }
body.tv .appupdate-title { font-size: 34px; }
body.tv .appupdate-msg { font-size: 26px; margin: 14px 0 0; }
body.tv #appUpdateNow { display: none; }

body.tv .toolbar, body.tv .weekstrip, body.tv .side { display: none !important; }
body.tv .board-area { padding: 10px; }
.tvbar { display: none; position: fixed; right: 14px; bottom: 12px; z-index: 70; background: rgba(43,50,66,.92); color: #fff;
  border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
body.tv .tvbar { display: block; }

/* Login + identity */
.login-card { background: #fff; border-radius: 14px; width: 360px; max-width: 92vw; box-shadow: 0 16px 50px rgba(0,0,0,.3); padding: 26px 28px; }
.login-card h1 { font-size: 19px; margin: 0 0 2px; }
.login-card .sub { color: #6b7280; font-size: 12.5px; margin: 0 0 16px; }
.login-card label { display: block; font-size: 12px; font-weight: 700; color: #4b5563; margin: 10px 0 4px; }
.login-card input[type="text"], .login-card input[type="password"] {
  width: 100%; border: 1px solid #d4d8dd; border-radius: 8px; padding: 9px 10px; font-size: 14px; font-family: inherit; }
.login-card .remember { display: flex; align-items: center; gap: 7px; margin: 12px 0 0; font-size: 12.5px; color: #4b5563; font-weight: 600; }
.login-card .lerr { color: #c0392b; font-size: 12.5px; font-weight: 600; min-height: 18px; margin-top: 8px; }
.login-card .btn.primary { width: 100%; padding: 10px; font-size: 14px; margin-top: 6px; }
#loginOverlay { z-index: 100; background: #14181f; }
#welcomeOverlay { z-index: 110; background: rgba(20,24,31,.55); }
.welcome-card {
  background: #fff; border-radius: 14px; width: 480px; max-width: 94vw; max-height: 88vh;
  overflow: auto; box-shadow: 0 16px 50px rgba(0,0,0,.3); padding: 26px 28px 22px;
}
.welcome-card h1 { font-size: 20px; margin: 0 0 8px; font-weight: 750; }
.welcome-card .welcome-role {
  margin: 0 0 18px; padding: 10px 12px; border-radius: 8px; background: #f3f5f8;
  color: #1c1e21; font-size: 13.5px; line-height: 1.45; font-weight: 550;
}
.welcome-card .welcome-sec { margin: 0 0 14px; }
.welcome-card .welcome-sec h2 {
  margin: 0 0 4px; font-size: 13px; font-weight: 750; color: #2f6fed; letter-spacing: 0.01em;
}
.welcome-card .welcome-sec p {
  margin: 0; font-size: 13px; line-height: 1.5; color: #3c4046; font-weight: 500;
}
.welcome-card .welcome-pwfoot {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #fff8eb;
  border: 1px solid #f0d48a; }
.welcome-card .welcome-pwfoot p {
  margin: 0 0 8px; font-size: 13px; font-weight: 650; color: #7a5c0a; line-height: 1.35; }
.welcome-card .welcome-pwfoot .btn { width: 100%; font-size: 13px; }
.welcome-card .btn.primary { width: 100%; padding: 10px; font-size: 14px; margin-top: 8px; }
body.pre-auth .wrap,
body.pre-auth .presbar,
body.pre-auth .tickbar,
body.pre-auth .statsbar,
body.pre-auth .tvbar { display: none !important; }
body.pre-auth { background: #14181f; }
#bootGate {
  display: none; position: fixed; inset: 0; z-index: 99;
  align-items: center; justify-content: center;
  background: #14181f; color: #c5cad3; font: 600 15px/1.4 "Figtree", system-ui, sans-serif;
}
body.pre-auth:not(.need-login) #bootGate { display: flex; }
.hubctl { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #555; font-weight: 700; }
.hubctl select { border: 1px solid #d4d8dd; border-radius: 7px; padding: 6px 8px; font-size: 13px; font-weight: 600; background: #fff; cursor: pointer; }
.userchip { display: inline-flex; align-items: center; gap: 6px; background: #eef0f2; border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 700; color: #4b5563; }
.userchip .rolemark { color: #8a93a0; font-weight: 600; }
.rochip { display: none; align-items: center; gap: 6px; background: #eef3ff; border: 1px solid #cfe0ff; color: #1d3f8a; border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 700; }
.rochip.show { display: inline-flex; }

/* Print day sheet */
#printSheet { display: none; }
@media print {
  body * { visibility: hidden; }
  #printSheet, #printSheet * { visibility: visible; }
  #printSheet { display: block; position: absolute; left: 0; top: 0; width: 100%; padding: 8px 4px; font-size: 12.5px; color: #000; background: #fff; }
  #printSheet h1 { font-size: 19px; margin: 0 0 2px; }
  #printSheet .psub { color: #444; margin: 0 0 12px; font-size: 12px; }
  #printSheet table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
  #printSheet th, #printSheet td { border: 1px solid #999; padding: 5px 8px; text-align: left; vertical-align: top; }
  #printSheet th { background: #eee; }
  #printSheet .psec { font-weight: 700; margin: 10px 0 4px; font-size: 13px; }
}
