:root{
  --concrete:#E9ECEB; --panel:#F6F7F6; --surface:#fff; --thead:#EEF1F0; --ink:#15202B; --steel:#56646F; --rule:#C7CFD1;
  --go:#1B7F4B; --go-dark:#146239; --stop:#B42318; --stop-dark:#8E1B12; --lunch:#B7791F; --lunch-dark:#8F5E15;
  --blue:#1E4D7A; --warn-bg:#FBEAE8; --ok-bg:#E6F2EB; --pin-bg:#DDEFE4; --pout-bg:#E3E7E8; --plunch-bg:#F6EAD5; --pedit-bg:#E1EAF3;
  --cond:"Barlow Condensed","Arial Narrow","Roboto Condensed",system-ui,sans-serif;
  --body:"Barlow",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  box-sizing:border-box;
  padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px);
}
*,*::before,*::after{box-sizing:inherit}
html,body{margin:0}
html{scroll-padding-top:env(safe-area-inset-top,0px)}
body{background:var(--concrete);color:var(--ink);font:16px/1.45 var(--body);-webkit-font-smoothing:antialiased}
button,input,select{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
[hidden]{display:none!important}
.wrap{max-width:560px;margin:0 auto;padding:16px}
.wide{max-width:1040px}
h1,h2,h3,h4{font-family:var(--cond);font-weight:700;line-height:1.1;margin:0}
h2{font-size:26px;margin:28px 0 10px}
h3{font-size:22px}
h4{font-size:19px;margin:18px 0 4px}
p{margin:0 0 12px}
.muted{color:var(--steel)}
.small{font-size:14px}
.mt-0{margin-top:0} .mt-8{margin-top:8px} .mt-14{margin-top:14px} .mt-16{margin-top:16px} .mt-18{margin-top:18px} .mt-24{margin-top:24px}
.mb-0{margin-bottom:0}
.nowrap{white-space:nowrap}

/* top bar */
.bar{background:var(--ink);color:#fff}
.bar-in{max-width:1040px;margin:0 auto;display:flex;align-items:center;gap:12px;padding:12px 16px}
.is-crew .bar-in,.is-crew .wrap.wide{max-width:560px}
.bar .shop{font-family:var(--cond);font-size:22px;font-weight:700;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bar button{background:none;border:1px solid #fff5;color:#fff;border-radius:6px;padding:8px 12px;cursor:pointer;min-height:40px}

/* forms */
label{display:block;font-weight:500;margin:14px 0 6px}
input,select{width:100%;padding:12px 14px;border:1.5px solid var(--rule);border-radius:8px;background:var(--surface);min-height:50px}
input:focus,select:focus{border-color:var(--blue);outline:none;box-shadow:0 0 0 3px #1E4D7A33}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:8px;
  padding:12px 18px;min-height:50px;font-weight:600;cursor:pointer;background:var(--ink);color:#fff;text-decoration:none}
.btn.block{width:100%}
.btn.ghost{background:transparent;color:var(--ink);border:1.5px solid var(--rule)}
.btn.small{min-height:38px;padding:6px 12px;font-size:14px}
.btn.danger{color:var(--stop-dark);border-color:#E7B9B4}
.btn.danger.armed{background:var(--stop);border-color:var(--stop);color:#fff}
.btn:disabled{opacity:.55;cursor:default}
.linkbtn{background:none;border:0;color:var(--blue);text-decoration:underline;cursor:pointer;padding:8px 0;font-weight:500}
.err{background:var(--warn-bg);color:var(--stop-dark);border-left:4px solid var(--stop);padding:10px 12px;border-radius:4px;margin:12px 0}
.ok{background:var(--ok-bg);color:var(--go-dark);border-left:4px solid var(--go);padding:10px 12px;border-radius:4px;margin:12px 0}

/* auth */
.auth{min-height:calc(100svh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;justify-content:center}
.auth .mark{font-family:var(--cond);font-size:56px;font-weight:700;line-height:.95;margin-bottom:6px}
.auth .mark span{display:block;color:var(--steel)}
.sheet{background:var(--panel);border:1px solid var(--rule);border-radius:12px;padding:20px;margin-top:20px}

/* clock */
.clock{max-width:560px;margin:0 auto}
.status{font-size:18px;margin:18px 0 4px}
.timer{font-family:var(--cond);font-weight:700;font-size:clamp(56px,19vw,112px);line-height:1;font-variant-numeric:tabular-nums;letter-spacing:.01em}
.timer.idle{color:var(--rule)}
.punch{display:block;width:100%;border:0;border-radius:18px;margin:18px 0 12px;min-height:max(200px,34vh);
  cursor:pointer;color:#fff;text-align:left;padding:22px 24px;
  box-shadow:inset 0 -8px 0 rgba(0,0,0,.18);transition:transform .08s ease, box-shadow .08s ease}
.punch:active{transform:translateY(4px);box-shadow:inset 0 -4px 0 rgba(0,0,0,.18)}
.punch .verb{font-family:var(--cond);font-weight:700;font-size:clamp(56px,17vw,92px);line-height:.9;display:block}
.punch .sub{display:block;font-size:17px;margin-top:10px;opacity:.9}
.punch.in{background:var(--go)} .punch.out{background:var(--stop)}
.punch:disabled{opacity:.6}
.lunchbtn{width:100%;min-height:64px;border-radius:12px;border:2px solid var(--lunch);background:var(--surface);color:var(--lunch-dark);
  font-family:var(--cond);font-size:28px;font-weight:700;cursor:pointer}
.lunchbtn.on{background:var(--lunch);color:#fff}
.notice{background:var(--warn-bg);border-left:4px solid var(--stop);padding:10px 12px;border-radius:4px;margin:14px 0 0;font-size:15px}
.notice ul{margin:6px 0 0;padding-left:20px}
.notice li{margin:4px 0}
.log{list-style:none;padding:0;margin:0;border-top:1px solid var(--rule)}
.log li{display:flex;gap:14px;padding:12px 2px;border-bottom:1px solid var(--rule);align-items:baseline}
.log time{font-family:var(--cond);font-size:22px;font-weight:600;min-width:92px;font-variant-numeric:tabular-nums}
.log .what{flex:1}
.dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:8px;vertical-align:1px}
.d-in{background:var(--go)} .d-out{background:var(--stop)} .d-lunch{background:var(--lunch)}

/* admin */
.tabs{display:flex;gap:4px;border-bottom:2px solid var(--rule);overflow-x:auto;margin-top:8px}
.tabs button{background:none;border:0;padding:14px 16px;font-family:var(--cond);font-size:22px;font-weight:600;color:var(--steel);
  cursor:pointer;border-bottom:4px solid transparent;margin-bottom:-2px;white-space:nowrap;min-height:52px}
.tabs button[aria-selected="true"]{color:var(--ink);border-bottom-color:var(--ink)}
.scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
table{width:100%;border-collapse:collapse;background:var(--panel);border:1px solid var(--rule);border-radius:8px}
th,td{padding:11px 12px;text-align:left;border-bottom:1px solid var(--rule);vertical-align:middle}
th{font-weight:600;font-size:14px;color:var(--steel);background:var(--thead)}
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}
tr.total td{font-weight:600;background:var(--thead)}
tr.inactive td{color:var(--steel)}
tr.missing td{background:#FDF3F2}
.ot{color:var(--stop);font-weight:600}
.pill{display:inline-block;padding:3px 10px;border-radius:999px;font-size:14px;font-weight:600;white-space:nowrap}
.p-in{background:var(--pin-bg);color:var(--go-dark)} .p-out{background:var(--pout-bg);color:var(--steel)} .p-lunch{background:var(--plunch-bg);color:var(--lunch-dark)}
.p-miss{background:var(--warn-bg);color:var(--stop-dark)} .p-edit{background:var(--pedit-bg);color:var(--blue)}
.part{display:block;font-size:13px;color:var(--steel);font-weight:400}
.board{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px;margin-top:14px}
.tile{background:var(--panel);border:1px solid var(--rule);border-left:6px solid var(--rule);border-radius:8px;padding:14px}
.tile.in{border-left-color:var(--go)} .tile.lunch{border-left-color:var(--lunch)} .tile.miss{border-left-color:var(--stop)}
.tile .top{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.tile .n{font-family:var(--cond);font-size:24px;font-weight:700}
.tile .t{font-family:var(--cond);font-size:30px;font-weight:700;font-variant-numeric:tabular-nums;margin-top:4px}
.tile .fix{margin-top:10px}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.row > *{flex:1 1 180px}
.row > .fit{flex:0 0 auto}
.formgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:0 14px}
.weekbar{display:flex;align-items:center;gap:10px;margin:16px 0}
.weekbar .lbl{flex:1;text-align:center;font-family:var(--cond);font-size:24px;font-weight:700}
.weekbar .lbl small{display:block;font-family:var(--body);font-size:14px;font-weight:400;color:var(--steel)}
.actions{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
.empty{padding:20px;border:1.5px dashed var(--rule);border-radius:8px;color:var(--steel);text-align:center}
.sectionhead{display:flex;justify-content:space-between;align-items:flex-end;gap:10px;flex-wrap:wrap}
.sectionhead h2{margin-bottom:10px}
.sectionhead .btn{margin-bottom:10px}
.changes{list-style:none;padding:0;margin:0;border-top:1px solid var(--rule)}
.changes li{padding:12px 2px;border-bottom:1px solid var(--rule)}
.changes .what{font-weight:600}
.changes .diff{font-size:14px;color:var(--steel);margin-top:2px}
.changes .why{font-size:15px;margin-top:4px}

/* shift dialog */
dialog{border:0;border-radius:14px;padding:0;width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 24px);
  background:var(--panel);color:var(--ink);box-shadow:0 20px 60px rgba(0,0,0,.35)}
dialog::backdrop{background:rgba(21,32,43,.55)}
dialog form{padding:20px 20px 16px;overflow-y:auto;max-height:calc(100dvh - 24px)}
.brk{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) 40px;gap:8px;align-items:center;margin-top:8px}
.brk input{min-width:0;padding:10px}
.brk .to{color:var(--steel)}
.brk-rm{width:40px;height:40px;border-radius:8px;border:1.5px solid var(--rule);background:var(--surface);color:var(--stop-dark);font-size:22px;line-height:1;cursor:pointer}
@media (max-width:520px){
  .brk{grid-template-columns:minmax(0,1fr) 40px;grid-template-areas:"s r" "e r";row-gap:6px}
  .brk .bs{grid-area:s} .brk .be{grid-area:e} .brk .brk-rm{grid-area:r;align-self:center} .brk .to{display:none}
}
.dialog-actions{margin-top:16px}
.dialog-actions .btn{flex:0 0 auto}
.dialog-actions .danger{margin-left:auto}
@media (max-width:420px){.dialog-actions .danger{margin-left:0;width:100%}}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}
