/* Worker portal: phone first, one column, big tap targets. */
:root {
    --brand: #5b2be6; --brand-ink: #ffffff; --ink: #1b1430; --muted: #6c6580; --line: #e6e2ef;
    --bg: #f6f4fb; --card: #ffffff; --ok: #1d7a46; --bad: #b42318;
    --tabs-h: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
    font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1 { font-size: 1.5rem; margin: 4px 0 14px; }
h1:focus { outline: none; }
h2 { font-size: 1.05rem; margin: 18px 0 8px; }
.card h2 { margin-top: 0; }
a { color: var(--brand); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.ok { color: var(--ok); }
.error { color: var(--bad); }

.shell { min-height: 100vh; padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); }
.top { position: sticky; top: 0; z-index: 2; background: var(--brand); color: var(--brand-ink);
    padding: calc(12px + env(safe-area-inset-top)) 16px 12px; font-weight: 600; }
.content { max-width: 560px; margin: 0 auto; padding: 16px; }
.boot { padding: 40px; text-align: center; color: var(--muted); }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; background: var(--card);
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { flex: 1; height: var(--tabs-h); display: flex; align-items: center; justify-content: center;
    color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; }
.tabs a.active { color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
.tabs .badge { margin-left: 6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    background: var(--bad); color: #fff; font-size: .75rem; display: inline-flex; align-items: center; justify-content: center; }
.confirm .pending { padding: 10px 0; border-top: 1px solid var(--line); }
.confirm .pending:first-of-type { border-top: 0; padding-top: 0; }
.confirm .pending .row { margin-top: 8px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.card.notice { border-color: var(--brand); }
.card.past { opacity: .65; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.row .field { flex: 1; min-width: 130px; }

label { display: block; font-weight: 600; font-size: .9rem; margin: 12px 0 4px; }
input, select, textarea { width: 100%; font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px;
    border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
    font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.big { min-height: 56px; flex: 1; font-size: 1.05rem; }
.btn.wide { width: 100%; margin-top: 14px; }
.btn.link { border: 0; background: none; color: var(--brand); padding: 6px 0; min-height: 0; }
/* Text links stacked under a form, each on its own line. */
.btn.link + .btn.link, form + .btn.link, .btn.wide + .btn.link { display: flex; margin-top: 8px; }
.btn:disabled { opacity: .5; cursor: default; }

.shift .when { font-size: 1.15rem; font-weight: 700; }
.shift .where { margin-top: 2px; }
.day { color: var(--muted); font-size: .95rem; }
.day.past { opacity: .7; }
.chip { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
    background: var(--bg); color: var(--muted); vertical-align: middle; margin-left: 6px; }
.chip.good { background: #e5f4e4; color: var(--ok); }
.chip.bad { background: #fbebeb; color: var(--bad); }
.punches { list-style: none; padding: 0; margin: 10px 0 0; }
.punches li { display: flex; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.punches li span:first-child { font-weight: 600; min-width: 72px; }

/* Digital ID card: same layout as the printed one (CR80 proportions). */
.idcard { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 10px rgba(27, 20, 48, .12);
    aspect-ratio: 85.6 / 54; display: flex; flex-direction: column; margin-bottom: 8px; }
.idcard-band { background: var(--brand); color: #fff; display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; font-weight: 700; }
.idcard-tag { font-size: .7rem; letter-spacing: .08em; font-weight: 500; }
.idcard-body { flex: 1; display: flex; gap: 14px; padding: 12px 14px; align-items: flex-start; }
.idcard-body img, .idcard-nophoto { width: 30%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.idcard-nophoto { background: var(--bg); color: var(--muted); display: flex; align-items: center; justify-content: center;
    text-align: center; font-size: .8rem; }
.idcard-name { font-size: 1.25rem; font-weight: 800; line-height: 1.15; }
.idcard-label { color: var(--muted); font-size: .75rem; margin-top: 10px; }
.idcard-code { color: var(--brand); font-size: 1.3rem; font-weight: 800; }

.preview { width: 60%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; display: block; margin: 8px auto; }
.details { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 6px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; padding: 12px 16px;
    background: #fff4ce; box-shadow: 0 -1px 4px rgba(0, 0, 0, .15); }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }
