/* ===== Brand theme: taken from staffingnetwork.ca ===== */
:root {
  --brand: #242424;        /* Staffing Network charcoal (top bar) */
  --brand-ink: #161616;
  --red: #c01b2c;          /* Staffing Network red (logo, Apply Now button) */
  --red-ink: #9e1524;
  --brand-soft: #fbeaec;
  --accent: #c01b2c;
  --bg: #f3f5f9;
  --surface: #ffffff;
  --line: #e2e7ef;
  --text: #15202e;
  --muted: #5b6778;
  --ok: #157347;    --ok-bg: #e6f4ec;
  --warn: #9a5b00;  --warn-bg: #fff4e0;
  --bad: #b42318;   --bad-bg: #fdecea;
  --info: #3f5872;  --info-bg: #edf1f6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  font-family: "Open Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); font-size: 15px; line-height: 1.45; }
h1, h2, h3, .brand strong, .kpi .value, .btn-lg, .tab { font-family: "Poppins", "Open Sans", "Segoe UI", sans-serif; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 600; }
a { color: var(--red-ink); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

/* ===== Top bar / brand ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: #fff; color: var(--brand); padding: 8px 24px; border-top: 6px solid var(--brand);
  box-shadow: 0 1px 0 var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.logo { display: block; height: 58px; width: auto; }
.logo-lg { height: 84px; margin: 0 auto; }
.auth-brand { justify-content: center; }
.brand-tag {
  font-family: "Poppins", sans-serif; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.4px;
  color: var(--muted); border-left: 2px solid var(--line); padding-left: 12px;
}
.logo-box { background: #fff; border-radius: 12px; padding: 8px 12px !important; margin: 0 2px 14px; }
.logo-box .logo { height: 50px; }
.hero-strip { background: var(--red); color: #fff; text-align: center; font-size: 13px; font-weight: 600; padding: 7px 16px; letter-spacing: .3px; }
.brand strong { display: block; font-size: 17px; letter-spacing: .2px; }
.brand small { display: block; font-size: 12px; opacity: .8; text-transform: uppercase; letter-spacing: 1.2px; }
.clock { text-align: right; font-variant-numeric: tabular-nums; }
.clock b { display: block; font-size: 20px; }
.clock span { font-size: 12px; opacity: .8; }

/* ===== Buttons & inputs ===== */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 10px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { border-color: #c5cfdc; background: #f8fafc; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(192, 27, 44, .25); outline-offset: 1px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-ink); border-color: var(--red-ink); }
.btn-dark { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-dark:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(.92); background: var(--accent); }
.btn-blue { background: var(--red); border-color: var(--red); color: #fff; }
.btn-blue:hover { background: var(--red-ink); border-color: var(--red-ink); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #0f5c38; border-color: #0f5c38; }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-bg); border-color: #f3b8b2; }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 16px 18px; font-size: 17px; border-radius: 12px; }
.btn-block { width: 100%; }

label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: #2a3646; }
.field { margin-bottom: 14px; }
.field .hint { font-weight: 400; color: var(--muted); }
input[type=text], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: #fff;
  border: 1px solid #ccd5e1; border-radius: 10px; padding: 10px 12px;
}
input:focus, select:focus, textarea:focus { border-color: var(--red); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; margin: 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }

/* ===== Cards ===== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 16px; }
.card-body { padding: 16px 20px; }

/* ===== Status chips & alerts ===== */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
}
.chip::before { font-size: 11px; }
.chip-approved, .chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-approved::before, .chip-ok::before { content: "✓"; }
.chip-flagged, .chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-flagged::before, .chip-warn::before { content: "!"; font-weight: 800; }
.chip-blocked, .chip-rejected, .chip-block { background: var(--bad-bg); color: var(--bad); }
.chip-blocked::before, .chip-rejected::before, .chip-block::before { content: "✕"; }
.chip-info { background: var(--info-bg); color: var(--info); }
.chip-info::before { content: "i"; font-weight: 800; font-style: italic; }
.chip-onshift { background: #eef0f2; color: var(--brand); }
.chip-onshift::before { content: "●"; color: var(--ok); }
.chip-plain { background: #eef1f5; color: var(--muted); }

.alert { border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; border: 1px solid; }
.alert-error { background: var(--bad-bg); color: var(--bad); border-color: #f5c2bd; }
.alert-ok { background: var(--ok-bg); color: var(--ok); border-color: #b7dfc8; }
.alert-info { background: #f3f4f6; color: var(--brand); border-color: #dcdfe4; }

.checks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; padding: 8px 10px; border-radius: 9px; }
.checks li .ico { flex: 0 0 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; margin-top: 1px; }
.checks li.ok { background: var(--ok-bg); } .checks li.ok .ico { background: var(--ok); }
.checks li.warn { background: var(--warn-bg); } .checks li.warn .ico { background: #c27c0e; }
.checks li.block { background: var(--bad-bg); } .checks li.block .ico { background: var(--bad); }
.checks li.info { background: var(--info-bg); } .checks li.info .ico { background: var(--info); }

/* ===== Employee page ===== */
.emp-wrap { max-width: 560px; margin: 28px auto 40px; padding: 0 16px; }
.emp-wrap h1 { font-size: 24px; margin-bottom: 4px; }
.step { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
.step-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.num-badge { width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 13px; flex: 0 0 24px; }
.shift-banner { display: flex; gap: 10px; align-items: center; background: #eef1f5; color: var(--muted); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600; margin-top: 14px; }
.shift-banner.on { background: var(--ok-bg); color: var(--ok); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.actions .btn.suggested { box-shadow: 0 0 0 3px rgba(192, 27, 44, .3); }
.actions .btn:disabled { opacity: .35; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #e4e9f0; padding: 5px; border-radius: 12px; margin-bottom: 14px; }
.tab { appearance: none; border: 0; background: transparent; padding: 10px; border-radius: 9px; font-size: 14.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tab.active { background: #fff; color: var(--red); box-shadow: 0 1px 3px rgba(16, 24, 40, .1); }
.modal-wide { width: min(980px, 100%); }
.upcoming { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #f6f6f6; }
.upcoming-head { font: 600 13px Poppins, sans-serif; text-transform: uppercase; letter-spacing: .04em; color: #555; margin-bottom: 6px; }
.upcoming ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 15px; }
.upcoming li::before { content: "📅 "; }
.regular { color: #8a8a8a; font-weight: 400; }
.oneoff { color: #1d1d1d; font-weight: 700; }
.upcoming li.none { color: #777; }
.grow.regular .title, .grow.regular .meta { color: #8a8a8a; font-weight: 400; }
.grow.oneoff .title { font-weight: 800; }
.grow.oneoff .meta { color: #1d1d1d; font-weight: 700; }
.upcoming li.none::before { content: ""; }
.offers { margin-top: 14px; border: 2px solid var(--red); border-radius: 12px; padding: 12px; display: grid; gap: 10px; }
.offers-head { font: 600 14px Poppins, sans-serif; }
.offer { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.mode-toggle { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 6px; }
.mode-toggle label { display: block; padding: 10px; text-align: center; cursor: pointer; font-weight: 600; font-size: 14px; }
.mode-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.mode-toggle label:has(input:checked) { background: var(--brand); color: #fff; }
.mode-toggle label:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: -2px; }
.match-note { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #f4f4f4; font-size: 14px; }
.linkish { background: none; border: 0; padding: 0; color: var(--red-ink); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.off-confirm { margin: 0 0 14px; padding: 14px; border-radius: 12px; background: var(--warn-bg); color: var(--text); display: grid; gap: 8px; text-align: left; font-size: 14px; border: 1px solid #f0d49b; }
.off-confirm b:first-child { color: var(--warn); font-size: 15px; }
.leave-alert { margin: 14px 0 4px; padding: 14px; border-radius: 12px; background: var(--red); color: #fff; display: grid; gap: 4px; text-align: left; animation: pulse 1.6s ease-in-out infinite; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed-day { position: sticky; top: 0; z-index: 1; background: #f6f6f6; border-bottom: 1px solid var(--line); padding: 8px 18px; font: 600 12px/1.4 Poppins, sans-serif; text-transform: uppercase; letter-spacing: .04em; color: #555; }
.feed-item { display: grid; grid-template-columns: 62px 34px 1fr auto; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.feed-item:hover { background: #fafafa; }
.feed-item .t { font-variant-numeric: tabular-nums; font-size: 13px; color: #666; }
.feed-item .ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; background: #eef7f0; }
.feed-item .what b { display: block; }
.feed-item .what .meta { font-size: 13px; color: #666; }
.feed-item.sus { background: #fff8e6; border-left: 4px solid #e0a100; }
.feed-item.sus .ico { background: #ffefc2; }
.feed-item.bad { background: #fdecee; border-left: 4px solid var(--red); }
.feed-item.bad .ico { background: #f9d3d8; }
.feed-item.done { opacity: .7; }
.feed-more { padding: 18px; text-align: center; color: #777; font-size: 14px; }
.seg-tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.seg-tabs button { border: 0; background: none; padding: 9px 14px; font: 600 14px 'Open Sans', sans-serif; cursor: pointer; color: #444; }
.seg-tabs button.active { background: var(--brand); color: #fff; }
@media (max-width: 640px) { .feed-item { grid-template-columns: 52px 1fr auto; } .feed-item .ico { display: none; } }
.alert.banner { display: block; text-decoration: none; }
.day-card { margin-bottom: 12px; }
.day-card.today { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), var(--shadow); }
.big-input { font-size: 19px !important; padding: 14px 14px !important; }
.code-input { text-transform: uppercase; letter-spacing: 4px; font-weight: 700; font-family: Consolas, "Courier New", monospace !important; }
.btn.back { margin-top: 10px; background: transparent; border-color: transparent; color: var(--muted); font-weight: 600; }
.btn.back:hover { color: var(--text); background: #eef0f3; }
.upper { text-transform: uppercase; letter-spacing: 1.4px; font-weight: 700; }
.suggest-name { font-family: "Poppins", sans-serif; font-size: 26px; font-weight: 600; margin: 14px 0 20px; color: var(--red-ink); }
.onshift { text-align: center; position: relative; }
.onshift h1 { font-size: 24px; margin-top: 2px; }
.live-dot { position: absolute; top: 22px; right: 22px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(21, 115, 71, .5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(21, 115, 71, .5); } 70% { box-shadow: 0 0 0 12px rgba(21, 115, 71, 0); } 100% { box-shadow: 0 0 0 0 rgba(21, 115, 71, 0); } }
.timer { font-family: "Poppins", sans-serif; font-size: 54px; font-weight: 600; letter-spacing: 1px; margin: 10px 0 2px; color: var(--brand); }
.loc-pill { display: block; margin: 18px 0; padding: 11px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; background: #eef0f3; color: var(--muted); }
.loc-pill.ok { background: var(--ok-bg); color: var(--ok); }
.loc-pill.warn { background: var(--warn-bg); color: var(--warn); }
.loc-pill.bad { background: var(--bad-bg); color: var(--bad); }
tr.flag td { background: #fff8ec; }
tr.flag.bad td { background: #fff1f0; }
.range-tabs { display: inline-flex; gap: 4px; background: #e4e9f0; padding: 4px; border-radius: 10px; }
.range-tabs button { border: 0; background: transparent; padding: 7px 12px; border-radius: 7px; font: inherit; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.range-tabs button.active { background: #fff; color: var(--red); box-shadow: 0 1px 3px rgba(16, 24, 40, .1); }
.suggest-list { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.suggest-list li button { width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: #fff; padding: 10px 12px; font: inherit; cursor: pointer; }
.suggest-list li:last-child button { border-bottom: 0; }
.suggest-list li button:hover { background: var(--brand-soft); }
.suggest-head { font-size: 13px; font-weight: 700; color: var(--red-ink); margin-top: 8px; }
.picked { margin-top: 8px; font-size: 13px; }
.state-on { color: var(--ok); } .state-late, .state-missed { color: var(--bad); } .state-upcoming { color: var(--muted); } .state-done { color: var(--info); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg-btn {
  flex: 1 1 140px; appearance: none; border: 2px solid var(--line); background: #fff; border-radius: 10px;
  padding: 11px 10px; font: inherit; font-weight: 600; font-size: 14px; color: var(--text); cursor: pointer;
}
.seg-btn:hover { border-color: #c5cdd8; }
.seg-btn.active { border-color: var(--red); background: var(--brand-soft); color: var(--red-ink); }
.seg-btn:disabled:not(.active) { opacity: .4; cursor: not-allowed; }
.who { display: flex; align-items: center; gap: 14px; }
.who h1 { font-size: 22px; margin: 0; }
.avatar-lg { width: 48px; height: 48px; flex: 0 0 48px; font-size: 17px; background: var(--red); color: #fff; }
.pin-input { letter-spacing: 6px; font-size: 20px !important; font-weight: 700; }
.consent { font-size: 12.5px; color: var(--muted); margin: 16px 0 0; }
.foot { text-align: center; font-size: 12px; color: var(--muted); padding: 0 16px 28px; }
.foot a { color: var(--muted); }

.result { text-align: center; }
.result-icon { width: 72px; height: 72px; border-radius: 50%; margin: 4px auto 14px; display: grid; place-items: center; font-size: 34px; color: #fff; font-weight: 800; }
.result-icon.approved { background: var(--ok); }
.result-icon.flagged { background: #c27c0e; }
.result-icon.blocked { background: var(--bad); }
.result-icon.pending { background: var(--brand); font-size: 30px; }

/* profile requests / PINs / security log */
.req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.req-card .card-head { align-items: flex-start; }
.req-card .reasons { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--warn); }
.verdict { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; font-weight: 700; margin-bottom: 12px; }
.verdict.fine { background: var(--ok-bg); color: var(--ok); }
.verdict.check { background: var(--warn-bg); color: var(--warn); }
.verdict.risky { background: var(--bad-bg); color: var(--bad); }
.pin { font-family: Consolas, "Courier New", monospace; font-weight: 700; letter-spacing: 2px; font-size: 14px; }
.sev { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.sev-info { background: #9aa8b8; } .sev-warn { background: #d08a12; } .sev-critical { background: var(--bad); }
tr.unreviewed td { background: #fffaf0; }
tr.unreviewed.critical td { background: #fff3f2; }
.result h2 { font-size: 22px; margin-bottom: 6px; }
.result .checks { text-align: left; margin: 18px 0; }

.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Admin layout ===== */
.admin-shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: var(--brand); color: #fff; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { padding: 4px 8px 18px; }
.nav a {
  display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .82); text-decoration: none;
  padding: 9px 12px; border-radius: 9px; font-weight: 600; font-size: 14px;
}
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a.active { background: var(--red); color: #fff; }
.nav a.active .badge { background: #fff; color: var(--red); }
.nav a .badge { margin-left: auto; background: var(--accent); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.nav-sep { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; opacity: .55; padding: 14px 12px 4px; }
.sidebar-foot { margin-top: auto; font-size: 13px; padding: 12px; border-top: 1px solid rgba(255, 255, 255, .15); }
.sidebar-foot b { display: block; }
.sidebar-foot .btn { margin-top: 10px; width: 100%; background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.sidebar-foot .btn:hover { background: rgba(255, 255, 255, .1); }

.main { padding: 26px 30px 50px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; }
.kpi .label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .value { font-size: 30px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi.attention .value { color: var(--warn); }

.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-bottom: 18px; }
.grid-2e { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }

/* bar chart */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: #edf0f4; }
.chart .axis text { fill: var(--muted); font-size: 11px; }
.chart .bar { fill: var(--red); }
.chart .bar.today { fill: var(--brand); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar, .chart g.col:hover .bar { filter: brightness(1.25); }
.tooltip {
  position: absolute; pointer-events: none; background: #15202e; color: #fff; font-size: 12px; padding: 6px 9px;
  border-radius: 7px; white-space: nowrap; transform: translate(-50%, -110%); box-shadow: var(--shadow);
}
.hbar-list { display: grid; gap: 10px; }
.hbar-row { display: grid; grid-template-columns: 130px 1fr 60px; gap: 10px; align-items: center; font-size: 13.5px; }
.hbar-row .track { height: 10px; background: #edf0f4; border-radius: 999px; overflow: hidden; }
.hbar-row .fill { height: 100%; background: var(--red); border-radius: 999px; }
.hbar-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-row .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* lists & tables */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; }
.list .meta { font-size: 12.5px; color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--red-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: 0 0 34px; }
.empty { padding: 26px 20px; text-align: center; color: var(--muted); font-size: 14px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfd; white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcff; }
tr.clickable { cursor: pointer; }
td .sub { display: block; font-size: 12px; color: var(--muted); }
td.right, th.right { text-align: right; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.issue-list { display: flex; flex-wrap: wrap; gap: 4px; max-width: 280px; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.filters .f { min-width: 130px; }
.filters .f.grow { flex: 1; min-width: 180px; }
.filters label { font-size: 12px; margin-bottom: 4px; }
.filters input, .filters select { padding: 8px 10px; }

.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { margin: 0; flex: 1; min-width: 160px; }

.settings-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.settings-row:last-child { border-bottom: 0; }
.settings-row .desc { font-size: 13px; color: var(--muted); margin-top: 2px; }
.settings-row input[type=number], .settings-row select, .settings-row input[type=text] { width: 220px; }

/* toggle */
.switch { position: relative; width: 44px; height: 24px; flex: 0 0 44px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #c9d2de; border-radius: 999px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid rgba(192, 27, 44, .25); }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(15, 23, 35, .45); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal { width: min(640px, 100%); max-height: 90vh; overflow: auto; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

/* auth screen */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, var(--brand) 0%, var(--brand-ink) 55%, var(--bg) 55.1%); }
.auth-card { width: min(400px, 100%); }
.auth-card .brand { color: var(--red); margin-bottom: 18px; }

.version-badge {
  position: fixed; right: 12px; bottom: 10px; z-index: 40; pointer-events: none;
  background: rgba(36, 36, 36, .82); color: #fff; font: 600 11px/1 "Poppins", sans-serif; letter-spacing: .6px;
  padding: 5px 9px; border-radius: 999px;
}
.version-badge.old { background: var(--bad); font-size: 12px; padding: 7px 11px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #15202e; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow); z-index: 60; }
.toast.error { background: var(--bad); }

@media (max-width: 960px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .sidebar .brand { padding: 4px 8px; }
  .logo-box { margin: 0 8px 0 0; }
  .logo-box .logo { height: 40px; }
  .nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .nav-sep { display: none; }
  .sidebar-foot { margin: 0 0 0 auto; border: 0; display: flex; align-items: center; gap: 10px; }
  .sidebar-foot .btn { margin: 0; width: auto; }
  .grid-2, .grid-2e { grid-template-columns: 1fr; }
  .main { padding: 20px 16px 40px; }
}
@media (max-width: 520px) {
  .grid2 { grid-template-columns: 1fr; }
  .topbar { padding: 6px 14px; }
  .logo { height: 46px; }
  .topbar .brand-tag { display: none; }
  .clock b { font-size: 17px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .settings-row { flex-direction: column; align-items: flex-start; }
  .settings-row input[type=number], .settings-row select, .settings-row input[type=text] { width: 100%; }
}

/* v3.1: on time (green) / late (red) dots on the dashboard */
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot-ontime { background: #1f9d55; }
.dot-late { background: #d92d20; }
.dot-space { display: inline-block; width: 12px; flex: none; }
.name-dot { display: inline-flex; align-items: center; gap: 10px; }
.legend-card { display: grid; gap: 10px; }
.legend-row { display: grid; grid-template-columns: 12px 150px 1fr auto; align-items: center; gap: 12px; font-size: 14px; }
.legend-row .cnt { font-size: 16px; }
.res-ontime { color: var(--ok); font-weight: 600; }
.res-late, .res-missing { color: var(--bad); font-weight: 600; }
.day-table td { vertical-align: middle; }
@media (max-width: 520px) { .legend-row { grid-template-columns: 12px 1fr auto; } .legend-row .muted { grid-column: 2 / 4; grid-row: 2; } }

/* v3.2: assign shifts (calendar, time picker, people) */
.week-nav { margin: 0 0 16px; }
.assign section { padding: 0 0 18px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.assign h3 { font-size: 15px; margin: 0 0 10px; }
.assign select, .assign input[type=text], .assign input[type=search] { width: 100%; }
.assign .inline-form input[type=search] { width: auto; flex: 1; min-width: 160px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; max-height: 240px; overflow: auto; }
.person { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; }
.person:has(input:checked) { border-color: var(--red); background: #fff5f5; font-weight: 600; }
.person[hidden] { display: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; max-width: 420px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-width: 420px; }
.cal-wd { text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; padding: 2px 0; }
.cal-d { aspect-ratio: 1; border: 1px solid var(--line); background: #fff; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; }
.cal-d:hover:not(:disabled) { border-color: var(--red); }
.cal-d.today { box-shadow: inset 0 0 0 2px #15202e; }
.cal-d.on { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.cal-d:disabled { opacity: .35; cursor: default; }
.wd-row { display: flex; flex-wrap: wrap; gap: 6px; }
.wd { min-width: 56px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.wd.on { background: var(--red); border-color: var(--red); color: #fff; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip-btn { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.chip-btn:hover { border-color: var(--red); color: var(--red-ink); }
.tp-pair { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.tp-arrow { font-size: 22px; color: var(--muted); padding-bottom: 10px; }
.tp { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.tp-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.tp-row { display: flex; align-items: flex-end; gap: 8px; }
.tp-box { display: grid; gap: 2px; }
.tp-box span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.assign .tp-box select { width: 74px; font-size: 18px; font-weight: 600; padding: 6px 8px; }
.tp-colon { font-size: 22px; padding-bottom: 6px; }
.tp-ap { margin-left: 4px; }
.assign-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.assign-foot #asSummary { font-weight: 600; }
.assign .action-tabs { margin-bottom: 18px; }
.assign .action-tabs button { font-size: 15px; padding: 9px 16px; }
.confirm-panel { margin-top: 14px; padding: 14px 16px; border: 2px solid var(--bad); background: var(--bad-bg); border-radius: 12px; }