:root {
  --bg: #eef1f6; --surface: #ffffff; --surface2: #f5f7fb; --ink: #0e1a2b; --muted: #5a6a80; --line: #d9e0ea;
  --brand: #1d4ed8; --brand-ink: #ffffff; --navy: #0c1a33; --navy2: #14284a;
  --ok: #15803d; --ok-bg: #dcfce7; --warn: #b45309; --warn-bg: #fef3c7; --bad: #b91c1c; --bad-bg: #fee2e2;
  --focus: #2563eb; --radius: 12px; --side: 248px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1120; --surface: #121c30; --surface2: #182540; --ink: #e8eef9; --muted: #94a7c2; --line: #263754;
    --brand: #6ea0ff; --brand-ink: #071226; --navy: #060d1b; --navy2: #0e1b33;
    --ok: #4ade80; --ok-bg: #11301f; --warn: #fbbf24; --warn-bg: #33270b; --bad: #f87171; --bad-bg: #3a1515; --focus: #93c5fd;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.45; font-size: 16px; }
h1 { font-size: 1.5rem; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0 0 .4rem; }
h3 { font-size: 1rem; margin: 1rem 0 .3rem; }
p { margin: 0 0 .7rem; }
a { color: var(--brand); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .help { color: var(--muted); font-size: .85rem; margin: .25rem 0 0; } .error { color: var(--bad); font-weight: 600; font-size: .9rem; margin: .3rem 0 0; }
.icon { flex: none; }
.skip { position: absolute; left: .5rem; top: -4rem; background: var(--brand); color: var(--brand-ink); padding: .5rem .8rem; z-index: 100; border-radius: 8px; }
.skip:focus { top: .5rem; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .5rem 1rem; border-radius: 10px; border: 1px solid transparent; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface2); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger-outline { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn-danger-soft { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.btn-sm { min-height: 36px; padding: .3rem .7rem; font-size: .9rem; border-radius: 8px; }
.btn-icon { min-width: 44px; padding: .5rem; } .btn-icon.btn-sm { min-width: 36px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; }
.link-btn { background: none; border: 0; color: var(--brand); text-decoration: underline; cursor: pointer; min-height: 36px; padding: 0 .3rem; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .5rem 0; }
.row.end { justify-content: flex-end; } .row.spread { justify-content: space-between; }

/* ---------- forms ---------- */
.field { margin: 0 0 .9rem; }
.field label, fieldset legend { display: block; font-weight: 600; margin-bottom: .25rem; font-size: .92rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=number], input[type=search], input[type=tel], select, textarea {
  width: 100%; min-height: 44px; padding: .5rem .7rem; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
textarea { resize: vertical; }
input[type=color] { width: 100%; height: 44px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
[aria-invalid="true"] { border-color: var(--bad); border-width: 2px; }
.check-row { display: flex; gap: .6rem; align-items: center; padding: .35rem 0; }
.check-row input { width: 22px; height: 22px; flex: none; accent-color: var(--brand); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 .9rem; padding: .4rem .8rem .6rem; }
.chips-set .check-row { display: inline-flex; margin-right: 1rem; }
.daypick { display: flex; flex-wrap: wrap; gap: .4rem; }
.dp input { position: absolute; opacity: 0; } .dp label { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; margin: 0; cursor: pointer; background: var(--surface); font-weight: 600; }
.dp input:checked + label { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); } .dp input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.copy-row { display: flex; gap: .5rem; } .copy-row input { flex: 1; min-width: 0; }
.searchbar { margin: .6rem 0; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--side) 1fr; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: .4rem; padding: 1.1rem .8rem; background: var(--navy); color: #e8eef9; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.2rem; letter-spacing: .01em; }
.brand-mark { width: 24px; height: 20px; background:
  linear-gradient(#38bdf8 0 0) 0 0 / 14px 4px no-repeat, linear-gradient(#f59e0b 0 0) 6px 8px / 18px 4px no-repeat, linear-gradient(#34d399 0 0) 0 16px / 11px 4px no-repeat, linear-gradient(#818cf8 0 0) 13px 16px / 9px 4px no-repeat; }
.side .biz { padding: 0 .2rem .8rem; color: #9fb4d6; font-size: .9rem; border-bottom: 1px solid #1d3257; margin-bottom: .4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidenav { display: flex; flex-direction: column; gap: .15rem; }
.sidenav a, .tabbar a { position: relative; display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; border-radius: 10px; color: #c7d5ee; text-decoration: none; font-weight: 600; min-height: 44px; }
.sidenav a:hover { background: var(--navy2); }
.sidenav a.on { background: #1b3a70; color: #fff; }
.badge { margin-left: auto; min-width: 22px; padding: 0 6px; height: 22px; line-height: 22px; text-align: center; border-radius: 99px; background: #f59e0b; color: #1c1100; font-size: .75rem; }
.side-foot { margin-top: auto; padding: .8rem .4rem 0; border-top: 1px solid #1d3257; display: flex; flex-direction: column; gap: .15rem; font-size: .9rem; color: #9fb4d6; }
.who-me { color: #fff; font-weight: 600; } .role-tag { font-size: .8rem; }
.topbar, .tabbar { display: none; }
.main { padding: 1.4rem 1.6rem 5.5rem; min-width: 0; outline: none; }
.view { max-width: 1400px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.block { margin: 1.2rem 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.sec-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.banner { padding: .7rem 1rem; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.banner.warn { background: var(--warn-bg); color: var(--warn); }

@media (max-width: 899px) {
  .shell { display: block; }
  .side { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem 1rem; padding-top: calc(.6rem + env(safe-area-inset-top)); background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
  .topbar .biz { color: #9fb4d6; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--navy); padding: .2rem .3rem calc(.2rem + env(safe-area-inset-bottom)); gap: .1rem; }
  .tabbar a { flex: 1; flex-direction: column; justify-content: center; gap: .1rem; padding: .35rem .1rem; font-size: .68rem; min-width: 0; text-align: center; }
  .tabbar a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .tabbar a.on { color: #fff; background: #1b3a70; }
  .tabbar .badge { position: absolute; top: 2px; right: calc(50% - 22px); margin: 0; min-width: 18px; height: 18px; line-height: 18px; font-size: .65rem; }
  .main { padding: 1rem .9rem 8.5rem; }
  h1 { font-size: 1.3rem; }
}

/* ---------- toolbar and summary ---------- */
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .7rem; margin-bottom: .9rem; }
.tb-nav { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tb-title { min-width: 11ch; text-align: center; font-size: 1.3rem; text-transform: capitalize; }
.tb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.seg button { display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; padding: .3rem .8rem; border: 0; background: transparent; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--brand); color: var(--brand-ink); }
.summary { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .9rem; }
.sum { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .8rem; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; min-height: 40px; }
.sum strong { font-size: 1.05rem; } .sum span { font-size: .9rem; }
.sum.danger { background: var(--bad-bg); color: var(--bad); border-color: transparent; } .sum.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.sum.zero { color: var(--muted); } .sum.good { background: var(--ok-bg); color: var(--ok); border-color: transparent; cursor: default; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem 1rem; margin-bottom: 1rem; }
.issues { list-style: none; margin: 0; padding: 0; }
.issues li { display: flex; align-items: center; gap: .8rem; padding: .45rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.issues li:last-child { border: 0; }
.iss-date { font-weight: 700; min-width: 6.5rem; } .iss-text { flex: 1; min-width: 14rem; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: 2px 6px; border-radius: 6px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 16%, var(--surface)); font-size: .78rem; line-height: 1.25; white-space: nowrap; }
.chip b { font-weight: 800; } .chip .ct { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.locked { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent); }
.abs { display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: .75rem; font-weight: 700; background: repeating-linear-gradient(135deg, var(--surface2) 0 6px, var(--line) 6px 8px); color: var(--muted); }
.abs-sick { background: repeating-linear-gradient(135deg, var(--bad-bg) 0 6px, transparent 6px 8px); color: var(--bad); }
.abs-paid { background: repeating-linear-gradient(135deg, var(--ok-bg) 0 6px, transparent 6px 8px); color: var(--ok); }
.abs.pending { outline: 1.5px dashed currentColor; outline-offset: -1px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; background: var(--surface2); color: var(--muted); white-space: nowrap; }
.st-pending, .st-short, .login-invited, .n2 { background: var(--warn-bg); color: var(--warn); }
.st-approved, .st-full, .login-active, .n1 { background: var(--ok-bg); color: var(--ok); }
.st-rejected, .n3 { background: var(--bad-bg); color: var(--bad); }
.login-none, .login-noemail, .st-cancelled { background: var(--surface2); color: var(--muted); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface2); color: var(--brand); font-weight: 800; font-size: .78rem; flex: none; border: 1px solid var(--line); }
.cdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .4rem; }

/* ---------- grid ---------- */
.grid-scroll { overflow: auto; max-height: calc(100vh - 17rem); min-height: 14rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .9rem; }
.grid th, .grid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0; vertical-align: top; background: var(--surface); }
.grid thead th { position: sticky; top: 0; z-index: 3; text-align: center; padding: .4rem .2rem; background: var(--surface2); min-width: 96px; font-weight: 600; }
.grid thead th.corner { left: 0; z-index: 5; text-align: left; padding-left: .8rem; min-width: 210px; }
.grid th.who { position: sticky; left: 0; z-index: 2; text-align: left; font-weight: 500; padding: .4rem .6rem; min-width: 210px; max-width: 240px; }
.who-in { display: flex; align-items: center; gap: .55rem; } .who-name { font-weight: 700; line-height: 1.2; } .who-sub { color: var(--muted); font-size: .76rem; }
.dayh .dow { display: block; font-size: .72rem; color: var(--muted); text-transform: capitalize; } .dayh .dom { font-size: 1.05rem; font-weight: 800; }
.dayh.we { background: color-mix(in srgb, var(--warn-bg) 55%, var(--surface2)); } .dayh.today { box-shadow: inset 0 -3px 0 var(--brand); } .dayh.closed { opacity: .55; }
.cell { padding: 0; } .cell.today { background: color-mix(in srgb, var(--brand) 5%, var(--surface)); } .cell.closed { background: var(--surface2); }
.cell-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; min-height: 54px; padding: 5px 6px; border: 0; background: transparent; cursor: pointer; text-align: left; position: relative; }
.cell-btn:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.cell.has-issue { box-shadow: inset 0 0 0 2px var(--bad); }
.cell .warn { position: absolute; top: 3px; right: 3px; color: var(--bad); }
tr.me th.who { background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.grid tfoot th, .grid tfoot td { position: sticky; bottom: 0; z-index: 2; background: var(--surface2); }
.grid tfoot th.who { z-index: 4; }
.covc { text-align: center; padding: .4rem .2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.covc.short { color: var(--bad); background: var(--bad-bg); } .covc.full { color: var(--ok); } .covc.none { color: var(--muted); font-weight: 400; }
.month .grid thead th { min-width: 44px; } .month .cell-btn { align-items: center; min-height: 48px; padding: 3px 2px; } .month .dayh .dom { font-size: .9rem; }
.month .chip { padding: 1px 4px; font-size: .72rem; }
.month .abs { font-size: .65rem; padding: 1px 3px; }

/* ---------- agenda ---------- */
.daystrip { display: flex; gap: .35rem; overflow-x: auto; padding: .2rem 0 .6rem; scroll-snap-type: x proximity; position: sticky; top: 0; background: var(--bg); z-index: 4; }
.dsb { position: relative; flex: 0 0 auto; width: 52px; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; scroll-snap-align: center; }
.dsb .dow { font-size: .72rem; color: var(--muted); text-transform: capitalize; } .dsb .dom { font-weight: 800; font-size: 1.1rem; }
.dsb.we { background: color-mix(in srgb, var(--warn-bg) 50%, var(--surface)); } .dsb.today .dom { color: var(--brand); }
.dsb.on { background: var(--brand); border-color: var(--brand); } .dsb.on .dow, .dsb.on .dom { color: var(--brand-ink); }
.dsb .dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.ag-title { text-transform: capitalize; margin: .6rem 0; font-size: 1.2rem; }
.shift-card { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--c); border-radius: var(--radius); padding: .8rem .9rem; margin-bottom: .8rem; }
.shift-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; } .shift-card h3 { margin: 0; font-size: 1.05rem; }
.sc-time { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.daybar { display: block; position: relative; width: 140px; height: 6px; border-radius: 3px; background: var(--line); margin-top: 4px; overflow: hidden; } .daybar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.people { list-style: none; margin: .5rem 0 0; padding: 0; }
.prow { display: flex; align-items: center; gap: .65rem; padding: .45rem 0; border-top: 1px solid var(--line); }
.prow.me { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.pr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; } .pr-name { font-weight: 700; } .pr-sub { color: var(--muted); font-size: .82rem; } .pr-warn { color: var(--bad); font-size: .82rem; display: flex; gap: .3rem; align-items: flex-start; }
.prow.open .pr-name { color: var(--warn); } .open-mark { width: 32px; height: 32px; border-radius: 50%; border: 2px dashed var(--warn); color: var(--warn); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.add-person { margin-top: .5rem; } .away { margin-top: 1rem; }

/* ---------- dialogs ---------- */
.dlg { border: 0; border-radius: 16px; padding: 1.2rem; width: min(520px, calc(100vw - 1.5rem)); max-height: 92vh; background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.dlg.wide { width: min(760px, calc(100vw - 1.5rem)); }
.dlg::backdrop { background: rgba(5, 12, 26, .6); }
.dlg h2 { margin-top: 0; } .dlg-text { font-size: 1.05rem; } .dlg-shift { color: var(--muted); }
.cell-list { list-style: none; padding: 0; margin: 0 0 .5rem; } .cell-list li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .4rem 0; border-bottom: 1px solid var(--line); } .cl-name { flex: 1; min-width: 8rem; font-weight: 600; }
.add-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; margin-bottom: .6rem; }
.add-shift { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; text-align: left; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-weight: 600; min-height: 44px; }
.add-shift:hover { background: var(--surface2); } .add-shift small { color: var(--bad); font-weight: 500; line-height: 1.25; } .add-shift.warn { border-color: var(--bad); }
.note-absent { background: var(--surface2); padding: .5rem .7rem; border-radius: 10px; }
.picker { list-style: none; margin: .6rem 0; padding: 0; max-height: 50vh; overflow: auto; }
.pick { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .5rem .4rem; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; min-height: 48px; }
.pick:hover { background: var(--surface2); } .pick.warn .pr-sub { color: var(--bad); }
.rules-sum { list-style: none; padding: 0; margin: .6rem 0; } .rules-sum li { display: flex; gap: .5rem; align-items: center; color: var(--ok); font-size: .9rem; padding: .1rem 0; }
.needs-grid { display: grid; grid-template-columns: minmax(110px, 1.4fr) repeat(7, minmax(40px, 1fr)) 36px; gap: .3rem; align-items: center; margin-bottom: .5rem; }
.ng-head { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: capitalize; } .ng-head.c { text-align: center; }
.ng-in { padding: .3rem; text-align: center; min-height: 38px; } .needs-grid select { min-height: 38px; padding: .3rem; }

/* ---------- lists and cards ---------- */
.plist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pl-row { display: flex; align-items: center; gap: .7rem; padding: .35rem .8rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; } .pl-row:last-child { border: 0; } .pl-row.inactive { opacity: .6; }
.pl-main { flex: 1; min-width: 12rem; display: flex; align-items: center; gap: .7rem; border: 0; background: transparent; text-align: left; cursor: pointer; min-height: 52px; } .pl-text { display: flex; flex-direction: column; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.req-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.req-card header { display: flex; gap: .7rem; align-items: center; margin-bottom: .4rem; } .rc-main { display: flex; flex-direction: column; } .rc-reason { font-style: italic; color: var(--muted); } .rc-actions { margin-top: .6rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.sug-list { list-style: none; margin: .4rem 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.sug { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; background: var(--surface2); } .sug-head { display: flex; gap: .6rem; align-items: center; margin-bottom: .3rem; } .sug-kind { color: var(--muted); font-size: .85rem; }
.sug-steps { margin: 0 0 .5rem; padding-left: 1.1rem; }
.empty { text-align: center; padding: 2rem 1rem; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); } .empty p { color: var(--muted); margin-inline: auto; }
.recent, .to-list, .st-list, .myshifts { list-style: none; margin: 0; padding: 0; }
.recent li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.to-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .6rem .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: .5rem; } .to-main { flex: 1; min-width: 12rem; display: flex; flex-direction: column; }
.st-row { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; border-bottom: 1px solid var(--line); } .st-main { flex: 1; display: flex; flex-direction: column; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; } .tag { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .3rem .2rem .7rem; border-radius: 99px; background: var(--surface2); border: 1px solid var(--line); } .tag button { border: 0; background: transparent; cursor: pointer; display: inline-flex; padding: 6px; border-radius: 50%; }
.pw-form { max-width: 380px; }

/* ---------- employee home ---------- */
.quick { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; } .quick .btn { flex: 1; min-width: 180px; min-height: 52px; }
.next-card { background: var(--navy); color: #fff; border-radius: 16px; padding: 1.1rem 1.2rem; margin-bottom: 1rem; border-left: 8px solid var(--c); } .next-card h2 { font-size: 1.5rem; text-transform: capitalize; margin: .2rem 0; } .nc-label { color: #9fb4d6; font-size: .85rem; } .nc-shift { margin: 0 0 .3rem; font-size: 1.1rem; } .next-card .daybar { background: #1d3257; width: 100%; max-width: 320px; }
.ms-row { display: grid; grid-template-columns: 9rem 1fr auto; gap: .6rem; align-items: center; padding: .6rem .8rem; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 10px; margin-bottom: .4rem; } .ms-date { font-weight: 700; text-transform: capitalize; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, 5fr) 6fr; }
.auth-brand { background: linear-gradient(160deg, var(--navy) 0%, #16336a 100%); color: #fff; padding: 3rem 2.5rem; display: flex; flex-direction: column; justify-content: center; gap: 1.2rem; }
.brand.big { font-size: 1.8rem; } .auth-brand h2 { font-size: 1.6rem; line-height: 1.25; max-width: 22ch; }
.auth-brand ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .7rem; } .auth-brand li { display: flex; gap: .6rem; align-items: flex-start; color: #cfe0ff; } .auth-brand .icon { color: #34d399; margin-top: 2px; }
.auth-main { display: flex; flex-direction: column; padding: 1.2rem; } .auth-top { display: flex; justify-content: flex-end; } .lang-select { width: auto; min-width: 8.5rem; }
.auth-card { margin: auto; width: min(420px, 100%); padding: 1rem 0 2rem; } .auth-card h1 { margin-bottom: .3rem; } .auth-alt { margin-top: 1rem; } .btn-block { margin-top: .4rem; }
@media (max-width: 800px) { .auth { display: block; } .auth-brand { padding: 1.4rem 1.2rem; } .auth-brand h2 { font-size: 1.15rem; } .auth-brand ul { display: none; } .brand.big { font-size: 1.4rem; } }

/* ---------- save bar and toast ---------- */
.savebar { position: fixed; left: var(--side); right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .7rem 1.4rem calc(.7rem + env(safe-area-inset-bottom)); background: var(--navy); color: #fff; box-shadow: 0 -6px 24px rgba(0,0,0,.25); }
.sb-text { display: inline-flex; gap: .5rem; align-items: center; } .sb-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.savebar .btn-secondary { background: transparent; color: #fff; border-color: #3a5588; }
@media (max-width: 899px) { .savebar { left: 0; bottom: 56px; padding: .6rem .9rem; } .sb-text { font-size: .85rem; } }
.toast { position: fixed; left: 50%; bottom: 5.5rem; transform: translate(-50%, 160%); background: var(--ink); color: var(--bg); padding: .7rem 1rem; border-radius: 12px; max-width: calc(100vw - 2rem); opacity: 0; transition: transform .2s ease, opacity .2s ease; z-index: 200; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; } .toast.warn { background: var(--warn); color: #fff; } .toast.ok { background: var(--ok); color: #fff; }
@media (prefers-color-scheme: dark) { .toast.ok { color: #06210f; } .toast.warn { color: #1c1100; } }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

@media (max-width: 600px) {
  .two { grid-template-columns: 1fr; }
  .dlg { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 18px 18px 0 0; max-height: 94vh; } .dlg.wide { width: 100%; }
  .needs-grid { grid-template-columns: minmax(90px, 1.3fr) repeat(7, minmax(30px, 1fr)) 34px; gap: .2rem; } .ng-in { padding: .2rem 0; font-size: .85rem; }
  .ms-row { grid-template-columns: 1fr auto; } .ms-date { grid-column: 1 / -1; }
  .tb-title { min-width: 0; font-size: 1.1rem; } .hide-sm { display: none; }
  .quick .btn { min-width: 100%; }
}

/* ---------- print ---------- */
@media print {
  .side, .topbar, .tabbar, .savebar, .toolbar .tb-tools, .summary, .issue-panel, .toast, .skip { display: none !important; }
  .shell { display: block; } .main { padding: 0; } body { background: #fff; color: #000; }
  .grid-scroll { max-height: none; overflow: visible; border: 0; } .grid thead th, .grid th.who, .grid tfoot th, .grid tfoot td { position: static; }
  .grid { font-size: 9pt; } .cell-btn { min-height: 0; }
  @page { size: landscape; margin: 10mm; }
}
