/* Colour tokens. Light by default; dark follows the device unless the user picks a theme (data-theme). */
:root {
  --bg: #f4f3f8; --card: #ffffff; --ink: #1d1d22; --muted: #6b6a75; --line: #e4e2ec;
  --brand: #8f4219; --brand-2: #b35a26; --brand-soft: #f6e9df;
  --panel: #25262c; --panel-2: #33343c; --panel-ink: #f4f3f8; --panel-muted: #a9a8b3;
  --nav-active: #e8e6f1; --chip: #eeedf4;
  --ok: #1e7a46; --ok-soft: #dff2e6; --bad: #b42318; --bad-soft: #fde4e1; --warn: #a15c00; --warn-soft: #fff1d6;
  --info: #1f5f99; --info-soft: #e1edf8;
  --radius: 16px; --shadow: 0 1px 2px rgba(20,18,40,.05), 0 6px 20px rgba(20,18,40,.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15151a; --card: #1e1f25; --ink: #f1f0f6; --muted: #a2a1ad; --line: #30313a;
    --brand: #e0915b; --brand-2: #efa877; --brand-soft: #3a2619;
    --panel: #0f1014; --panel-2: #23242b; --panel-ink: #f1f0f6; --panel-muted: #9f9eab;
    --nav-active: #2b2c35; --chip: #272830;
    --ok: #5ccf8b; --ok-soft: #173826; --bad: #ff7b6e; --bad-soft: #3d1a17; --warn: #f2b453; --warn-soft: #3a2c12;
    --info: #79b4ea; --info-soft: #162b40;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15151a; --card: #1e1f25; --ink: #f1f0f6; --muted: #a2a1ad; --line: #30313a;
  --brand: #e0915b; --brand-2: #efa877; --brand-soft: #3a2619;
  --panel: #0f1014; --panel-2: #23242b; --panel-ink: #f1f0f6; --panel-muted: #9f9eab;
  --nav-active: #2b2c35; --chip: #272830;
  --ok: #5ccf8b; --ok-soft: #173826; --bad: #ff7b6e; --bad-soft: #3d1a17; --warn: #f2b453; --warn-soft: #3a2c12;
  --info: #79b4ea; --info-soft: #162b40;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Sans Bengali", "Vrinda", system-ui, sans-serif; font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 16px 16px 90px; }

/* tiles */
.hello { margin: 4px 2px 14px; color: var(--muted); }
.hello b { color: var(--ink); font-size: 19px; display: block; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 12px; min-height: 108px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; font-weight: 600; cursor: pointer; box-shadow: var(--shadow); }
.tile .ic { font-size: 32px; line-height: 1; }
.tile.primary { background: var(--brand); color: #fff; border-color: var(--brand); grid-column: span 2; min-height: 92px; flex-direction: row; font-size: 18px; }
.tile:active { transform: scale(.98); }

/* cards & layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 10px; font-size: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 140px; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
h2.page { margin: 2px 2px 12px; font-size: 20px; }

/* form */
label.f { display: block; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
label.f > span { display: block; margin-bottom: 4px; font-weight: 600; }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); min-height: 46px; font-size: 16px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: 0; border-color: transparent; }
input.big { font-size: 26px; font-weight: 700; text-align: center; min-height: 60px; }
textarea { min-height: 70px; }
details { margin: 6px 0 10px; }
details summary { cursor: pointer; color: var(--brand); font-weight: 600; padding: 8px 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; padding: 10px 16px; min-height: 46px; background: var(--brand-soft); color: var(--brand); font-weight: 700; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.ok { background: var(--ok); color: #fff; }
.btn.bad { background: var(--bad-soft); color: var(--bad); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn.sm { min-height: 36px; padding: 6px 10px; font-size: 14px; border-radius: 9px; }
.btn.block { width: 100%; min-height: 56px; font-size: 18px; }
.btn:disabled { opacity: .5; }
.sticky-save { position: sticky; bottom: 0; padding: 10px 0 4px; background: linear-gradient(transparent, var(--bg) 30%); }

/* segmented choice */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1 1 auto; border: 1px solid var(--line); background: var(--card); padding: 10px 12px; border-radius: 10px; min-height: 46px; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* chips (worker picker) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 12px; min-height: 42px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.dim { opacity: .45; }
.chip small { opacity: .75; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(6, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 24px; }
.stat span { font-size: 12.5px; color: var(--muted); }
.stat.ok b { color: var(--ok); } .stat.bad b { color: var(--bad); } .stat.warn b { color: var(--warn); } .stat.info b { color: var(--info); }

/* lists */
.item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 8px; background: var(--card); }
.item .t { font-weight: 700; }
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--info-soft); color: var(--info); font-weight: 600; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.brand { background: var(--brand-soft); color: var(--brand); }
.bar { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.bar.low > i { background: var(--bad); } .bar.mid > i { background: var(--warn); }

/* attendance rows */
.att { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.att .who { flex: 1; min-width: 0; }
.att .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att .seg button { min-height: 42px; padding: 6px 10px; flex: 0 0 auto; font-size: 14px; }
.att .seg button.on.present { background: var(--ok); border-color: var(--ok); }
.att .seg button.on.absent { background: var(--bad); border-color: var(--bad); }
.att .seg button.on.leave { background: var(--warn); border-color: var(--warn); }

/* tables */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 8px; border-bottom: 1px solid var(--line); text-align: start; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; background: var(--bg); position: sticky; top: 0; }
td.num, th.num { text-align: end; font-variant-numeric: tabular-nums; }

/* toast & modal */
#toast { position: fixed; inset-inline: 12px; bottom: 18px; z-index: 100; display: flex; justify-content: center; pointer-events: none; }
#toast div { background: var(--ink); color: var(--bg); padding: 14px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.25); max-width: 520px; pointer-events: auto; }
#toast div.ok { background: var(--ok); color: #fff; } #toast div.bad { background: var(--bad); color: #fff; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--bg); width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 16px; }
@media (min-width: 700px) { .modal-bg { align-items: center; } .modal { border-radius: 18px; } }

/* login */
.login { max-width: 420px; margin: 6vh auto; padding: 0 16px; }
.login .logo { text-align: center; font-size: 46px; }
.login h1 { text-align: center; margin: 4px 0 18px; font-size: 22px; }
.langs { display: flex; gap: 8px; margin-bottom: 16px; }
.langs button { flex: 1; min-height: 50px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: 16px; cursor: pointer; }
.langs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 4px; }
.tabs button { flex: 0 0 auto; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; min-height: 40px; cursor: pointer; font-weight: 600; }
.tabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ===== sign-in: split screen ===== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--bg); }
@media (min-width: 900px) { .auth { grid-template-columns: 1.05fr 1fr; } }
.auth-brand { position: relative; overflow: hidden; background: var(--panel); color: var(--panel-ink); padding: 28px 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
.auth-brand::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(224,145,91,.28), transparent 70%); pointer-events: none; }
.auth-brand::after { content: ""; position: absolute; inset: auto auto -35% -25%; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(140,130,255,.16), transparent 70%); pointer-events: none; }
.auth-brand > * { position: relative; }
.auth-mark { width: 74px; height: 74px; }
@media (min-width: 900px) { .auth-mark { width: 120px; height: 120px; } .auth-brand { padding: 48px; gap: 16px; } }
.auth-company { font-size: 22px; font-weight: 800; letter-spacing: .2px; margin: 0; }
@media (min-width: 900px) { .auth-company { font-size: 34px; } }
.auth-company-en { color: var(--panel-muted); font-size: 13px; letter-spacing: 3px; text-transform: uppercase; }
.auth-tag { color: var(--panel-muted); font-size: 14px; max-width: 380px; }
.brand-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
.brand-chip { border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 700; letter-spacing: 1.5px; color: var(--panel-ink); background: rgba(255,255,255,.04); }
.auth-version { color: var(--panel-muted); font-size: 11px; opacity: .7; margin-top: 10px; display: none; }
@media (min-width: 900px) { .auth-version { display: block; } }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 26px 18px 40px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 26px; margin: 0 0 4px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.auth-langs { display: inline-flex; background: var(--chip); border-radius: 999px; padding: 4px; gap: 2px; margin-bottom: 22px; }
.auth-langs button { border: 0; background: transparent; border-radius: 999px; padding: 7px 14px; font-weight: 700; cursor: pointer; color: var(--muted); min-height: 36px; }
.auth-langs button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-inline-end: 48px; }
.pw-eye { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; cursor: pointer; font-size: 18px; padding: 8px; color: var(--muted); }
.auth-hint { color: var(--muted); font-size: 13px; text-align: center; margin-top: 14px; }
.auth-msg { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; font-size: 14px; }

