:root {
  /* Aegis design standard: every text colour passes WCAG AA on its background (see the redesign proposal) */
  /* light: white pages, light-gray surfaces, charcoal text, refined teal accents (all pass WCAG AA) */
  --bg: #FFFFFF; --panel: #ffffff; --text: #1F2328; --muted: #4A5160; --line: #E2E5E9;
  --accent: #0E6B6B; --accent-soft: #E3F2F1; --good: #17633F; --good-soft: #E7F2EC;
  --bad: #A8401A; --bad-soft: #FBEDE6; --warn: #7A4D00; --warn-soft: #FDF3E1;
  --shadow: none; --radius: 8px; --heading: #1F2328; --field-line: #8A8F99; --focus: #B98A2E; --surface: #F3F4F6;
  --nav-bg: #F3F4F6; --nav-text: #2B3037; --nav-dim: #4A5160; --nav-hover: #E7E9ED; --nav-active: #E3F2F1;
  --nav-strong: #0E6B6B; --nav-bar: #0E6B6B; --brass: #0E6B6B;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1218; --panel: #171b23; --text: #e6e9ef; --muted: #9aa3b2; --line: #272d38;
    --accent: #6d95ff; --accent-soft: #1d2740; --good: #46c08a; --good-soft: #143024;
    --bad: #ff7a70; --bad-soft: #3a1c1b; --warn: #f2b14c; --warn-soft: #3a2c14;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1218; --panel: #171b23; --text: #e6e9ef; --muted: #9aa3b2; --line: #272d38;
  --accent: #6d95ff; --accent-soft: #1d2740; --good: #46c08a; --good-soft: #143024;
  --bad: #ff7a70; --bad-soft: #3a1c1b; --warn: #f2b14c; --warn-soft: #3a2c14;
  --shadow: none;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
.theme-switch { margin: 6px 0; }
.theme-label { flex-direction: row; align-items: center; gap: 6px; }
.login-theme { position: fixed; top: 12px; right: 16px; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 Inter, system-ui, sans-serif; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--bad); min-height: 1em; }
h1 { font-size: 20px; margin: 0; font-weight: 600; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 600; }
a { color: var(--accent); }

