:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17332f;
  background: #f3f7f6;
  font-synthesis: none;
  --green: #0b5e55;
  --green-2: #e2f2ee;
  --blue: #176b9c;
  --blue-2: #e4f2fb;
  --orange: #a34f0b;
  --orange-2: #fff0df;
  --purple: #70428d;
  --purple-2: #f2eafa;
  --red: #b42318;
  --border: #d6e2df;
  --muted: #607b75;
  --shadow: 0 10px 28px rgba(21, 63, 55, .08);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 1100px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--border); backdrop-filter: blur(10px); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; letter-spacing: -.02em; }
h2 { font-size: 17px; }
h3 { font-size: 16px; }
.eyebrow { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .11em; margin-bottom: 4px; }
.header-actions { display: flex; gap: 10px; align-items: end; }
.header-actions label { color: var(--muted); font-size: 11px; font-weight: 700; }
input, select { border: 1px solid var(--border); background: #fff; color: #17332f; border-radius: 9px; padding: 9px 10px; outline: none; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(11,94,85,.12); }
.header-actions input, .header-actions select { display: block; margin-top: 4px; height: 38px; }
.button { border: 0; border-radius: 9px; padding: 10px 14px; font-weight: 750; background: var(--green); color: white; }
.button.secondary { background: #e7efed; color: #264842; }
.button.danger { background: #fff0ee; color: var(--red); }
.summary { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 10px; padding: 12px 24px; }
.metric { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); }
.metric strong { display: block; font-size: 21px; }
.metric span { color: var(--muted); font-size: 12px; }
.metric.error { border-color: #f2b8b5; background: #fff6f5; }
.metric.warning { border-color: #f2d19d; background: #fffaf0; }
.app-shell { display: grid; grid-template-columns: 300px 1fr; gap: 14px; padding: 0 24px 24px; }
.staff-panel, .workspace { background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.staff-panel { position: sticky; top: 94px; height: calc(100vh - 110px); padding: 14px; overflow: hidden; display: flex; flex-direction: column; }
.staff-panel.collapsed { width: 52px; padding: 10px 7px; }
.staff-panel.collapsed > *:not(.panel-title), .staff-panel.collapsed .panel-title > div { display: none; }
.app-shell:has(.staff-panel.collapsed) { grid-template-columns: 52px 1fr; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.panel-title p { color: var(--muted); font-size: 12px; margin-top: 2px; }
.icon-button { border: 0; width: 32px; height: 32px; border-radius: 8px; background: #edf3f1; color: #345650; font-size: 22px; line-height: 1; }
.search { width: 100%; margin: 12px 0 10px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--border); border-radius: 999px; padding: 5px 9px; color: var(--muted); background: #fff; font-size: 11px; font-weight: 750; }
.chip.active { background: #17332f; border-color: #17332f; color: #fff; }
.chip.gm:not(.active) { color: var(--blue); background: var(--blue-2); }
.chip.dc:not(.active) { color: var(--orange); background: var(--orange-2); }
.chip.hc:not(.active) { color: var(--purple); background: var(--purple-2); }
.check { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin: 10px 0; }
.check input { width: auto; }
.staff-list { overflow: auto; padding-right: 3px; }
.staff-card { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 9px; border-radius: 9px; margin-bottom: 6px; border: 1px solid transparent; cursor: grab; }
.staff-card:active { cursor: grabbing; }
.staff-card.gm { background: var(--blue-2); color: #14547a; }
.staff-card.dc { background: var(--orange-2); color: #7a410f; }
.staff-card.hc { background: var(--purple-2); color: #5c3674; }
.staff-card.assigned { opacity: .48; }
.staff-card small { font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.workspace { min-height: 700px; padding: 12px; overflow: hidden; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 14px; }
.tab { background: transparent; color: var(--muted); border: 0; padding: 8px 12px; border-radius: 8px; font-weight: 700; }
.tab.active { background: var(--green-2); color: var(--green); }
.view { display: none; }
.view.active { display: block; }
.zone-section { margin-bottom: 18px; }
.zone-header { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 9px 9px 0 0; color: white; background: #165d9a; }
.zone-header.green { background: #327329; }
.zone-header.gray { background: #4e6561; }
.room-grid { display: grid; grid-template-columns: 1fr; gap: 8px; padding-top: 8px; }
.room-card { border: 1px solid var(--border); border-radius: 11px; overflow: hidden; background: #fcfefd; }
.room-card.inactive { opacity: .52; }
.room-title { display: flex; align-items: center; justify-content: space-between; padding: 6px 9px; background: #eef5f3; }
.room-title strong { color: var(--green); }
.room-title label { color: var(--muted); font-size: 11px; }
.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.slot { min-height: 58px; padding: 6px; border-top: 1px solid var(--border); border-right: 1px solid var(--border); }
.slot:last-child { border-right: 0; }
.slot.invalid { background: #fff4f3; }
.slot.dragover { outline: 2px solid var(--green); outline-offset: -2px; background: var(--green-2); }
.slot-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.required { color: var(--red); }
.slot-people { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.person-pill { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 5px 7px; border-radius: 7px; background: white; border: 1px solid var(--border); font-size: 12px; font-weight: 650; }
.person-pill.wrong { border-color: #e7756e; background: #fff1f0; }
.person-pill.postshift { border-color: #db9c3e; background: #fff7e8; }
.person-pill button { border: 0; background: transparent; color: #8a9b97; padding: 0; font-size: 15px; }
.person-pill .note-edit { color: var(--green); font-size: 12px; font-weight: 800; }
.person-note { display: inline-block; color: #9a3f00; background: #fff0bd; border: 1px solid #efc45b; border-radius: 4px; padding: 1px 4px; font-size: 11px; font-weight: 900; white-space: nowrap; }
.add-person { border: 1px dashed #a7bbb7; color: var(--muted); background: transparent; border-radius: 7px; padding: 4px 7px; font-size: 12px; }
.support-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.support-card { border: 1px solid var(--border); border-radius: 9px; padding: 7px; min-height: 78px; background: #fbfdfc; }
.support-card header { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.support-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.support-card h3 { font-size: 14px; }
.support-card .slot { min-height: 42px; padding: 4px; margin-top: 5px; border: 0; background: #f3f8f6; border-radius: 7px; }
.support-card .slot-label { display: none; }
.support-card .slot-people { margin-top: 0; }
.view-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.small-button { border: 0; border-radius: 7px; padding: 6px 8px; font-size: 11px; font-weight: 750; background: #edf3f1; color: #345650; }
.small-button.delete { color: var(--red); background: #fff0ee; }
.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.status-card { min-height: 180px; border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.status-card.status-wide { grid-column: 1 / -1; }
.status-card h3 { margin-bottom: 10px; }
.status-columns { display: grid; gap: 8px; }
.status-columns.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.status-columns.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.status-card .slot { border: 1px dashed var(--border); border-radius: 8px; min-height: 118px; }
.picker-list { max-height: 55vh; overflow: auto; }
dialog { border: 0; padding: 0; border-radius: 14px; box-shadow: 0 24px 70px rgba(0,0,0,.22); width: 440px; }
dialog::backdrop { background: rgba(12,35,31,.48); }
.dialog-card { padding: 16px; }
.dialog-title { display: flex; justify-content: space-between; }
.picker-option { width: 100%; display: grid; grid-template-columns: minmax(110px, .7fr) minmax(190px, 1.3fr); align-items: center; gap: 12px; border: 0; border-radius: 8px; padding: 9px 10px; margin-bottom: 5px; text-align: left; }
.picker-person { display: flex; flex-direction: column; gap: 2px; }
.picker-person small { font-size: 10px; font-weight: 800; }
.picker-assignment { color: var(--green); font-size: 11px; font-weight: 800; text-align: right; line-height: 1.35; }
.picker-assignment.has-location { color: #9a3f00; }
.picker-option.gm { background: var(--blue-2); }
.picker-option.dc { background: var(--orange-2); }
.picker-option.hc { background: var(--purple-2); }
.picker-option[disabled] { opacity: .35; cursor: not-allowed; }
.field { display: block; margin-top: 12px; color: var(--muted); font-size: 12px; font-weight: 700; }
.field input, .field select { display: block; width: 100%; margin-top: 5px; }
.dialog-note { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 12px 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.file-field { display: block; border: 1px dashed #a7bbb7; border-radius: 9px; padding: 12px; color: var(--muted); font-size: 12px; }
.file-field input { display: block; border: 0; padding: 6px 0 0; width: 100%; }
.or { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; margin: 10px 0; }
.or::before,.or::after { content:""; height:1px; background:var(--border); flex:1; }
.note-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 14px; }
.note-option { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 8px; padding: 8px; font-size: 12px; }
.note-option input { width: auto; }
.toast { position: fixed; right: 24px; bottom: 24px; transform: translateY(20px); opacity: 0; pointer-events: none; background: #17332f; color: white; padding: 10px 14px; border-radius: 9px; transition: .2s; z-index: 50; }
.toast.show { transform: translateY(0); opacity: 1; }
@media print {
  @page { size: A3 landscape; margin: 8mm; }
  body { min-width: 0; background: white; }
  .app-header { position: static; padding: 0 0 10px; }
  .header-actions, .staff-panel, .tabs, .summary, .add-person, .room-title label { display: none !important; }
  .app-shell { display: block; padding: 0; }
  .workspace { border: 0; box-shadow: none; padding: 0; }
  .view { display: block !important; margin-bottom: 8mm; }
  .view-toolbar .button, .small-button.delete { display:none !important; }
  .view-toolbar { margin: 4mm 0 2mm; padding-bottom: 2mm; border-bottom: 2px solid #17332f; }
  .view-toolbar h2 { font-size: 15px; }
  .room-grid { grid-template-columns: 1fr; gap: 4px; }
  .room-card { break-inside: avoid; }
  .support-grid { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .support-card { min-height: 76px; padding: 6px; break-inside: avoid; }
  .status-card { min-height: 120px; break-inside: avoid; }
  .status-card .slot { min-height: 80px; }
  .slot { min-height: 46px; padding: 4px; }
  .person-pill { padding: 3px 5px; font-size: 10px; }
}