/* ===== app layout: sidebar + top bar ===== */
.layout { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
@media (min-width: 1000px) { .layout { grid-template-columns: 260px 1fr; } }
.side { background: var(--card); border-inline-end: 1px solid var(--line); padding: 16px 12px; position: fixed; inset-block: 0; inset-inline-start: 0; width: 270px; z-index: 40;
  transform: translateX(105%); transition: transform .2s ease; overflow-y: auto; display: flex; flex-direction: column; }
[dir="ltr"] .side { transform: translateX(-105%); }
.side.open { transform: none !important; box-shadow: 0 0 40px rgba(0,0,0,.25); }
@media (min-width: 1000px) { .side { position: sticky; top: 0; height: 100vh; transform: none !important; width: auto; } .side .side-close { display: none; } }
.side-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 35; display: none; }
.side-scrim.show { display: block; }
@media (min-width: 1000px) { .side-scrim { display: none !important; } }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 16px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.side-brand svg { width: 38px; height: 38px; flex: none; }
.side-brand b { display: block; font-size: 15px; line-height: 1.2; }
.side-brand span { color: var(--muted); font-size: 12px; }
.nav-group { margin: 10px 0 4px; }
.nav-group > button { width: 100%; display: flex; justify-content: space-between; align-items: center; background: none; border: 0; color: var(--muted); font-size: 12.5px; font-weight: 700; padding: 6px 10px; cursor: pointer; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; margin: 2px 0; }
.nav-link .ni { width: 22px; text-align: center; font-size: 17px; }
.nav-link:hover { background: var(--chip); }
.nav-link.on { background: var(--nav-active); box-shadow: inset 3px 0 0 var(--brand); }
[dir="rtl"] .nav-link.on { box-shadow: inset -3px 0 0 var(--brand); }
.nav-link .cnt { margin-inline-start: auto; background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.side-foot { margin-top: auto; padding: 14px 10px 4px; color: var(--muted); font-size: 11.5px; }

.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.icon-btn { border: 1px solid var(--line); background: var(--card); color: var(--ink); width: 42px; height: 42px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative; font-size: 17px; flex: none; }
.icon-btn .dot { position: absolute; top: -4px; inset-inline-end: -4px; background: var(--bad); color: #fff; border-radius: 999px; font-size: 10.5px; min-width: 18px; height: 18px; padding: 0 5px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
@media (min-width: 1000px) { .menu-btn { display: none !important; } }
.page-title { font-weight: 800; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.search { flex: 1; max-width: 520px; position: relative; display: none; }
@media (min-width: 760px) { .search { display: block; } .search-btn { display: none !important; } }
.search input { min-height: 42px; border-radius: 999px; padding-inline-start: 40px; background: var(--card); }
.search .s-ic { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.spacer { flex: 1; }
@media (min-width: 760px) { .spacer { display: none; } }
.clock { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; display: none; }
@media (min-width: 600px) { .clock { display: block; } }
.user-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 6px; padding-inline-end: 12px; cursor: pointer; color: var(--ink); max-width: 210px; }
.user-chip b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: none; }
@media (min-width: 600px) { .user-chip b { display: block; } }
.avatar { width: 32px; height: 32px; border-radius: 999px; background: var(--panel); color: var(--panel-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: none; }
.avatar.lg { width: 54px; height: 54px; font-size: 22px; background: var(--panel-2); }

/* dropdown panels (user menu, notifications, search results) */
.pop { position: fixed; top: 64px; inset-inline-end: 12px; width: min(380px, calc(100vw - 24px)); max-height: calc(100vh - 80px); overflow-y: auto; background: var(--card);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px rgba(20,18,40,.18); z-index: 60; }
.pop-head { background: var(--panel); color: var(--panel-ink); padding: 18px; border-radius: 17px 17px 0 0; }
.pop-head .row1 { display: flex; align-items: center; gap: 12px; }
.pop-head b { font-size: 18px; display: block; }
.pop-head span { color: var(--panel-muted); font-size: 13px; }
.pop-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pop-chips span { background: var(--panel-2); color: var(--panel-ink); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.pop-chips span.light { background: var(--panel-ink); color: var(--panel); }
.pop-sec { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.pop-sec:last-child { border-bottom: 0; }
.pop-sec h4 { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stats div { background: var(--chip); border-radius: 12px; padding: 10px 6px; text-align: center; }
.mini-stats b { display: block; font-size: 20px; }
.mini-stats span { font-size: 11.5px; color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 14px; }
.kv span:first-child { color: var(--muted); }
.switch { position: relative; width: 46px; height: 26px; border-radius: 999px; background: var(--line); border: 0; cursor: pointer; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch.on { background: var(--brand); }
.switch.on::after { inset-inline-start: 23px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; }
.seg-sm { display: inline-flex; background: var(--chip); border-radius: 999px; padding: 3px; }
.seg-sm button { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; cursor: pointer; font-weight: 700; color: var(--muted); font-size: 13px; }
.seg-sm button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.pop-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 4px; background: none; border: 0; color: var(--ink); cursor: pointer; font-size: 15px; }
.pop-link.bad { color: var(--bad); }
.res-item { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.res-item:hover { background: var(--chip); }

.offline-bar { background: var(--warn-soft); color: var(--warn); font-weight: 700; font-size: 14px; padding: 8px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.offline-bar[hidden], #sync[hidden] { display: none; }

/* ===== home ===== */
.hero { background: var(--panel); color: var(--panel-ink); border-radius: 22px; padding: 20px; position: relative; overflow: hidden; margin-bottom: 14px; }
.hero::before { content: ""; position: absolute; inset: -60% auto auto -10%; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(closest-side, rgba(224,145,91,.25), transparent 70%); }
.hero > * { position: relative; }
.hero-top { display: flex; align-items: center; gap: 16px; }
.hero-logo { width: 74px; height: 74px; border-radius: 20px; border: 2px solid rgba(255,255,255,.75); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 22px; letter-spacing: 1px; flex: none; }
@media (min-width: 700px) { .hero-logo { width: 96px; height: 96px; font-size: 28px; } }
.hero small { color: var(--panel-muted); font-size: 12.5px; background: rgba(255,255,255,.08); padding: 3px 10px; border-radius: 999px; display: inline-block; }
.hero h2 { margin: 6px 0 4px; font-size: 30px; line-height: 1.1; }
@media (min-width: 700px) { .hero h2 { font-size: 40px; } }
.hero .greet { color: var(--panel-muted); font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero .greet b { color: var(--panel-ink); }
.hero .role { background: var(--panel-ink); color: var(--panel); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 800; }
.hero-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.hero-stat { background: var(--panel-2); border-radius: 14px; padding: 8px 14px; display: flex; align-items: center; gap: 10px; min-width: 96px; }
.hero-stat b { font-size: 20px; display: block; line-height: 1.1; }
.hero-stat span { font-size: 12px; color: var(--panel-muted); }
.hero-stat .hi { font-size: 18px; opacity: .85; }
.warn-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.warn-card h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 18px; }
.warn-card .wic { width: 36px; height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--warn-soft); color: var(--warn); }
.warn-card p.d { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; }
.alert-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; margin-top: 6px; font-size: 14px; }
.alert-row.bad { background: var(--bad-soft); color: var(--bad); }
.alert-row.warn { background: var(--warn-soft); color: var(--warn); }
.alert-row.info { background: var(--info-soft); color: var(--info); }
.alert-row.ok { background: var(--ok-soft); color: var(--ok); }
.home-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 1000px) { .home-grid { grid-template-columns: 1.4fr 1fr; } }
.qa { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .qa { grid-template-columns: repeat(3, 1fr); } }
.qa a { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; color: var(--ink); text-decoration: none; font-weight: 700; min-height: 64px; box-shadow: var(--shadow); }
.qa a .ni { font-size: 22px; }
.qa a.primary { background: var(--brand); color: #fff; border-color: var(--brand); grid-column: 1 / -1; justify-content: center; font-size: 17px; }

@media print {
  .side, .topbar, .side-scrim, .pop, .noprint, #toast { display: none !important; }
  .layout { display: block; }
  body { background: #fff; color: #000; } .card { box-shadow: none; break-inside: avoid; }
  th { position: static; }
}
