/* Flow Rosters (staff and managers): app.css and admin.css, plus the roster's own pieces. */

.nav-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--pink); color: var(--burgundy-2); font-size: 0.7rem; font-weight: 700; margin-left: 2px; }
.input--sm { padding: 6px 10px; font-size: 0.85rem; width: auto; }

/* ---------- notification bell */
.bell { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: none; color: var(--on-burgundy-muted); cursor: pointer; }
.bell:hover { background: var(--burgundy-3); color: var(--on-burgundy); }
.bell__n { position: absolute; top: 1px; right: -2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--urgent); color: #fff; font-size: 0.66rem; font-weight: 700; display: grid; place-items: center; }
.notes { position: fixed; top: 64px; right: 16px; width: min(380px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 90px)); overflow: auto; z-index: 40; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: 0 18px 50px -20px oklch(20% 0.05 225 / 0.45); animation: rise2 200ms var(--ease); }
@keyframes rise2 { from { opacity: 0; transform: translateY(-6px); } }
.notes__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--rule); position: sticky; top: 0; background: var(--card); }
.notes__list { list-style: none; margin: 0; padding: 0; }
.notes__list li { border-bottom: 1px solid var(--rule); }
.notes__list li:last-child { border-bottom: 0; }
.notes__list a { display: grid; gap: 2px; padding: 11px 16px; text-decoration: none; font-size: 0.88rem; }
.notes__list a:hover { background: var(--paper); }
.notes__list span { color: var(--ink-2); font-size: 0.84rem; }
.notes__list time { color: var(--muted); font-size: 0.76rem; }
.notes__list .is-new a { background: var(--pink-soft); box-shadow: inset 3px 0 0 var(--burgundy); }

/* ---------- modal */
.modal { border: 0; border-radius: var(--r-lg); padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 30px 80px -20px oklch(15% 0.05 225 / 0.55); color: var(--ink); }
.modal--wide { width: min(760px, calc(100vw - 24px)); }
.modal::backdrop { background: oklch(20% 0.04 225 / 0.45); }
.modal form { display: grid; gap: 16px; padding: 22px; }
.modal h2 { font-size: 1.2rem; font-weight: 600; }
.modal .sub { color: var(--muted); font-size: 0.86rem; margin-top: 2px; }
.modal .actions { justify-content: flex-end; flex-wrap: wrap; }
.modal .actions .left { margin-right: auto; }
.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.days-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.days-pick label { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; padding: 5px 8px; border: 1px solid var(--rule-strong); border-radius: 999px; font-size: 0.82rem; cursor: pointer; }
.days-pick input { position: absolute; opacity: 0; pointer-events: none; }
.days-pick label:has(input:checked) { background: var(--burgundy); color: var(--on-burgundy); border-color: var(--burgundy); }
.days-pick label:has(input:disabled) { opacity: 0.4; cursor: default; }
.warnings { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.warnings li { display: flex; gap: 8px; align-items: flex-start; font-size: 0.84rem; color: var(--high); background: var(--high-bg); border-radius: var(--r); padding: 7px 10px; }
.warnings li::before { content: "!"; flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--high); color: #fff; font-size: 0.7rem; font-weight: 700; display: grid; place-items: center; margin-top: 1px; }
.cost-line { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.86rem; color: var(--muted); padding: 10px 12px; background: var(--sunk); border-radius: var(--r); }
.cost-line b { color: var(--ink); font-variant-numeric: tabular-nums; }
.suggest { display: grid; gap: 6px; }
.suggest button { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 7px 10px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--card); cursor: pointer; font-size: 0.85rem; }
.suggest button:hover { border-color: var(--burgundy); background: var(--pink-soft); }
.suggest small { color: var(--muted); }

