:root{font:16px/1.5 system-ui,sans-serif;color:#172833;background:#eef3f5;--ink:#102b32;--accent:#bdf08c;--border:#d6e0e3}
*{box-sizing:border-box}
body{margin:0}
[hidden]{display:none!important}
header{display:flex;align-items:center;justify-content:space-between;gap:16px;background:var(--ink);padding:14px max(16px,calc((100vw - 1120px)/2));color:white}
header a{color:inherit;text-decoration:none}
#brand{font-size:1.1rem;font-weight:800}
nav{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
nav a{padding:9px 11px;border-radius:8px}
nav a[aria-current]{background:var(--accent);color:var(--ink);font-weight:700}
main{max-width:1152px;margin:auto;padding:20px 16px max(32px,env(safe-area-inset-bottom));overflow-wrap:anywhere}
h1{font-size:clamp(1.9rem,5vw,3.1rem);line-height:1.1;margin:0 0 16px;letter-spacing:-.045em}
h2{font-size:1.15rem;margin:0 0 8px}
p{margin:4px 0 10px}
.panel{background:white;border:1px solid var(--border);border-radius:15px;padding:18px;margin-bottom:14px;min-width:0}
.login{max-width:460px;margin:40px auto 0}
.dashboard,.columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.stat{font-size:2.1rem;color:#174f43}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0 14px}
.toolbar h1,.toolbar h2{margin:0}
button,input,select{font:inherit;color:inherit;min-height:44px;border:1px solid #aebfc3;border-radius:8px;padding:8px 12px;background:white;max-width:100%}
button{font-weight:650;cursor:pointer}
button:hover{background:#eaf4ef}
.primary{background:var(--accent);border-color:#85b964;color:var(--ink)}
:focus-visible{outline:3px solid #29755d;outline-offset:3px}
label{display:block;font-weight:650;margin-bottom:12px}
label:not(.inline)>input,label>select{display:block;width:100%;margin-top:5px;min-width:0}
.inline{display:flex;align-items:center;gap:8px}
.inline input{min-height:auto;width:20px;height:20px}
.calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin-bottom:16px}
.calendar button{padding:4px;line-height:1.18}
.calendar button[aria-pressed=true]{background:var(--ink);color:white}
.calendar small{display:block;font-size:.7rem;font-weight:500}
.weekday{text-align:center;font-size:.83rem;color:#415964}
.entry{padding:10px 0;border-bottom:1px solid var(--border)}
.entry:last-child{border-bottom:0}
.entry button,article button{margin:4px 6px 0 0}
.muted{color:#48616a}
.warning{color:#8e3c13;font-weight:700}
#status:not(:empty){background:#eff7d5;border-left:4px solid #597e37;padding:9px 12px;border-radius:4px}
@media(max-width:620px){
  header{align-items:flex-start;flex-direction:column;gap:8px}
  nav{width:100%}
  nav a{font-size:.9rem;padding-inline:7px;min-height:44px;display:inline-flex;align-items:center}
  .dashboard,.columns{grid-template-columns:minmax(0,1fr)}
  .calendar{gap:3px}
  .calendar small{font-size:.61rem}
  .toolbar button{padding-inline:8px}
  .toolbar h2{text-align:center}
}

.schedule-key{display:flex;align-items:center;gap:8px}
.schedule-key span{width:14px;height:14px;background:#2171c7;border-radius:4px}
.calendar-day{min-width:0;border:1px solid var(--border);background:#fff;border-radius:8px;padding:8px}
.calendar-day h3{font-size:.95rem;margin:0 0 6px}
.calendar-today{border:2px solid #29755d}
.calendar-crew{border-top:1px solid var(--border);margin-top:8px;padding-top:6px}
.calendar-crew h4{font-size:.88rem;margin:0}
.calendar-day .entry{font-size:.86rem;padding:6px;margin:5px 0;overflow-wrap:anywhere}
.calendar-day .entry p{margin:4px 0}
.calendar-day button{font-size:.8rem;max-width:100%;min-height:36px}
.calendar-day .shift-open{background:#e8f3ff;border:1px solid #8ebced;border-left:4px solid #2171c7;border-radius:5px;color:#163b64}
.calendar-day .shift-open .muted{color:#175892;font-weight:700}
@media(max-width:900px){
  .calendar{grid-template-columns:minmax(0,1fr);gap:10px}
  .calendar>span{display:none}
  .calendar-day{padding:12px}
  .calendar-day button{min-height:44px;padding:7px 10px}
}

.schedule-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.schedule-toolbar h2{margin:0}
.crew-board{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;border:1px solid var(--border);border-radius:12px;overflow:hidden;background:white}
.crew-board th,.crew-board td{vertical-align:top;padding:7px;border-bottom:1px solid var(--border);border-right:1px solid var(--border)}
.crew-board thead th{background:var(--ink);color:white;font-size:.8rem;text-align:left}
.crew-board th:first-child{width:6rem}
.crew-board tbody th{background:#e5eef0;text-align:left;font-size:.86rem}
.crew-board tr:last-child td,.crew-board tbody tr:last-child th{border-bottom:0}
.crew-board tr > :last-child{border-right:0}
.crew-board thead .schedule-today{background:#296451}
.crew-board .entry,.mobile-day .entry{font-size:.83rem;padding:7px;margin:0 0 4px}
.crew-board .entry p,.mobile-day .entry p{margin:2px 0}
.entry p:empty{display:none}
.crew-board button,.mobile-day button{font-size:.78rem;padding:4px 6px}
.crew-board button{min-height:30px}
.shift-open{background:#e7f2ff;border:1px solid #92bde9;border-left:3px solid #2171c7;border-radius:5px;color:#163b64}
.crew-board .shift-open:last-child,.mobile-day .shift-open:last-child{border-bottom:1px solid #92bde9}
.add-slot{background:#f5f8f9}
.mobile-day h3,.schedule-group h4{margin:0 0 8px}
.schedule-group{margin-top:12px;border-top:1px solid var(--border);padding-top:8px}
.mobile-day .schedule-today{color:#296451}

.crew-board th,.crew-board td{padding:5px 6px}
.crew-board tbody tr:nth-child(even) td{background:#f6f9fa}
.shift-line{font-size:.82rem;line-height:1.35;padding:5px 0;border-bottom:1px solid var(--border)}
.shift-line:last-child{border-bottom:0}
.shift-line summary{cursor:pointer;list-style:none;overflow-wrap:anywhere}
.shift-line summary::-webkit-details-marker{display:none}
.shift-line summary:hover{text-decoration:underline}
.shift-line[open] summary{font-weight:700}
.open-line summary{color:#175892;font-weight:700}
.shift-actions{margin-top:6px;padding:6px;border-radius:6px;background:#edf3f5}
.shift-actions p{margin:2px 0}
.crew-board .shift-actions button{margin:3px 3px 0 0}
.week-picker{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;margin-bottom:12px}
.week-picker button{font-size:.75rem;padding:4px 2px;line-height:1.15}
.week-picker button[aria-pressed=true]{background:var(--ink);color:white}
.mobile-day .shift-line summary{min-height:44px;display:flex;align-items:center;font-size:.95rem}

.calendar-options{display:flex;align-items:flex-start;gap:12px 18px;flex-wrap:wrap;margin-top:14px}
.calendar-options label{margin-bottom:4px}
#crew-options{background:white;border:1px solid var(--border);border-radius:8px;padding:8px 12px;margin-top:24px;max-width:100%}
#crew-options summary{min-height:28px;cursor:pointer;font-weight:650}
#crew-options[open] summary{margin-bottom:8px}
#crew-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(125px,100%),1fr));gap:4px 12px;min-width:min(290px,65vw)}
#crew-filters label{min-height:36px}
#days .crew-board{margin-bottom:12px}
@media(max-width:620px){#crew-options{margin-top:0;width:100%}}

.schedule-create{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
#shift-batch-list{margin-bottom:12px}
#shift-batch-status{color:#31545c}
button:disabled{opacity:.55;cursor:default}

#range-days{display:flex;flex-wrap:wrap;gap:0 12px;border:1px solid var(--border);border-radius:8px;margin:0 0 12px;padding:8px 12px}
#range-days label{min-height:44px;margin:0}
#range-status{color:#31545c}

.staff-badge{display:inline-block;width:14px;height:14px;object-fit:contain;vertical-align:-2px;margin-inline-start:3px}
#staff-roles{border:1px solid var(--border);border-radius:8px;padding:8px 12px;margin:0 0 12px}
#staff-roles label{min-height:38px;margin:0}

.home-schedule{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:12px;align-items:start}
.home-shift-list{list-style:none;padding:0;margin:0}
.home-shift{display:flex;justify-content:space-between;flex-wrap:wrap;gap:2px 12px;padding:6px 0;font-size:.9rem}
.home-shift+.home-shift{border-top:1px solid var(--border)}
.home-crew{border-top:1px solid var(--border);padding:8px 0}
.home-crew h3{font-size:.95rem;margin:0}
.home-open-shift{color:#175892;font-weight:700}
#upcoming-more{margin-top:8px}
#upcoming-more summary{cursor:pointer;color:#31545c}
@media(max-width:620px){.home-schedule{grid-template-columns:minmax(0,1fr);gap:0}}


.pending-line{background:#fff2cb;border-left:3px solid #a66b00;border-radius:5px;padding-inline:6px}
.pending-line summary,.home-pending-shift{color:#704700;font-weight:700}
.schedule-key .pending-key{background:#e5a431;margin-inline-start:8px}

#punch-export{border-top:1px solid var(--border);margin-top:14px;padding-top:12px}
#punch-export h3{font-size:1rem;margin:0 0 8px}
.export-controls{display:flex;align-items:end;gap:8px 12px;flex-wrap:wrap}
.export-controls label,.export-controls button{margin:0}
#punch-export-range{margin-top:8px}
.employee-list{padding-block:4px}
.employee-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 0}
.employee-row+.employee-row{border-top:1px solid var(--border)}
.employee-row h2{font-size:1rem;margin:0}
.employee-row p,.employee-row button{margin:0}

#self-profile,#broadcast-form{max-width:640px}
#broadcast-form textarea{display:block;width:100%;margin-top:5px;font:inherit;padding:10px;border:1px solid #aebfc3;border-radius:8px}
.employee-actions{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}

#broadcast-audience,#broadcast-recipients{border:1px solid var(--border);border-radius:8px;padding:8px 12px;margin:0 0 12px}
#broadcast-audience .inline,#broadcast-roster .inline{min-height:34px;margin:0}
#broadcast-roster{max-height:16rem;overflow:auto}

.daily-note{background:#f1e9ff;color:#43276b;border:1px solid #cbb2ee;border-inline-start:4px solid #8054b3;border-radius:8px;padding:8px;margin:4px 0 8px;overflow-wrap:anywhere}
.daily-note p{white-space:pre-wrap;margin:2px 0 0}
#day-note-form textarea{display:block;width:100%;font:inherit;margin-top:5px;padding:8px;border:1px solid #aebfc3;border-radius:8px}

.crew-shift-note{background:#c5f5ed;color:#08483e;border-color:#54b8aa;border-inline-start-color:#087f71}
.crew-shift-note strong{font-size:.85rem}
.crew-shift-note-action{margin:4px 0 6px;line-height:1.25}
#crew-note-form textarea{display:block;width:100%;font:inherit;margin-top:5px;padding:8px;border:1px solid #aebfc3;border-radius:8px}

.profile-links,.issued-tabs{display:flex;flex-wrap:wrap;gap:8px 14px}
.issued-tabs{margin-bottom:12px}
.issued-tabs [aria-pressed=true]{background:var(--ink);color:white}
#operator-form,#issue-equipment-form,#issue-clothing-form{max-width:34rem;margin-bottom:12px}

#announcement-compose{margin-bottom:10px}
#announcement-compose summary{cursor:pointer;font-weight:650}
#announcement-form{max-width:42rem;margin-top:10px}
#announcement-form textarea{display:block;width:100%;font:inherit;padding:8px;margin-top:5px;border:1px solid #aebfc3;border-radius:8px}
.announcement{border-top:1px solid var(--border);padding-top:10px;margin-top:10px}
.announcement h3{font-size:1rem;margin:0}
.announcement time{font-size:.85rem}
.announcement-body{white-space:pre-wrap;margin:4px 0 0}

.cert-entry{display:grid;grid-template-columns:2fr 1fr 1fr;gap:8px 12px;min-width:0;margin:0 0 12px;padding:8px 12px;border:1px solid var(--border);border-radius:8px}
.cert-entry label{margin-bottom:0;min-width:0}
@media(max-width:620px){.cert-entry{grid-template-columns:minmax(0,1fr)}}

.employee-picker{position:relative}
.employee-results{position:absolute;inset-inline:0;top:100%;z-index:5;max-height:14rem;overflow:auto;list-style:none;padding:4px;margin:0;border:1px solid #52687b;border-radius:8px;background:#fff;color:#152536;box-shadow:0 6px 16px #16253426;color-scheme:light}
.employee-results [role=option]{padding:9px 10px;border-radius:4px;cursor:pointer;color:#152536}
.employee-results [role=option]:hover,.employee-results [aria-selected=true]{background:#cde8fb;color:#152536}

.notification-entry{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;justify-content:space-between;padding:12px;border-bottom:1px solid var(--border)}
.notification-entry p{margin:2px 0}
.notification-unread{border-inline-start:4px solid #236e9e;background:#edf7ff}

#notifications-link.has-unread{color:#ff9e9e;font-weight:800}
#notifications-link.has-unread[aria-current]{color:#8f1420}
#signout{color:#173140;background:#fff;border-color:#b8c7d2}
#signout:hover,#signout:focus-visible{color:#173140;background:#e8f1f7}

#staff-event-compose{margin-bottom:10px}
#staff-event-compose summary,.staff-event-attendance summary,#staff-event-history summary{cursor:pointer}
#staff-event-form{max-width:42rem;margin-top:10px}
#staff-event-form textarea{display:block;width:100%;font:inherit;padding:8px;margin-top:5px;border:1px solid #aebfc3;border-radius:8px}
.event-response-required,#staff-events-required:not(:empty){color:#922735;font-weight:700}
.event-rsvp{margin-top:6px}
.event-rsvp button[aria-pressed=true]{opacity:1}
.staff-event-attendance section{margin-top:8px}
.staff-event-attendance p{margin:2px 0 0}

.demo-bar{display:flex;justify-content:space-between;flex-wrap:wrap;align-items:center;gap:5px 16px;padding:9px 12px;margin:0 0 14px;border:1px solid #abcbd7;background:#e9f6f9;color:#183947;border-radius:8px;font:inherit;font-size:.84rem}
.demo-bar button{min-height:32px;padding:4px 8px;margin:0 0 0 6px;font:inherit;color:#183947;background:white}
.demo-bar a{color:#183947}
#login-form[hidden]{display:none!important}
