:root,html[data-theme="light"]{color-scheme:light dark;--bg:#f7f8fa;--surface:#fff;--text:#1f2328;--muted:#59636e;--border:#e3e6ea;--accent:#2453d6;--hover:#edf2ff;--gap:#d1242f;--overlap:#bc4c00;--expired:#8250df;--missing:#9a6700;--extra:#57606a;--radius:8px;--header-height:65px}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.6}button,.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:36px;padding:7px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);color:var(--text);text-decoration:none;white-space:normal}button:hover,.button:hover{background:var(--hover);text-decoration:none}.primary{background:var(--accent);color:white;border-color:var(--accent)}.primary:hover{background:#193fa8}.danger{color:var(--gap);border-color:var(--gap)}:focus-visible{outline:3px solid var(--accent);outline-offset:2px}h1{font-size:25px;line-height:1.25;margin:0 0 16px;font-weight:650;letter-spacing:-.5px}h2{font-size:18px;margin:0 0 12px}h3{font-size:15px;margin:0 0 8px}p{margin:0 0 16px}.muted,small{color:var(--muted)}small{font-size:12px}.app-header{flex-wrap:wrap;min-height:var(--header-height);padding:12px 24px;display:flex;align-items:center;gap:24px;background:var(--surface);border-bottom:1px solid var(--border)}.brand{font-size:18px;font-weight:700;white-space:nowrap;color:var(--text);letter-spacing:-.4px}.app-header nav{min-width:0;display:flex;flex-wrap:wrap;gap:4px 12px;align-items:center;font-size:13px}.app-header nav a{color:var(--muted);padding:4px 0;white-space:nowrap}.app-header nav a[aria-current]{color:var(--accent);font-weight:600}.account-menu{flex-shrink:0;display:flex;align-items:center;gap:12px;margin-left:auto;font-size:13px}.username{white-space:nowrap;flex-shrink:0}.account-menu form{margin:0}.text-button{border:0;background:none;padding:4px;min-height:32px;color:var(--muted)}.counter{font-variant-numeric:tabular-nums;font-size:12px}.notification-link{white-space:nowrap}.page{width:100%;max-width:1600px;margin:auto;padding:24px;min-width:0}.surface{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:24px}.login-panel{max-width:400px;margin:10vh auto}.field{display:flex;flex-direction:column;gap:4px;margin-bottom:16px;min-width:0}.field label{font-weight:550}.field input,.field select,.field textarea{width:100%;min-width:0;min-height:38px;border:1px solid var(--border);border-radius:6px;padding:8px;background:var(--surface);color:var(--text)}.field textarea{min-height:100px;resize:vertical}.field input[type=checkbox]{width:20px;min-height:20px}.errorlist{color:var(--gap);padding:0;list-style:none;margin:4px 0}.invalid input,.invalid select{border-color:var(--gap)}.full{width:100%}.notice{padding:12px 16px;background:var(--surface);border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:6px}.error{border-color:var(--gap);color:var(--gap)}.empty{padding:48px 24px;text-align:center}.cabinet{max-width:560px;margin:auto}.cabinet form{margin-top:24px}.skip-link{position:absolute;left:-9999px}.skip-link:focus{left:12px;top:8px;z-index:50;padding:8px;background:var(--surface)}[hidden],[x-cloak]{display:none!important}dialog{width:min(480px,calc(100% - 24px));max-height:85vh;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text);padding:24px}dialog::backdrop{background:#17213144}.floating{position:fixed;right:16px;bottom:16px;max-width:360px;z-index:100}.toolbar,.page-heading,.actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.page-heading{justify-content:space-between;margin-bottom:16px}.page-heading h1{margin:0}.toolbar{margin-bottom:16px}.toolbar .field{margin:0}.tabular,time{font-variant-numeric:tabular-nums}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]){--bg:#161a20;--surface:#20262e;--text:#eef0f3;--muted:#b0bac6;--border:#38414d;--accent:#8faaff;--hover:#293549;--gap:#ff8790;--overlap:#f8a369;--expired:#c4a0ff;--missing:#e4bd63;--extra:#b6c4d6}.primary{background:#2453d6;color:white;border-color:#2453d6}}
@media(max-width:800px){.app-header{padding:12px 16px;flex-wrap:wrap;gap:8px 16px}.app-header nav{order:3;width:100%}.account-menu{gap:8px}.username{display:none}.page{padding:16px}.surface{padding:16px}h1{font-size:22px}.login-panel{margin:8vh auto}.brand{font-size:17px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.heading-note{margin:8px 0 0;font-size:13px}.segmented{display:flex;border:1px solid var(--border);border-radius:8px;background:var(--surface);padding:3px}.segmented a{padding:5px 14px;border-radius:5px;color:var(--muted)}.segmented a[aria-current]{background:var(--hover);color:var(--accent);font-weight:600}.period-nav{display:flex;align-items:center;gap:12px;white-space:nowrap}.period-nav strong{font-size:15px}.filters{display:flex;flex-wrap:wrap;align-items:end;gap:8px;margin-left:auto}.filters label{font-size:12px;color:var(--muted);display:flex;flex-direction:column;gap:4px}.filters select,.filters input:not([type=checkbox]){background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:7px;max-width:190px;min-height:36px}.filters .check-label{flex-direction:row;align-items:center;min-height:36px}.board-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:20px 0 12px}.conflict-summary{display:flex;flex-wrap:wrap;gap:8px}.conflict-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 8px;border:1px solid currentColor;border-radius:6px;background:var(--surface);font-size:12px}.conflict-chip strong{margin-left:4px;font-variant-numeric:tabular-nums}.conflict-chip.zero{border-color:var(--border);color:var(--muted)}.gap{color:var(--gap)}.overlap{color:var(--overlap)}.expired{color:var(--expired)}.missing{color:var(--missing)}.extra{color:var(--extra)}.grid-scroll{position:relative;min-width:0;max-width:100%;overflow:auto;max-height:calc(100vh - 285px);min-height:240px;border:1px solid var(--border);border-radius:8px;background:var(--surface)}.schedule-grid{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:12px}.schedule-grid th,.schedule-grid td{border-right:1px solid var(--border);border-bottom:1px solid var(--border);padding:0;vertical-align:middle;text-align:left}.schedule-grid th:last-child,.schedule-grid td:last-child{border-right:0}.schedule-grid tr:last-child td,.schedule-grid tr:last-child th{border-bottom:0}.schedule-grid thead th{position:sticky;top:0;z-index:3;background:var(--bg);padding:10px 8px;color:var(--muted);font-weight:500;font-variant-numeric:tabular-nums}.schedule-grid thead th strong{color:var(--text);margin-left:4px;font-weight:600}.schedule-grid thead th.today{background:var(--hover);color:var(--accent);box-shadow:inset 0 2px var(--accent)}.schedule-grid .post-column{width:190px;position:sticky;left:0;background:var(--surface);z-index:2;padding:6px 12px;font-weight:550}.schedule-grid thead .post-column{z-index:4;background:var(--bg)}.post-column small{display:block;font-size:10px;font-weight:400}.site-divider th{padding:8px 12px;background:var(--bg);font-weight:650}.site-divider span{font-weight:400;margin-left:12px;color:var(--muted);font-size:11px}.cell-content{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:2px 4px;align-items:center;min-height:36px;width:100%;border:0;border-radius:0;padding:5px 8px;background:transparent;text-align:left;color:var(--text);font-size:12px;line-height:1.3}.cell-content:hover{background:var(--hover)}.assignment{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.assignment small{display:block;font-size:10px}.cell-conflict{font-size:10px;display:inline-flex;gap:3px;align-items:center}.not-needed{background:repeating-linear-gradient(135deg,transparent,transparent 5px,var(--border) 5px,var(--border) 6px)}.not-needed-label{font-size:10px}.schedule-grid td:target{outline:2px solid var(--accent);outline-offset:-2px;scroll-margin:80px}.month-grid .schedule-grid{min-width:2500px}.month-grid .post-column{width:190px}.month-grid .conflict-label{display:none}.month-grid .not-needed-label{font-size:0}.month-grid .not-needed-label:after{content:'—';font-size:12px}.legend{display:flex;flex-wrap:wrap;gap:8px 16px;font-size:11px;margin-top:12px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(max-width:1100px){.filters{margin-left:0}.schedule-grid .post-column{width:160px}.cell-content{padding:4px}.conflict-label{font-size:9px}}
.candidate-list{max-height:270px;overflow:auto;border:1px solid var(--border);border-radius:8px}.candidate{display:block;text-align:left;width:100%;border:0;border-bottom:1px solid var(--border);border-radius:0;padding:10px 12px}.candidate strong{display:block;font-weight:550}.candidate small{display:block;margin-top:2px}.edit-time{margin-top:16px;border-top:1px solid var(--border);padding-top:12px}.edit-time summary{cursor:pointer;color:var(--accent);margin-bottom:12px}.two-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px}.editor-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;padding-top:16px;border-top:1px solid var(--border)}
.form-page{max-width:700px;margin:auto}.detail-page{max-width:960px;margin:auto}.back-link{display:inline-block;margin:0 0 16px;font-size:13px}.table-wrap{max-width:100%;overflow:auto;border:1px solid var(--border);border-radius:8px;background:var(--surface)}.data-table{width:100%;border-collapse:collapse;text-align:left}.data-table th{font-size:12px;font-weight:550;color:var(--muted);background:var(--bg)}.data-table th,.data-table td{padding:12px 16px;border-bottom:1px solid var(--border)}.data-table tr:last-child td{border-bottom:0}.data-table tr:hover td{background:var(--hover)}.data-table td{font-size:13px;overflow-wrap:anywhere}.list-filters{margin-left:0;margin-bottom:16px}.profile{display:flex;gap:24px;align-items:center}.avatar{width:90px;height:112px;object-fit:cover;border-radius:8px}.initials{display:flex;align-items:center;justify-content:center;font-size:32px;background:var(--hover);color:var(--accent)}.facts{display:flex;flex-wrap:wrap;gap:16px 32px;margin:0 0 16px}.facts div{min-width:130px}.facts dt{color:var(--muted);font-size:12px;margin-bottom:4px}.facts dd{margin:0;overflow-wrap:anywhere}.section-heading{margin-top:24px}.help{font-size:12px;margin-top:8px}.ok{color:var(--muted)}
.detail-facts{margin:0}.detail-facts>div{display:grid;grid-template-columns:220px minmax(0,1fr);gap:16px;padding:10px 0;border-bottom:1px solid var(--border)}.detail-facts>div:last-child{border:0}.detail-facts dt{font-size:13px;color:var(--muted)}.detail-facts dd{margin:0;overflow-wrap:anywhere}.record-list{padding:0;list-style:none;background:var(--surface);border:1px solid var(--border);border-radius:8px}.record-list li{padding:12px 16px;border-bottom:1px solid var(--border)}.record-list li:last-child{border:0}.formset-section{margin-bottom:16px}.formset-row{display:flex;flex-wrap:wrap;gap:12px;border-bottom:1px solid var(--border);margin-bottom:16px}.formset-row .field{flex:1 1 150px}.formset-row .field:has(input[type=checkbox]){flex:0 1 100px}
@media(max-width:600px){.detail-facts>div{grid-template-columns:1fr;gap:4px}.two-columns{grid-template-columns:1fr}.profile{align-items:flex-start;gap:16px}.avatar{width:64px;height:80px}}
.timeline{list-style:none;padding:0;display:flex;flex-direction:column;gap:12px}.timeline .page-heading{margin-bottom:4px}.timeline h3{margin:0}.timeline p:last-child{margin:0}.timeline time{font-size:12px;color:var(--muted)}.event-photo{max-width:100%;max-height:240px;border-radius:8px}.notification-list{list-style:none;padding:0;border:1px solid var(--border);border-radius:8px;background:var(--surface);overflow:hidden}.notification-list li{border-bottom:1px solid var(--border)}.notification-list li:last-child{border:0}.notification-list a{display:block;padding:16px 24px;color:var(--text)}.notification-list a:hover{background:var(--hover);text-decoration:none}.notification-list small{display:block;margin-top:4px}.notification-list .unread{border-left:3px solid var(--accent)}.notification-list .unread span{font-weight:600}.notification-link{display:flex;align-items:center;gap:4px}
.field:has([type=checkbox]) label{font-weight:400}.field div label{display:flex;gap:8px;align-items:center;margin:4px 0}.field div input[type=checkbox]{flex-shrink:0}

html[data-theme="dark"]{--bg:#161a20;--surface:#20262e;--text:#eef0f3;--muted:#b0bac6;--border:#38414d;--accent:#8faaff;--hover:#293549;--gap:#ff8790;--overlap:#f8a369;--expired:#c4a0ff;--missing:#e4bd63;--extra:#b6c4d6}
.schedule-grid .post-column{padding:4px 12px;line-height:1.3}
.guard-page{max-width:608px}.guard-page .cabinet{width:100%}.guard-page button,.guard-page .button,.guard-page select,.guard-page input:not([type=hidden]):not([type=checkbox]){min-height:48px}.guard-page .back-link{padding:12px 0;min-height:48px}.guard-page .profile>div{min-width:0;overflow-wrap:anywhere}.guard-page form{margin-top:16px}.shift-card{margin:12px 0}.shift-status{color:var(--accent);font-weight:650;margin-bottom:8px}.instruction summary{min-height:48px;display:flex;align-items:center;color:var(--accent);cursor:pointer}.instruction>div{padding:12px 0;overflow-wrap:anywhere}.inventory-check{display:flex;align-items:center;gap:12px;min-height:48px;padding:8px 0}.inventory-check input{width:24px;height:24px;flex-shrink:0}.capture-form video,.capture-form [data-preview]{width:100%;max-height:380px;object-fit:contain;border-radius:var(--radius);background:var(--bg)}.capture-form button{margin-bottom:8px}.fallback-camera{display:block;margin:16px 0}.fallback-camera input{width:100%;max-width:100%}.guard-page .surface{overflow-wrap:anywhere}.guard-page .record-list p{margin:8px 0}.guard-page .record-list a{display:inline-block;min-height:48px;padding:10px 0}.replacement-search{border-top:1px solid var(--border);padding-top:16px}
@media(max-width:800px){.period-nav{flex-wrap:wrap;white-space:normal;gap:8px}.grid-scroll:not(.month-grid) .schedule-grid{min-width:950px}}