/* ---------- role colours and shift chips */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); flex-shrink: 0; }
.role-tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 999px; font-size: 0.76rem; font-weight: 600; background: color-mix(in oklch, var(--c, #888) 14%, white); color: color-mix(in oklch, var(--c, #888) 70%, black); white-space: nowrap; }
.role-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, #888); }
.chip { position: relative; display: block; width: 100%; text-align: left; border: 0; border-radius: 7px; padding: 5px 7px 5px 9px; margin-bottom: 4px; font-size: 0.78rem; line-height: 1.3; cursor: pointer;
  background: color-mix(in oklch, var(--c, #6b7c8f) 16%, white); color: color-mix(in oklch, var(--c, #6b7c8f) 55%, black); box-shadow: inset 3px 0 0 var(--c, #6b7c8f); transition: transform 120ms var(--ease), box-shadow 120ms var(--ease); }
.chip:hover { box-shadow: inset 3px 0 0 var(--c, #6b7c8f), 0 4px 12px -6px oklch(25% 0.05 225 / 0.45); transform: translateY(-1px); }
.chip b { display: block; font-variant-numeric: tabular-nums; font-weight: 700; color: color-mix(in oklch, var(--c, #6b7c8f) 45%, black); }
.chip.is-draft { background: repeating-linear-gradient(135deg, color-mix(in oklch, var(--c, #6b7c8f) 10%, white) 0 6px, color-mix(in oklch, var(--c, #6b7c8f) 18%, white) 6px 12px); outline: 1px dashed color-mix(in oklch, var(--c, #6b7c8f) 55%, white); outline-offset: -1px; }
.chip.is-dragging { opacity: 0.4; }
.chip__flags { position: absolute; top: 4px; right: 5px; display: flex; gap: 3px; }
.flag { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; font-size: 0.64rem; font-weight: 700; display: inline-grid; place-items: center; color: #fff; background: var(--high); }
.flag--req { background: var(--medium); }
.flag--off { background: var(--urgent); }

/* ---------- manager toolbar and key numbers */
.sched-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.sched-bar h1 { font: 800 1.6rem/1 var(--font-display); font-stretch: 78%; text-transform: uppercase; letter-spacing: -0.02em; color: var(--burgundy); margin-right: 8px; }
.date-nav { display: inline-flex; align-items: center; gap: 4px; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--rule-strong); background: var(--card); cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { border-color: var(--ink-2); }
.date-label { font-weight: 600; min-width: 180px; text-align: center; font-variant-numeric: tabular-nums; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 14px; }
.kpi { background: var(--card); padding: 10px 14px; }
.kpi span { display: block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.kpi b { font: 700 1.2rem/1.3 var(--font-body); font-variant-numeric: tabular-nums; color: var(--ink); }
.kpi small { color: var(--muted); font-size: 0.78rem; margin-left: 4px; }
.kpi.is-bad b { color: var(--urgent); }
.kpi.is-good b { color: var(--ok); }

/* ---------- week grid */
.sched { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.grid-wrap { overflow: auto; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); max-height: calc(100vh - 250px); }
.wk { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 980px; table-layout: fixed; }
.wk th, .wk td { border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); vertical-align: top; }
.wk th:last-child, .wk td:last-child { border-right: 0; }
.wk thead th { position: sticky; top: 0; z-index: 3; background: var(--sunk); font-size: 0.8rem; font-weight: 600; color: var(--ink-2); padding: 8px; text-align: center; }
.wk thead th.is-today { color: var(--burgundy); box-shadow: inset 0 -3px 0 var(--burgundy); }
.wk thead th small { display: block; font-weight: 500; font-size: 0.72rem; color: var(--urgent); }
.wk .who-col { width: 200px; position: sticky; left: 0; z-index: 2; background: var(--card); text-align: left; }
.wk thead .who-col { z-index: 4; background: var(--sunk); }
.wk tbody th.who-col { padding: 8px 10px; font-weight: 400; }
.wk .person { display: grid; gap: 1px; font-size: 0.85rem; }
.wk .person b { font-weight: 600; }
.wk .person small { color: var(--muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.wk .person small.is-over { color: var(--urgent); font-weight: 600; }
.wk td.cell { padding: 4px; height: 58px; cursor: copy; transition: background-color 120ms; }
.wk td.cell:hover { background: var(--paper); }
.wk td.cell.is-over { background: var(--pink-soft); box-shadow: inset 0 0 0 2px var(--pink); }
.wk td.cell.is-off { background: repeating-linear-gradient(135deg, var(--urgent-bg) 0 6px, var(--card) 6px 12px); }
.wk td.cell.is-unavail { background: var(--sunk); }
.wk td.cell .cell-note { font-size: 0.7rem; color: var(--muted); padding: 2px 4px; }
.wk td.cell.is-off .cell-note { color: var(--urgent); font-weight: 600; }
.wk tr.sum th, .wk tr.sum td { background: var(--paper); font-size: 0.8rem; padding: 6px 8px; text-align: right; font-variant-numeric: tabular-nums; cursor: default; height: auto; }
.wk tr.sum th { text-align: left; color: var(--muted); font-weight: 600; }
.wk tr.sum td.is-bad { color: var(--urgent); font-weight: 600; }
.wk tr.sum td.is-good { color: var(--ok); font-weight: 600; }
.wk tr.sum input { width: 100%; text-align: right; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 3px 6px; font-variant-numeric: tabular-nums; }
.wk tr.sum input:hover { border-color: var(--rule-strong); background: var(--card); }
.wk tr.sum input:focus { outline: none; border-color: var(--focus); background: var(--card); }
.wk tr.open-row th.who-col, .wk tr.open-row td { background: color-mix(in oklch, var(--pink-soft) 55%, white); }
.wk tr.group th { background: var(--sunk); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 5px 10px; text-align: left; }

.summary { display: grid; gap: 12px; position: sticky; top: 76px; }
.summary .panel { padding: 16px; }
.summary h2 { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 10px; }
.sumtable { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.sumtable td, .sumtable th { padding: 6px 0; border-bottom: 1px solid var(--rule); text-align: right; font-variant-numeric: tabular-nums; }
.sumtable th { font-size: 0.7rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.sumtable td:first-child, .sumtable th:first-child { text-align: left; }
.sumtable tr:last-child td { border-bottom: 0; }
.sumtable tfoot td { font-weight: 700; border-top: 2px solid var(--rule-strong); }
.legend { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- day timeline */
.day { min-width: 900px; }
.day__axis, .day__row { display: grid; grid-template-columns: 200px minmax(0, 1fr); border-bottom: 1px solid var(--rule); }
.day__axis { position: sticky; top: 0; z-index: 3; background: var(--sunk); font-size: 0.72rem; color: var(--muted); }
.day__axis > div:first-child, .day__row > div:first-child { padding: 8px 10px; border-right: 1px solid var(--rule); position: sticky; left: 0; background: inherit; z-index: 2; }
.day__row > div:first-child { background: var(--card); }
.day__ticks, .day__track { position: relative; height: 34px; }
.day__track { height: 48px; background-image: repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px calc(100% / var(--hours))); cursor: copy; }
.day__ticks span { position: absolute; top: 9px; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.bar-shift { position: absolute; top: 7px; height: 34px; border: 0; border-radius: 7px; padding: 3px 8px; font-size: 0.75rem; text-align: left; overflow: hidden; white-space: nowrap; cursor: pointer;
  background: color-mix(in oklch, var(--c, #6b7c8f) 22%, white); color: color-mix(in oklch, var(--c, #6b7c8f) 45%, black); box-shadow: inset 3px 0 0 var(--c, #6b7c8f); }
.bar-shift b { font-weight: 700; margin-right: 4px; }
.bar-shift.is-draft { outline: 1px dashed color-mix(in oklch, var(--c, #6b7c8f) 55%, white); outline-offset: -1px; }
.bar-shift .brk { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, transparent 0 3px, oklch(100% 0 0 / 0.6) 3px 6px); }
.cover { display: flex; align-items: flex-end; height: 44px; gap: 1px; }
.cover div { flex: 1; background: var(--pink-line); border-radius: 2px 2px 0 0; position: relative; min-height: 1px; }
.cover div span { position: absolute; top: -15px; left: 0; right: 0; text-align: center; font-size: 0.66rem; color: var(--muted); }
.day__row.cover-row { background: var(--paper); }
.day__row.cover-row > div:first-child { background: var(--paper); }

/* ---------- month calendar */
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--rule); gap: 1px; border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; }
.month > .mh { background: var(--sunk); font-size: 0.75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 10px; }
.mday { background: var(--card); min-height: 118px; padding: 8px 10px; display: grid; align-content: start; gap: 4px; text-align: left; border: 0; cursor: pointer; font-size: 0.8rem; transition: background-color 120ms; }
.mday:hover { background: var(--paper); }
.mday.is-out { background: var(--paper); color: var(--muted); }
.mday.is-today .mday__n { background: var(--burgundy); color: var(--on-burgundy); }
.mday__n { font-weight: 700; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; margin: -3px 0 0 -5px; font-variant-numeric: tabular-nums; }
.mday__line { display: flex; justify-content: space-between; gap: 6px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mday__line span:first-child { color: var(--muted); }
.mday .bad { color: var(--urgent); font-weight: 600; }
.mday .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.mini { font-size: 0.7rem; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); }
.mini--open { background: var(--pink-soft); color: var(--burgundy); }
.mini--off { background: var(--urgent-bg); color: var(--urgent); }
.mini--draft { background: var(--high-bg); color: var(--high); }
.mini--hol { background: var(--medium-bg); color: var(--medium); }

/* ---------- requests */
.req-list { display: grid; gap: 10px; }
.req { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.req__title { font-weight: 600; }
.req__meta { color: var(--muted); font-size: 0.84rem; margin-top: 2px; }
.req__shifts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; font-size: 0.86rem; }
.req__shift { display: inline-flex; gap: 8px; align-items: center; padding: 5px 10px; border-radius: var(--r); background: var(--sunk); font-variant-numeric: tabular-nums; }
.req__note { margin-top: 8px; font-size: 0.86rem; color: var(--ink-2); background: var(--paper); border-left: 3px solid var(--pink-line); padding: 6px 10px; border-radius: 0 6px 6px 0; }
.req__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.req.is-done { opacity: 0.75; }
.type { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 8px; border-radius: 4px; margin-right: 6px; }
.type--drop { background: var(--high-bg); color: var(--high); }
.type--swap { background: var(--medium-bg); color: var(--medium); }
.type--pickup { background: var(--ok-bg); color: var(--ok); }
.type--timeoff { background: var(--urgent-bg); color: var(--urgent); }
.type--availability { background: var(--pink-soft); color: var(--burgundy); }
.st { font-size: 0.76rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.st--open, .st--asked, .st--pending { background: var(--high-bg); color: var(--high); }
.st--approved { background: var(--ok-bg); color: var(--ok); }
.st--declined, .st--refused { background: var(--urgent-bg); color: var(--urgent); }
.st--cancelled { background: var(--sunk); color: var(--muted); }

.av-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.av-table td, .av-table th { padding: 5px 8px; border-bottom: 1px solid var(--rule); text-align: left; }
.av-table th { color: var(--muted); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; }
.av-table .changed { background: var(--high-bg); font-weight: 600; }
.av-edit { display: grid; gap: 8px; }
.av-row { display: grid; grid-template-columns: 110px 150px minmax(0, 1fr); gap: 10px; align-items: center; }
.av-row b { font-weight: 500; font-size: 0.9rem; }
.av-times { display: inline-flex; gap: 6px; align-items: center; }
.av-times .input { width: 110px; }

.labour-table th, .labour-table td { white-space: nowrap; padding: 10px 12px; }

/* ---------- people */
.roles-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.roles-pick label { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--rule-strong); border-radius: 999px; font-size: 0.82rem; cursor: pointer; }
.roles-pick input { accent-color: var(--burgundy); }
.roles-pick label:has(input:checked) { border-color: var(--burgundy); background: var(--pink-soft); }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.82rem; }
.history li { border-left: 2px solid var(--rule-strong); padding-left: 10px; }
.history time { color: var(--muted); font-size: 0.76rem; display: block; }
.drawer details summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; padding: 4px 0; }
.setup-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 130px auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.setup-row:last-child { border-bottom: 0; }
.setup-row input[type=color] { width: 30px; height: 30px; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; }
.money-in { position: relative; }
.money-in::before { content: "$"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 0.85rem; }
.money-in .input { padding-left: 22px; }

/* ---------- staff site */
.next { background: var(--burgundy); color: var(--on-burgundy); border-radius: var(--r-lg); padding: 22px 24px; display: grid; gap: 6px; margin-bottom: 20px; position: relative; overflow: hidden; }
.next span { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--on-burgundy-muted); font-weight: 600; }
.next h2 { font: 800 clamp(1.8rem, 5vw, 2.6rem)/1 var(--font-display); font-stretch: 78%; text-transform: uppercase; color: var(--pink); }
.next p { color: var(--on-burgundy-muted); }
.next .role-tag { justify-self: start; }
.strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 22px; }
.strip a { display: grid; gap: 2px; text-decoration: none; padding: 8px 6px; border-radius: var(--r); background: var(--card); border: 1px solid var(--rule); text-align: center; font-size: 0.78rem; min-height: 74px; align-content: start; }
.strip a.is-today { border-color: var(--burgundy); box-shadow: inset 0 0 0 1px var(--burgundy); }
.strip a b { font-size: 0.9rem; }
.strip a .t { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--burgundy); font-size: 0.74rem; }
.strip a .o { color: var(--muted); }
.week-head { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 0 10px; }
.week-head h2 { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.week-head span { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.shift-card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 14px 16px; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-bottom: 8px; box-shadow: inset 4px 0 0 var(--c, var(--rule-strong)); }
.shift-card.is-past { opacity: 0.6; }
.shift-card .date { text-align: center; line-height: 1.1; }
.shift-card .date small { display: block; font-size: 0.72rem; text-transform: uppercase; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }
.shift-card .date b { font: 800 1.7rem/1 var(--font-display); font-stretch: 78%; color: var(--burgundy); }
.shift-card .time { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1.02rem; }
.shift-card .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 0.82rem; color: var(--muted); margin-top: 3px; }
.shift-card .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.banner { background: var(--pink-soft); border: 1px solid var(--pink-line); border-radius: var(--r-lg); padding: 14px 16px; margin-bottom: 16px; display: grid; gap: 10px; }
.banner h2 { font-size: 0.95rem; }
.team-wk .wk { min-width: 760px; }

@media (max-width: 1200px) { .sched { grid-template-columns: 1fr; } .summary { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
/* let columns shrink on phones instead of pushing the page wider */
.split { grid-template-columns: minmax(0, 1fr) 340px; }
.split > *, .layout > *, .two > *, .three > * { min-width: 0; }
.input { min-width: 0; }
@media (max-width: 1000px) { .split, .layout { grid-template-columns: minmax(0, 1fr); } }

/* the bar holds more here than in Flow Support: keep it on one line */
.bar .nav a, .org-badge, .who { white-space: nowrap; }
@media (max-width: 1280px) { .bar .who span:not(.avatar), .bar .org-badge { display: none; } }
@media (max-width: 900px) {
  .bar__inner { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 8px; row-gap: 6px; }
  .bar nav { order: 3; width: 100%; overflow-x: auto; }
  .bar .nav { flex-wrap: nowrap; }
  .notes { top: 100px; }
}
@media (max-width: 700px) {
  .three { grid-template-columns: 1fr 1fr; }
  .shift-card { grid-template-columns: 52px minmax(0, 1fr); }
  .shift-card .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .req { grid-template-columns: 1fr; }
  .req__actions { justify-content: flex-start; }
  .strip { gap: 3px; }
  .strip a { padding: 6px 2px; font-size: 0.7rem; }
  .av-row { grid-template-columns: 1fr 1fr; }
  .av-row .av-times { grid-column: 1 / -1; }
  .setup-row { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .setup-row .money-in { grid-column: 2; }
  .org-badge, .bar .who span:not(.avatar) { display: none; }
}

/* ======================================================================
   Layout like LifeLenz: slim dark icon sidebar, white header, dense white
   working surface, solid shift blocks. Overrides the pieces above.
   ====================================================================== */
body { background: oklch(97.2% 0.006 220); }
.site-foot { padding-left: 76px; }
.rl { display: grid; grid-template-columns: 68px minmax(0, 1fr); min-height: calc(100vh - 36px); }
.rl-side { background: var(--burgundy-2); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; z-index: 30; }
.rl-logo { display: grid; place-items: center; width: 56px; height: 40px; margin-bottom: 10px; }
.rl-logo img { width: 50px; height: auto; }
.rl-nav { display: flex; flex-direction: column; gap: 4px; width: 100%; align-items: center; }
.rl-nav__item { position: relative; width: 56px; padding: 8px 0 6px; border-radius: 10px; display: grid; justify-items: center; gap: 3px; text-decoration: none; color: var(--on-burgundy-muted); transition: background-color 140ms var(--ease), color 140ms var(--ease); }
.rl-nav__item span { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.01em; line-height: 1.1; text-align: center; }
.rl-nav__item:hover { background: var(--burgundy-3); color: var(--on-burgundy); }
.rl-nav__item[aria-current="page"] { background: color-mix(in oklch, var(--pink) 22%, transparent); color: var(--pink); box-shadow: inset 3px 0 0 var(--pink); }
.rl-badge { position: absolute; top: 3px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--urgent); color: #fff; font-size: 0.62rem; display: grid; place-items: center; }
.rl-main { min-width: 0; display: flex; flex-direction: column; }
.rl-head { position: sticky; top: 0; z-index: 25; height: 60px; background: var(--card); border-bottom: 1px solid var(--rule); display: flex; align-items: center; gap: 18px; padding: 0 20px; }
.rl-org { display: flex; align-items: center; gap: 10px; min-width: 0; padding-right: 18px; border-right: 1px solid var(--rule); }
.rl-org img { height: 30px; max-width: 90px; object-fit: contain; }
.rl-org b { display: block; font-size: 0.92rem; white-space: nowrap; }
.rl-org small { display: block; font-size: 0.74rem; color: var(--muted); white-space: nowrap; }
.rl-picker select { appearance: none; border: 1px solid var(--rule-strong); border-radius: 8px; padding: 7px 30px 7px 10px; font-weight: 600; font-size: 0.86rem; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23456' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center; cursor: pointer; }
.rl-title { font: 600 1.05rem/1 var(--font-body); color: var(--ink); white-space: nowrap; }
.rl-head .bell { color: var(--ink-2); width: 38px; height: 38px; }
.rl-head .bell:hover { background: var(--sunk); color: var(--ink); }
.rl-me { position: relative; }
.rl-me summary { list-style: none; cursor: pointer; border-radius: 50%; }
.rl-me summary::-webkit-details-marker { display: none; }
.rl-me .avatar { border: 2px solid var(--rule-strong); background: var(--sunk); color: var(--ink-2); }
.rl-me__menu { position: absolute; right: 0; top: 46px; min-width: 220px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: 0 18px 40px -18px oklch(20% 0.05 225 / 0.4); padding: 6px; display: grid; }
.rl-me__who { padding: 10px 12px; border-bottom: 1px solid var(--rule); margin-bottom: 4px; display: grid; }
.rl-me__menu a, .rl-me__menu button { text-align: left; padding: 9px 12px; border-radius: 8px; border: 0; background: none; cursor: pointer; text-decoration: none; font-size: 0.88rem; }
.rl-me__menu a:hover, .rl-me__menu button:hover { background: var(--sunk); }
.rl-body { padding: 16px 20px 40px; min-width: 0; }
.rl-body .page { padding: 4px 0 24px; max-width: none; }
.rl-body .page--narrow { max-width: 1040px; }
.rl-body .head h1 { display: none; } /* the title is in the header */
.rl-body .head { margin-bottom: 14px; min-height: 0; }
.notes { top: 64px; }

/* toolbar: M W D, date, actions */
.sched-bar { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 10px; gap: 8px; margin-bottom: 10px; }
.sched-bar .seg { border-radius: 6px; padding: 0; overflow: hidden; }
.sched-bar .seg button { border-radius: 0; padding: 6px 12px; font-weight: 600; }
.sched-bar .seg button + button { border-left: 1px solid var(--rule-strong); }
.icon-btn { width: 32px; height: 32px; border-radius: 6px; position: relative; overflow: hidden; }
.icon-btn input[type=date] { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.date-label { min-width: 170px; font-size: 0.9rem; }
.sched-bar .btn { border-radius: 6px; }

/* key numbers: one flat row, like LifeLenz */
.kpis { display: flex; flex-wrap: wrap; gap: 0; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 6px 4px; margin-bottom: 10px; }
.kpi { background: none; padding: 4px 16px; border-right: 1px solid var(--rule); }
.kpi:last-child { border-right: 0; }
.kpi span { font-size: 0.66rem; letter-spacing: 0.04em; }
.kpi b { font-size: 1rem; }

/* week grid */
.sched { grid-template-columns: minmax(0, 1fr) 330px; gap: 12px; }
.sched--full { grid-template-columns: minmax(0, 1fr); }
.grid-wrap { border-radius: 10px; max-height: calc(100vh - 230px); }
.wk thead th { background: var(--card); font-size: 0.84rem; color: var(--ink-2); padding: 10px 8px; }
.wk thead .who-col { background: var(--card); }
.wk .who-col { width: 190px; }
.wk tr.sum th, .wk tr.sum td { background: var(--card); font-size: 0.78rem; padding: 5px 8px; }
.wk tr.sum th { color: var(--ink-2); font-weight: 500; }
.diff { display: inline-block; margin-top: 2px; padding: 0 5px; border-radius: 4px; font-size: 0.7rem; font-weight: 600; }
.diff--over { background: oklch(93% 0.09 95); color: oklch(42% 0.1 70); }
.diff--under { background: var(--ok-bg); color: var(--ok); }
.wk tr.open-row th.who-col, .wk tr.open-row td { background: var(--card); }
.wk td.cell { height: 70px; padding: 4px; }
.wk .person { gap: 3px; }
.person__top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.person__top small { font-variant-numeric: tabular-nums; }
.codes { display: flex; gap: 3px; }
.code { font-size: 0.64rem; font-weight: 700; padding: 1px 4px; border-radius: 3px; background: var(--sunk); color: var(--muted); border: 1px solid var(--rule); }
.warn-flag { display: inline-flex; align-items: center; gap: 2px; font-size: 0.72rem; font-weight: 700; color: oklch(52% 0.19 27); }
.warn-flag svg { color: oklch(55% 0.2 27); }

/* shift blocks: solid role colour, white text */
.chip { background: var(--c, #6b7c8f); color: #fff; box-shadow: none; border-radius: 6px; padding: 5px 7px 6px; margin-bottom: 4px; }
.chip:hover { box-shadow: 0 6px 14px -8px oklch(20% 0.05 225 / 0.6); transform: translateY(-1px); }
.chip b { color: #fff; font-weight: 600; font-size: 0.8rem; }
.chip__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.chip__code { font-weight: 700; font-size: 0.72rem; letter-spacing: 0.03em; }
.chip__flags { position: static; display: flex; gap: 3px; }
.chip__len { display: block; font-size: 0.72rem; opacity: 0.9; }
.chip .warn-flag { background: #fff; border-radius: 4px; padding: 0 4px; line-height: 1.5; }
.chip .flag--req { background: #fff; color: var(--medium); }
.chip.is-draft { background: repeating-linear-gradient(135deg, var(--c, #6b7c8f) 0 7px, color-mix(in oklch, var(--c, #6b7c8f) 78%, white) 7px 14px); outline: 2px dashed color-mix(in oklch, var(--c, #6b7c8f) 60%, black); outline-offset: -2px; }
.bar-shift { background: var(--c, #6b7c8f); color: #fff; box-shadow: none; }
.bar-shift b { color: #fff; }

/* summary panel with a tab header and cost pills */
.summary { top: 72px; }
.summary .panel { padding: 0 16px 14px; border-radius: 10px; }
.summary .panel h2 { padding-top: 14px; }
.summary__tabs { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--rule); margin: 0 -16px 12px; padding: 0 10px 0 16px; }
.summary__tabs span { font-size: 0.88rem; font-weight: 600; padding: 11px 2px; box-shadow: inset 0 -2px 0 var(--burgundy); color: var(--burgundy); }
.summary__kicker { font-size: 0.8rem; color: var(--medium); }
.summary__title { font-size: 1.15rem; font-weight: 600; margin: 2px 0 12px; }
.jobs td:first-child { text-transform: uppercase; font-size: 0.76rem; font-weight: 600; color: var(--ink-2); }
.cost-pill { display: inline-block; padding: 2px 8px; border-radius: 4px; color: #fff; font-weight: 600; font-size: 0.78rem; background: var(--c); }

/* staff site cards pick up the same solid role colours */
.shift-card { box-shadow: inset 5px 0 0 var(--c, var(--rule-strong)); border-radius: 10px; }
.role-tag { background: var(--c, #888); color: #fff; }
.role-tag::before { background: #fff; opacity: 0.8; }

/* phones: the sidebar becomes a tab bar along the bottom */
@media (max-width: 800px) {
  .rl { grid-template-columns: minmax(0, 1fr); }
  .rl-side { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: 62px; flex-direction: row; padding: 0 4px; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--burgundy-3); }
  .rl-logo { display: none; }
  .rl-nav { flex-direction: row; justify-content: space-around; overflow-x: auto; }
  .rl-nav__item { width: auto; min-width: 58px; flex: 1; padding: 7px 2px 5px; }
  .rl-nav__item[aria-current="page"] { box-shadow: inset 0 3px 0 var(--pink); }
  .rl-head { padding: 0 12px; gap: 10px; height: 54px; }
  .rl-org { border-right: 0; padding-right: 0; }
  .rl-org small, .rl-title { display: none; }
  .rl-body { padding: 12px 12px 90px; }
  .site-foot { padding: 10px 16px 76px; }
  .rl-picker select { max-width: 140px; }
}
