/* Darba galds. Layout: sticky top bar with role-dependent tabs; one working surface per tab. Worker view is phone-first: one big status card. */
:root {
  --bg: #f3f5f8; --surface: #ffffff; --surface-2: #e9edf3; --line: #d5dbe4;
  --fg: #172030; --muted: #5a6578; --accent: #2a4f96; --accent-fg: #ffffff; --accent-soft: #dfe7f7;
  --ok: #2e7d4f; --warn: #a96a07; --bad: #b3372f; --ok-soft: #dcefe3; --warn-soft: #f6ead2; --bad-soft: #f6dedb;
  --p0: #3a6ea5; --p1: #c0603a; --p2: #3f8f5a; --p3: #8a5cb8; --p4: #a87d1f; --p5: #2a8686; --p6: #b84a72; --p7: #667085;
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r: 8px; --shadow: 0 1px 2px rgb(20 30 50 / .06), 0 4px 14px rgb(20 30 50 / .06);
  color-scheme: light;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #10141b; --surface: #181e27; --surface-2: #212834; --line: #2d3644;
  --fg: #e5e9f0; --muted: #96a1b3; --accent: #8db0f2; --accent-fg: #0f1a2e; --accent-soft: #23314b;
  --ok: #6cc991; --warn: #e2ad4f; --bad: #ef8a80; --ok-soft: #1c3427; --warn-soft: #3a2f19; --bad-soft: #3d2220;
  --p0: #74a3dc; --p1: #e48b64; --p2: #6fc08a; --p3: #b38ce0; --p4: #d8b04f; --p5: #5fc0c0; --p6: #e47ea3; --p7: #9aa3b2;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 4px 14px rgb(0 0 0 / .25); color-scheme: dark; } }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 15px; line-height: 1.45; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font-family: var(--f-display); font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-family: var(--f-display); font-size: 1.15rem; font-weight: 600; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num, .mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: .88em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.label { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }

/* test environment marker */
.env-banner { background: repeating-linear-gradient(-45deg, var(--warn) 0 14px, color-mix(in srgb, var(--warn) 82%, var(--fg)) 14px 28px); color: var(--surface); font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-align: center; padding: 4px max(16px, env(safe-area-inset-right, 0px)) 4px max(16px, env(safe-area-inset-left, 0px)); }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in, .wrap { max-width: 1320px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.top-in { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.brand-mark { width: 26px; height: 26px; border-radius: 6px; background: var(--accent); display: grid; place-items: center; }
.brand-mark svg { width: 16px; height: 16px; }
.tabs { display: flex; gap: 2px; flex: 1; overflow-x: auto; min-width: 0; scrollbar-width: none; }
.tab { border: 0; background: none; padding: 8px 12px; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tab:hover { background: var(--surface-2); color: var(--fg); }
.tab[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.top-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.whoami { font-weight: 600; font-size: .9rem; }
.lang { padding: 4px 6px; font-size: .85rem; font-weight: 600; border-radius: 6px; cursor: pointer; }
@media (max-width: 640px) { .tabs { order: 3; flex-basis: 100%; } .top-right { margin-left: auto; } }

.wrap { padding-block: 22px 60px; display: flex; flex-direction: column; gap: 18px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar h1 { margin-right: auto; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.panel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-head h2 { margin-right: auto; }
.cols-2 { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.cols-even { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 18px; align-items: start; }
@media (max-width: 860px) { .cols-2 { grid-template-columns: minmax(0, 1fr); } }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 7px 12px; border-radius: 6px; cursor: pointer; font-weight: 500; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.go { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.btn.stop { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.btn.danger { color: var(--bad); }
.btn.danger.armed { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.btn.ghost { border-color: transparent; background: none; }
.btn.sm { padding: 3px 8px; font-size: .85rem; }
.btn.lg { padding: 14px 20px; font-size: 1.05rem; font-weight: 600; border-radius: 8px; white-space: normal; }
.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; min-width: 0; font-size: 16px; }
input[readonly] { background: var(--surface-2); }
textarea { resize: vertical; min-height: 64px; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > span { font-size: .8rem; font-weight: 600; color: var(--muted); }
.field.check { flex-direction: row; align-items: center; gap: 8px; }
.field.check > span { font-weight: 500; color: var(--fg); font-size: .9rem; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: 6px 12px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; max-height: 220px; overflow-y: auto; }
.check-item { display: flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; min-width: 0; }
.check-item span { overflow-wrap: anywhere; }
.geo-map { height: 260px; margin: 8px 0; border: 1px solid var(--line, #d6dbe3); border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--surface-2, #eef1f5); position: relative; z-index: 0; }
.geo-map.leaflet-container { display: block; }
.photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 8px; }
.ph { position: relative; display: block; }
.ph img { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line, #d6dbe3); background: var(--surface-2, #eef1f5); }
.ph-x { position: absolute; top: 3px; right: 3px; border: 0; border-radius: 4px; background: rgb(0 0 0 / .6); color: #fff; font-size: .75rem; padding: 2px 6px; cursor: pointer; }
.ph-x.armed { background: #c0392b; }
.photo-add { cursor: pointer; }
/* hours added by hand or corrected after check-in */
td.b { font-weight: 700; }
td.edited, td.edited.zero, .num.edited, span.edited { color: #c62828 !important; font-weight: 700; }
td.edited { background: rgb(198 40 40 / .08); cursor: help; }
.edited-note { color: #c62828; }
.neg { color: #c62828; }
.search-row { margin: 4px 0 8px; }
.search-row input, .checks-q { width: 100%; padding: 8px 10px; border: 1px solid var(--line, #d6dbe3); border-radius: 8px; font: inherit; background: var(--surface, #fff); color: inherit; }
.checks-tools { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 4px 0 6px; }
.checks-tools .checks-q { flex: 1 1 200px; width: auto; }
.check-item[hidden] { display: none !important; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.obj-row { flex-wrap: wrap; }
.obj-people { flex-basis: 100%; margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--line, #d6dbe3); display: flex; flex-direction: column; gap: 6px; }
.obj-person { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.login-nudge { margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (prefers-color-scheme: dark) { td.edited, td.edited.zero, .num.edited, span.edited, .edited-note { color: #ff6b6b !important; } td.edited { background: rgb(255 107 107 / .12); } }
.form-sep { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.form-actions .spacer { flex: 1; }
@media (max-width: 480px) { .form { grid-template-columns: 1fr; } }
.weeknav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.weeknav .wk { font-weight: 600; min-width: 170px; text-align: center; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c, var(--p7)) 16%, transparent); color: var(--c, var(--p7)); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--p7)); flex: none; display: inline-block; }
.pill { font-size: .72rem; font-weight: 600; padding: 1px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.pill.high, .pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.mid, .pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.low { background: var(--surface-2); color: var(--muted); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.sample { background: var(--accent-soft); color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: .75rem; padding: 1px 7px; border-radius: 4px; background: var(--surface-2); color: var(--muted); }

/* board */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .board { grid-template-columns: minmax(0, 1fr); } }
/* notifications + processes */
.bell { position: relative; padding: 4px 8px; }
.bell svg { width: 18px; height: 18px; display: block; }
.bell .badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: var(--surface); font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.notif { display: flex; gap: 10px; padding: 10px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 6px; }
.notif:hover { background: var(--surface-2); }
.notif.unread b { color: var(--accent); }
.notif .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.flows { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 14px; }
.flow { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.flow h3 { font-size: 1.02rem; overflow-wrap: anywhere; }
.steps { display: flex; flex-wrap: wrap; gap: 4px; }
.step { font-size: .75rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step.todo, .step.doing { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.step.review { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); font-weight: 600; }
.step.done { border-color: transparent; color: var(--ok); background: var(--ok-soft); }
.step-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.step-row .n { font-family: var(--f-mono); color: var(--muted); min-width: 22px; }
.step-row .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.col { background: var(--surface-2); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.col.drop { outline: 2px dashed var(--accent); outline-offset: -2px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; }
.col-head h2 { font-size: 1rem; }
.col-head .count { margin-left: auto; color: var(--muted); }
.col-head .bar { width: 10px; height: 10px; border-radius: 3px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; cursor: pointer; box-shadow: var(--shadow); }
.card:hover { border-color: var(--accent); }
.card.done h3 { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.card h3 { font-family: var(--f-body); font-size: .97rem; font-weight: 600; overflow-wrap: anywhere; }
.card-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .84rem; }
.card-row .grow { flex: 1; min-width: 0; }
.due { color: var(--muted); }
.due.over { color: var(--bad); font-weight: 600; }
.due.soon { color: var(--warn); font-weight: 600; }
.meter { height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; flex: 1; min-width: 60px; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.meter.over > span { background: var(--bad); }
.more-done { align-self: center; }

/* tables */
.scroll { overflow-x: auto; min-width: 0; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: 7px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; white-space: nowrap; }
td.n, th.n { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.total td { font-weight: 600; border-top: 2px solid var(--line); border-bottom: 0; }
th.today, td.today { background: var(--accent-soft); }
td.zero { color: var(--line); }
.over-cell { color: var(--bad); font-weight: 600; }

/* plan grid */
.plan { display: grid; grid-template-columns: 170px repeat(7, minmax(118px, 1fr)); min-width: 1000px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.plan.single { grid-template-columns: repeat(7, minmax(118px, 1fr)); min-width: 840px; }
.plan > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px; min-width: 0; }
.plan .ph { background: var(--surface-2); font-size: .8rem; font-weight: 600; display: flex; justify-content: space-between; gap: 6px; }
.plan .ph.today { background: var(--accent-soft); color: var(--accent); }
.plan .ph.wkend, .plan .cell.wkend { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.plan .who { display: flex; flex-direction: column; gap: 6px; }
.plan .who strong { font-weight: 600; overflow-wrap: anywhere; }
.cell { display: flex; flex-direction: column; gap: 5px; min-height: 92px; }
.cell.today { background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.item { border: 0; border-left: 3px solid var(--c, var(--p7)); background: color-mix(in srgb, var(--c, var(--p7)) 10%, var(--surface)); border-radius: 4px; padding: 4px 6px; font-size: .8rem; cursor: pointer; display: flex; flex-direction: column; text-align: left; width: 100%; }
.item b { font-weight: 600; overflow-wrap: anywhere; }
.item .mono { color: var(--muted); }
.cell-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: .75rem; }
.add-item { border: 1px dashed var(--line); background: none; border-radius: 4px; width: 24px; height: 22px; cursor: pointer; color: var(--muted); line-height: 1; }
.add-item:hover { border-color: var(--accent); color: var(--accent); }
.load { font-family: var(--f-mono); font-size: .75rem; color: var(--muted); }
.load.over { color: var(--bad); font-weight: 600; }
.load.full { color: var(--ok); }
.cap { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.cap > span { display: block; height: 100%; background: var(--ok); }
.cap.over > span { background: var(--bad); }

/* report */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile .big { font-family: var(--f-display); font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; overflow-wrap: anywhere; }
.tile.bad .big { color: var(--bad); }
.tile.ok .big { color: var(--ok); }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 90px; gap: 10px; align-items: center; font-size: .88rem; }
.bar-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack { display: flex; height: 16px; border-radius: 4px; overflow: hidden; background: var(--surface-2); position: relative; }
.stack > i { display: block; height: 100%; background: var(--c); }
.stack .norm { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--fg); opacity: .55; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 520px) { .bar-row { grid-template-columns: 90px minmax(0, 1fr) 70px; } }

/* lists */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* presence + worker */
.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.site { border: 1px solid var(--line); border-top: 4px solid var(--c, var(--p7)); border-radius: var(--r); padding: 12px 14px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.site h3 { font-size: 1rem; overflow-wrap: anywhere; }
.person { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.person .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; display: inline-block; }
.live.travel { background: var(--warn); }
@media (prefers-reduced-motion: no-preference) { .live { animation: pulse 2s ease-in-out infinite; } @keyframes pulse { 50% { opacity: .35; } } }
.status { border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.status.working { background: var(--ok-soft); border-color: transparent; }
.status.travel { background: var(--warn-soft); border-color: transparent; }
.status h2 { font-size: 1.5rem; overflow-wrap: anywhere; }
.status .state { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.status.working .state { color: var(--ok); }
.status.travel .state { color: var(--warn); }
.bigclock { font-family: var(--f-mono); font-size: clamp(2.2rem, 9vw, 3.4rem); font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1; }
.status-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.status-actions > * { flex: 1 1 200px; }
.obj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 10px; }
.obj-btn { border: 1px solid var(--line); border-left: 5px solid var(--c, var(--p7)); background: var(--surface); border-radius: 8px; padding: 14px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.obj-btn:hover { border-color: var(--ok); border-left-color: var(--c, var(--p7)); background: var(--ok-soft); }
.obj-btn b { font-size: 1.02rem; overflow-wrap: anywhere; }
.obj-btn .go-lbl { color: var(--ok); font-weight: 600; font-size: .85rem; margin-top: 4px; }
.travel-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.travel-row select { flex: 1 1 180px; }
.invite-box { background: var(--surface-2); border-radius: 6px; padding: 12px; font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; }

/* auth */
.auth { max-width: 460px; margin: 6vh auto 0; width: 100%; }
.code-input { font-family: var(--f-mono); font-size: 1.6rem; letter-spacing: .4em; text-align: center; }

/* states */
.empty { border: 1px dashed var(--line); border-radius: var(--r); padding: 26px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; background: var(--surface); }
.empty ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.empty-sm { color: var(--muted); font-size: .88rem; padding: 6px 4px; }
.banner { background: var(--warn-soft); color: var(--warn); border-radius: var(--r); padding: 10px 14px; font-weight: 500; }
.note { background: var(--accent-soft); color: var(--fg); border-radius: 6px; padding: 10px 12px; font-size: .88rem; }
.err { color: var(--bad); font-size: .9rem; }
body.worker [data-admin] { display: none !important; }

/* modal + toast */
.scrim { position: fixed; inset: 0; background: rgb(10 15 25 / .45); z-index: 50; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.modal { background: var(--surface); border-radius: 10px; width: min(580px, 100%); max-height: 100%; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 20px 60px rgb(0 0 0 / .3); }
.modal-head { display: flex; align-items: center; gap: 10px; }
.modal-head h2 { margin-right: auto; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--fg); color: var(--bg); padding: 9px 16px; border-radius: 6px; z-index: 60; font-weight: 500; max-width: calc(100% - 32px); }
@media (prefers-reduced-motion: no-preference) { .toast { animation: rise .18s ease-out; } @keyframes rise { from { transform: translate(-50%, 8px); opacity: 0; } } }