.btn { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 8px;
  padding: 7px 12px; font: inherit; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.small { padding: 4px 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--muted);
  border-radius: 8px; padding: 8px 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
textarea { width: 100%; min-height: 70px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(380px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; }
.brand-mark { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 15px; }
details input { width: 100%; margin: 8px 0; }

.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 12px; display: flex;
  flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
#nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
#nav a { text-decoration: none; color: var(--text); padding: 8px 10px; border-radius: 8px; }
#nav a:hover { background: var(--bg); }
#nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar-foot { display: flex; flex-direction: column; gap: 8px; }
main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 18px 24px 6px; }
.topbar #hotel-name { margin-left: auto; }
.menu-btn { display: none; }
.page { padding: 12px 24px 40px; display: flex; flex-direction: column; gap: 16px; }

.section-tabs { display: flex; gap: 2px; padding: 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.section-tabs:empty { display: none; }
.section-tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent;
  white-space: nowrap; font-weight: 500; margin-bottom: -1px; }
.section-tabs a:hover { color: var(--text); }
.section-tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
#nav .nav-section { display: block; }
@media (max-width: 820px) { .section-tabs { padding: 0 16px; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); min-width: 0; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.fcb-pick h2 { margin: 2px 0 10px; }
.fcb-opt { flex-direction: row; align-items: flex-start; gap: 8px; color: var(--text); padding: 6px 0; flex-wrap: wrap; }
.fcb-opt .small { flex-basis: 100%; margin-left: 24px; }
.fcb-inline { display: inline-flex; margin-right: 14px; }
.fcb-pick select { width: 100%; }
.fcb-head .pill { font-size: 13px; }
.fcb-drivers { font-size: 15px; margin-top: 4px; }
.fcb-flag { border-color: var(--warn); }
input.fcb-col, input.fcb-tot { width: 48px; text-align: right; padding: 4px 5px; }
table.fcb-tbl th, table.fcb-tbl td { padding: 6px 6px; }
table.fcb-tbl td:first-child { white-space: normal; min-width: 110px; }
input.fcb-col:disabled, input.fcb-tot:disabled { border-color: transparent; background: transparent; color: var(--text); opacity: 1; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.tile .label { color: var(--muted); font-size: 12px; }
.tile .value { font-size: 24px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile .sub { font-size: 12px; margin-top: 2px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.toolbar label { flex-direction: row; align-items: center; gap: 6px; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
td.num, th.num { text-align: right; }
tr.sub td { color: var(--muted); font-size: 12px; }
tr.sub td:first-child { padding-left: 26px; }

.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 500; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.info { background: var(--accent-soft); color: var(--accent); }
.good-t { color: var(--good); } .bad-t { color: var(--bad); } .warn-t { color: var(--warn); }

.list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; }
.list li .grow { flex: 1; }
.empty { color: var(--muted); padding: 10px 0; }

.sched td.cell { min-width: 96px; vertical-align: top; }
.shift { display: block; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 3px 6px;
  font-size: 12px; margin-bottom: 3px; }
.shift.open { background: var(--warn-soft); color: var(--warn); }
.chart-box { position: relative; height: 280px; }
.answer { white-space: pre-wrap; line-height: 1.55; }

.toast { position: fixed; bottom: 18px; right: 18px; background: var(--text); color: var(--bg); padding: 10px 14px;
  border-radius: 8px; max-width: 360px; box-shadow: var(--shadow); z-index: 10; }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 5; width: 240px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-block; }
  .topbar, .page { padding-left: 16px; padding-right: 16px; }
  .grid.two { grid-template-columns: 1fr; }
}

/* department finance */
table.pl tr.group td { font-weight: 600; padding-top: 12px; color: var(--muted, #9aa4b2); text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
table.pl tr.sub td { font-style: italic; }
table.pl tr.total td { font-weight: 600; border-top: 1px solid rgba(127,127,127,.35); }
td.manual, td.manual input { color: var(--accent); }
.manual-key { color: var(--accent); font-weight: 600; }
input.cell-in { width: 78px; text-align: right; background: transparent; border: 1px solid rgba(127,127,127,.25); border-radius: 4px; padding: 3px 5px; color: inherit; }
input.cell-in.dirty { border-color: #f0b429; }
table.grid12 td, table.grid12 th { padding: 4px 6px; white-space: nowrap; }
.grid.targets { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 14px; margin: 8px 0; }
.target { display: flex; align-items: center; gap: 6px; }
.target .pct-in { width: 48px; }
details.po { border: 1px solid rgba(127,127,127,.25); border-radius: 6px; padding: 8px 10px; margin: 6px 0; }
details.po summary { cursor: pointer; }

/* order guides (Adaco look: editable columns tinted) */
table.guide td.ed { background: rgba(240, 200, 60, .08); }
table.guide td.ctr { text-align: center; }
table.guide td, table.guide th { padding: 4px 6px; white-space: nowrap; }
.item-search label { display: flex; justify-content: space-between; gap: 10px; margin: 4px 0; }
.item-search label input, .item-search label select { width: 60%; }
@media print { .sidebar, .section-tabs, .toolbar, #topbar, header, button { display: none !important; } table.guide input { border: none; } }

/* Revenue & BI */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); gap: 12px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 6px; }
.cal-day { border: 1px solid rgba(127,127,127,.3); border-radius: 6px; padding: 6px; min-height: 92px; }
.cal-day.high { background: rgba(214, 75, 42, .12); }
.cal-day.medium { background: rgba(232, 130, 42, .10); }
.cal-h { display: flex; justify-content: space-between; align-items: center; }
.cal-note { margin-top: 2px; }
table.maps input { width: 100%; background: transparent; border: 1px solid rgba(127,127,127,.25); color: inherit; padding: 2px 4px; }
.warn-box { border-left: 3px solid #e0a12c; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { border: 1px solid rgba(127,127,127,.4); border-radius: 12px; padding: 2px 9px; cursor: pointer; font-size: 12px; user-select: none; }
.chip.on { background: rgba(47,127,181,.25); border-color: #2f7fb5; cursor: grab; }
.commentary textarea { width: 100%; background: transparent; color: inherit; border: 1px solid rgba(127,127,127,.3); border-radius: 4px; padding: 6px; }
table.review td, table.review th { white-space: nowrap; padding: 4px 6px; }
@media print { .commentary textarea { border: none; resize: none; } .print-area { box-shadow: none; } }
@media (max-width: 700px) { .cal { grid-template-columns: repeat(2, 1fr); } .kpi-grid { grid-template-columns: 1fr; } }
/* recipe & ingredients */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; align-items: end; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid textarea { width: 100%; box-sizing: border-box; }
.inline { display: flex; gap: 6px; align-items: center; }
.ing-cost { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; background: var(--accent-soft); }
.ing-cost.bad { background: var(--bad-soft); }
.ing-cost .big { font-size: 22px; font-weight: 700; margin: 2px 0 4px; }
tr.sel-row td { background: var(--accent-soft); }
.re-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.re-steps { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.re-costcard { position: sticky; top: 64px; }
.re-costcard h3 { margin-top: 0; }
.cc-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.cc-row.cc-main strong { font-size: 18px; color: var(--accent); }
.cc-row.cc-bad strong { color: var(--bad); }
.cc-warn { background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; font-size: 13px; }
.step { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; align-items: center; justify-content: center; margin-right: 6px; }
.re-search { position: relative; margin-bottom: 10px; }
.re-search input { width: 100%; box-sizing: border-box; }
.re-hits { position: absolute; z-index: 12; left: 0; right: 0; top: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(16,24,40,.14); max-height: 300px; overflow: auto; }
.re-hit { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; cursor: pointer; }
.re-hit:hover { background: var(--accent-soft); }
table.re-tbl input.cell-in { width: 64px; text-align: right; }
.re-img { max-width: 160px; max-height: 120px; border-radius: 8px; border: 1px solid var(--line); }
@media (max-width: 1000px) { .re-grid { grid-template-columns: 1fr; } .re-costcard { position: static; } }
/* shared P&L comparison */
.plc-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; }
.plc-title h2 { margin: 0; }
.plc-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.plc-bar { margin: 10px 0; }
.plc-side { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.plc-exp { margin-left: auto; display: flex; gap: 6px; }
.plc-tbl tr.plc-hd td { font-weight: 700; padding-top: 12px; color: var(--muted); text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
.plc-tbl tr.plc-sub td { font-weight: 700; border-top: 1px solid var(--muted); }
.plc-tbl td.plc-l1 { padding-left: 18px; }
@media print { body.printing-plc .page-body > *:not(.plc-holder), body.printing-plc .plc-holder:not(:has(.plc-print)), body.printing-plc .plc-bar, body.printing-plc .plc-quick { display: none !important; }
  body.printing-plc .plc-print .card { box-shadow: none; border: none; } }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.page-body { display: contents; }

/* ================= Aegis design standard (visual only; no screen logic depends on it) ================= */
/* dark keeps its own look: navy sidebar with a brass marker */
:root[data-theme="dark"] { --heading: #E6EAF2; --field-line: #6b7486; --focus: #D8B46A; --surface: #1d222c;
  --nav-bg: #14213D; --nav-text: #E6EAF2; --nav-dim: #AEB8CC; --nav-hover: #1C2C50; --nav-active: #22335A; --nav-strong: #FFFFFF; --nav-bar: #D8B46A; --brass: #D8B46A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --heading: #E6EAF2; --field-line: #6b7486; --focus: #D8B46A; --surface: #1d222c;
  --nav-bg: #14213D; --nav-text: #E6EAF2; --nav-dim: #AEB8CC; --nav-hover: #1C2C50; --nav-active: #22335A; --nav-strong: #FFFFFF; --nav-bar: #D8B46A; --brass: #D8B46A; } }
html, body { font: 16px/1.5 Inter, "Segoe UI", system-ui, -apple-system, sans-serif; }
.small { font-size: 14px; }
h1 { font-size: 28px; font-weight: 700; color: var(--heading); letter-spacing: -0.01em; }
h2 { font-size: 20px; font-weight: 600; margin: 0 0 14px; }
h3 { font-size: 17px; font-weight: 600; }
label { font-size: 14px; font-weight: 600; color: var(--text); gap: 6px; }
/* controls: 44 px targets, one clear primary */
.btn { min-height: 44px; padding: 0 18px; border-radius: 6px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-color: var(--field-line); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn.danger { background: var(--panel); }
input, select, textarea { font-size: 16px; border-color: var(--field-line); border-radius: 6px; background: var(--panel); }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not(.cell-in):not(.fcb-col):not(.fcb-tot), select { min-height: 44px; padding: 0 12px; }
textarea { padding: 10px 12px; }
input[type=checkbox], input[type=radio] { width: 24px; height: 24px; accent-color: var(--accent); }
input.cell-in, input.fcb-col, input.fcb-tot, table.maps input, table.guide input { min-height: 36px; font-size: 15px; }
:focus-visible { outline: 3px solid var(--focus) !important; outline-offset: 2px; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--accent); }
/* cards and tiles: restrained */
.card { box-shadow: none; padding: 20px; }
.tiles { gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.tile { box-shadow: none; padding: 18px 20px; }
.tile .label { font-size: 15px; font-weight: 600; color: var(--text); }
.tile .value { font-size: 30px; font-weight: 700; }
.tile .sub { font-size: 14px; color: var(--muted); }
/* tables: readable rows, numbers right-aligned in tabular figures, strong totals */
th, td { padding: 11px 14px; }
th { font-size: 14px; font-weight: 600; color: var(--muted); }
td.num, th.num { font-variant-numeric: tabular-nums; }
tr.sub td { font-size: 14px; color: var(--muted); }
table.pl tr.group td, .plc-tbl tr.plc-hd td { font-size: 14px; color: var(--muted); letter-spacing: .05em; }
table.pl tr.sub td { font-style: normal; }
table.pl tr.total td, .plc-tbl tr.plc-sub td { font-weight: 700; border-top: 2px solid var(--text); }
td.manual, td.manual input { color: var(--accent); text-decoration: underline dotted; text-underline-offset: 3px; }
table.fcb-tbl th, table.fcb-tbl td, table.grid12 td, table.grid12 th, table.guide td, table.guide th, table.review td, table.review th { padding: 6px 8px; }
/* status: never colour alone; badges are bold and carry a word or symbol */
.pill { font-size: 14px; font-weight: 600; padding: 3px 10px; }
.chip { font-size: 14px; padding: 4px 12px; }
.shift { font-size: 14px; }
.fcb-head .pill { font-size: 14px; }
.cc-row { font-size: 15px; }
.cc-warn { font-size: 15px; }
.step { width: 28px; height: 28px; font-size: 14px; }
.toast { font-size: 16px; padding: 12px 16px; }
.section-tabs a { font-size: 16px; padding: 12px 16px; }
.section-tabs a.active { font-weight: 700; border-bottom-width: 3px; }

/* theme switch fixed at the bottom-left of every screen */
.theme-dock { position: fixed; left: 12px; bottom: 12px; z-index: 40; display: inline-flex; background: var(--panel);
  border: 1px solid var(--field-line); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(16, 24, 40, .12); }
.theme-dock button { min-height: 40px; padding: 0 14px; border: 0; border-right: 1px solid var(--line); background: transparent;
  color: var(--text); font: 600 14px Inter, "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.theme-dock button:last-child { border-right: 0; }
.theme-dock button:hover { background: var(--accent-soft); }
.theme-dock button[aria-pressed="true"] { background: var(--accent); color: #fff; }
@media print { .theme-dock { display: none !important; } }
.ws-side { padding-bottom: 76px; }
body { padding-bottom: 64px; }

/* Marketing & Attribution */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.grid2 > .card { margin: 0; }
.mk-code { background: var(--nav-bg, #F3F4F6); border: 1px solid var(--line); border-radius: 8px; padding: 12px; white-space: pre-wrap; word-break: break-all; font-size: 14px; }
.mk-filters label { min-width: 0; }






/* Restaurant version brand: purple (set on <html data-brand="restaurant"> after login; hotels keep blue) */
:root[data-brand="restaurant"] { --accent: #6d28d9; --accent-soft: #f1eafd; }
@media (prefers-color-scheme: dark) {
  :root[data-brand="restaurant"]:not([data-theme="light"]) { --accent: #b18cff; --accent-soft: #2a1f45; }
}
:root[data-brand="restaurant"][data-theme="dark"] { --accent: #b18cff; --accent-soft: #2a1f45; }
:root[data-brand="restaurant"] .brand-mark { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.brand-mark svg { width: 17px; height: 17px; display: block; }

/* Schedule Builder grid (OnTrack-style, editable) */
table.sb-grid { table-layout: fixed; min-width: 1000px; }
table.sb-grid th:first-child, table.sb-grid td.sb-name { width: 170px; }
table.sb-grid td.sb-cell { vertical-align: top; cursor: pointer; padding: 4px; position: relative; min-height: 48px; }
table.sb-grid td.sb-cell:hover { background: var(--accent-soft); }
td.sb-cell.sb-off { background: var(--warn-soft); }
td.sb-cell.sb-drop { outline: 2px dashed var(--accent); outline-offset: -2px; }
.sb-shift { background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 6px; padding: 3px 6px; margin-bottom: 3px; font-size: 12px; line-height: 1.3; }
.sb-shift b { display: block; color: var(--text); }
.sb-shift span { color: var(--muted); }
.sb-shift i { display: block; font-style: normal; color: var(--warn); }
.sb-shift.sb-warn { border-left-color: var(--warn); }
.sb-shift.sb-other { opacity: .55; border-left-style: dashed; cursor: default; }
.sb-shift[draggable="true"] { cursor: grab; }
.sb-code { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .03em; color: var(--warn); background: var(--warn-soft); border-radius: 4px; padding: 1px 6px; margin-bottom: 3px; }
.sb-add { border: 1px dashed var(--line); background: transparent; color: var(--muted); border-radius: 6px; width: 100%; padding: 1px 0; cursor: pointer; opacity: 0; }
td.sb-cell:hover .sb-add { opacity: 1; }
table.sb-grid tfoot th, table.sb-grid tfoot td { font-size: 12px; border-top: 1px solid var(--line); }
.sb-editor { border: 1px solid var(--accent); }
@media print { .sb-add, #editor, #preview, .toolbar { display: none !important; } table.sb-grid { min-width: 0; } }

/* Simple schedule: one box per person per day, type a shift letter */
table.sc-grid { table-layout: fixed; min-width: 760px; }
table.sc-grid th:first-child, table.sc-grid td.sc-name { width: 180px; }
table.sc-grid td { vertical-align: top; padding: 4px; }
.sc-box { width: 100%; max-width: 74px; text-align: center; font: 700 15px Inter, system-ui, sans-serif; text-transform: uppercase;
  padding: 7px 4px; border: 2px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); }
.sc-box:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sc-box.sc-daycode { color: var(--warn); background: var(--warn-soft); font-size: 12px; }
.sc-box.sc-bad { border-color: var(--bad) !important; background: var(--bad-soft); }
.sc-box.sc-saving { opacity: .6; }
.sc-hint { font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.2; }
.sc-legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.sc-chip { display: inline-flex; gap: 5px; align-items: center; border: 1px solid var(--line); border-left-width: 4px; border-radius: 6px; padding: 3px 8px; font-size: 12.5px; }
@media print { table.sc-grid .sc-box { border: none; } .sc-hint { display: none; } }

/* Simple schedule v2: click a day, press a shortcut key; cells show the shift times */
.sc-cell { cursor: pointer; min-height: 44px; border-radius: 6px; }
.sc-cell:hover { background: var(--accent-soft); }
.sc-cell.sc-sel { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.sc-cell:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.sc-cell.sc-saving { opacity: .5; }
.sc-shift { border-left: 4px solid var(--accent); background: var(--panel); border-radius: 6px; padding: 4px 7px; font-size: 12.5px; line-height: 1.3; box-shadow: var(--shadow); }
.sc-shift b { display: block; white-space: nowrap; }
.sc-shift span { color: var(--muted); font-size: 11.5px; }
.sc-off { color: var(--warn); background: var(--warn-soft); border-radius: 6px; padding: 4px 7px; font-size: 12px; font-weight: 600; }
.sc-other { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sc-palette { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.sc-key { border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--panel); color: var(--text); border-radius: 7px; padding: 5px 9px; font: 500 12.5px Inter, system-ui, sans-serif; cursor: pointer; }
.sc-key:hover { background: var(--accent-soft); }
.sc-key kbd { font: 700 12px Inter, system-ui, sans-serif; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; margin-right: 3px; }
.sc-key-off { border-left-color: var(--warn); }

/* Schedule publish bar */
.pub-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 10px; }
.pub-warn { margin: -4px 0 12px; font-size: 13px; }
.pub-warn summary { cursor: pointer; color: var(--warn); font-weight: 600; }
.pub-warn ul { margin: 6px 0 0; padding-left: 18px; }

/* Employee requests inbox */
.rq { border-top: 1px solid var(--line); padding: 12px 0; }
.rq:first-of-type { border-top: 0; }
.rq-top { display: flex; justify-content: space-between; gap: 12px; }
.rq-conf { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--text); font-size: 13px; }
.rq .toolbar { margin-top: 8px; }

