@charset "UTF-8";
/*
  마취과 근무표 — 시각 체계
  · 일정 상태 색은 마취과 주사기 라벨 색(ISO 26825)에서 가져왔다.
    랩=오피오이드 파랑, 휴가=유도제 노랑, 연수=항콜린제 초록, outside=승압제 보라,
    오프=벤조디아제핀 주황, 지원=국소마취제 회색. 경고·대기 알림만 근이완제 빨강.
  · 빗금은 길항제 라벨처럼 "같은 계열이지만 아직 확정 아님"을 뜻한다.
  · 평상 근무는 조용하게, 예외는 크게.
*/
:root{
  --drape:#0f3b3d;--drape-2:#164d4f;--scrub:#127a73;--scrub-ink:#0b5c56;--scrub-tint:#dff1ef;
  --canvas:#eef2f2;--surface:#fff;--ink:#142629;--ink-2:#3f5357;--muted:#5a6b6f;--faint:#7a898c;
  --line:#d7e0e0;--line-soft:#e6ecec;--alert:#e23b3b;--alert-tint:#fde9e9;
  --lab:#8ccdf0;--lab-ink:#083048;--leave:#ffd84d;--leave-ink:#3b2f00;--training:#b2dc7b;--training-ink:#1f3608;
  --outside:#d4bdf0;--outside-ink:#391a60;--off:#ffbb6e;--off-ink:#4a2500;--support:#dcd6ca;--support-ink:#3a342a;
  --hold:#eef1f1;--hold-ink:#3e4a4d;
  --stripe:repeating-linear-gradient(-45deg,rgba(255,255,255,.62) 0 4px,transparent 4px 9px);
  --font-ui:"IBM Plex Sans KR","Malgun Gothic","Apple SD Gothic Neo","Noto Sans KR",sans-serif;
  --font-num:"IBM Plex Sans Condensed","IBM Plex Sans KR","Malgun Gothic",sans-serif;
  --r-lg:12px;--r-md:8px;--r-sm:4px;
  font-family:var(--font-ui);color:var(--ink);font-size:14px;line-height:1.55;font-synthesis:none;-webkit-font-smoothing:antialiased
}
*{box-sizing:border-box}
body{margin:0;background:var(--canvas);min-height:100vh}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.45}
a{color:inherit;text-decoration:none}
:focus-visible{outline:3px solid #2f9c94;outline-offset:2px}
h1,h2,h3,p{margin:0}
h1{font-size:26px;line-height:1.3;letter-spacing:-.4px;font-weight:700}
h2{font-size:17px;letter-spacing:-.2px;font-weight:700}
h3{font-size:15px;font-weight:600}
small{font-size:12px}
svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip-link{position:absolute;left:12px;top:-80px;background:#fff;padding:12px;z-index:60;border-radius:var(--r-sm)}
.skip-link:focus{top:12px}
.num{font-family:var(--font-num);font-variant-numeric:tabular-nums}

/* ───────── App bar ───────── */
.appbar{position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:24px;height:60px;padding:0 28px;background:var(--drape);color:#fff;box-shadow:0 1px 0 #0a2a2b}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:16px;letter-spacing:-.3px;white-space:nowrap}
.brand-text small{display:block;font:500 11px/1.2 var(--font-num);letter-spacing:.3px;color:#9fc4c1;margin-top:2px}
.brand-mark{display:flex;align-items:flex-end;gap:3px;height:26px;padding:4px 0}
.brand-mark i{display:block;width:6px;border-radius:2px}
.brand-mark i:nth-child(1){height:12px;background:var(--lab)}
.brand-mark i:nth-child(2){height:20px;background:var(--leave)}
.brand-mark i:nth-child(3){height:15px;background:var(--training)}
.navigation{display:flex;align-items:stretch;gap:2px;height:100%;overflow-x:auto;scrollbar-width:none;flex:1;min-width:0}
.navigation::-webkit-scrollbar{display:none}
.nav-button{position:relative;display:flex;align-items:center;gap:7px;border:0;background:none;color:#b9d2d0;padding:0 13px;font-size:14px;font-weight:500;white-space:nowrap}
.nav-button svg{width:17px;height:17px;opacity:.8}
.nav-button:hover{color:#fff;background:var(--drape-2)}
.nav-button.active{color:#fff;font-weight:700}
.nav-button.active:after{content:"";position:absolute;left:10px;right:10px;bottom:0;height:3px;border-radius:3px 3px 0 0;background:var(--leave)}
.request-pending{display:inline-flex;align-items:center;justify-content:center;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:var(--alert);color:#fff;font:700 11px/1 var(--font-num)}
.request-pending .notification-dot{display:none}
.account-button{display:flex;align-items:center;gap:9px;border:0;background:none;color:#fff;padding:6px 8px;border-radius:var(--r-md);text-align:left;margin-left:auto;flex-shrink:0}
.account-button:hover{background:var(--drape-2)}
.account-text strong{display:block;font-size:13px;font-weight:600;line-height:1.25}
.account-text small{display:block;font-size:11px;color:#9fc4c1;line-height:1.3}
.avatar{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#fff;color:var(--drape);font-weight:700;font-size:12px;flex-shrink:0}

/* ───────── Page ───────── */
.workspace{min-width:0}
main{padding:26px 28px 18px;max-width:1880px;margin:0 auto;min-height:calc(100vh - 110px)}
main:focus{outline:none}
.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px 24px;margin-bottom:18px;flex-wrap:wrap}
.page-heading h1{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.page-subtitle{margin-top:4px;color:var(--muted);font-size:13px;max-width:72ch}
.page-heading-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.draft-chip{display:inline-flex;align-items:center;height:24px;padding:0 9px;border-radius:var(--r-sm);font-size:12px;font-weight:600;color:var(--hold-ink);background:var(--hold);background-image:var(--stripe);border:1px solid #cbd6d6;letter-spacing:0}
.app-footer{display:flex;justify-content:space-between;gap:16px;padding:0 28px 22px;max-width:1880px;margin:0 auto;font-size:12px;color:var(--faint)}

/* ───────── Buttons & inputs ───────── */
.button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:7px 14px;border:1px solid var(--line);border-radius:var(--r-md);background:var(--surface);font-size:13px;font-weight:600;line-height:1.4;color:var(--ink-2);transition:background .12s,border-color .12s}
.button:hover{border-color:#b6c6c6;background:#f6f9f9}
.button svg{width:16px;height:16px}
.button.primary{background:var(--scrub);border-color:var(--scrub);color:#fff}
.button.primary:hover{background:var(--scrub-ink);border-color:var(--scrub-ink)}
.button.danger{color:#b62828;border-color:#efc5c5;background:#fff}
.button.danger:hover{background:var(--alert-tint)}
.button.small{min-height:30px;padding:4px 11px;font-size:12px}
.button-link{border:0;background:none;color:var(--scrub-ink);font-size:13px;font-weight:600;padding:4px 0;text-decoration:underline;text-underline-offset:3px}
.input,.select{width:100%;min-height:38px;padding:7px 11px;border:1px solid #cfdada;border-radius:var(--r-md);background:#fff;font-size:14px;color:var(--ink)}
.input::placeholder{color:#9aa8aa}
.input[readonly]{background:#f3f6f6;color:var(--muted)}
.select{padding-right:28px;max-width:100%}
.segment-control{display:inline-flex;gap:2px;padding:3px;border-radius:var(--r-md);background:#dfe7e7}
.segment-control button{border:0;background:none;border-radius:6px;padding:6px 12px;min-height:30px;font-size:13px;font-weight:500;color:var(--ink-2);white-space:nowrap}
.segment-control button:hover{color:var(--ink)}
.segment-control button.active{background:#fff;color:var(--ink);font-weight:700;box-shadow:0 1px 2px rgba(15,59,61,.18)}
.search-wrap{position:relative;display:flex;align-items:center}
.search-wrap svg{position:absolute;left:10px;width:15px;height:15px;color:var(--faint)}
.search-wrap input{padding-left:32px;width:170px;min-height:34px;font-size:13px}

/* ───────── State labels (syringe colours) ───────── */
.slot-badge{display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:24px;padding:0 7px;border-radius:var(--r-sm);font-size:12px;font-weight:700;line-height:1;white-space:nowrap;letter-spacing:-.1px}
.st-work{background:transparent;color:var(--faint);font-weight:500;box-shadow:inset 0 0 0 1px var(--line-soft)}
.st-lab{background:var(--lab);color:var(--lab-ink)}
.st-leave{background:var(--leave);color:var(--leave-ink)}
.st-off{background:var(--off);color:var(--off-ink)}
.st-training{background:var(--training);color:var(--training-ink)}
.st-outside{background:var(--outside);color:var(--outside-ink)}
.st-support{background:var(--support);color:var(--support-ink)}
.st-hold{background-color:var(--hold);color:var(--hold-ink);box-shadow:inset 0 0 0 1px #c9d4d4}
.st-review{background-image:var(--stripe)}
.st-hold.st-review{background-image:repeating-linear-gradient(-45deg,#dbe3e3 0 3px,transparent 3px 8px)}

/* ───────── Key / filter chips ───────── */
.grid-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px 18px;flex-wrap:wrap;padding:12px 14px;border-bottom:1px solid var(--line)}
.keys{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.key-chip{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 10px 0 6px;border:1px solid transparent;border-radius:16px;background:none;font-size:13px;font-weight:500;color:var(--ink-2)}
.key-chip:hover{background:#f1f5f5;border-color:var(--line)}
.key-chip .swatch{width:20px;height:14px;border-radius:3px;flex-shrink:0}
.key-chip .count{font:600 13px/1 var(--font-num);color:var(--muted)}
.key-chip[aria-pressed="true"]{background:var(--ink);color:#fff;border-color:var(--ink)}
.key-chip[aria-pressed="true"] .count{color:#cfe0e0}
.key-hint{font-size:12px;color:var(--faint);margin-left:4px}
.grid-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

/* ───────── Roster grid ───────── */
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden}
.grid-panel{border-radius:var(--r-lg)}
.table-scroll{overflow:auto;max-height:max(440px,calc(100vh - 250px));scrollbar-width:thin;scrollbar-color:#c4d1d1 transparent;position:relative}
.schedule-table{border-collapse:separate;border-spacing:0;width:100%;table-layout:fixed;font-size:13px}
.schedule-table th,.schedule-table td{padding:0;text-align:center;vertical-align:middle;border-bottom:1px solid var(--line-soft);border-right:1px solid var(--line-soft)}
.schedule-table thead th{position:sticky;z-index:4;background:#f7fafa;color:var(--ink-2);font-weight:600}
.schedule-table thead tr:nth-child(1) th{top:0;height:42px;border-bottom:0}
.schedule-table thead tr:nth-child(2) th{top:42px;height:22px;font-size:11px;font-weight:500;color:var(--faint);border-bottom:1px solid var(--line)}
.schedule-table thead tr:nth-child(3) th,.schedule-table thead tr:nth-child(3) td{position:sticky;top:64px;z-index:4;height:38px;background:#fff;border-bottom:2px solid var(--ink)}
.date-head{display:flex;align-items:baseline;justify-content:center;gap:5px}
.date-head .num{font-size:17px;font-weight:700;color:var(--ink);letter-spacing:-.2px}
.date-head .weekday-label{font-size:12px;color:var(--muted);font-weight:500}
.schedule-table th.is-today{background:var(--ink)!important;color:#fff}
.schedule-table th.is-today .num,.schedule-table th.is-today .weekday-label{color:#fff}
.schedule-table .week-break{border-left:3px solid var(--ink)}
.schedule-table .day-start{border-left:1px solid var(--line)}
.rosette-heading,.person-heading{left:0;z-index:6!important;text-align:left!important;padding:0 12px!important;font-size:12px!important;color:var(--muted)!important}
.grouped-schedule .rosette-heading{width:56px;left:0}
.grouped-schedule .person-heading{width:118px;left:56px}
.flat-schedule .person-heading{width:130px;left:0}
.readout-label{position:sticky;left:0;z-index:6!important;text-align:left!important;padding:0 12px!important;background:#fff!important}
.readout-label strong{display:block;font-size:12px;font-weight:700;color:var(--ink)}
.readout-label small{display:block;font-size:11px;color:var(--faint);font-weight:500;line-height:1.2}
.readout{position:relative}
.readout .num{position:relative;z-index:1;font-size:16px;font-weight:700;color:var(--ink)}
.readout .bar{position:absolute;left:6px;right:6px;bottom:5px;height:4px;border-radius:2px;background:#e3ebeb;overflow:hidden}
.readout .bar i{display:block;height:100%;background:var(--scrub);border-radius:2px}
.readout.low .num{color:#b62828}
.readout.low .bar i{background:var(--alert)}
.rosette-cell{position:sticky;left:0;z-index:3;width:56px;background:#f7fafa;font:700 18px/1.1 var(--font-num);color:var(--drape);letter-spacing:.3px;border-right:1px solid var(--line)!important;overflow-wrap:anywhere;padding:4px!important}
.rosette-cell small{display:block;font:500 11px/1.3 var(--font-ui);color:var(--faint);margin-top:4px;letter-spacing:0}
.name-cell{position:sticky;left:56px;z-index:3;width:118px;height:38px;background:#fff;text-align:left!important;padding:0 8px 0 12px!important;font-weight:600;font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-right:1px solid var(--line)!important}
.flat-schedule .name-cell{left:0;width:130px}
.leave-table .name-cell{left:0;width:120px}
.name-cell .name-row{display:flex;align-items:center;gap:6px;min-width:0}
.me-dot{display:inline-flex;align-items:center;height:18px;padding:0 6px;border-radius:9px;background:var(--scrub);color:#fff;font-size:11px;font-weight:700;flex-shrink:0}
.group-edit{border:0;background:none;color:var(--faint);padding:2px 4px;margin-left:auto;border-radius:4px;font-size:11px;opacity:0;flex-shrink:0}
.name-cell:hover .group-edit,.group-edit:focus-visible{opacity:1}
.group-edit:hover{color:var(--scrub-ink);background:var(--scrub-tint)}
tr.group-start>*{border-top:2px solid #b9c8c8}
tr.group-alt td,tr.group-alt .name-cell{background:#fafcfc}
.schedule-table tbody td{background:#fff;transition:background .08s}
.schedule-table tbody tr:hover td,.schedule-table tbody tr:hover .name-cell{background:#f0f6f6}
.schedule-table tbody td.col-hot{background:#f0f6f6}
.schedule-table thead th.col-hot{background:#e2eeee}
tr.is-me td{background:#e6f4f2!important}
tr.is-me .name-cell{background:var(--scrub-tint)!important;color:var(--scrub-ink);box-shadow:inset 4px 0 0 var(--scrub)}
.slot-button{position:relative;display:block;width:100%;height:37px;padding:3px;border:0;background:none}
.slot-button .slot-badge{display:flex;width:100%;height:100%;min-width:0;padding:0 2px;font-size:12.5px;overflow:hidden;text-overflow:ellipsis}
.slot-button .st-work{box-shadow:none;font-size:12px}
.slot-button:hover .slot-badge{box-shadow:inset 0 0 0 2px var(--ink)}
.slot-button.has-request:after{content:"";position:absolute;top:2px;right:2px;width:9px;height:9px;border-radius:50%;background:var(--alert);box-shadow:0 0 0 2px #fff}
.lab-empty .slot-badge{color:transparent;box-shadow:none}
.lab-empty:hover .slot-badge{color:var(--faint)}
.lab-origin{position:absolute;left:3px;right:3px;bottom:2px;font-size:9.5px;line-height:1.2;color:#7a5a00;font-weight:600;pointer-events:none;text-shadow:0 0 3px #fff}
.schedule-table[data-focus] .slot-button .slot-badge{opacity:.16;transition:opacity .15s}
.schedule-table[data-focus="lab"] .slot-button[data-k="lab"] .slot-badge,
.schedule-table[data-focus="leave"] .slot-button[data-k="leave"] .slot-badge,
.schedule-table[data-focus="off"] .slot-button[data-k="off"] .slot-badge,
.schedule-table[data-focus="training"] .slot-button[data-k="training"] .slot-badge,
.schedule-table[data-focus="outside"] .slot-button[data-k="outside"] .slot-badge,
.schedule-table[data-focus="support"] .slot-button[data-k="support"] .slot-badge,
.schedule-table[data-focus="review"] .slot-button[data-r="1"] .slot-badge,
.schedule-table[data-focus="work"] .slot-button[data-k="work"] .slot-badge{opacity:1}
.schedule-table[data-focus="work"] .slot-button[data-k="work"] .slot-badge{background:var(--scrub-tint);color:var(--scrub-ink);font-weight:700}
.table-bottom{display:flex;justify-content:space-between;gap:6px 16px;flex-wrap:wrap;padding:10px 14px;border-top:1px solid var(--line);font-size:12px;color:var(--muted);background:#fafcfc}
.footnotes{margin-top:14px;display:grid;gap:6px}
.info-strip{display:flex;gap:8px;align-items:flex-start;margin-top:12px;font-size:12.5px;line-height:1.65;color:var(--muted);max-width:110ch}
.footnotes .info-strip{margin-top:0}
.info-strip svg{width:15px;height:15px;margin-top:3px;color:var(--faint)}
.info-strip strong{color:var(--ink-2);font-weight:600}

/* ───────── Notices, empty ───────── */
.notice{font-size:13px;line-height:1.65;color:var(--ink-2);background:#f3f7f7;border:1px solid var(--line);border-left:4px solid #9fb4b4;border-radius:var(--r-md);padding:11px 14px}
.notice.warning{background:#fff8e1;border-color:#f1dfa2;border-left-color:#e2b100;color:#5a4700}
.notice + .notice{margin-top:10px}
.empty-state{text-align:center;padding:48px 22px;color:var(--muted)}
.empty-state svg{width:30px;height:30px;color:#a3b5b5;margin-bottom:10px}
.empty-state h3{color:var(--ink-2);margin-bottom:6px}
.empty-state p{font-size:13px}
.empty-action{text-align:center;padding:0 20px 30px}
.initial-loading{padding:90px 20px;text-align:center;color:var(--muted)}
.spinner{width:18px;height:18px;border:2px solid #cfdcdc;border-top-color:var(--scrub);border-radius:50%;display:inline-block;animation:spin .8s linear infinite;vertical-align:middle;margin-right:8px}
@keyframes spin{to{transform:rotate(360deg)}}

/* ───────── Panels, sections ───────── */
.panel-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 18px;border-bottom:1px solid var(--line)}
.panel-heading h2{font-size:16px}
.panel-heading h2 .count-label{font:600 14px var(--font-num);color:var(--muted);margin-left:6px}
.panel-subtitle{font-size:12.5px;color:var(--muted);margin-top:3px}
.admin-sections{flex-wrap:wrap;gap:5px;padding:7px!important;height:auto!important}
.admin-sections button{min-height:34px}
.config-checks{display:flex;gap:12px 20px;flex-wrap:wrap;align-items:center}
.config-checks .check-field{margin:5px 0}
.config-reapply{margin-top:12px}
.config-rows input.input,.config-rows select{min-width:105px;width:100%;font-size:13px}
.config-rows td{padding:7px!important;vertical-align:middle}
.config-rows td label{display:inline-flex;align-items:center;gap:4px;margin:3px;white-space:nowrap}
.config-lab td{text-align:center!important}
.config-lab input{width:18px;height:18px;accent-color:var(--scrub)}
#admin-lab-person{min-width:180px;margin-left:12px}
.toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 14px;border-bottom:1px solid var(--line)}
.subsection{margin-top:26px}
.subsection-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:10px}
.subsection-heading h2{font-size:17px}
.pill{display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:11px;font-size:12px;font-weight:600;white-space:nowrap;background:#e8eeee;color:var(--ink-2)}
.pill.pending{background:#fff1bf;color:#5a4700}
.pill.approved{background:#d8f0e4;color:#145c38}
.pill.rejected,.pill.cancelled{background:#f0e9e9;color:#7a4b4b}
.history-wrap{overflow:auto}
.history-table{width:100%;border-collapse:collapse;font-size:13px}
.history-table th{position:sticky;top:0;z-index:1;text-align:left;padding:10px 14px;background:#f7fafa;color:var(--muted);font-size:12px;font-weight:600;border-bottom:1px solid var(--line);white-space:nowrap}
.history-table td{padding:12px 14px;border-bottom:1px solid var(--line-soft);vertical-align:top;line-height:1.6}
.history-table tr:last-child td{border-bottom:0}
.history-table tbody tr:hover td{background:#f7fafa}
.history-table td small{display:block;color:var(--faint);font-size:12px}
.history-time{white-space:nowrap;font-family:var(--font-num);font-variant-numeric:tabular-nums;color:var(--muted)}
.history-description{min-width:240px;max-width:480px}
.history-description>span{display:block;margin-bottom:5px}
.history-description .slot-badge{height:21px;font-size:11.5px}
.history-status{min-width:96px}
.legacy-label{color:#8a6a00!important}
.audit-policy{display:grid;grid-template-columns:56px 1fr;gap:3px 8px;font-size:12px;line-height:1.6;margin-bottom:6px;min-width:230px}
.audit-policy strong{font-weight:600;color:var(--faint)}
.audit-policy small{grid-column:1/-1}
.audit-details summary{cursor:pointer;font-size:12px;font-weight:600;color:var(--scrub-ink)}
.audit-details pre{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.6 var(--font-ui);max-height:220px;overflow:auto;padding:8px 10px;background:#f6f9f9;border-radius:var(--r-sm)}
.arrow-sep{color:var(--faint);margin:0 4px}

/* ───────── My schedule (anaesthesia-record timeline) ───────── */
.me-summary{display:flex;align-items:stretch;flex-wrap:wrap;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);margin-bottom:16px}
.me-summary>div{flex:1 1 150px;padding:13px 18px;border-right:1px solid var(--line-soft);display:flex;align-items:center;gap:12px}
.me-summary>div:last-child{border-right:0}
.me-summary .swatch{width:10px;align-self:stretch;border-radius:3px;flex-shrink:0;max-height:38px}
.me-summary .value{font:700 26px/1 var(--font-num);font-variant-numeric:tabular-nums;color:var(--ink)}
.me-summary .value small{font:500 13px var(--font-ui);color:var(--muted);margin-left:3px}
.me-summary .label{font-size:12.5px;color:var(--muted);line-height:1.35}
.me-summary .alert .value{color:#b62828}
.timeline{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden}
.timeline-scroll{overflow-x:auto}
.timeline-grid{display:grid;grid-template-columns:64px repeat(var(--days),minmax(84px,1fr));min-width:calc(64px + var(--days) * 84px)}
.timeline-grid>.t-head{padding:10px 8px 8px;text-align:center;border-bottom:1px solid var(--line);background:#f7fafa}
.timeline-grid>.t-head .num{display:block;font-size:20px;font-weight:700;line-height:1.1;color:var(--ink)}
.timeline-grid>.t-head small{font-size:12px;color:var(--muted)}
.timeline-grid>.t-head.week-break,.timeline-grid>.t-cell.week-break{border-left:3px solid var(--ink)}
.timeline-grid>.t-head.is-today{background:var(--ink)}
.timeline-grid>.t-head.is-today .num,.timeline-grid>.t-head.is-today small{color:#fff}
.timeline-grid>.t-half{display:flex;flex-direction:column;gap:1px;align-items:center;justify-content:center;font-size:12px;font-weight:600;color:var(--muted);border-right:1px solid var(--line);background:#f7fafa}
.timeline-grid>.t-half small{display:block;font:500 10.5px/1.2 var(--font-num);color:var(--faint);text-align:center}
.timeline-grid>.t-corner{border-bottom:1px solid var(--line);border-right:1px solid var(--line);background:#f7fafa}
.t-cell{padding:5px}
.t-cell+.t-cell{border-left:1px solid var(--line-soft)}
.my-slot{display:block;width:100%;height:58px;padding:0;border:0;background:none;border-radius:var(--r-sm)}
.my-slot .slot-badge{display:flex;width:100%;height:100%;font-size:14px;border-radius:6px}
.my-slot .st-work{background:#f3f6f6;box-shadow:none;color:var(--muted);font-weight:500}
.my-slot:hover .slot-badge{box-shadow:inset 0 0 0 2px var(--ink)}
.my-slot:disabled{opacity:1;cursor:default}
.my-slot:disabled .slot-badge{box-shadow:none}
.timeline-foot{display:flex;gap:6px 16px;flex-wrap:wrap;padding:10px 14px;border-top:1px solid var(--line);font-size:12px;color:var(--muted);background:#fafcfc}

/* ───────── Requests ───────── */
.request-list{display:grid;gap:10px}
.request-card{padding:16px 18px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg)}
.request-card.is-pending{border-left:4px solid var(--alert)}
.request-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.request-top h3{font-size:15px}
.request-top h3 .swap-glyph{color:var(--faint);font-weight:400;margin:0 4px}
.request-meta{font-size:12px;color:var(--muted);margin-top:3px}
.request-changes{display:grid;grid-template-columns:1fr auto 1fr;gap:14px;align-items:start;background:#f5f8f8;border-radius:var(--r-md);padding:12px 14px;margin-top:12px}
.request-changes>svg{align-self:center;color:var(--faint)}
.request-change-name{font-size:13px;font-weight:700}
.request-change-date{font:500 12px var(--font-num);color:var(--muted);margin-top:8px}
.request-change-state{display:flex;align-items:center;gap:6px;margin-top:4px;font-size:12px;color:var(--faint)}
.request-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;flex-wrap:wrap}
.request-filter-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}

/* ───────── Duty ───────── */
.duty-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:12px}
.duty-policy-summary{margin-bottom:14px}
.duty-table{width:100%;min-width:820px;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:13px}
.duty-table th,.duty-table td{border-right:1px solid var(--line-soft);border-bottom:1px solid var(--line-soft);text-align:center;padding:0}
.duty-table thead th{position:sticky;top:0;z-index:2;background:#f7fafa;padding:9px 4px;font-weight:600;border-bottom:2px solid var(--ink)}
.duty-table thead .date-head .num{font-size:16px}
.duty-table th:first-child{width:112px;text-align:left;padding-left:14px;font-size:13px;color:var(--ink);background:#f7fafa}
.duty-table tbody th{font-weight:700}
.duty-table .weekend{background:#fbf3ee}
.duty-table thead .weekend .num,.duty-table thead .weekend .weekday-label{color:#a2402c}
.duty-cell{display:grid;align-content:center;gap:3px;width:100%;min-height:62px;padding:8px 4px;border:0;background:transparent;text-align:center;border-radius:0}
.duty-cell strong{font-size:14px;font-weight:700;color:var(--ink)}
.duty-cell small{font-size:11px;font-weight:600;color:var(--muted)}
.duty-cell:disabled{opacity:1;cursor:default}
.duty-cell:not(:disabled):hover{box-shadow:inset 0 0 0 2px var(--ink)}
.duty-cell.duty-unassigned strong{color:#a0adaf;font-weight:500}
.duty-cell.duty-unassigned{background-image:repeating-linear-gradient(-45deg,#eef2f2 0 3px,transparent 3px 8px)}
.duty-confirmed small{color:#145c38}
.duty-confirmed small:before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:#1f9d5c;margin-right:4px;vertical-align:1px}
.duty-review small{color:#7a5a00}
.duty-cell.is-me{background:var(--scrub-tint);box-shadow:inset 0 -3px 0 var(--scrub)}
.duty-cell.is-me strong{color:var(--scrub-ink)}
.duty-missing{color:#a0adaf;font-size:12px;background-image:repeating-linear-gradient(-45deg,#f1f4f4 0 3px,transparent 3px 8px)}
.duty-issues{padding:12px 18px}
.duty-issues p{font-size:13px;color:#5a4700;line-height:1.65;margin:4px 0;padding-left:14px;position:relative}
.duty-issues p:before{content:"";position:absolute;left:0;top:8px;width:6px;height:6px;border-radius:50%;background:#e2b100}

/* ───────── Capacity & staffing ───────── */
.stats-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);margin:16px 0}
.stat-card{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border-right:1px solid var(--line-soft)}
.stat-card:last-child{border-right:0}
.stat-label{font-size:12.5px;color:var(--muted);margin-bottom:4px}
.stat-value{font:700 28px/1.1 var(--font-num);font-variant-numeric:tabular-nums}
.stat-value small{font:500 13px var(--font-ui);color:var(--muted);margin-left:4px}
.stat-note{display:block;font-size:12px;color:var(--faint);margin-top:3px}
.stat-icon{display:none}
.staffing-policy-panel{margin:0 0 18px}
.staffing-policy-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(88px,1fr));align-items:end;gap:6px;padding:16px 18px 12px}
.staffing-policy-cell{display:flex;flex-direction:column-reverse;align-items:center;gap:5px}
.staffing-policy-cell>span{font:600 13px var(--font-num);color:var(--muted)}
.staffing-policy-cell>strong{display:flex;align-items:flex-end;justify-content:center;width:100%;height:calc(var(--h,0.8) * 120px);padding-bottom:6px;border-radius:6px 6px 2px 2px;background:var(--scrub);color:#fff;font:700 22px/1 var(--font-num)}
.staffing-policy-cell small{font:500 12px var(--font-ui);margin-left:2px;color:#cdeae6}
.policy-note{padding:10px 18px;font-size:12px;color:var(--muted);border-top:1px solid var(--line-soft);background:#fafcfc}
.staffing-edit-labels{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding-right:70px;margin-bottom:8px;font-size:12px;color:var(--muted)}
.staffing-edit-row{display:grid;grid-template-columns:minmax(60px,1fr) 22px minmax(60px,1fr) 22px auto;gap:7px;align-items:center;margin-bottom:8px;font-size:13px;color:var(--muted)}
.staffing-edit-row .input{min-width:0;text-align:right;font-family:var(--font-num)}
.capacity-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
.capacity-card{padding:16px 18px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg)}
.capacity-card h3{font-size:14px;margin-bottom:6px}
.capacity-card p{font-size:13px;line-height:1.7;color:var(--muted)}
.capacity-select{width:180px}
.big-figure{font:700 16px var(--font-num);color:var(--scrub-ink)}
.details-panel>summary{padding:14px 18px;font-size:13px;font-weight:600;cursor:pointer}
.details-panel>div{padding:0 18px 16px}

/* ───────── Admin ───────── */
.admin-hint{display:flex;gap:10px;align-items:center;padding:10px 14px;background:#fff8e1;color:#5a4700;font-size:13px;border-bottom:1px solid #f1dfa2}
.admin-hint svg{width:16px;height:16px}
.accounts-panel{margin-bottom:18px}
.account-table{min-width:680px}
.account-table td:last-child{width:80px}

/* ───────── Login ───────── */
.login-panel{max-width:440px;margin:7vh auto 4vh;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:32px;box-shadow:0 18px 50px rgba(15,59,61,.10)}
.login-icon{display:flex;gap:4px;align-items:flex-end;height:30px;margin-bottom:20px}
.login-icon svg{display:none}
.login-icon:before,.login-icon:after,.login-icon i{content:"";display:block;width:9px;border-radius:2px}
.login-icon:before{height:16px;background:var(--lab)}
.login-icon i{height:28px;background:var(--leave)}
.login-icon:after{height:21px;background:var(--training)}
.login-panel h1{font-size:23px}
.login-panel>p{font-size:14px;color:var(--muted);margin:8px 0 22px;line-height:1.65}
.login-panel .button.primary{width:100%;min-height:44px;font-size:15px;margin-top:4px}
.login-note{font-size:12.5px;line-height:1.65;color:var(--muted);margin-top:16px;padding-top:14px;border-top:1px solid var(--line-soft)}
.access-actions{display:flex;gap:10px;margin-top:16px;align-items:center;flex-wrap:wrap}
.access-actions .button.primary{width:auto;margin-top:0}

/* ───────── Forms ───────── */
.form-field{display:grid;gap:6px;margin-bottom:16px}
.form-field label{font-size:13px;font-weight:600;color:var(--ink-2)}
.form-field input,.form-field select{min-height:40px}
.form-hint{font-size:12px;color:var(--muted);line-height:1.6}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.form-error{background:var(--alert-tint);color:#9b1c1c;border-radius:var(--r-md);padding:10px 12px;font-size:13px;line-height:1.6;margin-top:12px;border-left:4px solid var(--alert)}
.rule-note{font-size:12.5px;line-height:1.7;color:var(--muted);margin-top:10px}
.optional-label{font-size:12px;font-weight:400;color:var(--faint)}
.check-field{display:flex;align-items:center;gap:9px;font-size:13px;color:var(--ink-2);line-height:1.6}
.check-field input{accent-color:var(--scrub);width:17px;height:17px;flex:none}
.field-caption{display:block;margin-top:16px;font-size:13px;font-weight:600;color:var(--ink-2)}
.policy-role-list{display:grid;gap:8px;margin:16px 0}
.policy-role{border:1px solid var(--line);border-radius:var(--r-md)}
.policy-role summary{padding:12px 14px;font-size:14px;font-weight:700;cursor:pointer;background:#f7fafa;border-radius:var(--r-md)}
.policy-role[open] summary{border-bottom:1px solid var(--line);border-radius:var(--r-md) var(--r-md) 0 0}
.policy-role summary small{float:right;font-weight:500;color:var(--muted)}
.policy-role-body{padding:14px}
.policy-count-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.eligible-checks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px 10px;max-height:210px;overflow:auto;padding:12px;background:#f5f8f8;border-radius:var(--r-md);margin-top:8px}
.eligible-checks label{display:flex;align-items:center;gap:7px;font-size:13px}
.eligible-checks input{accent-color:var(--scrub)}
.policy-confirmation{background:var(--scrub-tint);border-radius:var(--r-md);padding:12px;margin-top:6px}

/* ───────── Dialog ───────── */
dialog{border:0;padding:0;border-radius:16px;box-shadow:0 30px 90px rgba(10,40,42,.35);width:min(540px,calc(100vw - 24px));max-height:90vh;color:var(--ink);background:#fff}
dialog[open]{animation:dialogIn .16s ease-out}
dialog::backdrop{background:rgba(10,38,40,.5)}
dialog:has(#duty-policy-form){width:min(760px,calc(100vw - 24px))}
@keyframes dialogIn{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}
.dialog-header{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:20px 22px 16px;border-bottom:1px solid var(--line)}
.dialog-header h2{font-size:19px}
.dialog-header p{font-size:13px;color:var(--muted);margin-top:4px;line-height:1.6}
.close-button{flex-shrink:0;width:32px;height:32px;border:0;border-radius:var(--r-md);background:#eef3f3;font-size:20px;line-height:1;color:var(--ink-2)}
.close-button:hover{background:#e0e9e9}
.dialog-body{padding:18px 22px;overflow:auto}
.dialog-footer{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;padding:14px 22px;border-top:1px solid var(--line);background:#f7fafa;border-radius:0 0 16px 16px}
.detail-summary{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:-18px -22px 18px;padding:18px 22px;border-bottom:1px solid var(--line);background:#f7fafa}
.detail-summary strong{font-size:22px;font-weight:700}
.detail-summary small{display:block;color:var(--scrub-ink);font-size:12px;font-weight:600;margin-top:2px}
.detail-summary .slot-badge{height:44px;min-width:96px;padding:0 18px;font-size:18px;border-radius:6px}
.detail-lines{display:grid;grid-template-columns:76px 1fr;gap:8px 12px;font-size:13px;line-height:1.65;margin:0 0 16px}
.detail-lines dt{color:var(--muted)}
.detail-lines dd{margin:0;color:var(--ink-2)}
.detail-actions{display:grid;gap:8px}
.detail-actions .button{justify-content:space-between;padding:10px 14px;min-height:44px;font-size:14px}
.dialog-footnote{font-size:12px;line-height:1.65;color:var(--muted);margin-top:12px}
.change-preview{display:grid;gap:8px;background:#f5f8f8;border-radius:var(--r-md);padding:12px 14px;margin-top:14px;font-size:13px}
.change-preview strong{font-weight:700;color:var(--ink)}
.change-preview-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--faint)}
.change-preview-line>span:first-child{min-width:96px;color:var(--ink-2);font-family:var(--font-num);font-weight:600}

/* ───────── Toast ───────── */
.toast-region{position:fixed;right:24px;bottom:24px;z-index:70;display:grid;gap:8px;max-width:min(440px,calc(100vw - 32px))}
.toast{background:var(--drape);color:#fff;padding:12px 16px 12px 14px;border-radius:var(--r-md);font-size:13.5px;line-height:1.6;box-shadow:0 10px 30px rgba(10,40,42,.3);border-left:4px solid var(--training);animation:toastIn .2s ease-out}
.toast.error{background:#5e1717;border-left-color:var(--alert)}
@keyframes toastIn{from{transform:translateY(8px);opacity:0}to{transform:none;opacity:1}}

/* ───────── Responsive ───────── */
@media (max-width:1100px){
  .appbar{gap:14px;padding:0 16px}
  .brand-text small{display:none}
  .nav-button{padding:0 10px;font-size:13px}
  .nav-button svg{display:none}
  .account-text{display:none}
  main{padding:22px 16px 16px}
  .app-footer{padding:0 16px 18px}
}
@media (max-width:760px){
  .appbar{flex-wrap:wrap;height:auto;padding:8px 12px 0;gap:0 10px}
  .brand{font-size:15px;height:40px}
  .account-button{padding:4px}
  .avatar{width:30px;height:30px;font-size:11px}
  .navigation{order:3;flex-basis:100%;height:42px;margin:0 -12px;padding:0 6px}
  .nav-button{padding:0 11px;font-size:13.5px}
  .nav-button.active:after{left:8px;right:8px}
  main{padding:18px 12px 14px}
  h1{font-size:21px}
  .page-heading{margin-bottom:14px;align-items:flex-start}
  .page-heading-actions{width:100%}
  .page-subtitle{font-size:12.5px}
  .grid-toolbar{padding:10px}
  .keys{gap:2px}
  .key-chip{height:30px;font-size:12.5px;padding:0 8px 0 5px}
  .key-hint{display:none}
  .keys{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 -10px;padding:0 10px;width:calc(100% + 20px)}
  .key-chip{flex-shrink:0}
  .date-head{align-items:center}
  .grid-tools{width:100%}
  .search-wrap{flex:1}
  .search-wrap input{width:100%}
  .table-scroll{max-height:72vh}
  .grouped-schedule .rosette-heading,.rosette-cell{width:36px;font-size:13px}
  .rosette-cell small{display:none}
  .grouped-schedule .person-heading,.grouped-schedule .name-cell{width:76px;left:36px}
  .name-cell{font-size:13px;padding:0 4px 0 7px!important}
  .flat-schedule .person-heading,.flat-schedule .name-cell,.leave-table .name-cell,.leave-table .person-heading{width:80px}
  .me-dot{display:none}
  tr.is-me .name-cell{box-shadow:inset 3px 0 0 var(--scrub)}
  .slot-button .slot-badge{font-size:11.5px}
  .date-head{flex-direction:column;gap:0;line-height:1.1}
  .date-head .num{font-size:15px}
  .date-head .weekday-label{font-size:10.5px}
  .schedule-table thead tr:nth-child(1) th{height:42px}
  .readout-label small{display:none}
  .readout .num{font-size:14px}
  .me-summary>div{flex:1 1 50%;padding:11px 14px;border-bottom:1px solid var(--line-soft)}
  .me-summary .value{font-size:22px}
  .timeline-grid{grid-template-columns:44px repeat(var(--days),minmax(64px,1fr));min-width:calc(44px + var(--days) * 64px)}
  .my-slot{height:50px}
  .my-slot .slot-badge{font-size:12.5px}
  .request-changes{grid-template-columns:1fr;gap:8px}
  .request-changes>svg{transform:rotate(90deg);justify-self:center}
  .stats-row{grid-template-columns:1fr}
  .stat-card{border-right:0;border-bottom:1px solid var(--line-soft)}
  .stat-card:last-child{border-bottom:0}
  .capacity-grid{grid-template-columns:1fr}
  .staffing-policy-grid{grid-template-columns:repeat(4,minmax(0,1fr));padding:12px}
  .staffing-policy-cell>strong{font-size:18px}
  .form-grid{grid-template-columns:1fr;gap:0}
  .policy-count-grid{gap:6px}
  .eligible-checks{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dialog-header{padding:18px 16px 14px}
  .dialog-body{padding:16px}
  .detail-summary{margin:-16px -16px 16px;padding:16px}
  .dialog-footer{padding:12px 16px}
  .login-panel{padding:24px 20px;margin:4vh auto}
  .app-footer{display:block;padding:0 12px 16px}
  .app-footer>span{display:block}
  .toast-region{right:12px;left:12px;bottom:12px;max-width:none}
  .history-table td{padding:10px 12px}
  .table-bottom{font-size:11.5px}
}
@media (prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
@media print{
  .appbar,.app-footer,.page-heading-actions,.grid-tools,.keys,.toast-region,.footnotes{display:none!important}
  body{background:#fff}
  main{padding:0;max-width:none}
  .panel{border:0}
  .table-scroll{max-height:none;overflow:visible}
  .schedule-table thead th,.schedule-table thead td,.rosette-cell,.name-cell{position:static}
  .slot-badge{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
.swatch.slot-badge{min-width:0;padding:0;height:14px}
.nora-label{display:block;font-size:12px;line-height:1.2;letter-spacing:0;overflow-wrap:normal;white-space:nowrap}
.output-summary{margin-top:12px}
.output-summary-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:12px}
.output-summary-table th,.output-summary-table td{border:1px solid var(--line);padding:7px 6px;text-align:center;white-space:normal;overflow-wrap:anywhere;vertical-align:middle}
.output-summary-table thead th{background:#f1f5f4;font-size:11px}
.output-summary-table th:first-child{width:78px;background:#eef3ed;font-weight:700}
.output-summary-table td{min-width:85px}
.output-source-note{padding:7px 12px;font-size:10.5px;color:var(--muted)}
.output-checks{display:flex;flex-wrap:wrap;gap:14px 20px;margin-bottom:20px}
.output-row-fields{padding-top:14px;border-top:1px solid var(--line)}
.month-navigation{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:16px 0}
.month-navigation input{min-width:155px}
.leave-calendar-scroll{overflow:auto}
.leave-calendar{width:100%;min-width:780px;border-collapse:collapse;table-layout:fixed;color:var(--ink)}
.leave-calendar caption{font-size:25px;font-weight:700;padding:19px 12px;background:#fff;border-bottom:1px solid var(--line)}
.leave-calendar caption small{font-size:15px;color:#8b3832;margin-left:8px}
.leave-calendar .cycle-column{width:48px}
.leave-calendar .weekend-column{width:57px}
.leave-calendar th,.leave-calendar td{border:1px solid #bac5be;vertical-align:top}
.leave-calendar thead th{font-size:13px;background:#f0f2f0;padding:7px 2px;letter-spacing:.3px}
.leave-calendar .leave-cycle{vertical-align:middle;text-align:center;font-size:15px;font-weight:700}
.leave-calendar .leave-cycle.first{background:#dfe9c9}
.leave-calendar .leave-cycle.second{background:#f0e5bc}
.leave-calendar .sunday{color:#a83d36}
.leave-calendar .saturday{color:#325a8b}
.leave-calendar .outside-month{background:#f6f7f4}
.leave-day{height:164px}
.leave-date{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:25px;padding:3px;border-bottom:1px solid #c8cec9;background:#f3f5f3;font:600 13px/1.3 var(--font-num)}
.leave-date small{font:500 10px/1.4 var(--font-ui);text-align:center}
.leave-calendar .today .leave-date{background:var(--scrub);color:#fff}
.leave-day-body{padding-top:2px;color:var(--ink)}
.leave-line{min-height:27px;border-bottom:1px solid #d4dbd5;text-align:center;padding:2px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:1px}
.leave-name{background:none;border:0;border-radius:3px;color:var(--ink);font-size:13px;font-weight:650;line-height:1.5;padding:0 2px;white-space:normal;overflow-wrap:anywhere}
.leave-name.st-review{background-image:var(--stripe)}
.leave-name.st-trip{color:#694b96}
.leave-name:hover,.leave-name:focus-visible{background:var(--scrub-tint);outline:1px solid var(--scrub)}
.leave-name.is-me{color:var(--scrub-ink);background:var(--scrub-tint)}
.leave-blank{width:10px}
.leave-slash{color:var(--muted);padding:0 2px}
.leave-day-status{display:block;text-align:center;padding:17px 3px;color:var(--faint);font-size:10px;font-weight:400;line-height:1.5}
.leave-day.uncreated{background:repeating-linear-gradient(-45deg,#fafbf8 0 6px,#f3f5f0 6px 7px)}
@media(max-width:760px){
  .leave-calendar{min-width:700px}.leave-calendar caption{font-size:21px}.leave-calendar .cycle-column{width:38px}.leave-calendar .weekend-column{width:44px}
  .output-summary-table{min-width:650px}.output-checks{display:grid;gap:12px}.leave-name{font-size:12px}
}
@media print{
  .month-navigation,.admin-sections,.duty-controls,.duty-policy-summary,.output-source-note{display:none!important}
  .leave-calendar-scroll,.history-wrap{overflow:visible!important;max-height:none!important}
  .leave-calendar{min-width:0;width:100%;font-size:10px;break-inside:auto}
  .leave-calendar caption{font-size:21px;padding:8px}
  .leave-calendar caption small{font-size:11px}
  .leave-calendar .cycle-column{width:26px}.leave-calendar .weekend-column{width:24px}
  .leave-calendar th,.leave-calendar td,.leave-calendar tr,.output-summary-table tr{break-inside:avoid}
  .leave-calendar thead th{font-size:9px;padding:4px 0}
  .leave-calendar .leave-cycle{font-size:10px;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .leave-day{height:125px}.leave-line{min-height:19px;padding:1px 0}.leave-name{font-size:9px;line-height:1.3}.leave-date{font-size:10px;min-height:20px}
  .leave-date small{font-size:8px}.leave-day-status{font-size:8px;padding:10px 1px}
  .output-summary-table{min-width:0;font-size:8px}.output-summary-table th,.output-summary-table td{padding:4px 2px}.output-summary-table th:first-child{width:48px}.output-summary-table thead th{font-size:8px}
  .nora-label{font-size:10px}.output-summary{break-inside:avoid}
  .schedule-table,.duty-table{min-width:0!important;width:100%!important;font-size:9px}
  .schedule-table th,.schedule-table td,.duty-table th,.duty-table td{break-inside:avoid}
  .grouped-schedule .rosette-heading,.schedule-table .rosette-cell{width:25px;font-size:10px!important;padding:2px!important}
  .grouped-schedule .person-heading,.grouped-schedule .name-cell{width:58px}
  .flat-schedule .person-heading,.flat-schedule .name-cell{width:64px}
  .schedule-table .person-heading,.schedule-table .name-cell{font-size:9px!important;padding:1px 3px!important;height:25px}
  .schedule-table .name-row{gap:2px}.me-dot,.group-edit,.readout .bar{display:none!important}
  .schedule-table thead tr:nth-child(1) th{height:28px}
  .schedule-table thead tr:nth-child(2) th{height:16px;font-size:8px}
  .schedule-table thead tr:nth-child(3) th,.schedule-table thead tr:nth-child(3) td{height:25px;position:static}
  .date-head{gap:2px;flex-wrap:wrap}.date-head .num,.duty-table thead .date-head .num{font-size:10px}.date-head .weekday-label{font-size:8px}
  .slot-button{height:24px;padding:1px}.slot-button .slot-badge,.slot-button .st-work{font-size:8px;padding:0;white-space:normal;line-height:1.05;text-overflow:clip}
  .rosette-cell small{font-size:7px}.readout .num{font-size:11px}.readout-label strong{font-size:8px}.readout-label small{font-size:7px}
  .duty-table th:first-child{width:59px;font-size:9px;padding-left:3px}.duty-table thead th{position:static;padding:4px 1px}
  .duty-cell{min-height:34px;padding:4px 1px}.duty-cell strong{font-size:9px}.duty-cell small{font-size:7px;white-space:normal}
  .schedule-table[data-focus] .slot-button .slot-badge{opacity:1!important}
}
.me-summary .swatch.slot-badge{width:10px;height:auto;align-self:stretch;max-height:42px}
.st-alert{background:var(--alert);color:#fff}
.leave-table .person-heading{left:0;width:120px}
@media (max-width:760px){.leave-table .person-heading,.leave-table .name-cell{width:80px}}

.subsection .empty-state{padding:26px 20px}
.subsection .empty-state svg{width:24px;height:24px;margin-bottom:6px}
.audit-change{display:flex!important;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:4px}
.audit-who{min-width:112px;font-size:12.5px;color:var(--ink-2)}
.audit-change .arrow-sep{margin:0}
.audit-details .audit-change:first-of-type{margin-top:6px}
.accounts-panel .history-wrap{max-height:420px}
.account-table td{padding-top:8px;padding-bottom:8px;vertical-align:middle}
.account-table td small{display:inline!important;margin-left:6px;color:var(--scrub-ink)!important;font-weight:600}

/* ───────── 확장: 기간·신청·당직 교환·방배정·일괄 입력 ───────── */
:root{--trip:#f6b49a;--trip-ink:#4d1f0e}
.st-trip{background:var(--trip);color:var(--trip-ink)}
.icon-only{padding:6px;min-width:32px}
.period-switch{display:inline-flex;align-items:center;gap:4px}
.period-select .select{min-height:32px;padding:4px 26px 4px 10px;font:600 13px var(--font-num);width:auto}
.readonly-banner{display:flex;gap:10px;align-items:center;margin-bottom:14px}
.readonly-banner svg{width:18px;height:18px}
.kind-label{display:inline-flex;margin-left:8px;padding:0 8px;height:20px;align-items:center;border-radius:10px;background:#eef3f3;color:var(--ink-2);font-size:12px;font-weight:600;vertical-align:2px}
.request-changes.single{grid-template-columns:1fr;gap:6px}
.request-change-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.request-change-row .request-change-date{margin:0;min-width:118px}
.request-change-row .request-change-state{margin:0}
.name-chip{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:4px;background:#e8eeee;font-size:12.5px;font-weight:500;color:var(--ink-2)}
.name-chip.strong{background:var(--scrub-tint);color:var(--scrub-ink);font-weight:700}
.policy-line{font-size:12px;color:var(--muted)}
.admin-sections{margin-bottom:16px;flex-wrap:wrap}
.admin-sections .dot-alert,.dot-alert{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--alert);vertical-align:2px;margin-left:3px}
.panel-pad{padding:16px 18px}
.mono-lines{font:13px/1.7 var(--font-num);resize:vertical;min-height:140px}
.form-section{font-size:14px;margin:16px 0 8px}
.form-section:first-child{margin-top:0}
.choice-row{display:flex;gap:8px;flex-wrap:wrap}
.choice{display:grid;gap:2px;flex:1 1 200px;padding:11px 14px 11px 38px;border:1px solid var(--line);border-radius:var(--r-md);cursor:pointer;position:relative}
.choice input{position:absolute;left:13px;top:14px;accent-color:var(--scrub);width:16px;height:16px}
.choice strong{font-size:13.5px}
.choice small{font-size:12px;color:var(--muted)}
.choice.checked{border-color:var(--scrub);background:var(--scrub-tint)}
.storage-meter{display:flex;align-items:center;gap:12px;padding:12px 18px;border-bottom:1px solid var(--line-soft);font-size:12.5px;color:var(--muted)}
.storage-bar{flex:0 0 220px;height:8px;border-radius:4px;background:#e3ebeb;overflow:hidden}
.storage-bar i{display:block;height:100%;background:var(--scrub)}
.storage-meter.warn .storage-bar i{background:#e2b100}
.storage-meter.full .storage-bar i{background:var(--alert)}
.row-actions{white-space:nowrap;text-align:right}
.row-actions .button+.button{margin-left:6px}
.file-button{cursor:pointer}
.file-button input{display:none}
.access-actions.compact{margin-top:8px;gap:6px}
.access-actions.center{justify-content:center}
.import-preview{margin-top:14px;padding:14px 16px;border-radius:var(--r-md);background:#f5f8f8;border:1px solid var(--line)}
.import-preview h3{font-size:14px;margin-bottom:8px}
.import-preview ul{margin:0;padding-left:18px;display:grid;gap:4px;font-size:13px}
.import-preview .slot-badge{height:20px;font-size:11.5px;min-width:30px}
.bulk-bar{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);z-index:35;display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 12px;background:var(--drape);color:#fff;border-radius:12px;box-shadow:0 14px 40px rgba(10,40,42,.35);max-width:calc(100vw - 24px)}
.bulk-bar strong{font:700 14px var(--font-num);padding:0 6px}
.bulk-bar .select,.bulk-bar .input{width:auto;min-height:34px;font-size:13px}
.bulk-bar .input{width:160px}
.slot-button.is-selected .slot-badge{box-shadow:inset 0 0 0 3px var(--drape),0 0 0 2px #fff inset;outline:2px solid var(--leave);outline-offset:-2px}
.slot-button.is-selected:after{content:"✓";position:absolute;left:4px;top:3px;width:14px;height:14px;border-radius:50%;background:var(--drape);color:#fff;font-size:10px;line-height:14px;text-align:center}
.pick-grid{display:grid;gap:4px;max-height:46vh;overflow:auto;padding-right:4px}
.pick-row{display:grid;grid-template-columns:76px 1fr 1fr;gap:6px;align-items:center}
.pick-date{font:600 13px var(--font-num)}
.pick-date small{font:500 11.5px var(--font-ui);color:var(--muted)}
.pick{display:flex;align-items:center;gap:6px;padding:6px 8px;border:1px solid var(--line);border-radius:6px;cursor:pointer;font-size:12.5px}
.pick input{accent-color:var(--scrub)}
.pick .slot-badge{height:20px;font-size:11.5px;min-width:30px;margin-left:auto}
.pick.disabled{opacity:.45;cursor:not-allowed}
.pick:has(input:checked){border-color:var(--scrub);background:var(--scrub-tint)}
.my-slot{position:relative}
.my-rooms{position:absolute;left:4px;right:4px;bottom:3px;font:700 11px/1.2 var(--font-num);color:var(--drape);text-align:center;background:rgba(255,255,255,.85);border-radius:3px}
.room-chip{display:inline-flex;align-items:center;height:20px;padding:0 6px;border-radius:4px;background:var(--drape);color:#fff;font:700 12px var(--font-num)}
.duty-cell.has-request:after{content:"";position:absolute;top:6px;right:6px;width:8px;height:8px;border-radius:50%;background:var(--alert)}
.duty-cell{position:relative}
details.exception{margin-top:12px;border-top:1px solid var(--line-soft);padding-top:10px}
details.exception summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--ink-2)}
/* 방배정 */
.date-chips{display:flex;gap:6px;overflow-x:auto;padding:2px 0 12px;scrollbar-width:thin}
.date-chip{position:relative;display:grid;justify-items:center;gap:1px;min-width:62px;padding:7px 8px 8px;border:1px solid var(--line);border-radius:var(--r-md);background:#fff;flex-shrink:0}
.date-chip .num{font-size:15px;font-weight:700}
.date-chip small{font-size:11px;color:var(--muted)}
.date-chip .status-dot{width:7px;height:7px;border-radius:50%;background:#d3dcdc;margin-top:2px}
.date-chip.draft .status-dot{background:#e2b100}
.date-chip.confirmed .status-dot{background:#1f9d5c}
.date-chip.active{background:var(--ink);border-color:var(--ink);color:#fff}
.date-chip.active small{color:#cfe0e0}
.date-chip .mine-flag{position:absolute;top:-7px;right:-4px;font:700 10px/1 var(--font-ui);padding:3px 5px;border-radius:8px;background:var(--scrub);color:#fff}
.arr-status{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px;font-size:13px;color:var(--ink-2)}
.arr-meta{margin-left:auto;color:var(--muted);font-size:12px}
.arr-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.arr-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:14px;align-items:start}
.arr-table{width:100%;border-collapse:separate;border-spacing:0;font-size:13px}
.arr-table thead th{position:sticky;top:0;z-index:2;background:#f7fafa;padding:9px 10px;text-align:left;border-bottom:2px solid var(--ink);font-size:13px}
.arr-table thead th small{font:500 11px var(--font-num);color:var(--muted);margin-left:4px}
.arr-table th:first-child{width:64px}
.arr-letter th{padding:7px 10px;background:#eef3f3;font:700 12px var(--font-ui);color:var(--drape);text-align:left;border-top:2px solid #b9c8c8}
.arr-room{font:700 15px var(--font-num);color:var(--drape);padding:0 10px;border-bottom:1px solid var(--line-soft)}
.arr-table td{padding:3px;border-bottom:1px solid var(--line-soft);vertical-align:top}
.arr-table td+td{border-left:1px solid var(--line-soft)}
.arr-idle{color:#c3cdce;text-align:center;vertical-align:middle!important}
.arr-add{border:1px dashed var(--line);background:none;border-radius:6px;width:100%;height:38px;color:var(--faint);font-size:18px}
.arr-add:hover{border-color:var(--scrub);color:var(--scrub)}
.arr-cell{display:grid;gap:2px;width:100%;min-height:54px;padding:7px 10px;border:0;border-radius:6px;background:#f5f8f8;text-align:left;box-shadow:inset 3px 0 0 var(--scrub)}
.arr-cell:hover{box-shadow:inset 0 0 0 2px var(--ink)}
.arr-cell.unassigned{background:var(--alert-tint);box-shadow:inset 3px 0 0 var(--alert)}
.arr-cell.unassigned .arr-person{color:#b62828}
.arr-cell.predicted{background-image:repeating-linear-gradient(-45deg,rgba(255,255,255,.7) 0 4px,transparent 4px 9px)}
.arr-cell.has-issue{box-shadow:inset 3px 0 0 var(--alert),inset 0 0 0 1px #f2b3b3}
.arr-cell.is-me{background:var(--scrub-tint);box-shadow:inset 4px 0 0 var(--scrub)}
.arr-person{display:flex;align-items:center;gap:6px;font-size:14.5px;font-weight:700;color:var(--ink)}
.arr-person .lock svg{width:13px;height:13px;color:var(--muted)}
.load-badge{font:700 11px var(--font-num);padding:1px 6px;border-radius:8px;background:#ffe08a;color:#5a4700}
.arr-info{font-size:12px;color:var(--muted)}
.arr-reasons{display:flex;gap:4px;flex-wrap:wrap}
.arr-reasons i{font-style:normal;font-size:11px;padding:1px 6px;border-radius:4px;background:#e2efee;color:var(--scrub-ink)}
.arr-warn{font-size:11.5px;color:#7a5a00}
.arr-issue{font-size:11.5px;font-weight:600;color:#b62828}
.arr-side{padding:4px 0}
.pool{padding:12px 14px;border-bottom:1px solid var(--line-soft)}
.pool:last-child{border-bottom:0}
.pool h3{font-size:14px;margin-bottom:8px}
.pool h3 small{font:500 12px var(--font-ui);color:var(--muted);margin-left:4px}
.pool-list{display:flex;flex-wrap:wrap;gap:4px}
.pool-person{display:inline-flex;align-items:center;gap:5px;height:24px;padding:0 4px 0 8px;border-radius:12px;background:#eef3f3;font-size:12.5px}
.pool-person b{display:inline-grid;place-items:center;min-width:18px;height:18px;border-radius:9px;background:var(--scrub);color:#fff;font:700 11px var(--font-num)}
.pool-person.idle{background:#fff8e1}
.pool-person.idle b{background:#c9b56b}
.pool-person.is-me{outline:2px solid var(--scrub)}
.pool-note{font-size:12px;color:var(--muted);margin-top:8px;line-height:1.55}
.pool-note.alert{color:#b62828;font-weight:600}
.candidate-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-height:280px;overflow:auto}
.candidate{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--line);border-radius:6px;cursor:pointer;font-size:13.5px}
.candidate input{accent-color:var(--scrub)}
.candidate .score{margin-left:auto;font:600 12px var(--font-num);color:var(--scrub-ink)}
.candidate b{display:inline-grid;place-items:center;min-width:18px;height:18px;border-radius:9px;background:#e3ebeb;font:700 11px var(--font-num)}
.candidate:has(input:checked){border-color:var(--scrub);background:var(--scrub-tint)}
.candidate.current{border-style:dashed}
.reserved-list{display:grid;gap:8px}
.reserved-row{display:grid;grid-template-columns:1fr 1.3fr auto auto;gap:8px;align-items:center}
.preview-table{max-height:260px;margin-top:12px;border:1px solid var(--line);border-radius:6px}
.order-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px;margin:18px 0}
.order-group{border:1px solid var(--line);border-radius:8px;overflow:hidden}
.order-group h3{margin:0;padding:10px 14px;background:#eef3f3;font-size:14px}
.order-group h3 small{font-weight:400;color:var(--muted);margin-left:6px}
.order-group ol{list-style:none;padding:0;margin:0}
.order-group li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 12px;border-top:1px solid var(--line-soft)}
.order-group li>div{display:flex;gap:4px}
.order-group .button{min-width:34px}
@media (max-width:1100px){.arr-layout{grid-template-columns:1fr}.arr-side{display:grid;grid-template-columns:1fr 1fr}.pool{border-bottom:0;border-right:1px solid var(--line-soft)}}
@media (max-width:760px){
  .period-switch{width:100%}.period-select{flex:1}.period-select .select{width:100%}
  .storage-meter{flex-wrap:wrap}.storage-bar{flex-basis:100%}
  .bulk-bar{left:8px;right:8px;transform:none;bottom:8px}.bulk-bar .input{width:100%}
  .pick-row{grid-template-columns:60px 1fr 1fr}
  .arr-side{grid-template-columns:1fr}.pool{border-right:0;border-bottom:1px solid var(--line-soft)}
  .candidate-list{grid-template-columns:1fr}
  .reserved-row{grid-template-columns:1fr 1fr}
  .arr-meta{margin-left:0;width:100%}
}
@media print{
  .date-chips,.arr-toolbar,.arr-side,.bulk-bar,.period-switch,.readonly-banner{display:none!important}
  .arr-layout{display:block}
  .arr-cell{background:#fff!important;box-shadow:none!important;border:1px solid #999}
  .arr-reasons,.arr-warn{display:none}
  @page{size:A4 portrait;margin:10mm}
}

/* Printed sheets share one physical table, including linked duties and notes. */
.table-output-footer{display:table-row-group}
.table-output-footer th,.table-output-footer td{position:static!important;background:#fff;white-space:normal;overflow-wrap:anywhere;vertical-align:middle!important;font-size:11px;padding:5px 3px!important;border:1px solid var(--line)!important;line-height:1.35}
.table-output-footer .output-row>th{background:#eef3ed;font-weight:700;text-align:center}
.table-output-footer .output-note td{text-align:left!important;color:var(--muted);font-size:10px;padding:7px!important}
@media print{
  @page{size:A4 portrait;margin:6mm}
  html,body{margin:0!important;padding:0!important;background:#fff!important;font-size:8.5px!important}
  .workspace,main,#main-content{margin:0!important;padding:0!important;width:auto!important;max-width:none!important}
  .appbar,.app-footer,.page-heading-actions,.grid-toolbar,.admin-hint,.screen-only,.footnotes,.month-navigation,.admin-sections,.duty-controls,.duty-policy-summary,.date-chips,.arr-toolbar,.arr-side,.table-bottom,.duty-issues,.subsection,.toast-region{display:none!important}
  .page-heading{display:block!important;margin:0 0 5px!important;padding:0!important}
  .page-heading h1{font-size:15px!important;line-height:1.1!important;margin:0!important}
  .page-subtitle{font-size:8px!important;margin:2px 0 0!important;line-height:1.2!important}
  .draft-chip{font-size:7px!important;padding:1px 3px!important;margin-left:4px!important}
  .panel,.grid-panel,.arr-main{border:0!important;border-radius:0!important;overflow:visible!important;margin:0!important;box-shadow:none!important}
  .table-scroll,.history-wrap,.leave-calendar-scroll{max-height:none!important;overflow:visible!important}
  table{page-break-inside:auto;break-inside:auto}
  thead{display:table-header-group}tfoot.table-output-footer{display:table-row-group}
  .schedule-table,.duty-table,.arr-table,.leave-calendar{width:100%!important;min-width:0!important;table-layout:fixed;font-size:8.5px!important}
  .schedule-table tbody tr,.duty-table tbody tr,.arr-table tbody tr,.table-output-footer tr{break-inside:avoid;page-break-inside:avoid}
  .schedule-table .name-cell,.schedule-table .person-heading{height:16px!important;font-size:8.5px!important;padding:0 2px!important;line-height:1!important}
  .grouped-schedule .person-heading,.grouped-schedule .name-cell{width:55px!important}
  .flat-schedule .person-heading,.flat-schedule .name-cell{width:58px!important}
  .grouped-schedule .rosette-heading,.schedule-table .rosette-cell{width:22px!important;font-size:9px!important;padding:1px!important}
  .schedule-table .rosette-cell small{font-size:6px!important;margin-top:1px!important}
  .nora-label{font-size:8px!important;line-height:1!important}
  .slot-button{height:15px!important;padding:0 1px!important;min-height:0!important}
  .slot-button .slot-badge,.slot-button .st-work{font-size:8px!important;line-height:1!important;padding:0!important;min-height:0!important;white-space:nowrap!important;overflow:visible!important}
  .slot-button.has-request:after{width:3px!important;height:3px!important;top:1px!important;right:1px!important}
  .schedule-table thead tr:nth-child(1) th{height:20px!important;position:static!important}
  .schedule-table thead tr:nth-child(2) th{height:11px!important;font-size:7px!important;position:static!important}
  .schedule-table thead tr:nth-child(3) th,.schedule-table thead tr:nth-child(3) td{height:19px!important;position:static!important}
  .readout .num{font-size:9px!important}.readout-label strong{font-size:7px!important}.readout-label small{font-size:6px!important}
  .date-head .num{font-size:9px!important}.date-head .weekday-label{font-size:7px!important}
  .me-dot,.group-edit,.lab-origin,.readout .bar{display:none!important}
  .table-output-footer th,.table-output-footer td{font-size:7.5px!important;padding:3px 2px!important;line-height:1.2!important;height:auto!important;min-height:0!important;overflow:visible!important}
  .table-output-footer .output-note td{font-size:7px!important;padding:4px!important;line-height:1.25!important}
  .leave-calendar caption{font-size:17px!important;padding:6px!important}
  .leave-calendar caption small{font-size:10px!important}
  .leave-calendar thead th{font-size:9px!important;padding:3px 0!important}
  .leave-calendar .cycle-column{width:25px!important}.leave-calendar .weekend-column{width:27px!important}
  .leave-day{height:112px!important}.leave-line{min-height:15px!important;padding:0!important;gap:0!important}
  .leave-name{font-size:8.5px!important;line-height:1.2!important;padding:0!important}
  .leave-date{font-size:9px!important;min-height:15px!important;padding:2px!important}
  .leave-day-status{padding:8px 1px!important;font-size:7px!important}
  .leave-calendar .leave-cycle{font-size:10px!important}
  .duty-table thead th{position:static!important;padding:3px 1px!important;font-size:8px!important}
  .duty-table th:first-child{width:55px!important;font-size:8px!important;padding:1px 2px!important}
  .duty-cell{padding:2px 1px!important;min-height:23px!important;line-height:1.1!important}
  .duty-cell strong{font-size:8px!important}.duty-cell small{font-size:6.5px!important;line-height:1!important}
  .arr-layout{display:block!important}.arr-status{font-size:8px!important;gap:5px!important;margin-bottom:4px!important}.arr-meta{font-size:7px!important}
  .arr-table thead th{font-size:9px!important;padding:3px!important;position:static!important}.arr-table td{padding:0!important}
  .arr-table .arr-letter th{font-size:8px!important;padding:2px!important}.arr-table .arr-room{font-size:9px!important;padding:0 3px!important;width:35px!important}
  .arr-cell{min-height:16px!important;padding:1px 3px!important;gap:0!important;border:0!important;border-radius:0!important;background:#fff!important}
  .arr-person{font-size:8.5px!important;line-height:1.05!important}.arr-info{font-size:7px!important;line-height:1.1!important}
  .arr-reasons,.arr-warn,.arr-issue,.load-badge,.lock{display:none!important}
}

@media print{.duty-kind-switch{display:none!important}}

/* 원본 당직표: 역할 + 월~일, 주별 세로 배치. 기존 가로 duty-table과 독립. */
.duty-raw-sheet{padding:16px;--duty-raw-border:#657577}
.duty-raw-week+.duty-raw-week{margin-top:18px}
.duty-raw-table{width:100%;min-width:650px;table-layout:fixed;border-collapse:collapse;border:1px solid var(--duty-raw-border);font-size:13px}
.duty-raw-table caption{text-align:left;font-size:14px;font-weight:700;padding:0 0 6px;color:var(--ink)}
.duty-raw-table th,.duty-raw-table td{padding:0;border:1px solid var(--duty-raw-border);text-align:center;vertical-align:middle}
.duty-raw-table .duty-raw-role-column{width:90px}
.duty-raw-table thead th{background:#e7ecec;font-weight:700}
.duty-raw-weekdays th{height:26px}
.duty-raw-table .duty-raw-month{background:#236f90;color:#fff;font-size:16px}
.duty-raw-month small{display:block;font-size:10px;line-height:1.1}
.duty-raw-dates th{height:35px;font-size:16px;line-height:1.15}
.duty-raw-dates th:first-child{font-size:12px;font-weight:600}
.duty-raw-table tbody th{padding:2px 4px;background:#f5f7f7;font-size:12px;line-height:1.15;overflow-wrap:anywhere}
.duty-raw-role-slot{display:inline-block;margin-left:3px;color:var(--muted);font-size:10px;font-weight:500}
.duty-raw-cell{display:grid;align-content:center;gap:2px;width:100%;min-height:42px;padding:4px 2px;border:0;border-radius:0;background:transparent;text-align:center;line-height:1.2}
.duty-raw-cell strong{font-size:14px;font-weight:700;overflow-wrap:anywhere}
.duty-raw-cell small{font-size:10px;color:var(--muted);font-weight:500}
button.duty-raw-cell:hover{box-shadow:inset 0 0 0 2px var(--scrub)}
.duty-raw-cell.is-me{box-shadow:inset 0 -3px 0 var(--scrub);background:var(--scrub-tint)}
.duty-raw-cell.has-request{outline:1px dashed #b17d16;outline-offset:-3px}
.duty-raw-cell.duty-raw-draft{background-image:repeating-linear-gradient(-45deg,rgba(230,236,236,.5) 0 2px,transparent 2px 7px)}
.duty-raw-cell.duty-raw-unassigned{background-image:repeating-linear-gradient(-45deg,#e6ecec 0 2px,transparent 2px 6px);color:var(--muted)}
.duty-raw-cell.duty-raw-unassigned strong{font-size:11px;font-weight:500}
.duty-raw-table .duty-raw-holiday{background-color:#f4e8e5;color:#98452f}
.duty-raw-table .duty-raw-saturday{background-color:#e9eff5;color:#285a81}
.duty-raw-holiday-name{display:block;padding:0 2px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:9px;line-height:1.2;font-weight:500}
.duty-raw-table .is-today{box-shadow:inset 0 3px 0 var(--scrub)}
.duty-raw-table .duty-raw-outside{background:#edf0f0;color:var(--faint)}
.duty-raw-table .duty-raw-missing{height:42px;color:var(--faint)}
.duty-raw-no-roles{padding:16px!important;color:var(--muted)}
.duty-raw-table .table-output-footer th{font-size:11px;overflow-wrap:anywhere}
.duty-raw-table .table-output-footer td{padding:4px 3px;font-size:10px;line-height:1.25;overflow-wrap:anywhere}
.duty-raw-table .table-output-footer .output-note td{padding:6px;font-size:10px;text-align:left}
.duty-raw-key{padding-top:8px;font-size:11px;color:var(--muted)}
.duty-raw-candidate .duty-raw-table caption{color:#75520e}
.duty-raw-title{margin:0 0 16px;text-align:center;font-size:24px;font-weight:700;color:var(--ink)}
.duty-raw-role-label{font-size:9px;line-height:1.1;color:var(--muted)}
.duty-raw-unopened{font-size:10px;font-weight:400}
.duty-raw-output-note{margin:10px 0 0;padding:8px 0;border-top:1px solid var(--line);font-size:10px;line-height:1.4;color:var(--muted)}
.duty-source-link{display:flex;align-items:center;gap:10px;margin:-6px 0 16px}
.duty-raw-monthly .duty-raw-week+.duty-raw-week{margin-top:12px}
.duty-workspace-panel{margin:0 0 18px}
.duty-workspace-panel .notice{margin-bottom:14px}
.duty-workspace-panel .notice p{margin-top:3px}
.duty-workspace-create{display:grid;grid-template-columns:minmax(220px,1.4fr) minmax(180px,1fr) minmax(210px,1fr);gap:12px;align-items:end}
.duty-workspace-create .access-actions{grid-column:1/-1;margin-top:0}
.duty-workspace-status{padding:14px 0;color:var(--muted);font-size:13px}
.duty-workspace-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:8px;margin:15px 0}
.duty-workspace-item{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:12px;text-align:left;border:1px solid var(--line);border-radius:var(--r-md);background:#fff;overflow-wrap:anywhere}
.duty-workspace-item strong{font-size:14px;font-weight:600}
.duty-workspace-item small{font-size:11px;color:var(--muted)}
.duty-workspace-item.active{border-color:var(--scrub);box-shadow:inset 0 0 0 1px var(--scrub);background:var(--scrub-tint)}
.duty-workspace-selected{padding-top:16px;border-top:1px solid var(--line)}
.duty-workspace-selected-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.duty-workspace-plan{font-size:12px;color:var(--muted);margin-bottom:12px}
.duty-workspace-plan details{margin-top:5px}
.duty-workspace-plan ul{padding-left:20px;max-height:180px;overflow:auto}
.duty-workspace-compare-controls{display:flex;align-items:center;gap:10px;margin-bottom:15px}
.duty-workspace-compare-controls label{font-size:12px;font-weight:600;white-space:nowrap}
.duty-workspace-compare-controls .select{max-width:400px}
.duty-workspace-comparison h3{font-size:14px;overflow-wrap:anywhere}
.duty-workspace-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));border:1px solid var(--line);border-radius:var(--r-md);margin:10px 0 15px;background:#f7fafa}
.duty-workspace-stats>span{display:flex;flex-direction:column;gap:2px;padding:10px 12px;font-size:11px;color:var(--muted)}
.duty-workspace-stats strong{font:700 18px/1.3 var(--font-num);color:var(--ink)}
.duty-workspace-detail{margin:10px 0;border:1px solid var(--line);border-radius:var(--r-md);overflow:hidden}
.duty-workspace-detail>summary{padding:10px 12px;background:#f7fafa;font-size:13px;font-weight:600;cursor:pointer}
.duty-workspace-detail>form,.duty-workspace-detail>p{padding:12px}
.duty-workspace-detail>ul{padding:0 16px 0 30px;font-size:12px;line-height:1.6;max-height:260px;overflow:auto}
.duty-workspace-detail .history-wrap{max-height:330px;overflow:auto}
.duty-workspace-detail .history-table{font-size:12px}
.duty-workspace-detail .history-table th,.duty-workspace-detail .history-table td{padding:7px 10px}
.duty-workspace-assignment-status{display:block;font-size:10px;color:var(--muted);white-space:normal;overflow-wrap:anywhere}
.duty-workspace-detail .duty-raw-sheet{padding:10px}
.duty-workspace-detail .duty-raw-table caption{font-size:12px}
.duty-workspace-rename{display:flex;align-items:center;gap:8px;max-width:560px;margin:14px 0}
.duty-workspace-rename .input{min-width:0;flex:1}
.duty-workspace-rename .button{white-space:nowrap}
@media(max-width:900px){.duty-workspace-create{grid-template-columns:1fr 1fr}.duty-workspace-create>.form-field:first-child{grid-column:1/-1}}
@media(max-width:600px){.duty-workspace-create{display:flex;flex-direction:column;align-items:stretch}.duty-workspace-list{grid-template-columns:1fr}.duty-workspace-compare-controls{align-items:stretch;flex-direction:column;gap:5px}.duty-workspace-selected-heading{align-items:flex-start}.duty-workspace-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media print{.duty-workspace-panel{display:none!important}}
@media(max-width:700px){
  .duty-raw-sheet{padding:10px}
  .duty-raw-table{min-width:565px;font-size:12px}
  .duty-raw-table .duty-raw-role-column{width:75px}
  .duty-raw-cell strong{font-size:13px}
}
@media print{
  .duty-raw-sheet{padding:0!important}
  .duty-raw-week{break-inside:avoid;page-break-inside:avoid}
  .duty-raw-week+.duty-raw-week{margin-top:8px!important}
  .duty-raw-table{width:100%!important;min-width:0!important;font-size:8px!important;border-color:#596668!important}
  .duty-raw-table caption{padding:0 0 3px!important;font-size:10px!important;line-height:1.2!important}
  .duty-raw-table .duty-raw-role-column{width:57px!important}
  .duty-raw-table th,.duty-raw-table td{border:0.5pt solid #697577!important;break-inside:avoid;page-break-inside:avoid}
  .duty-raw-table .duty-raw-weekdays th{height:15px!important;font-size:8px!important}
  .duty-raw-table .duty-raw-month{font-size:10px!important}
  .duty-raw-month small{display:none!important}
  .duty-raw-table .duty-raw-dates th{height:20px!important;font-size:9px!important;line-height:1.05!important}
  .duty-raw-table .duty-raw-dates th:first-child{font-size:7px!important}
  .duty-raw-table tbody th{padding:1px 2px!important;font-size:8px!important;line-height:1.1!important}
  .duty-raw-role-slot{font-size:6px!important}
  .duty-raw-cell{min-height:18px!important;padding:2px 1px!important;gap:0!important;line-height:1.1!important}
  .duty-raw-cell strong{font-size:8.5px!important;line-height:1.1!important;white-space:nowrap!important}
  .duty-raw-cell small{display:none!important}
  .duty-raw-cell.duty-raw-unassigned strong{font-size:7px!important;font-weight:500!important}
  .duty-raw-table .duty-raw-missing{height:18px!important;font-size:8px!important}
  .duty-raw-holiday-name{font-size:6px!important;line-height:1!important}
  .duty-raw-table .table-output-footer th,.duty-raw-table .table-output-footer td{padding:2px!important;font-size:7px!important;line-height:1.2!important}
  .duty-raw-table .table-output-footer .output-note td{font-size:6.5px!important;padding:3px!important;line-height:1.2!important}
  .duty-raw-key{padding-top:4px!important;font-size:6.5px!important;line-height:1.15!important}
  .duty-raw-title{margin:0 0 6px!important;font-size:16px!important;line-height:1.1!important}
  .duty-raw-monthly .duty-raw-week+.duty-raw-week{margin-top:5px!important}
  .duty-raw-monthly .duty-raw-table caption.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}
  .duty-raw-role-label{font-size:6px!important;line-height:1!important}
  .duty-raw-monthly .duty-raw-cell{min-height:19px!important;padding:1px!important}
  .duty-raw-monthly .duty-raw-table .table-output-footer th,.duty-raw-monthly .duty-raw-table .table-output-footer td{padding:1px 2px!important;font-size:6.5px!important;line-height:1.1!important}
  .duty-raw-output-note{margin:5px 0 0!important;padding:3px 0!important;font-size:6.5px!important;line-height:1.2!important}
}

@media print{
 .slot-button .slot-badge.st-review{font-size:6.4px!important;letter-spacing:-.3px!important}
 .leave-calendar .weekend-column{width:43px!important}
 .leave-day{height:92px!important}
 .leave-name{white-space:nowrap!important;overflow-wrap:normal!important}
 .leave-line{min-height:12px!important;line-height:1.05!important}
 .leave-calendar .table-output-footer .output-row td{font-size:7px!important}
}

@media print{.leave-calendar .cycle-column{width:34px!important}}

@media print{.schedule-table .name-row{display:block!important;line-height:1.1!important}.schedule-table .name-cell{overflow:visible!important;color:#0f3b3d!important;position:static!important;z-index:auto!important}.schedule-table .name-cell span{color:#0f3b3d!important}}

/* Administrator restore points */
.backup-panel .panel-subtitle{font-size:12px;color:var(--muted);margin-top:4px}
.backup-panel .panel-heading{align-items:flex-start}
.backup-panel .panel-heading>.button{flex-shrink:0}
.backup-scope{font-size:12px;line-height:1.65}
.backup-scope p{margin-top:5px}
.backup-create-form{display:flex;align-items:flex-end;gap:12px;margin-top:18px}
.backup-create-form .form-field{flex:1;max-width:540px;margin:0}
.backup-create-form>.button{min-height:38px;flex-shrink:0}
.backup-status{padding:22px 18px;color:var(--muted);font-size:13px}
.backup-table{min-width:680px}
.backup-table th:last-child{width:148px}
.backup-table td:first-child{min-width:180px;max-width:300px;overflow-wrap:anywhere}
.backup-table td:nth-child(2){min-width:145px}
.backup-table td:last-child{white-space:nowrap}
.backup-summary{font-size:12px}
.backup-preview{max-height:65vh}
.backup-diff-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0 12px}
.backup-diff-counts>div{display:flex;align-items:baseline;justify-content:center;gap:7px;background:#f3f7f7;border:1px solid var(--line-soft);border-radius:var(--r-md);padding:10px}
.backup-diff-counts strong{font:700 24px/1.3 var(--font-num);color:var(--drape)}
.backup-diff-counts span{color:var(--muted);font-size:12px}
.backup-diff-sections>section{border-top:1px solid var(--line);padding:14px 0}
.backup-diff-sections h3{font-size:14px}
.backup-diff-sections h3 small{display:block;font-weight:400;font-size:11px;color:var(--muted);margin-top:3px}
.backup-diff-sections ul{list-style:none;padding:0;margin:10px 0 0}
.backup-diff-sections li{font-size:12px;padding:10px 0;border-top:1px solid var(--line-soft);overflow-wrap:anywhere}
.backup-diff-sections li:first-child{border:0}
.backup-diff-sections li>strong{font-size:11px;color:var(--muted);font-weight:500}
.backup-example{display:grid;grid-template-columns:minmax(0,1fr) 16px minmax(0,1fr);gap:8px;margin-top:5px}
.backup-example>span{min-width:0;white-space:pre-wrap}
.backup-example>span:nth-child(2){align-self:center;color:var(--faint)}
.backup-example small{display:block;font-size:10px;color:var(--muted);margin-bottom:3px}
.holiday-calendar-panel .panel-heading{align-items:flex-start}
.holiday-calendar-panel .panel-subtitle{font-size:12px;color:var(--muted);margin-top:4px}
.holiday-preservation{font-size:12px;line-height:1.7;color:var(--ink-2);max-width:85ch}
.day-holiday-form{margin-top:18px}
.holiday-date-fields{display:grid;grid-template-columns:minmax(160px,220px) minmax(180px,420px);gap:12px}
.holiday-date-fields .form-field{margin:0}
.holiday-selected-status{margin-top:7px}
.holiday-impact{display:flex;flex-direction:column;gap:4px;margin:14px 0;padding:11px 13px;border:1px solid var(--line-soft);border-radius:var(--r-md);background:#f5f8f8;font-size:12px}
.holiday-impact strong{font-size:11px;color:var(--muted)}
.holiday-impact small{color:var(--muted);font-size:11px}
.holiday-list{max-height:360px;overflow:auto;border-top:1px solid var(--line)}
.holiday-table{min-width:530px}
.holiday-table th:first-child{width:135px}
.holiday-table th:last-child{width:230px}
.holiday-table td{padding-top:9px;padding-bottom:9px;vertical-align:middle}
.holiday-table td:nth-child(2){overflow-wrap:anywhere}
.holiday-row-actions{display:flex;gap:6px;white-space:nowrap}
@media(max-width:600px){
  .holiday-date-fields{grid-template-columns:minmax(0,1fr)}
  .holiday-calendar-panel .access-actions>.button{width:100%}
}
@media(max-width:600px){
  .backup-panel .panel-heading{flex-wrap:wrap}
  .backup-create-form{display:block}
  .backup-create-form>.button{width:100%;margin-top:10px}
  .backup-diff-counts{gap:6px}
  .backup-diff-counts>div{padding:8px 5px;gap:5px}
  .backup-diff-counts strong{font-size:21px}
  .backup-example{grid-template-columns:minmax(0,1fr) 12px minmax(0,1fr);gap:5px}
}
