/* IndusTrack — single stylesheet (web + Android app WebView) */
:root {
  --brand: #0a2a6b;
  --brand-2: #1d5fd1;
  --brand-3: #3b82f6;
  --accent: #f59e0b;
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f7f9fd;
  --text: #0f1b33;
  --muted: #5a6a85;
  --line: #e3e9f3;
  --green: #15803d; --green-bg: #dcfce7;
  --red: #b91c1c;   --red-bg: #fee2e2;
  --amber: #b45309; --amber-bg: #fef3c7;
  --blue: #1d4ed8;  --blue-bg: #dbeafe;
  --gray: #4b5563;  --gray-bg: #eef2f8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(10,27,61, .06), 0 4px 16px rgba(10,27,61, .05);
  --nav-w: 248px;
  --top-h: 58px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1222; --surface: #111b30; --surface-2: #16223a; --text: #e6edf8; --muted: #97a6c2; --line: #24324d;
    --green-bg: #12301f; --red-bg: #3a1414; --amber-bg: #33260c; --blue-bg: #13213f; --gray-bg: #1c2840;
    --green: #4ade80; --red: #f87171; --amber: #fbbf24; --blue: #93c5fd; --gray: #b8c4c3;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 1.55rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
code { background: var(--gray-bg); padding: 1px 6px; border-radius: 6px; font-size: .9em; word-break: break-all; }
img { max-width: 100%; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.hidden { display: none !important; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

/* ---------- Top bar & navigation ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 10px;
  padding: 0 12px; background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.15);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; flex: 1; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mark {
  display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; font-weight: 800; letter-spacing: .5px;
  background: url('../img/icon-192.png') center / cover no-repeat; color: transparent; font-size: 1.2rem; overflow: hidden;
}
.brand-mark.sm { width: 34px; height: 34px; border-radius: 10px; font-size: .85rem; }
.icon-btn { background: transparent; border: 0; color: inherit; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn:hover { background: rgba(255,255,255,.1); }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-weight: 700; font-size: .8rem; }
.avatar.lg { width: 44px; height: 44px; background: var(--brand-2); font-size: .95rem; }
.topbar-user:hover { text-decoration: none; }

.layout { display: flex; min-height: calc(100vh - var(--top-h)); }
.sidenav {
  width: var(--nav-w); background: var(--surface); border-right: 1px solid var(--line); padding: 12px 10px 24px;
  position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto; flex-shrink: 0;
}
.sidenav-user { display: flex; gap: 10px; align-items: center; padding: 8px 8px 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.sidenav-user small { display: block; color: var(--muted); }
.sidenav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 500; }
.sidenav a svg { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.sidenav a:hover { background: var(--surface-2); text-decoration: none; }
.sidenav a.active { background: rgba(59,130,246, .12); color: var(--brand-2); }
.sidenav a.active svg { color: var(--brand-2); }
.sidenav .count { margin-left: auto; background: var(--accent); color: #111; font-style: normal; font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.sidenav-sep { border-top: 1px solid var(--line); margin: 10px 4px; }
.nav-scrim { display: none; }
.content { flex: 1; min-width: 0; padding: 22px 26px 60px; max-width: 1180px; }
.content.no-nav { margin: 0 auto; }
.menu-toggle { display: none; }

@media (max-width: 899px) {
  .menu-toggle { display: grid; }
  .sidenav { position: fixed; left: 0; top: var(--top-h); bottom: 0; z-index: 40; transform: translateX(-102%); transition: transform .2s ease; height: auto; box-shadow: var(--shadow); }
  body.nav-open .sidenav { transform: none; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: var(--top-h) 0 0 0; background: rgba(0,0,0,.35); z-index: 35; }
  .content { padding: 16px 14px 70px; }
}

/* ---------- Cards, grids ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card.empty { text-align: center; padding: 38px 18px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { margin: 0; flex: 1; min-width: 200px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; }
.span2 { grid-column: span 2; } .span3 { grid-column: 1 / -1; }
@media (max-width: 680px) { .grid2, .grid3 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: block; color: var(--text); }
.stat:hover { text-decoration: none; border-color: var(--brand-3); }
.stat b { display: block; font-size: 1.7rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.accent b { color: var(--amber); }

/* ---------- Forms ---------- */
.form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .9rem; }
.form label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
.form h3 { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.form h3:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; min-height: 44px; font-weight: 400;
}
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand-2); }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(59,130,246,.45); border-color: var(--brand-3); }
input[type=file] { padding: 8px; }
.hint { font-weight: 400; color: var(--muted); font-size: .8rem; }
.form .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.radio-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 680px) { .radio-cards { grid-template-columns: 1fr; } }
.radio-cards label { border: 1px solid var(--line); border-radius: 12px; padding: 12px; flex-direction: row; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 500; }
.radio-cards label:has(input:checked) { border-color: var(--brand-3); background: rgba(59,130,246,.08); }
.radio-cards small { display: block; color: var(--muted); font-weight: 400; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px;
  border: 1px solid transparent; background: var(--brand-2); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important;
}
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-lg { min-height: 54px; font-size: 1.05rem; padding: 12px 24px; }
.btn-xl { min-height: 72px; font-size: 1.35rem; font-weight: 800; letter-spacing: .5px; }
.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.btn-light { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-green { background: #16a34a; } .btn-red { background: #dc2626; } .btn-blue { background: #2563eb; } .btn-amber { background: #d97706; }
.btn-wa { background: #128c7e; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Badges / alerts ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge-green { background: var(--green-bg); color: var(--green); } .badge-red { background: var(--red-bg); color: var(--red); }
.badge-amber { background: var(--amber-bg); color: var(--amber); } .badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-gray { background: var(--gray-bg); color: var(--gray); }
.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; border: 1px solid transparent; }
.alert-success { background: var(--green-bg); color: var(--green); border-color: rgba(21,128,61,.2); }
.alert-error { background: var(--red-bg); color: var(--red); border-color: rgba(185,28,28,.2); }
.alert-info { background: var(--blue-bg); color: var(--blue); border-color: rgba(29,78,216,.15); }
.alert-warning { background: var(--amber-bg); color: var(--amber); border-color: rgba(180,83,9,.2); }

/* ---------- Tables (become cards on phones) ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
.table tr:hover td { background: var(--surface-2); }
.table td small { display: block; color: var(--muted); }
@media (max-width: 760px) {
  .table.stack thead { display: none; }
  .table.stack tr { display: block; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 6px 4px; background: var(--surface); }
  .table.stack td { display: flex; gap: 10px; justify-content: space-between; border: 0; padding: 6px 10px; text-align: right; }
  .table.stack td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; font-size: .85rem; }
  .table.stack td[data-label=""]::before { content: none; }
  .table.stack td small { display: block; }
}
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters > * { flex: 1 1 150px; }
.filters .btn { flex: 0 0 auto; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.pager a, .pager span { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.pager a.active { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 8px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: .9rem; }
.tabs a.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.tabs a:hover { text-decoration: none; }

/* ---------- Detail lists ---------- */
dl.details { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; margin: 0; }
dl.details dt { color: var(--muted); font-size: .88rem; }
dl.details dd { margin: 0; font-weight: 600; word-break: break-word; }
@media (max-width: 520px) { dl.details { grid-template-columns: 1fr; gap: 2px; } dl.details dd { margin-bottom: 8px; } }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.doc { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2); display: block; color: var(--text); }
.doc img { width: 100%; height: 100px; object-fit: cover; display: block; }
.doc .pdf { height: 100px; display: grid; place-items: center; font-weight: 800; color: var(--red); font-size: 1.3rem; }
.doc span { display: block; padding: 6px 8px; font-size: .8rem; }
.visitor-photo { width: 96px; height: 96px; border-radius: 16px; object-fit: cover; object-position: 50% 28%; background: var(--gray-bg); display: grid; place-items: center; font-size: 1.8rem; font-weight: 800; color: var(--muted); flex-shrink: 0; }
.person-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.person-head h2 { margin: 0 0 4px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }

/* ---------- Auth pages ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 20% 0%, rgba(59,130,246,.18), transparent 50%), var(--bg); }
.auth-wrap { width: 100%; max-width: 420px; padding: 24px 16px; }
.auth-wrap.wide { max-width: 760px; }
.brand-block { text-align: center; margin-bottom: 18px; }
.brand-block h1 { margin: 12px 0 4px; }
.checklist { list-style: none; padding: 0; margin: 0; columns: 2; }
.checklist li { padding: 4px 0; } .checklist .ok { color: var(--green); } .checklist .bad { color: var(--red); font-weight: 700; }
@media (max-width: 600px) { .checklist { columns: 1; } }

/* ---------- Scanner ---------- */
.scan-wrap { max-width: 560px; margin: 0 auto; }
.scanner { position: relative; background: #000; border-radius: 18px; overflow: hidden; aspect-ratio: 1 / 1; box-shadow: var(--shadow); }
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner .frame { position: absolute; inset: 15%; border: 3px solid rgba(255,255,255,.85); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scanner .laser { position: absolute; left: 17%; right: 17%; height: 2px; background: var(--brand-3); top: 50%; box-shadow: 0 0 12px var(--brand-3); animation: laser 1.8s ease-in-out infinite; }
@keyframes laser { 0%,100% { top: 18%; } 50% { top: 82%; } }
.scanner .scan-msg { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; color: #fff; font-weight: 600; text-shadow: 0 1px 3px #000; padding: 0 10px; }
.scanner.idle { display: grid; place-items: center; color: #fff; }
.gate-pick { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.gate-pick select { flex: 1; }
.manual { display: flex; gap: 8px; margin-top: 12px; }
.manual input { flex: 1; text-transform: uppercase; }
.result { border-radius: 18px; padding: 18px; margin-top: 14px; border: 3px solid transparent; }
.result.ok { background: var(--green-bg); border-color: #16a34a; }
.result.out { background: var(--blue-bg); border-color: #2563eb; }
.result.deny { background: #dc2626; color: #fff; border-color: #991b1b; }
.result.deny .muted, .result.deny dt { color: rgba(255,255,255,.85); }
.result-head { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 800; margin-bottom: 12px; }
.result-head .dot { width: 14px; height: 14px; border-radius: 50%; background: currentColor; }
.result.ok .result-head { color: #15803d; } .result.out .result-head { color: #1d4ed8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .result.ok .result-head { color: #4ade80; } :root:not([data-theme="light"]) .result.out .result-head { color: #93c5fd; } }
.result .actions { display: grid; gap: 10px; margin-top: 14px; }

/* ---------- Public pass page ---------- */
.pass-page { max-width: 480px; margin: 0 auto; padding: 16px 14px 40px; }
.pass-card { background: var(--surface); border-radius: 22px; overflow: hidden; box-shadow: 0 10px 40px rgba(10,42,107,.18); border: 1px solid var(--line); }
.pass-top { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; padding: 18px 20px; }
.pass-top small { opacity: .85; }
.pass-top h1 { margin: 2px 0 0; font-size: 1.35rem; }
.pass-body { padding: 20px; }
.qr-box { display: grid; place-items: center; padding: 16px; background: #fff; border-radius: 16px; border: 1px dashed var(--line); margin: 6px 0 14px; }
.qr-box canvas, .qr-box img { width: 240px; height: 240px; image-rendering: pixelated; }
.qr-ref { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.15rem; letter-spacing: 2px; font-weight: 700; color: #0f1b33; margin-top: 8px; }
.pass-status { text-align: center; font-weight: 800; padding: 10px; border-radius: 12px; margin-bottom: 12px; }
.pass-cut { border-top: 2px dashed var(--line); margin: 16px -20px; position: relative; }
@media print {
  .no-print, .topbar, .sidenav { display: none !important; }
  body { background: #fff; }
  .pass-card { box-shadow: none; }
}

/* ---------- Display screen ---------- */
.display-body { background: #061433; color: #fff; min-height: 100vh; overflow: hidden; font-size: 18px; }
.display { display: grid; grid-template-rows: auto 1fr auto; min-height: 100vh; }
.display-top { display: flex; align-items: center; gap: 16px; padding: 18px 28px; background: rgba(255,255,255,.04); }
.display-top h1 { margin: 0; font-size: 1.6rem; flex: 1; }
.display-clock { font-size: 1.6rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.display-main { display: grid; place-items: center; padding: 30px; text-align: center; }
.display-idle h2 { font-size: 3rem; margin-bottom: 10px; }
.display-idle p { font-size: 1.4rem; color: #a9bde0; }
.greet { width: min(1100px, 100%); display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: center; text-align: left;
  padding: 40px; border-radius: 32px; background: rgba(255,255,255,.05); border: 4px solid #16a34a; animation: pop .35s ease; }
.greet.deny { border-color: #ef4444; background: rgba(220,38,38,.25); }
.greet.out { border-color: #3b82f6; }
.greet .photo { width: 280px; height: 280px; border-radius: 28px; object-fit: cover; object-position: 50% 28%; background: #13285a; display: grid; place-items: center; font-size: 6rem; font-weight: 800; color: #7dd3fc; }
.greet .hello { font-size: 1.6rem; color: #bae6fd; margin: 0; }
.greet h2 { font-size: 3.6rem; margin: 6px 0 12px; line-height: 1.05; }
.greet .meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 26px; font-size: 1.25rem; }
.greet .meta span { color: #a9bde0; display: block; font-size: .95rem; }
.greet .status-pill { display: inline-block; padding: 8px 20px; border-radius: 99px; font-weight: 800; font-size: 1.3rem; background: #16a34a; margin-bottom: 8px; }
.greet.deny .status-pill { background: #dc2626; } .greet.out .status-pill { background: #2563eb; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.display-foot { padding: 12px 28px; display: flex; gap: 12px; overflow: hidden; background: rgba(255,255,255,.04); color: #a9bde0; font-size: 1rem; white-space: nowrap; }
.display-foot b { color: #fff; }
@media (max-width: 900px) { .greet { grid-template-columns: 1fr; text-align: center; } .greet .photo { margin: 0 auto; width: 200px; height: 200px; } .greet h2 { font-size: 2.4rem; } .greet .meta { grid-template-columns: 1fr; } }

/* ---------- Misc ---------- */
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #111; color: #fff; padding: 10px 18px; border-radius: 99px; z-index: 99; box-shadow: var(--shadow); }

/* inline "add new" next to a select */
.gate-field { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .9rem; }
.inline-add { display: flex; gap: 8px; }
.inline-add select, .inline-add input { flex: 1; min-width: 0; }
.inline-add .btn { flex: 0 0 auto; white-space: nowrap; }
.gate-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.gate-checks label.check { border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px 6px 10px; background: var(--surface); }
.gate-checks label.check:has(input:checked) { border-color: var(--brand-3); background: rgba(59,130,246,.08); }

/* sign-in page with demo accounts */
.auth-wrap.demo-wrap { max-width: 1180px; }
.demo-cols { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 28px; align-items: start; }
.demo-roles h2 { margin: 0 0 4px; font-size: 1.3rem; }
.demo-roles > p { margin: 0 0 14px; }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.demo-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.demo-card:hover { border-color: var(--brand-3); }
.demo-card p { margin: 0; color: var(--muted); font-size: .9rem; flex: 1; }
.demo-card .demo-hint { flex: 0; font-size: .82rem; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.demo-head { display: flex; gap: 10px; align-items: center; }
.demo-head small { display: block; color: var(--muted); font-size: .78rem; word-break: break-all; }
.demo-chip { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; flex-shrink: 0; background: var(--brand-2); }
.chip-member { background: #2563eb; } .chip-head { background: #7c3aed; } .chip-guard { background: #b45309; }
.chip-display { background: #15803d; } .chip-tv { background: #0a2a6b; }
.demo-bar { margin-bottom: 14px; }
@media (max-width: 820px) { .demo-cols { grid-template-columns: 1fr; } }

/* v1.4 — industry profiles, credentials, imports */
.profile-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.form label.profile-card { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; background: var(--surface); font-weight: 400; }
.profile-card input { position: absolute; opacity: 0; pointer-events: none; }
.profile-card .pc-icon { grid-row: span 2; font-size: 1.6rem; line-height: 1; }
.profile-card b { font-size: .95rem; } .profile-card small { color: var(--muted); font-size: .8rem; }
.profile-card.on, .profile-card:has(input:checked) { border-color: var(--brand-3); box-shadow: 0 0 0 2px rgba(59,130,246,.25); background: rgba(59,130,246,.06); }
.profile-card:focus-within { outline: 2px solid var(--brand-3); outline-offset: 2px; }
.cred-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.cred-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface-2); }
.cred-list li code { font-size: .95rem; }
.cred-add { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr auto; gap: 8px; align-items: end; }
@media (max-width: 680px) { .cred-add { grid-template-columns: 1fr; } }
.import-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; padding: 0; list-style: none; counter-reset: st; }
.import-steps li { counter-increment: st; padding: 6px 12px 6px 8px; border-radius: 99px; background: var(--gray-bg); color: var(--muted); font-size: .85rem; }
.import-steps li::before { content: counter(st); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); margin-right: 6px; font-weight: 700; font-size: .75rem; }
.import-steps li.on { background: var(--brand); color: #fff; } .import-steps li.on::before { color: var(--brand); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table.compact td, .table.compact th { padding: 6px 8px; font-size: .85rem; white-space: nowrap; }
tr.row-error td { background: var(--red-bg); } tr.row-update td:first-child { box-shadow: inset 3px 0 0 var(--blue); } tr.row-new td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; font-size: .8rem; background: var(--surface); }
.wedge-hint { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); margin-top: 8px; }
.wedge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }

/* v1.5 — CCTV */
.cam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.cam { position: relative; margin: 0; background: #0a1224; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; cursor: zoom-in; }
.cam .cam-media { width: 100%; height: 100%; object-fit: contain; display: block; border: 0; background: #0a1224; }
.cam figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; }
.cam-title b { display: block; font-size: .9rem; } .cam-title small { opacity: .8; font-size: .75rem; }
.cam-live, .cam-badge { position: absolute; top: 8px; left: 8px; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.cam-live { background: #dc2626; color: #fff; letter-spacing: .05em; } .cam-badge { background: rgba(0,0,0,.65); color: #fbbf24; }
.cam.cam-err::after { content: "Camera not reachable"; position: absolute; inset: 0; display: grid; place-items: center; color: #fbbf24; background: rgba(0,0,0,.55); font-size: .85rem; }
.cam:fullscreen { border-radius: 0; cursor: zoom-out; }
.cam-compact { aspect-ratio: 4 / 3; }

/* v1.7 — (i) page help */
.help-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-left: 8px; vertical-align: middle;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--brand-2); cursor: pointer; padding: 0; }
.help-btn:hover { background: rgba(59,130,246,.12); border-color: var(--brand-3); }
.help-btn svg { width: 18px; height: 18px; }
.help-btn.floating { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; z-index: 60; box-shadow: var(--shadow); }
.help-btn.floating svg { width: 24px; height: 24px; }
.help-modal { width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 0; border-radius: 16px; padding: 26px 26px 20px;
  background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(0,0,0,.3); overflow: auto; }
.help-modal::backdrop { background: rgba(6,16,40, .55); backdrop-filter: blur(2px); }
.help-modal h2 { margin: 2px 0 8px; font-size: 1.35rem; }
.help-modal h3 { margin: 18px 0 6px; font-size: .95rem; color: var(--brand-2); text-transform: uppercase; letter-spacing: .04em; }
.help-modal ol, .help-modal ul { margin: 0; padding-left: 20px; } .help-modal li { margin: 5px 0; line-height: 1.5; }
.help-kicker { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.help-about { font-size: 1.02rem; line-height: 1.55; margin: 0; }
.help-x { position: absolute; right: 12px; top: 10px; margin: 0; } .help-x button { border: 0; background: none; font-size: 1.7rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.help-more { margin: 18px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.help-modal { position: fixed; }
/* hardware status */
.hw-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.hw-sum .stat b { font-size: 1.8rem; }
.hw-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.hw-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.hw-online { background: #dcfce7; color: #15803d; } .hw-offline { background: #fee2e2; color: #b91c1c; } .hw-issue { background: #fef3c7; color: #b45309; }
.hw-unknown, .hw-disabled { background: #eef2f8; color: #64748b; }
.hw-offline-row { background: rgba(254, 226, 226, .45); }
.hw-dept { margin-bottom: 16px; } .hw-dept h3 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hw-managed { display: inline-block; font-size: .72rem; padding: 2px 8px; border-radius: 6px; background: #e0f2fe; color: #0369a1; font-weight: 600; }
.guide-page h2 { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); scroll-margin-top: 70px; }
.guide-page h2:first-of-type { border: 0; margin-top: 6px; }
.guide-steps { counter-reset: s; list-style: none; padding: 0; }
.guide-steps > li { counter-increment: s; position: relative; padding-left: 40px; margin: 12px 0; line-height: 1.55; }
.guide-steps > li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 27px; height: 27px; border-radius: 50%; background: var(--brand-2); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .85rem; }
@media print { .sidenav, .topbar, .page-head .btn, .help-btn, .guide-page nav { display: none !important; } .content { margin: 0 !important; padding: 0 !important; } .card { box-shadow: none; border: 0; } }

/* v1.7.3 in / out notifications */
.notify-stack { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.notify { display: flex; gap: 12px; align-items: center; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-left: 6px solid #16a34a;
  border-radius: 14px; padding: 12px 14px; box-shadow: 0 14px 36px rgba(0,0,0,.18); text-decoration: none !important; animation: nIn .25s; transition: opacity .35s, transform .35s; }
.notify.n-out { border-left-color: #2563eb; } .notify.n-bad { border-left-color: #dc2626; }
.notify img, .notify .n-av { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.notify .n-av { display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--brand-2); }
.notify .n-top { display: flex; gap: 8px; align-items: center; } .notify .n-top b { font-size: 1rem; }
.notify .n-label { margin-left: auto; font-size: .75rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; background: #dcfce7; color: #15803d; letter-spacing: .04em; }
.notify.n-out .n-label { background: #dbeafe; color: #1d4ed8; } .notify.n-bad .n-label { background: #fee2e2; color: #b91c1c; }
.notify .n-sub { font-size: .86rem; color: var(--muted); } .notify .n-time { font-size: .78rem; color: var(--muted); }
.notify.n-hide { opacity: 0; transform: translateX(30px); }
@keyframes nIn { from { opacity: 0; transform: translateY(12px); } }

/* v1.8 grouped sidebar */
.nav-group { margin: 2px 0; }
.nav-group > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; color: var(--text); font-weight: 600; user-select: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { background: rgba(59,130,246,.08); }
.nav-group > summary svg { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.nav-group .nav-chev { margin-left: auto; display: inline-flex; transition: transform .15s; } .nav-group .nav-chev svg { width: 16px; height: 16px; }
.nav-group[open] .nav-chev { transform: rotate(90deg); }
.nav-group > summary .count { margin-left: 4px; }
.sidenav a.sub { padding: 7px 12px 7px 44px; font-size: .93rem; font-weight: 500; }
.sidenav a.sub.active { background: rgba(59,130,246,.12); color: var(--brand-2); }

.notify .n-kind { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.notify.k-employee { background: linear-gradient(90deg, #eff6ff, var(--surface) 40%); } .notify.k-employee .n-kind { color: #1d5fd1; } .notify.k-employee .n-av { background: #1d5fd1; }
.notify.k-visitor { background: linear-gradient(90deg, #f5f3ff, var(--surface) 40%); } .notify.k-visitor .n-kind { color: #6d28d9; } .notify.k-visitor .n-av { background: #7c3aed; }
.notify.k-employee img { box-shadow: 0 0 0 3px #38bdf8; } .notify.k-visitor img { box-shadow: 0 0 0 3px #a78bfa; }

/* v1.8 photo crop */
.crop-dlg { border: 0; border-radius: 18px; padding: 0; width: min(980px, calc(100vw - 24px)); max-height: calc(100vh - 24px); color: var(--text); background: var(--surface); }
.crop-dlg::backdrop { background: rgba(6,16,40,.6); }
.crop-head { display: flex; gap: 12px; align-items: baseline; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.crop-x { margin-left: auto; border: 0; background: none; font-size: 1.6rem; cursor: pointer; color: var(--muted); }
.crop-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; padding: 18px 20px; }
.crop-area { height: 440px; background: #111; border-radius: 12px; overflow: hidden; }
.crop-area img { display: block; max-width: 100%; }
.crop-previews { display: grid; gap: 16px; align-content: start; justify-items: start; }
.crop-previews > div { display: grid; gap: 6px; }
.pv { overflow: hidden; background: #e5e7eb; }
.pv-card { width: 170px; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; text-align: center; background: #fff; color: #111; padding-bottom: 10px; box-shadow: var(--shadow); }
.pv-band { background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; padding: 6px; }
.pv-photo { width: 84px; height: 112px; margin: 10px auto 6px; border-radius: 6px; }
.pv-card b { display: block; font-size: .85rem; } .pv-card small { color: #6b7280; font-size: .7rem; }
.pv-disp { display: flex; gap: 10px; align-items: center; background: #16a34a; color: #fff; padding: 10px; border-radius: 12px; width: 230px; }
.pv-sq { width: 64px; height: 64px; border-radius: 10px; } .pv-disp span { font-size: .7rem; font-weight: 800; background: #fff; color: #15803d; padding: 1px 6px; border-radius: 999px; } .pv-disp b { display: block; }
.pv-round { width: 64px; height: 64px; border-radius: 50%; }
.crop-foot { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.crop-dlg .cropper-view-box { outline: 2px solid #3b82f6; }
.crop-dlg .cropper-face { background: radial-gradient(ellipse 34% 30% at 50% 40%, transparent 98%, rgba(59,130,246,.9) 99%, transparent 100%); opacity: 1; }
label.need > select { border-color: #f59e0b; }
@media (max-width: 760px) { .crop-body { grid-template-columns: 1fr; } .crop-area { height: 320px; } }
/* faces sit in the upper part of a portrait photo: keep them in view in square and round frames */
img.avatar, .avatar img, .emp-photo img, .icard img, img.emp-photo, .notify img { object-fit: cover; object-position: 50% 28%; }

.agency-tag { display: inline-block; vertical-align: middle; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #fef3c7; color: #92400e; margin-left: 4px; }

/* v1.8 person dashboard */
.person-card { display: grid; gap: 14px; }
.person-id { display: flex; gap: 14px; align-items: center; }
.person-id .visitor-photo { width: 72px; height: 96px; border-radius: 12px; }
.kpis6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.kpis6 > div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.kpis6 b { display: block; font-size: 1.35rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpis6 span { font-size: .78rem; color: var(--muted); }
.chart { width: 100%; height: auto; display: block; }
.chart .gl { stroke: var(--line); stroke-width: 1; } .chart .gl-full { stroke: #1d5fd1; stroke-dasharray: 4 3; stroke-width: 1.2; }
.chart .ax { font-size: 10px; fill: var(--muted); }
.chart .ok-band { fill: rgba(22,163,74,.07); } .chart .ontime { fill: #16a34a; } .chart .late { fill: #dc2626; } .chart .trend { fill: none; stroke: #94a3b8; stroke-width: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 0; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legend i.dash { width: 16px; height: 0; border-top: 2px dashed #1d5fd1; border-radius: 0; }
.donut-wrap { display: flex; gap: 16px; align-items: center; } .donut { width: 120px; height: 120px; flex-shrink: 0; transform: rotate(-90deg); }
.donut-leg { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; flex: 1; font-size: .86rem; }
.donut-leg li { display: grid; grid-template-columns: 12px 1fr auto 40px; gap: 8px; align-items: center; } .donut-leg i { width: 10px; height: 10px; border-radius: 3px; } .donut-leg span { color: var(--muted); text-align: right; }
.table.compact td, .table.compact th { padding: 6px 8px; }
.person-days tr.sel td { background: rgba(59,130,246,.1); }
.st { display: inline-block; min-width: 34px; text-align: center; font-weight: 700; font-size: .78rem; padding: 2px 6px; border-radius: 6px; background: #eef2f8; }
.st-P, .st-WOP, .st-HP { background: #dcfce7; color: #15803d; } .st-HD { background: #fef3c7; color: #b45309; } .st-A, .st-LWP { background: #fee2e2; color: #b91c1c; } .st-WO, .st-H { background: #ede9fe; color: #6d28d9; } .st-PL { background: #dbeafe; color: #1d5fd1; }
.moves { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.moves li { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid var(--line); }
.moves li.mv-in { box-shadow: inset 4px 0 0 #16a34a; } .moves li.mv-out { box-shadow: inset 4px 0 0 #2563eb; }
.moves img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; background: #111; }
.mv-nophoto { width: 96px; height: 72px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font-size: .75rem; color: var(--muted); }
.print-only { display: none; }
@media (max-width: 900px) { .kpis6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media print {
  @page { size: A4; margin: 9mm; }
  body { font-size: 10.5px; background: #fff; }
  .topbar, .sidenav, .no-print, .help-btn, .notify-stack, .alert { display: none !important; }
  .layout, .content { display: block !important; margin: 0 !important; padding: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd; padding: 8px 10px !important; margin-bottom: 6px !important; break-inside: avoid; }
  .page-head { margin: 0 0 4px; } .page-head h1 { font-size: 16px; }
  .grid2 { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 6px !important; }
  .kpis6 { grid-template-columns: repeat(6, 1fr); gap: 4px; } .kpis6 > div { padding: 4px 6px; } .kpis6 b { font-size: 13px; } .kpis6 span { font-size: 8.5px; }
  .person-id .visitor-photo { width: 44px; height: 58px; }
  .chart { max-height: 120px; } .donut { width: 80px; height: 80px; }
  .table.compact td, .table.compact th { padding: 1px 4px; font-size: 9px; } .person-days h3, .card h3 { font-size: 11px; margin: 0 0 3px; }
  .table.stack thead { display: table-header-group !important; } .table.stack tr { display: table-row !important; } .table.stack td { display: table-cell !important; } .table.stack td::before { content: none !important; }
  .print-only { display: block; }
  #day { break-before: page; }
}

/* ---- v1.8: vehicles, safety checks, visitor dashboard ---- */
.dlg { border: 0; border-radius: 16px; padding: 18px 20px; width: min(560px, calc(100vw - 24px)); color: var(--text); background: var(--surface); }
.dlg::backdrop { background: rgba(6,16,40,.55); }
.dlg h3 { margin-top: 0; }
.plate { display: inline-block; font: 800 .95rem/1 ui-monospace, Consolas, monospace; letter-spacing: 1px; background: #fef9c3; color: #111; border: 2px solid #111; border-radius: 6px; padding: 4px 8px; }
.veh-shot { width: 96px; height: 60px; object-fit: cover; border-radius: 8px; display: block; }
.veh-color { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line); margin-right: 6px; vertical-align: -1px; }
a.kind-emp { color: #1d5fd1; font-weight: 700; } a.kind-vis { color: #7c3aed; font-weight: 700; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; flex: 2 1 320px !important; }
.ppe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ppe-card { display: flex; gap: 12px; padding: 12px; margin: 0; border-left: 5px solid var(--amber); }
.ppe-card.ppe-ok { border-left-color: #16a34a; } .ppe-card.ppe-missing { border-left-color: #dc2626; } .ppe-card.ppe-skipped { border-left-color: var(--line); }
.ppe-shot { width: 120px; flex-shrink: 0; aspect-ratio: 3/4; background: var(--gray-bg); border-radius: 10px; overflow: hidden; display: grid; place-items: center; text-align: center; }
.ppe-shot img { width: 100%; height: 100%; object-fit: cover; }
.ppe-body { flex: 1; min-width: 0; }
.ppe-form { margin-top: 6px; display: grid; gap: 4px; }
.ppe-form .btn { min-height: 34px; padding: 6px 10px; font-size: .85rem; }
.hbars { display: grid; gap: 5px; }
.hbars > div { display: grid; grid-template-columns: 52px 1fr 48px; gap: 8px; align-items: center; font-size: .85rem; }
.hbars i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #a78bfa, #7c3aed); }
.hbars b { text-align: right; font-variant-numeric: tabular-nums; }
ul.plain { list-style: none; padding: 0; margin: 0 0 10px; } ul.plain li { padding: 4px 0; border-bottom: 1px dotted var(--line); }
.move-shot { width: 44px; height: 58px; object-fit: cover; border-radius: 6px; }
@media (max-width: 520px) { .ppe-shot { width: 90px; } }
/* ---- v1.8 full-page help ---- */
.help-btn { width: auto !important; height: 32px !important; padding: 0 12px 0 8px; gap: 6px; border-radius: 999px !important; font: 700 .85rem/1 inherit; color: var(--brand-2); }
.help-btn span { font-size: .85rem; }
.help-btn svg { width: 20px !important; height: 20px !important; }
.help-btn.floating { height: 46px !important; padding: 0 16px 0 12px; }
.help-modal.help-full { width: min(1040px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 26px 30px 24px; }
.help-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 14px 0 4px; }
.help-tabs button { border: 0; background: none; padding: 9px 14px; font: 700 .9rem/1 inherit; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; }
.help-tabs button.on { color: var(--brand-2); border-bottom-color: var(--brand-3); }
.help-pane { display: none; } .help-pane.on { display: block; }
.help-fields { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .92rem; }
.help-fields th, .help-fields td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.help-fields thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.help-fields tbody th { white-space: nowrap; color: var(--text); }
.help-fields code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .85rem; }
.help-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.help-flow span { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; max-width: 230px; font-size: .9rem; }
.help-flow span b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-3); color: #fff; font-size: .75rem; margin-right: 8px; }
.help-flow i { font-style: normal; font-size: 1.3rem; color: var(--brand-3); font-weight: 800; }
.help-shot { width: 100%; border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; box-shadow: var(--shadow); }
@media (max-width: 640px) { .help-modal.help-full { padding: 20px 16px; } .help-fields tbody th { white-space: normal; } .help-btn span { display: none; } .help-btn { padding: 0 6px !important; } }
.lang-sw { display: inline-flex; gap: 2px; background: rgba(255,255,255,.12); border-radius: 999px; padding: 3px; margin-left: auto; margin-right: 10px; }
.lang-sw a { color: inherit; opacity: .8; text-decoration: none; font: 700 .78rem/1 inherit; padding: 6px 9px; border-radius: 999px; }
.lang-sw a.on { background: #fff; color: var(--brand); opacity: 1; }
.brand-block .lang-sw { background: var(--surface-2); margin: 10px auto 0; color: var(--text); }
.brand-block .lang-sw a.on { background: var(--brand); color: #fff; }
/* "+" beside dropdowns */
.sel-add { display: flex; gap: 6px; align-items: stretch; width: 100%; }
.sel-add > select { flex: 1; min-width: 0; }
.sel-add-btn { flex: 0 0 auto; width: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--brand-2); cursor: pointer; display: grid; place-items: center; }
.sel-add-btn:hover { background: rgba(59,130,246,.1); border-color: var(--brand-3); }
.sel-add-btn svg { width: 18px; height: 18px; }
.sel-add-btn.ok { background: #16a34a; color: #fff; border-color: #16a34a; }
.notify { position: relative; padding-right: 34px !important; }
.notify .n-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.notify .n-x:hover { background: #fee2e2; color: #b91c1c; }
@media (max-width: 640px) { .notify-stack { bottom: 8px; right: 8px; width: calc(100vw - 16px); } .notify { padding: 8px 34px 8px 10px !important; } }
.auto-note { background: #fef3c7; color: #92400e; border-radius: 10px; padding: 8px 12px; font-size: .9rem; margin: 8px 0; }
/* sortable tables + client pages */
th.sortable-th { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable-th::after { content: '↕'; opacity: .3; margin-left: 6px; font-size: .8em; }
th.sortable-th.s-asc::after { content: '▲'; opacity: .8; } th.sortable-th.s-desc::after { content: '▼'; opacity: .8; }
th.sortable-th:hover { color: var(--brand-2); }
.tbl-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 10px; }
.tbl-tools .tbl-q { flex: 1 1 200px; max-width: 320px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
.tbl-tools .tbl-info { color: var(--muted); font-size: .85rem; }
.tbl-tools .tbl-size { margin-left: auto; font-size: .85rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.tbl-tools .tbl-size select { width: auto; padding: 4px 8px; }
.tbl-pager { margin-top: 10px; }
@media print { .tbl-tools, .tbl-pager { display: none !important; } table.table tr[style*="display: none"] { display: table-row !important; } }
/* ---- 1.9: roster, employee panel ---- */
.rot-row { border-bottom: 1px dashed var(--line); padding: 8px 0; display: grid; gap: 4px; }
.rot-row form.inline { justify-self: start; }
.rot-seq { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; }
.rot-seq span { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; }
.rot-seq i { font-style: normal; color: var(--brand-3); font-weight: 800; }
.rot-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
table.roster td { padding: 4px; } table.roster select { min-width: 150px; font-size: .82rem; padding: 4px 6px; }
table.roster td.r-set select { background: #fef3c7; border-color: #f59e0b; } table.roster td.r-off select { color: var(--muted); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-h { font-weight: 700; font-size: .8rem; color: var(--muted); text-align: center; padding: 4px; }
.cal-d { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 74px; display: grid; align-content: start; gap: 2px; font-size: .85rem; }
.cal-d .cal-n { font-size: .75rem; color: var(--muted); } .cal-d small { color: var(--muted); }
.cal-d.c-today { outline: 2px solid var(--brand-3); }
.cal-d.c-off { background: var(--surface-2); color: var(--muted); } .cal-d.c-hol { background: #ede9fe; } .cal-d.c-leave { background: #fef3c7; }
.cal-d.c-s0 { border-left: 4px solid #3b82f6; } .cal-d.c-s1 { border-left: 4px solid #3b82f6; } .cal-d.c-s2 { border-left: 4px solid #8b5cf6; }
.cal-d.c-s3 { border-left: 4px solid #f59e0b; } .cal-d.c-s4 { border-left: 4px solid #ef4444; } .cal-d.c-s5 { border-left: 4px solid #22c55e; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick-grid .btn { justify-content: flex-start; }
.count-pill { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #f59e0b; color: #fff; font-size: .75rem; margin-left: 4px; }
form.dec { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } form.dec input { flex: 1 1 140px; min-width: 120px; } form.dec select { width: auto; }
@media (max-width: 640px) { .cal { grid-template-columns: repeat(7, minmax(42px, 1fr)); gap: 3px; } .cal-d { padding: 4px; min-height: 58px; font-size: .7rem; } .cal-d small { display: none; } .quick-grid, .rot-pick { grid-template-columns: 1fr; } }
/* ---- one colour per kind, everywhere: employees teal, visitors violet ---- */
:root { --emp: #2563eb; --emp-2: #38bdf8; --emp-bg: #dbeafe; --emp-ink: #1d5fd1; --vis: #7c3aed; --vis-2: #a78bfa; --vis-bg: #ede9fe; --vis-ink: #6d28d9; }
.ktag { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 1px 7px; border-radius: 6px; vertical-align: 1px; }
.ktag-emp { background: var(--emp-bg); color: var(--emp-ink); } .ktag-vis { background: var(--vis-bg); color: var(--vis-ink); } .ktag-unk { background: #fee2e2; color: #b91c1c; }
tr.row-emp td:first-child { box-shadow: inset 4px 0 0 var(--emp-2); } tr.row-vis td:first-child { box-shadow: inset 4px 0 0 var(--vis-2); }
.agency-tag[style*="ede9fe"] { background: var(--vis-bg) !important; color: var(--vis-ink) !important; }

/* ---------- Manpower reports (1.10.0) ---------- */
.mp-kpis { margin-bottom: 14px; }
.mp-card { padding: 12px 14px; margin-bottom: 14px; }
.mp-title { margin: 0 0 10px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.mp-table th, .mp-table td { text-align: center; white-space: nowrap; }
.mp-table tbody th, .mp-table tfoot th { text-align: left; font-weight: 600; }
.mp-table td.mp-zero { color: var(--muted); opacity: .55; }
.mp-table td.mp-on { font-weight: 700; color: var(--teal, #1d5fd1); }
.mp-table td.mp-tot, .mp-table tfoot td { font-weight: 800; background: var(--surface-2); }
.mp-table tfoot th, .mp-table tfoot td { border-top: 2px solid var(--line); }
.mp-week td.mp-heat { background: color-mix(in srgb, #2563eb calc(var(--h) * 55%), transparent); font-weight: 700; }
.mp-week td.mp-future { background: repeating-linear-gradient(45deg, transparent 0 6px, var(--surface-2) 6px 12px); }
.mp-week th.mp-today { color: var(--teal, #1d5fd1); }
.mp-miss { color: var(--red, #dc2626); font-weight: 700; }
.mp-pva th, .mp-pva td { text-align: center; white-space: nowrap; font-size: .8rem; padding: 3px 6px; }
.mp-pva td:nth-child(2), .mp-pva td:nth-child(3) { text-align: left; }
.mp-pva thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.mp-pva tr.mp-plan td { background: color-mix(in srgb, #3b82f6 9%, transparent); }
.mp-pva tr.mp-subp td, .mp-pva tr.mp-suba td { background: var(--surface-2); font-weight: 700; }
.mp-pva tr.mp-gp td, .mp-pva tr.mp-ga td { background: color-mix(in srgb, #2563eb 16%, transparent); font-weight: 800; }
.mp-pva td.mp-short { color: var(--red, #dc2626); font-weight: 700; }

/* client branding */
.brand-logo { height: 34px; max-width: 120px; object-fit: contain; border-radius: 6px; background: #fff; padding: 2px; flex-shrink: 0; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-tag { font-size: .68rem; font-weight: 500; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.layout { position: relative; z-index: 1; }
@media (max-width: 640px) { .brand-logo + .brand-name { display: none; } .brand-logo { max-width: 150px; } }

.help-key { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
.help-key summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.help-key summary code { font-size: .8rem; color: var(--muted); background: var(--bg, #f3f6f6); padding: 1px 6px; border-radius: 6px; word-break: break-all; }
.help-key p { margin: 8px 0 4px; }
.info-i { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; color: var(--brand-2, #1d5fd1); font: 700 12px/1 serif; font-style: italic; background: none; cursor: pointer; vertical-align: middle; margin-left: 6px; padding: 0; }
.info-i:hover { background: var(--brand-2, #1d5fd1); color: #fff; }

/* 1.17: ☰ hides / shows the side menu on computers too */
.menu-toggle { display: grid; }
@media (min-width: 900px) {
  .sidenav { transition: margin-left .2s ease, opacity .2s ease; }
  body.nav-hidden .sidenav { margin-left: calc(-1 * var(--nav-w) - 2px); opacity: 0; pointer-events: none; }
  body.nav-hidden .content { max-width: 1400px; }
}
.tv-code { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); }
.tv-code span { color: var(--muted); font-weight: 600; }
.tv-code b { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.8rem; letter-spacing: .25em; color: var(--brand-2); }

.brand-mark.has-icon { padding: 0; overflow: hidden; background: none; }
.brand-mark.has-icon img { width: 100%; height: 100%; display: block; border-radius: inherit; }
/* licences */
.lic-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.lic-tile { margin: 0; display: grid; gap: 4px; }
.lic-tile > span { color: var(--muted); font-size: .85rem; font-weight: 600; }
.lic-tile > b { font-size: 1.5rem; justify-self: start; } .lic-tile > b.badge { font-size: .85rem; }
.lic-tile small { color: var(--muted); }
.lic-wait { color: #b45309; font-weight: 700; }
.lic-req { display: grid; grid-template-columns: minmax(0, 1fr) 90px minmax(0, 220px) auto auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lic-req small { display: block; color: var(--muted); }
@media (max-width: 760px) { .lic-req { grid-template-columns: 1fr 1fr; } .lic-req > div { grid-column: 1 / -1; } }
.lic-log { list-style: none; padding: 0; margin: 0; max-height: 360px; overflow: auto; } .lic-log li { padding: 4px 0; border-bottom: 1px solid var(--line); }
td small { display: block; color: var(--muted); }
.app-powered { margin: 40px 0 0; text-align: center; font-size: .78rem; color: var(--muted); opacity: .8; }

.pm-table td small { display: block; } .pm-table tr.pm-ok td { background: rgba(22,163,74,.06); }
.diag-list { list-style: none; padding: 0; margin: 0; } .diag-list li { padding: 8px 10px; border-left: 4px solid var(--line); margin: 6px 0; background: var(--surface-2); border-radius: 8px; }
.diag-list li.ok { border-color: #16a34a; } .diag-list li.warn { border-color: #f59e0b; } .diag-list li.bad { border-color: #dc2626; } .diag-list li.fix { border-color: #2563eb; }
.diag-list li b { display: block; } .diag-list li ul { margin: 6px 0 0; padding-left: 18px; }
.cloud-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 14px; margin-top: 12px; padding: 10px 12px; background: #f8fafb; border: 1px solid #e5e7eb; border-radius: 10px; }
.cloud-info small { display: block; color: #6b7280; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; } .cloud-info b { font-size: .92rem; word-break: break-word; }

/* 1.20 — approval record and the contractor's month grid */
.apv-log { list-style: none; margin: 0; padding: 0; }
.apv-log li { padding: 7px 0; border-bottom: 1px solid var(--line, #e5e7eb); font-size: 14px; }
.apv-log li:last-child { border-bottom: 0; }
.att-grid th.d, .att-grid td.d { padding: 6px 4px; min-width: 30px; text-align: center; font-size: 12px; }
.att-grid td.s-p { background: var(--green-bg); color: var(--green); }
.att-grid td.s-hd { background: var(--amber-bg); color: var(--amber); }
.att-grid td.s-a { background: var(--red-bg); color: var(--red); }
.att-grid td.s-wo, .att-grid td.s-h { color: var(--gray); }
.att-grid td.s-wop, .att-grid td.s-hp { background: var(--blue-bg); color: var(--blue); }
.hc-devs .check { align-items: flex-start; }
.hc-devs .check input { flex: none; }
/* small phones: the logo and the language switch share the top bar without overlapping */
@media (max-width: 480px) {
  .topbar .brand { min-width: 0; flex: 0 1 auto; overflow: hidden; }
  .brand-logo { max-width: 96px; height: 30px; }
  .topbar .lang-sw { margin-right: 6px; flex: none; }
  .topbar .lang-sw a { padding: 6px 6px; font-size: .72rem; }
}
@media (max-width: 380px) { .topbar .lang-sw a { padding: 6px 4px; font-size: .66rem; } .brand-logo { max-width: 78px; } }

/* =====================================================================
   IndusTrack: Company Access — blue & white industrial theme (v1.22)
   Developed by Hisoft IT Solutions Pvt. Ltd.
   ===================================================================== */
:root {
  --brand: #0a2a6b; --brand-2: #1d5fd1; --brand-3: #3b82f6; --brand-soft: #e8f0fe;
  --c-blue: #1d5fd1; --c-violet: #8b5cf6; --c-green: #10b981; --c-amber: #f59e0b; --c-rose: #f43f5e; --c-cyan: #06b6d4; --c-indigo: #4f46e5; --c-orange: #f97316;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(10,27,61,.05), 0 6px 20px rgba(10,27,61,.06);
  --shadow-lg: 0 10px 30px rgba(10,42,107,.14);
  --ease: cubic-bezier(.2,.8,.2,1);
  --nav-w: 264px;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --brand-soft: #172a52; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25); } }
body { letter-spacing: -.003em; }
h1 { font-weight: 800; letter-spacing: -.02em; } h3 { font-weight: 700; }
a { color: var(--brand-2); }

/* ---- top bar: deep blue gradient ---- */
.topbar { background: linear-gradient(100deg, #0a2a6b 0%, #133f9a 55%, #1d5fd1 100%); box-shadow: 0 2px 14px rgba(10,42,107,.25); }
.topbar .brand-name { font-weight: 800; letter-spacing: -.01em; }
.brand-mark.sm.has-icon { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.topbar .avatar { background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); transition: transform .2s var(--ease); }
.topbar .avatar:hover { transform: scale(1.06); }

/* ---- side menu ---- */
.sidenav { background: linear-gradient(180deg, #ffffff 0%, #f7f9fe 100%); border-right: 1px solid var(--line); padding: 14px 12px 18px; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; }
.sidenav > * { flex-shrink: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sidenav { background: linear-gradient(180deg, #101a2e 0%, #0d1628 100%); } }
.sidenav-user { margin: 0 0 10px; padding: 12px; border: 0; border-radius: 14px; color: #fff;
  background: linear-gradient(135deg, #1d5fd1, #0a2a6b); box-shadow: 0 6px 18px rgba(29,95,209,.28); position: relative; overflow: hidden; }
.sidenav-user::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.08); }
.sidenav-user small { color: #c9dbff; }
.sidenav-user .avatar.lg { background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 2px rgba(255,255,255,.4); }
.ng-ic { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0; background: var(--brand-soft); color: var(--brand-2); transition: transform .25s var(--ease), background .2s, color .2s; }
.sidenav .ng-ic svg, .nav-group > summary .ng-ic svg { width: 18px; height: 18px; color: inherit; }
.sidenav a.nav-top { padding: 7px 10px; gap: 11px; font-weight: 600; border-radius: 12px; transition: background .18s, transform .18s var(--ease); }
.sidenav a.nav-top:hover { background: var(--brand-soft); transform: translateX(2px); }
.sidenav a.nav-top:hover .ng-ic { transform: scale(1.08) rotate(-4deg); }
.sidenav a.nav-top.active { background: linear-gradient(90deg, #1d5fd1, #3b82f6); color: #fff; box-shadow: 0 6px 16px rgba(29,95,209,.3); }
.sidenav a.nav-top.active .ng-ic { background: rgba(255,255,255,.2); color: #fff; }
.sidenav a.nav-out .ng-ic { background: #fee2e2; color: #dc2626; }
.nav-group { margin: 1px 0; border-radius: 14px; transition: background .25s; }
.nav-group > summary { padding: 7px 10px; gap: 11px; border-radius: 12px; font-weight: 650; transition: background .18s; }
.nav-group > summary:hover { background: var(--brand-soft); }
.nav-group > summary:hover .ng-ic { transform: scale(1.08) rotate(-4deg); }
.nav-group[open] { background: color-mix(in srgb, var(--tone, #1d5fd1) 6%, transparent); }
.nav-group[open] > summary { color: var(--tone-ink, var(--brand)); }
.nav-group .nav-chev { transition: transform .3s var(--ease); color: var(--muted); }
.nav-group[open] .nav-chev { transform: rotate(90deg); color: var(--tone, var(--brand-2)); }
.nav-group .ng-ic { background: color-mix(in srgb, var(--tone, #1d5fd1) 14%, transparent); color: var(--tone, #1d5fd1); }
.nav-group[open] .ng-ic { background: var(--tone, #1d5fd1); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--tone, #1d5fd1) 40%, transparent); }
.tone-blue { --tone: #1d5fd1; --tone-ink: #133f9a; } .tone-violet { --tone: #8b5cf6; --tone-ink: #5b21b6; } .tone-green { --tone: #10b981; --tone-ink: #047857; }
.tone-rose { --tone: #f43f5e; --tone-ink: #be123c; } .tone-amber { --tone: #f59e0b; --tone-ink: #b45309; } .tone-cyan { --tone: #06b6d4; --tone-ink: #0e7490; }
.tone-indigo { --tone: #4f46e5; --tone-ink: #3730a3; }
.nav-sub { position: relative; margin: 2px 0 6px 25px; padding-left: 10px; border-left: 2px solid color-mix(in srgb, var(--tone, #1d5fd1) 22%, transparent); }
.nav-group[open] .nav-sub { animation: navSub .32s var(--ease); }
@keyframes navSub { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.nav-group[open] .nav-sub a { animation: navItem .35s var(--ease) both; }
.nav-group[open] .nav-sub a:nth-child(2) { animation-delay: .03s; } .nav-group[open] .nav-sub a:nth-child(3) { animation-delay: .06s; }
.nav-group[open] .nav-sub a:nth-child(4) { animation-delay: .09s; } .nav-group[open] .nav-sub a:nth-child(5) { animation-delay: .12s; }
.nav-group[open] .nav-sub a:nth-child(6) { animation-delay: .15s; } .nav-group[open] .nav-sub a:nth-child(n+7) { animation-delay: .18s; }
@keyframes navItem { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.sidenav a.sub { padding: 6px 10px; gap: 10px; font-size: .9rem; font-weight: 500; border-radius: 10px; color: var(--text); position: relative; transition: background .15s, color .15s, padding .2s var(--ease); }
.sidenav a.sub svg { width: 16px; height: 16px; color: var(--muted); transition: color .15s; }
.sidenav a.sub:hover { background: color-mix(in srgb, var(--tone, #1d5fd1) 10%, transparent); padding-left: 14px; }
.sidenav a.sub:hover svg { color: var(--tone, var(--brand-2)); }
.sidenav a.sub.active { background: #fff; color: var(--tone-ink, var(--brand-2)); font-weight: 650; box-shadow: 0 2px 10px rgba(10,27,61,.08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sidenav a.sub.active { background: #1a2742; color: #fff; } }
.sidenav a.sub.active svg { color: var(--tone, var(--brand-2)); }
.sidenav a.sub.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--tone, var(--brand-2)); }
.sidenav .count { background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; box-shadow: 0 2px 6px rgba(249,115,22,.35); animation: cntPop .5s var(--ease); }
@keyframes cntPop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: none; } }
.sidenav-sep { margin: 10px 6px; }
.sidenav-foot { margin-top: auto; padding: 14px 8px 0; display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--line); opacity: .85; }
.sidenav-foot b { display: block; font-size: .82rem; } .sidenav-foot small { display: block; font-size: .7rem; color: var(--muted); line-height: 1.25; }

/* ---- page & cards ---- */
.content { animation: pageIn .45s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-head h1 { color: var(--brand); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .page-head h1 { color: var(--text); } }
.card { border-radius: var(--radius); border-color: var(--line); transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.card:hover { box-shadow: var(--shadow-lg); }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-head h3 { margin: 0; } .card-head small { display: block; }
.ch-ic { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; }
.ch-ic svg, .stat-ic svg, .empty-state svg, .btn .ic { width: 20px; height: 20px; }
.ic-blue { background: #e0ebff; color: #1d5fd1; } .ic-violet { background: #ede9fe; color: #7c3aed; } .ic-green { background: #d1fae5; color: #059669; }
.ic-amber { background: #fef3c7; color: #d97706; } .ic-rose { background: #ffe4e6; color: #e11d48; } .ic-cyan { background: #cffafe; color: #0891b2; }
.link-more { font-weight: 600; }

/* ---- buttons ---- */
.btn { background: linear-gradient(135deg, #2563eb, #1d4ed8); border-radius: 12px; box-shadow: 0 4px 12px rgba(29,95,209,.25); transition: transform .15s var(--ease), box-shadow .2s, filter .2s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(29,95,209,.32); text-decoration: none; }
.btn:active { transform: translateY(0) scale(.98); }
.btn-light { background: var(--surface); box-shadow: 0 1px 3px rgba(10,27,61,.08); }
.btn-light:hover { box-shadow: 0 6px 14px rgba(10,27,61,.1); border-color: var(--brand-3); }
.btn-green { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 4px 12px rgba(16,185,129,.28); }
.btn-red { background: linear-gradient(135deg, #f43f5e, #dc2626); box-shadow: 0 4px 12px rgba(244,63,94,.28); }
.btn-amber { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 4px 12px rgba(245,158,11,.28); }
.btn-glow { position: relative; overflow: hidden; display: inline-flex; gap: 8px; align-items: center; }
.btn-glow::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); animation: shine 3.5s infinite; }
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }

/* ---- stat tiles: coloured accents, icons, count-up ---- */
.stats-x { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
@media (max-width: 520px) { .stats, .stats-x { grid-template-columns: 1fr 1fr; gap: 10px; } .stat { padding: 12px; } .stat b { font-size: 1.5rem; } .stat-ic { width: 32px; height: 32px; } .stat span { font-size: .8rem; } }
.timeline-x .badge::before { display: none; }
.stat { position: relative; overflow: hidden; border-radius: var(--radius); padding: 16px 16px 14px; transition: transform .25s var(--ease), box-shadow .25s; animation: tileIn .5s var(--ease) both; }
.stats .stat:nth-child(2) { animation-delay: .05s; } .stats .stat:nth-child(3) { animation-delay: .1s; } .stats .stat:nth-child(4) { animation-delay: .15s; }
@keyframes tileIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--t, var(--brand-3)); }
.stat::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--t, #1d5fd1), color-mix(in srgb, var(--t, #1d5fd1) 40%, #fff)); }
.stat::after { content: ""; position: absolute; right: -26px; bottom: -26px; width: 96px; height: 96px; border-radius: 50%; background: var(--t, #1d5fd1); opacity: .07; transition: transform .4s var(--ease); }
.stat:hover::after { transform: scale(1.35); }
.stat b { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.stat.accent b { color: var(--text); }
.stat-ic { float: right; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--t, #1d5fd1) 14%, transparent); color: var(--t, #1d5fd1); }
.t-blue { --t: #1d5fd1; } .t-violet { --t: #8b5cf6; } .t-green { --t: #10b981; } .t-amber { --t: #f59e0b; } .t-rose { --t: #f43f5e; } .t-cyan { --t: #06b6d4; }
.stat .spark { display: block; width: 100%; height: 26px; margin-top: 6px; }
.spark polyline { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke: var(--t, #1d5fd1); stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.2s .3s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
/* plain .stat tiles elsewhere in the app get a blue accent too */
.stats .stat:not([class*=" t-"]) { --t: #1d5fd1; }
.stats .stat:not([class*=" t-"]):nth-child(4n+2) { --t: #10b981; } .stats .stat:not([class*=" t-"]):nth-child(4n+3) { --t: #8b5cf6; } .stats .stat:not([class*=" t-"]):nth-child(4n+4) { --t: #f59e0b; }

/* ---- dashboard layout ---- */
.dash-head { align-items: flex-end; }
.dash-hello { flex: 1; min-width: 240px; }
.dash-hello h1 { margin: 0; }
.dash-hello p { margin: 4px 0 0; }
.wave { display: inline-block; animation: wave 2.4s ease-in-out 1; transform-origin: 70% 70%; }
@keyframes wave { 0%, 60%, 100% { transform: none; } 10%, 30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
.dash-charts { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; margin-bottom: 4px; }
.dash-charts .card { margin-bottom: 0; animation: tileIn .55s var(--ease) both; }
.dash-charts .card:nth-child(2) { animation-delay: .08s; } .dash-charts .card:nth-child(3) { animation-delay: .14s; } .dash-charts .card:nth-child(4) { animation-delay: .2s; }
.dash-lists { margin-top: 16px; }
@media (max-width: 980px) { .dash-charts { grid-template-columns: 1fr; } }
.att-mini { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.live-dot { font-size: .7rem; font-weight: 800; letter-spacing: .08em; color: #059669; display: inline-flex; align-items: center; gap: 6px; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #10b981; animation: ping 1.8s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.55); } 80%, 100% { box-shadow: 0 0 0 9px rgba(16,185,129,0); } }

/* ---- charts ---- */
.chart-box { width: 100%; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart-cols, .chart-area { height: auto; max-height: 300px; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.chart .ax { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .bar { transform-box: fill-box; transform-origin: bottom; animation: barUp .8s var(--ease) both; animation-delay: var(--d, 0s); transition: filter .15s, opacity .15s; }
.chart .bar:hover { filter: brightness(1.12) drop-shadow(0 3px 6px rgba(10,27,61,.25)); }
@keyframes barUp { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.chart .line { fill: none; stroke-width: 2.6; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s var(--ease) forwards; }
.chart .area { opacity: 0; animation: fadeIn .9s .4s ease forwards; }
.chart .pt { opacity: 0; animation: fadeIn .4s 1.1s ease forwards; transition: r .15s; }
.chart .pt:hover { r: 5.5; }
@keyframes fadeIn { to { opacity: 1; } }
.chart-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 0; padding: 0; font-size: .82rem; color: var(--muted); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart-empty { display: grid; place-items: center; min-height: 150px; border: 2px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: .9rem; text-align: center; padding: 16px;
  background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--line) 35%, transparent) 10px 11px); }
.chart-note { font-size: .78rem; color: var(--muted); margin: 6px 0 0; }
.donut2 { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.chart-donut { width: 150px; height: 150px; flex-shrink: 0; transform: rotate(0); }
.chart-donut .seg { animation: segIn 1s var(--ease) both; animation-delay: var(--d, 0s); transition: stroke-width .2s; }
.chart-donut .seg:hover { stroke-width: 6.6; }
@keyframes segIn { from { stroke-dasharray: 0 100; } }
.chart-donut .d-num { font-size: 8px; font-weight: 800; fill: var(--text); }
.chart-donut .d-lbl { font-size: 3.2px; fill: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.donut2-leg { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 150px; display: grid; gap: 6px; font-size: .86rem; }
.donut2-leg li { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 9px; transition: background .15s; }
.donut2-leg li:hover { background: var(--surface-2); }
.donut2-leg i { width: 12px; height: 12px; border-radius: 4px; } .donut2-leg b { font-weight: 700; } .donut2-leg small { color: var(--muted); min-width: 34px; text-align: right; }
.att-mini .chart-donut { width: 104px; height: 104px; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: minmax(80px, 34%) 1fr 36px; gap: 10px; align-items: center; font-size: .88rem; animation: tileIn .5s var(--ease) both; animation-delay: var(--d, 0s); }
.hb-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.hb-track { height: 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.hb-track i { display: block; height: 100%; border-radius: 99px; transform-origin: left; animation: growX 1s var(--ease) both; animation-delay: calc(var(--d, 0s) + .15s); }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hbars b { text-align: right; }

/* ---- lists ---- */
.list-rich { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.list-rich li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; transition: background .15s, transform .2s var(--ease); animation: tileIn .45s var(--ease) both; }
.list-rich li:nth-child(2) { animation-delay: .04s; } .list-rich li:nth-child(3) { animation-delay: .08s; } .list-rich li:nth-child(4) { animation-delay: .12s; }
.list-rich li:nth-child(5) { animation-delay: .16s; } .list-rich li:nth-child(n+6) { animation-delay: .2s; }
.list-rich li:hover { background: var(--surface-2); transform: translateX(3px); }
.lr-av { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: .8rem; flex-shrink: 0;
  color: hsl(var(--h, 220) 70% 32%); background: hsl(var(--h, 220) 85% 92%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lr-av { color: hsl(var(--h, 220) 80% 80%); background: hsl(var(--h, 220) 40% 22%); } }
.lr-main { flex: 1; min-width: 0; color: var(--text); }
.lr-main:hover { text-decoration: none; } .lr-main:hover b { color: var(--brand-2); }
.lr-main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-main small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: .8rem; }
.lr-main small svg { width: 13px; height: 13px; }
.empty-state { display: grid; place-items: center; text-align: center; gap: 6px; padding: 26px 12px; color: var(--muted); }
.empty-state svg { width: 40px; height: 40px; color: var(--brand-3); opacity: .55; }
.empty-state p { margin: 0; }
.list-plain .kv { padding: 10px 8px; border-radius: 10px; transition: background .15s; }
.list-plain .kv:hover { background: var(--surface-2); }
ul.plain li, .kv { transition: background .15s; }
.timeline-x li { position: relative; padding: 9px 4px 9px 18px; border-bottom: 1px solid var(--line); animation: tileIn .4s var(--ease) both; }
.timeline-x li:last-child { border-bottom: 0; }
.timeline-x .tl-dot { position: absolute; left: 0; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 3px #d1fae5; }
.timeline-x li.tl-out .tl-dot { background: #1d5fd1; box-shadow: 0 0 0 3px #dbeafe; }
.timeline-x li::before { content: ""; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: var(--line); z-index: 0; }
.timeline-x .tl-dot { z-index: 1; }

/* ---- tables: zebra, sticky head, row hover ---- */
.table-wrap, .table-scroll { border-radius: 14px; }
.table th { background: linear-gradient(180deg, #f5f8fe, #eef3fc); color: #42557a; font-weight: 700; border-bottom: 2px solid #dbe5f5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .table th { background: #16223a; color: #a9b8d6; border-bottom-color: #24324d; } }
.table th:first-child { border-top-left-radius: 10px; } .table th:last-child { border-top-right-radius: 10px; }
.table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover td { background: #eef4ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .table tbody tr:hover td { background: #172a52; } }
.table td a { font-weight: 600; }

/* ---- badges, chips, tabs, pager, alerts ---- */
.badge { padding: 3px 10px; letter-spacing: .01em; display: inline-flex; align-items: center; gap: 5px; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.tabs a { transition: background .15s, transform .15s var(--ease), box-shadow .15s; }
.tabs a:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.tabs a.active { background: linear-gradient(135deg, #1d5fd1, #0a2a6b); border-color: transparent; box-shadow: 0 4px 12px rgba(29,95,209,.3); }
.chip.active, a.chip.active { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }
.pager a.active { background: linear-gradient(135deg, #2563eb, #1d4ed8); border-color: transparent; }
.alert { border-left-width: 4px; animation: tileIn .4s var(--ease) both; }
.alert-success { border-left-color: #10b981; } .alert-error { border-left-color: #f43f5e; } .alert-info { border-left-color: #1d5fd1; } .alert-warning { border-left-color: #f59e0b; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(59,130,246,.22); border-color: var(--brand-3); }
input, select, textarea { transition: border-color .15s, box-shadow .15s; border-radius: 11px; }

/* ---- sign-in page ---- */
.auth-page { background: radial-gradient(900px 500px at 10% -10%, rgba(59,130,246,.22), transparent 60%), radial-gradient(700px 400px at 110% 110%, rgba(16,185,129,.14), transparent 60%), var(--bg); }
.auth-wrap > form, .auth-wrap .card { box-shadow: var(--shadow-lg); }
.brand-block .brand-mark.has-icon { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 12px 30px rgba(29,95,209,.35); animation: logoIn .7s var(--ease) both; }
@keyframes logoIn { from { opacity: 0; transform: scale(.7) rotate(-10deg); } to { opacity: 1; transform: none; } }
.dev-credit { opacity: .8; margin-top: 4px; }
.app-powered { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.app-powered img { border-radius: 5px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .chart .line, .spark polyline { stroke-dashoffset: 0 !important; }
}
@media print { .chart .bar, .chart .line, .chart .area, .chart .pt, .stat, .card, .content { animation: none !important; opacity: 1 !important; stroke-dashoffset: 0 !important; } }

@media (max-width: 600px) { .chart .ax { font-size: 20px; } }

/* ---- machine groups ---- */
.grp-dot { display: inline-block; width: 14px; height: 14px; border-radius: 5px; margin-right: 10px; vertical-align: 2px; }
.grp-how { line-height: 1.6; }
.grp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px; }
.grp-card { display: grid; gap: 12px; color: var(--text); border-top: 4px solid var(--gc, #1d5fd1); transition: transform .2s var(--ease), box-shadow .2s; }
.grp-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.grp-top { display: flex; gap: 12px; align-items: center; min-width: 0; } .grp-top > div { min-width: 0; }
.grp-top b { display: block; font-size: 1.05rem; } .grp-top small { color: var(--muted); }
.grp-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--gc, #1d5fd1) 15%, transparent); color: var(--gc, #1d5fd1); flex-shrink: 0; }
.grp-ic svg { width: 22px; height: 22px; }
.grp-nums { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .9rem; } .grp-nums b { color: var(--text); font-size: 1.3rem; margin-right: 3px; }
.grp-mlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.form label.grp-m, label.grp-m { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
label.grp-m:has(input:checked) { border-color: var(--brand-3); background: rgba(59,130,246,.07); }
label.grp-m > span:nth-of-type(1) { flex: 1; min-width: 0; } label.grp-m b { display: block; } label.grp-m small { color: var(--muted); font-weight: 400; }
.form select[multiple] { min-height: 130px; }
.wipe-box { margin-top: 14px; border: 1px solid #fecaca; border-radius: 12px; background: #fff7f7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wipe-box { background: #2a1416; border-color: #5b2226; } }
.wipe-box > summary { cursor: pointer; padding: 10px 12px; font-weight: 600; color: #b91c1c; display: flex; gap: 8px; align-items: center; list-style: none; }
.wipe-box > summary::-webkit-details-marker { display: none; }
.wipe-box > summary svg { width: 18px; height: 18px; } .wipe-box > summary .badge { margin-left: auto; }
.wipe-box form { padding: 0 12px 12px; } .wipe-box hr { border: 0; border-top: 1px dashed #fecaca; margin: 10px 0; }
.btn-danger-text { color: #dc2626 !important; } .btn-danger-text:hover { border-color: #fca5a5 !important; background: #fff1f1 !important; }
.bulk-wipe { border-left: 1px solid var(--line); padding-left: 10px; gap: 8px; }
.wipe-box .form label.check, .wipe-box label.check { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; margin: 6px 0; }
.wipe-box label.check input { margin-top: 2px; flex-shrink: 0; }
.wipe-box .wipe-dates label { flex-direction: row; align-items: center; gap: 6px; } .wipe-box .wipe-dates input { width: auto; }
.wipe-confirm input { min-height: 36px; }
.wipe-dates[hidden] { display: none !important; }
/* punch sound toggle in the top bar */
.snd-toggle .snd-x { display: none; } .snd-toggle.off .snd-w { display: none; } .snd-toggle.off .snd-x { display: inline; } .snd-toggle.off { opacity: .6; }
.snd-toggle.wait { animation: sndPulse 1.6s ease-in-out infinite; }
@keyframes sndPulse { 50% { background: rgba(255,255,255,.18); } }
/* registered credentials: fingerprint / face / card */
.cred-ic { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.cred-ic .ci { display: inline-flex; align-items: center; gap: 2px; padding: 3px 5px; border-radius: 8px; color: #b8c2d6; background: transparent; }
.cred-ic .ci svg { width: 16px; height: 16px; }
.cred-ic .ci b { font-size: .72rem; }
.cred-ic .ci.on { color: #fff; } .cred-ic .ci-fp.on { background: #10b981; } .cred-ic .ci-face.on { background: #8b5cf6; } .cred-ic .ci-card.on { background: #06b6d4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cred-ic .ci { color: #4b5a78; } :root:not([data-theme="light"]) .cred-ic .ci.on { color: #fff; } }
/* edit in the list */
tr.ie-row td { background: #f3f7ff !important; padding: 8px 10px 12px; border-bottom: 2px solid #dbe5f5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) tr.ie-row td { background: #13203a !important; } }
.ie-grid { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr .9fr 1.2fr .9fr; gap: 8px; }
.ie-grid label { display: flex; flex-direction: column; gap: 3px; font-size: .74rem; font-weight: 600; color: var(--muted); }
.ie-grid input, .ie-grid select { min-height: 36px; padding: 6px 9px; font-size: .88rem; }
.ie-grid .ie-wait { border-color: #f59e0b; } .ie-grid .ie-ok { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.15); } .ie-grid .ie-bad { border-color: #f43f5e; box-shadow: 0 0 0 3px rgba(244,63,94,.15); }
#inlineEdit.active { background: var(--brand-2); color: #fff; }
@media (max-width: 900px) { .ie-grid { grid-template-columns: 1fr 1fr; } }
input.ro, input[readonly] { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }

/* ---------------------------------------------------------------- forms: label on top, box, help text under the box (1.25.1)
   Every input of a row starts at the same height — a long help text never pushes its box down. */
.form label:not(.check):not(.choice):not(.switch-row):not(.profile-card):not(.grp-m) > :is(input, select, textarea, .inline-add, .ro) { order: 1; }
.form label:not(.check):not(.choice):not(.switch-row):not(.profile-card):not(.grp-m) > :is(.hint, small) { order: 2; }
.form .grid2, .form .grid3 { align-items: start; }
.emp-form { display: grid; gap: 16px; }
.emp-form .card.fs { margin: 0; padding: 20px 22px 22px; }
.fs-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.fs-head h3 { margin: 0; font-size: 1.05rem; }
.fs-head p { margin: 2px 0 0; color: var(--muted); font-size: .84rem; }
.fs-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.fs-ico .ic { width: 20px; height: 20px; }
.fs-ico.t-blue { background: #e0ecff; color: #1d5fd1; } .fs-ico.t-amber { background: #fff1d6; color: #c26a00; }
.fs-ico.t-violet { background: #efe7ff; color: #6d3fd9; } .fs-ico.t-cyan { background: #dcf6fb; color: #0e8aa3; }
.fs-ico.t-green { background: #dcf7ea; color: #0f9a62; } .fs-ico.t-indigo { background: #e5e8ff; color: #3949c6; }
.fs-ico.t-rose { background: #ffe4e8; color: #d1334f; }
.fgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; align-items: start; }
.fgrid > .span2 { grid-column: span 2; } .fgrid > .span3 { grid-column: 1 / -1; }
.emp-form .fgrid label { gap: 6px; min-width: 0; }
.emp-form .lbl { font-size: .86rem; font-weight: 600; color: var(--ink, #0f2240); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-form .hint { font-size: .78rem; line-height: 1.35; }
.req { color: #e11d48; font-style: normal; }
.emp-form input.ro, .emp-form input[readonly] { background: #f1f5fb; color: #1d5fd1; font-weight: 700; letter-spacing: .03em; cursor: not-allowed; }
.emp-form input[type=file] { padding: 8px 10px; }
.fs-sub { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 0 8px; }
.fs-sub ~ .fs-sub { margin-top: 18px; }
.fs-foot { margin: 14px 0 0; }
.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.form label.choice { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; font-weight: 500; }
.form label.choice:has(input:checked) { border-color: #2f6fe4; background: rgba(47,111,228,.06); }
.form label.choice input { margin-top: 3px; flex-shrink: 0; }
.choice span, .switch-row > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.choice small, .switch-row small { color: var(--muted); font-size: .8rem; font-weight: 400; line-height: 1.35; }
.form label.switch-row { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-top: 14px; cursor: pointer; font-weight: 500; background: var(--surface); }
.form label.switch-row + label.switch-row { margin-top: 10px; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-row .sw { width: 40px; height: 22px; border-radius: 99px; background: #cbd5e1; position: relative; flex-shrink: 0; transition: background .2s; }
.switch-row .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch-row input:checked + .sw { background: #1d5fd1; } .switch-row input:checked + .sw::after { transform: translateX(18px); }
.switch-row.danger input:checked + .sw { background: #e11d48; }
.switch-row input:focus-visible + .sw { outline: 2px solid #2f6fe4; outline-offset: 2px; }
.form label.blk-reason { margin-top: 10px; max-width: 520px; }
.form-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 18px; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 -6px 24px rgba(15,34,64,.08); }
.form-bar .grow { flex: 1; }
@media (max-width: 980px) { .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .fgrid, .choice-cards { grid-template-columns: 1fr; } .fgrid > .span2 { grid-column: auto; }
  .emp-form .card.fs { padding: 16px; } .form-bar { padding: 10px 12px; } .form-bar .btn { flex: 1; }
  .form-bar > .muted, .form-bar .grow { display: none; }
}

/* ---------------------------------------------------------------- 1.26 product-owner console */
.tone-gold { --tone: #d97706; --tone-ink: #92400e; }
.nav-hid { opacity: .45; } .nav-hid:hover { opacity: .8; }
.sa-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 16px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.sa-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .88rem; }
.sa-tabs a .ic { width: 17px; height: 17px; }
.sa-tabs a:hover { background: var(--surface-2); color: var(--text); }
.sa-tabs a.on { background: linear-gradient(135deg, #1d5fd1, #3b82f6); color: #fff; box-shadow: 0 4px 12px rgba(29,95,209,.25); }
.sa-tabs .count { background: #f59e0b; color: #fff; border-radius: 99px; font-size: .7rem; padding: 0 6px; font-style: normal; }
.color-row { display: flex; align-items: center; gap: 12px; } .color-row input[type=color] { width: 56px; height: 40px; padding: 2px; border-radius: 10px; }
.color-row label.check { font-weight: 500; }
.brand-preview { margin: 16px 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.bp-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: var(--brand); color: #fff; min-width: 300px; }
.bp-bar small { opacity: .75; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.form label.switch-row.mod-card { margin: 0; align-items: flex-start; }
.form label.switch-row.mod-card .sw { margin-top: 3px; }
.mod-card b { display: flex; align-items: center; gap: 7px; } .mod-ic .ic { width: 17px; height: 17px; color: #1d5fd1; }
.form label.switch-row.mod-card:has(input:checked) { border-color: #93c5fd; background: #f5f9ff; }
.lic-soon { color: #b45309 !important; font-weight: 600; }
.row-new td { background: #fffbea; }
/* menu editor */
.m-top, .m-items { list-style: none; margin: 0; padding: 0; }
.m-top { display: grid; gap: 10px; }
.m-group { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; box-shadow: 0 1px 2px rgba(15,34,64,.04); border-left: 4px solid var(--tone, #1d5fd1); }
.m-ghead, .m-item { display: flex; align-items: center; gap: 10px; }
.m-ghead { padding: 2px 4px 8px; }
.m-ghead .ng-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--tone, #1d5fd1) 14%, #fff); color: var(--tone, #1d5fd1); }
.m-ghead .ng-ic .ic { width: 17px; height: 17px; }
.m-items { display: grid; gap: 6px; min-height: 36px; padding: 6px; border-radius: 10px; background: var(--surface-2); }
.m-items.drop-into { outline: 2px dashed #3b82f6; }
.m-item { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.m-item.m-single { border-left: 4px solid #94a3b8; padding: 10px; }
.m-grip { cursor: grab; color: #94a3b8; font-weight: 800; letter-spacing: -2px; user-select: none; padding: 0 2px; }
.m-ic .ic { width: 16px; height: 16px; color: var(--muted); }
.m-label { flex: 1; min-width: 120px; border: 1px solid transparent !important; background: transparent !important; padding: 6px 8px !important; font-weight: 600; border-radius: 8px; }
.m-label:hover, .m-label:focus { border-color: var(--line) !important; background: #fff !important; }
.m-glabel { font-size: 1rem; font-weight: 700; }
.m-file { font-size: .72rem; color: var(--muted); background: transparent; }
.m-btns { display: flex; gap: 2px; } .m-btns .icon-btn { width: 28px; height: 28px; font-size: .9rem; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 8px; }
.m-eye { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; cursor: pointer; padding: 4px 10px; border-radius: 99px; background: #dcfce7; color: #15803d; white-space: nowrap; }
.m-eye input { margin: 0; }
.is-hidden > .m-ghead .m-eye, .m-item.is-hidden > .m-eye { background: #f1f5f9; color: #64748b; }
.m-item.is-hidden, .m-group.is-hidden > .m-ghead { opacity: .55; }
.dragging { opacity: .4; outline: 2px dashed #3b82f6; }
@media (max-width: 640px) { .m-file { display: none; } .m-label { min-width: 0; } }
/* roles */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.role-card { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 14px 16px; border-top: 4px solid var(--rc); color: var(--text); transition: transform .15s, box-shadow .15s; }
.role-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,34,64,.08); }
.role-card.on { outline: 2px solid var(--rc); } .role-card.off { opacity: .6; }
.role-card small { color: var(--muted); min-height: 1.2em; }
.role-meta { display: flex; gap: 10px; margin-top: 6px; font-size: .78rem; font-weight: 600; color: var(--rc); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.perm-col { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; border-top: 3px solid var(--tone, #1d5fd1); display: flex; flex-direction: column; gap: 4px; }
.perm-col label.check { font-weight: 500; font-size: .88rem; }
.perm-col .perm-head { font-weight: 700; padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.perm-head .ng-ic .ic { width: 16px; height: 16px; color: var(--tone, #1d5fd1); }
/* billing */
.inv-lines { width: 100%; border-collapse: collapse; } .inv-lines th { text-align: left; font-size: .78rem; color: var(--muted); padding: 4px; }
.inv-lines td { padding: 3px 4px; } .inv-lines input, .inv-lines select { width: 100%; }
.lic-use { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 12px; align-items: end; }
@media (max-width: 640px) { .lic-use { grid-template-columns: 1fr; } }
/* employee forms */
.form-cat { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.form-tile { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 16px; color: var(--text); transition: transform .15s, box-shadow .15s; }
.form-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,34,64,.08); }
.form-tile small { color: var(--muted); }
.fgrid input[type=color] { width: 90px; height: 42px; padding: 3px; border-radius: 10px; }

/* ---------------------------------------------------------------- 1.26.1 roles & logins guide */
.rg-intro p { margin: 0 0 12px; }
.rg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rg-chips a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-weight: 600; font-size: .86rem;
  color: var(--tone-ink, #133f9a); background: color-mix(in srgb, var(--tone, #1d5fd1) 10%, #fff); border: 1px solid color-mix(in srgb, var(--tone, #1d5fd1) 25%, #fff); }
.rg-chips a .ic { width: 15px; height: 15px; }
.rg-role { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; margin-top: 16px; border-top: 4px solid var(--tone, #1d5fd1); scroll-margin-top: 80px; }
.rg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rg-head h2 { margin: 0; font-size: 1.25rem; } .rg-head small { color: var(--muted); }
.rg-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--tone, #1d5fd1); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--tone, #1d5fd1) 35%, transparent); flex-shrink: 0; }
.rg-ic .ic { width: 24px; height: 24px; }
.rg-login { background: var(--surface-2); border: 1px dashed color-mix(in srgb, var(--tone, #1d5fd1) 45%, #fff); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; display: grid; gap: 6px; }
.rg-login > div { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 8px; }
.rg-login span { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rg-login code { font-size: .95rem; font-weight: 700; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; overflow-wrap: anywhere; }
.rg-copy { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 32px; height: 30px; cursor: pointer; color: var(--muted); }
.rg-miss { margin: 2px 0 0; font-size: .8rem; color: #b45309; }
.rg-can { margin: 0; padding-left: 20px; display: grid; gap: 6px; } .rg-can li { line-height: 1.45; }
.rg-can li::marker { color: var(--tone, #1d5fd1); }
.rg-shots { min-width: 0; }
.rg-main { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(15,34,64,.12); cursor: zoom-in; }
.rg-main img { display: block; width: 100%; height: auto; }
.rg-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.rg-thumbs button { border: 2px solid transparent; border-radius: 8px; padding: 0; overflow: hidden; width: 110px; flex-shrink: 0; cursor: pointer; background: none; opacity: .7; }
.rg-thumbs button.on { border-color: var(--tone, #1d5fd1); opacity: 1; } .rg-thumbs img { display: block; width: 100%; }
.rg-noshot { display: grid; place-items: center; min-height: 200px; border: 1px dashed var(--line); border-radius: 12px; }
.rg-rules { margin-top: 16px; } .rg-rules h2 { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; margin-top: 0; }
.rg-zoom { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
.rg-zoom::backdrop { background: rgba(5,15,41,.8); }
.rg-zoom img { display: block; max-width: 96vw; max-height: 88vh; border-radius: 10px; }
.rg-zoom .btn { margin: 10px auto 0; display: block; }
@media (max-width: 900px) { .rg-role { grid-template-columns: 1fr; } }
@media print { .rg-chips, .rg-copy, .rg-thumbs { display: none; } .rg-role { break-inside: avoid; box-shadow: none; } }

/* ---------------------------------------------------------------- 1.27 biometric data lock */
.bio-lock { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); margin: 4px 0 14px; }
.bio-lock.on { background: #ecfdf5; border-color: #a7f3d0; }
.bio-lock .bl-ic { font-size: 1.4rem; } .bio-lock .bl-t { flex: 1; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.bio-lock small { color: var(--muted); font-size: .8rem; }
.bio-lk { font-size: .9rem; vertical-align: middle; }

/* ---------------------------------------------------------------- 1.28 profile picture from face registration, sites */
.prof-pic { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface-2); }
.prof-pic img, .prof-pic .pp-none { width: 56px; height: 70px; border-radius: 10px; object-fit: cover; flex-shrink: 0; display: grid; place-items: center; background: #e2e8f0; font-weight: 800; color: #475569; }
.prof-pic > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prof-pic label.small { display: flex; flex-direction: row !important; align-items: center; gap: 8px; font-weight: 500; }
.site-pick select { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 99px; padding: 6px 12px; font-weight: 700; font-size: .82rem; max-width: 220px; }
.site-pick select option { color: #0f1b33; }
.site-chip { color: #fff; background: rgba(255,255,255,.14); border-radius: 99px; padding: 6px 12px; font-weight: 700; font-size: .82rem; white-space: nowrap; }
@media (max-width: 700px) { .site-pick select { max-width: 120px; } .site-chip { display: none; } }
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.site-card { margin: 0; border-top: 4px solid #1d5fd1; } .site-card.off { opacity: .6; }
.sc-head { display: flex; gap: 10px; align-items: flex-start; } .sc-head h3 { margin: 0; } .sc-head small { color: var(--muted); } .sc-ic { font-size: 1.6rem; }
.sc-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.sc-kpis div { background: var(--surface-2); border-radius: 10px; padding: 8px; } .sc-kpis b { display: block; font-size: 1.2rem; } .sc-kpis span { font-size: .74rem; color: var(--muted); }

/* ===== 1.28 planner ===== */
.wk-nav { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wk-nav b { padding: 0 6px; white-space: nowrap; }
.plan-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.plan-sum .kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.plan-sum .kpi > span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.plan-sum .kpi > b { font-size: 1.5rem; line-height: 1.15; }
.plan-sum .kpi.quick { justify-content: center; gap: 8px; }
.plan-tbl td { vertical-align: middle; } .plan-tbl select, .plan-tbl input { width: 100%; min-width: 0; }
.plan-tbl td.n input { width: 100px; text-align: right; }
.table .n, .table th.n { text-align: right; }
.pv-tbl th.today { background: rgba(37, 99, 235, .1); }
.pv-tbl tr.grp-first td { border-top: 2px solid var(--line); }
.pv-tbl td small { display: block; font-size: .7rem; opacity: .8; }
.pv-cell { font-weight: 600; min-width: 52px; }
.pv-short { color: #b91c1c; } td.pv-short { background: rgba(220, 38, 38, .12); }
.pv-close { color: #a16207; } td.pv-close { background: rgba(234, 179, 8, .16); }
.pv-ok { color: #15803d; } td.pv-ok { background: rgba(22, 163, 74, .12); }
.pv-over { color: #6d28d9; } td.pv-over { background: rgba(124, 58, 237, .12); }
td.pv-future, td.pv-none { color: var(--muted); }
.pv-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.pv-chip { background: none; border: 1px solid currentColor; }
.pv-bars { display: flex; flex-direction: column; gap: 10px; }
.pv-bar { display: grid; grid-template-columns: minmax(110px, 200px) 1fr 70px; gap: 4px 10px; align-items: center; }
.pv-bar small { grid-column: 2 / 4; color: var(--muted); font-size: .75rem; margin-top: -4px; }
.pv-track { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; }
.pv-track i { display: block; height: 100%; border-radius: 6px; background: currentColor; }
.stars { white-space: nowrap; color: #d1d5db; } .stars i { font-style: normal; font-size: 1.05em; }
.stars i.on { color: #f59e0b; } .stars i.half { color: #fcd34d; } .stars b { color: var(--text, inherit); font-size: .85em; margin-left: 3px; }
td small .stars, td > small { display: block; }
.rate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.rate-card { display: flex; flex-direction: column; gap: 10px; }
.rate-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.rate-kpis div { background: var(--bg, #f8fafc); border-radius: 8px; padding: 8px 4px; } .rate-kpis b { display: block; font-size: 1.05rem; } .rate-kpis span { font-size: .72rem; color: var(--muted); }
.rate-card textarea { width: 100%; margin-top: 4px; }
@media (max-width: 640px) { .pv-bar { grid-template-columns: 1fr 60px; } .pv-bar > span { grid-column: 1 / 3; } .pv-bar small { grid-column: 1 / 3; } }
.ms-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 10px 14px; border: 1px solid #8c8c8c; border-radius: 6px; background: #fff; color: #5e5e5e; font-weight: 600; text-decoration: none; }
.ms-btn:hover { background: #f3f3f3; } .ms-btn svg { width: 20px; height: 20px; }
.or-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 14px 0; } .or-line:before, .or-line:after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* ===== 1.29: overtime highlight, registers, activity log, timeline, pick lists ===== */
td.ot-hi { background: #ffedd5 !important; color: #c2410c; font-weight: 700; }
.report td.ot { box-shadow: inset 0 -3px 0 #f97316; font-weight: 700; }
tr.ot-row td:first-child, tr.ot-row td:nth-child(2) { border-left: 3px solid #f97316; }
tr.ot-row td { background: #fff7ed; }
tr.sub-row td { background: var(--bg, #f8fafc); font-weight: 700; border-top: 1px solid var(--line); }
td.flag { color: #b91c1c; font-weight: 600; }
.ot-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #ffedd5; color: #c2410c; font-size: .72rem; font-weight: 700; }
.act-tbl td small { display: block; color: var(--muted); font-size: .72rem; }
.act-chip { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--bg, #f1f5f9); font-size: .78rem; font-weight: 600; }
tr.act-bad .act-chip { background: #fee2e2; color: #b91c1c; } tr.act-ok .act-chip { background: #dcfce7; color: #15803d; } tr.act-muted .act-chip { color: var(--muted); }
.act-det { max-width: 520px; word-break: break-word; font-size: .85rem; }
.nowrap { white-space: nowrap; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline .tl-day { padding: 12px 0 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; position: sticky; top: 0; background: var(--card, #fff); z-index: 1; }
.timeline .tl-item { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 6px 0 6px 10px; border-left: 3px solid var(--line); margin-left: 6px; }
.timeline .tl-item time { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.timeline .tl-item small { display: block; color: var(--muted); }
.tl-in { border-left-color: #16a34a !important; } .tl-out { border-left-color: #2563eb !important; } .tl-bad { border-left-color: #dc2626 !important; } .tl-warn { border-left-color: #f59e0b !important; } .tl-info { border-left-color: #8b5cf6 !important; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 14px; max-height: 360px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; }
.pick-list label.check { margin: 0; } .pick-list label.off { opacity: .45; }

/* ===== 1.30: projects overview, dashboard project strip, score ring ===== */
.ring { --p: 0; width: 58px; height: 58px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: conic-gradient(currentColor calc(var(--p) * 1%), var(--line) 0); }
.ring b { width: 44px; height: 44px; border-radius: 50%; background: var(--card, #fff); display: grid; place-items: center; font-size: .95rem; color: var(--text, #0f172a); }
.ring.pv-ok { color: #16a34a; } .ring.pv-close { color: #eab308; } .ring.pv-short { color: #dc2626; } .ring-none { background: var(--line); color: var(--muted); }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.ph-card { display: flex; flex-direction: column; gap: 12px; }
.ph-card .sc-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.ph-card .sc-kpis div { background: var(--bg, #f8fafc); border-radius: 8px; padding: 6px 4px; } .ph-card .sc-kpis b { display: block; } .ph-card .sc-kpis span { font-size: .7rem; color: var(--muted); }
.ph-top { display: grid; grid-template-columns: minmax(260px, 320px) 1fr; gap: 14px; margin-bottom: 14px; align-items: start; }
.ph-score { display: flex; gap: 14px; align-items: flex-start; } .ph-score .ring { width: 84px; height: 84px; } .ph-score .ring b { width: 66px; height: 66px; font-size: 1.3rem; } .ph-score > div { flex: 1; }
@media (max-width: 860px) { .ph-top { grid-template-columns: 1fr; } }
.dash-projects { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 8px; align-items: stretch; }
.dp-card button { display: flex; gap: 10px; align-items: center; text-align: left; min-width: 250px; height: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card, #fff); cursor: pointer; font: inherit; color: inherit; }
.dp-card button:hover { border-color: #93c5fd; } .dp-card.on button { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37, 99, 235, .2); }
.dp-card .ring { width: 46px; height: 46px; } .dp-card .ring b { width: 34px; height: 34px; font-size: .8rem; }
.dp-t small { display: block; color: var(--muted); font-size: .75rem; }
.dp-more { align-self: center; white-space: nowrap; padding: 0 8px; font-weight: 600; }
.ctr-pick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }

/* ===== 1.31: today's progress, contractor progress ===== */
.tp-h { margin: 22px 0 10px; font-size: 1.2rem; }
.tp-tbl .pv-track, .tp-dash .pv-track { margin-bottom: 2px; }
tr.tp-now td { background: rgba(22, 163, 74, .07); }
.tp-dash { margin-bottom: 14px; }
.tips ul { margin: 6px 0 0 18px; padding: 0; } .tips li { margin: 4px 0; }
.tips { border-left: 4px solid #f59e0b; }

/* ===== 1.32: contractor scheduling checks ===== */
.cr-tbl td { vertical-align: top; } .cr-tbl tr.off { opacity: .45; } .cr-tbl select { min-width: 150px; }
.ck { display: block; font-size: .75rem; line-height: 1.3; margin: 1px 0; } .ck-bad { color: #b91c1c; font-weight: 600; } .ck-warn { color: #a16207; } .ck-ok { color: #15803d; }
.tp-break td small { display: block; color: var(--muted); font-size: .72rem; } .tp-break tr.tp-tot td { border-top: 2px solid var(--line); background: var(--bg, #f8fafc); }
.tp-break tr.tp-ag td:first-child { padding-left: 22px; } .tp-sub { margin: 14px 0 6px; font-size: 1rem; }
/* 1.34 weekly plan */
.pw-days{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;padding:8px 0}
.pl-days{white-space:nowrap}.pl-range select{width:auto;padding:2px 4px;font-size:.85em}
.pl-dk{display:inline-flex;gap:2px;margin-left:6px}.pl-dk label{display:inline-flex;flex-direction:column;align-items:center;font-size:.72em;line-height:1.1}
.pl-dk label.off{opacity:.35}.plan-est td.today,.plan-est th.today{background:rgba(59,130,246,.08)}
.pw-d{display:inline-flex!important;flex-direction:row!important;align-items:center;gap:4px;white-space:nowrap;font-weight:500}.pw-d input{width:auto;margin:0}
.plan-tbl .pl-wt{min-width:170px}.plan-tbl .pl-ag{min-width:200px}.plan-tbl td{vertical-align:middle}

/* ===== 1.35 responsive: nothing may push the page wider than the screen ===== */
html, body { max-width: 100%; }
body { overflow-x: clip; }
.content, .content > *, .card, .content form, .content section { max-width: 100%; }
.content :where(.grid2, .grid3, .stats, .stats-x, .plan-sum, .hw-sum, .kpis6, .lic-tiles, .demo-cols, .crop-body, .cam-grid, .ppe-grid, .doc-grid, .profile-cards, .quick-grid, .tp-project) > * { min-width: 0; }
.content input:not([type=checkbox]):not([type=radio]), .content select, .content textarea { max-width: 100%; }
.content img, .content video, .content canvas, .content iframe { max-width: 100%; }
.content pre, .content code { white-space: pre-wrap; overflow-wrap: anywhere; }
.table-wrap, .table-scroll, .tbl-wrap, .auto-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.auto-wrap { margin: 0; }
.table td { overflow-wrap: break-word; }
.table td.n, .table th.n, .table td .badge, .table td .pv-chip { overflow-wrap: normal; }
.page-head { flex-wrap: wrap; gap: 8px 12px; }
.page-head h1 { flex: 1 1 220px; overflow-wrap: break-word; }
.row-gap { flex-wrap: wrap; }
.tabs { overflow-x: auto; scrollbar-width: thin; max-width: 100%; }
.sess-cell { white-space: normal !important; min-width: 120px; }
.sess-list { display: flex; flex-wrap: wrap; gap: 3px; max-width: 340px; }
.sess-chip { display: inline-block; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-size: .78rem; white-space: nowrap; }
.sess-chip.more { background: transparent; font-weight: 600; }
@media (max-width: 760px) {
  .content { padding: 14px 12px 50px; }
  .card { padding-left: 12px; padding-right: 12px; }
  .table.compact td, .table.compact th { white-space: normal; }
  .plan-sum, .stats-x { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .btn { white-space: normal; }
}
@media (max-width: 330px) { .plan-sum, .stats-x { grid-template-columns: 1fr !important; } }
@media (max-width: 560px) {
  .topbar { gap: 6px; }
  .topbar .brand-name { display: none; }
  .lang-sw:not(.open) a:not(.on) { display: none; }
  .lang-sw { margin-right: 4px; }
  .topbar select { max-width: 42vw; }
}
/* 1.35 Reports sub-menu inside a menu group */
.nav-rep { margin-top: 2px; }
.nav-rep > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--text); }
.nav-rep > summary::-webkit-details-marker { display: none; }
.nav-rep > summary svg { width: 16px; height: 16px; color: var(--muted); }
.nav-rep > summary:hover { background: color-mix(in srgb, var(--tone, #1d5fd1) 10%, transparent); }
.nav-rep > summary span { flex: 1; }
.nav-rep > summary .nav-chev { margin-left: auto; transition: transform .2s; display: inline-flex; }
.nav-rep[open] > summary .nav-chev { transform: rotate(90deg); }
.nav-rep.has-active > summary { color: var(--tone, var(--brand-2)); }
.nav-rep .rep-n { background: var(--surface-2); color: var(--muted); }
.nav-rep-list { margin: 2px 0 4px 14px; padding-left: 8px; border-left: 1px dashed var(--line); }
.sidenav .nav-rep-list a.sub { font-size: .85rem; padding: 5px 8px; }
/* 1.35 View as */
.va-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; margin-bottom: 14px; border-radius: 12px; background: #fff4d6; border: 1px solid #f2c94c; color: #5c4400; font-size: .9rem; }
.va-bar span { flex: 1 1 260px; }
.va-bar form { margin: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .va-bar { background: #3a2e0a; border-color: #8a6d1a; color: #f5dc8a; } }
.va-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.va-grid > * { min-width: 0; }
.va-role h3 { margin: 0 0 4px; }
.va-list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.va-list li span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.va-list li form { margin: 0; }
.va-top { font-size: 1.05rem; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
/* 1.37 billing plan */
.bm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.bm-card { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; background: var(--surface); }
.bm-card input { width: auto; margin: 0 0 4px; }
.bm-card small { color: var(--muted); font-weight: 400; }
.bm-card.on, .bm-card:has(input:checked) { border-color: var(--brand-2, #1d5fd1); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-2, #1d5fd1) 20%, transparent); }
.form label.inl, label.inl { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; font-weight: 500; }
.form label.inl input, .form label.inl select { margin: 0; }
.bm-card { position: relative; padding-left: 38px; }
.bm-card input { position: absolute; left: 12px; top: 14px; }
.inl-row { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; }
.inl-row input { margin: 0; }

/* ---------- 1.41 reports centre, overtime board, smart insights, replacements ---------- */
td.warn-cell { background: #fef3c7 !important; color: #92400e; font-weight: 600; }
td.ok-cell { background: #dcfce7 !important; color: #166534; font-weight: 600; }
tr.risk-row td { background: #fff1f2; } tr.risk-row td:first-child { box-shadow: inset 4px 0 0 #e11d48; }
.text-red { color: #b91c1c; }
.rpt-head > div:first-child { flex: 1; min-width: 0; } .rpt-head h1 { margin-bottom: 0; }
.rpt-form { display: inline-block; margin-top: 4px; font-size: .78rem; font-weight: 700; color: #6d28d9; background: #ede9fe; border-radius: 99px; padding: 2px 10px; }
.rpt-group { font-size: 1rem; margin: 22px 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.rpt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.rpt-tile { position: relative; display: grid; gap: 6px; align-content: start; padding: 16px 16px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text);
  box-shadow: var(--shadow); transition: transform .25s var(--ease, ease), box-shadow .25s, border-color .2s; animation: tileIn .5s var(--ease, ease) both; }
.rpt-grid .rpt-tile:nth-child(2) { animation-delay: .04s; } .rpt-grid .rpt-tile:nth-child(3) { animation-delay: .08s; } .rpt-grid .rpt-tile:nth-child(4) { animation-delay: .12s; } .rpt-grid .rpt-tile:nth-child(5) { animation-delay: .16s; }
.rpt-tile:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg, 0 10px 30px rgba(15,27,51,.12)); border-color: var(--brand-3); }
.rpt-tile .rt-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #1d5fd1, #0a2a6b); color: #fff; }
.rpt-tile .rt-ic svg { width: 20px; height: 20px; }
.rpt-tile b { font-size: 1rem; } .rt-desc { color: var(--muted); font-size: .85rem; line-height: 1.4; }
.rt-form { font-size: .72rem; font-weight: 700; color: #6d28d9; }
.rpt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 4px 0 14px; }
.rpt-kpis > a, .rpt-kpis > div { position: relative; overflow: hidden; display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); animation: tileIn .45s var(--ease, ease) both; }
.rpt-kpis > a:hover { text-decoration: none; border-color: var(--brand-3); }
.rpt-kpis b { font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; } .rpt-kpis span { color: var(--muted); font-size: .8rem; }
.rpt-kpis.small-k b { font-size: 1.25rem; }
.rpt-kpis i { position: absolute; left: 0; bottom: 0; height: 4px; background: currentColor; opacity: .5; border-radius: 0 4px 4px 0; transition: width .8s var(--ease, ease); }
.rpt-kpis .k-green { color: #047857; } .rpt-kpis .k-red { color: #be123c; } .rpt-kpis .k-blue { color: #1d4ed8; } .rpt-kpis .k-amber { color: #b45309; }
.rpt-kpis .k-orange { color: #c2410c; } .rpt-kpis .k-violet { color: #6d28d9; } .rpt-kpis .k-slate { color: #334155; }
.rpt-kpis .k-green, .rpt-kpis .k-red, .rpt-kpis .k-blue, .rpt-kpis .k-amber, .rpt-kpis .k-orange, .rpt-kpis .k-violet, .rpt-kpis .k-slate { box-shadow: inset 0 3px 0 currentColor; }
.rpt-kpis > * span { color: var(--muted); }
.rpt-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; } .rpt-tabs a { white-space: nowrap; }
.f-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.rpt-quick { margin-left: 4px; }
.rpt-note { margin: 4px 0 10px; }
.rpt-prep { display: flex; gap: 16px; align-items: center; }
.rpt-bar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; margin-top: 6px; } .rpt-bar i { display: block; height: 100%; background: linear-gradient(90deg, #1d5fd1, #10b981); transition: width .6s; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid #dbeafe; border-top-color: #1d5fd1; animation: spin 1s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.rpt-pager span:first-child { border: 0; background: none; color: var(--muted); }
.rpt-charts { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
table.timecard td:last-child { min-width: 340px; font-size: .78rem; color: var(--muted); white-space: normal; }
table.timecard td:nth-child(5) { white-space: normal; min-width: 200px; }
.rpt-letter { border-bottom: 2px solid #0a2a6b; padding-bottom: 6px; margin-bottom: 8px; }
.rl-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; }
.rl-org { font-size: 16px; display: block; } .rl-top span { display: block; font-size: 11px; color: #444; } .rl-right { text-align: right; } .rl-right b { font-size: 14px; }
.rl-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 10px; color: #333; margin-top: 4px; }
.rpt-sign { display: none; }
/* overtime board */
.ob-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 3px 0 8px; vertical-align: -1px; }
.ob-key .k-ok { background: #fde68a; } .ob-key .k-amber { background: #fb923c; } .ob-key .k-red { background: #e11d48; }
.ob-bulk { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 2px 2px 10px; }
.ob-table tr.ob-amber td { background: #fff7ed; } .ob-table tr.ob-amber td:first-child { box-shadow: inset 4px 0 0 #fb923c; }
.ob-table tr.ob-red td { background: #fff1f2; } .ob-table tr.ob-red td:first-child { box-shadow: inset 4px 0 0 #e11d48; }
.ob-table tr.ob-ok td:first-child { box-shadow: inset 4px 0 0 #fde68a; }
.ob-table small { display: block; color: var(--muted); font-size: .74rem; }
.ob-ot b { color: #c2410c; font-size: 1.05rem; } tr.ob-red .ob-ot b { color: #be123c; }
.ob-q { display: block; width: 90px; height: 6px; border-radius: 6px; background: #e2e8f0; overflow: hidden; } .ob-q i { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #e11d48); }
.ob-dec { font-weight: 700; font-size: .8rem; padding: 2px 8px; border-radius: 8px; display: inline-block; }
.dec-approved { background: #dcfce7; color: #166534; } .dec-partial { background: #fef3c7; color: #92400e; } .dec-stop { background: #ffedd5; color: #c2410c; } .dec-rejected { background: #fee2e2; color: #b91c1c; }
.ob-act { white-space: nowrap; } .ob-act .btn { min-width: 34px; padding-left: 8px; padding-right: 8px; }
/* smart insights */
.ins-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.ins-brief { background: linear-gradient(135deg, #0a2a6b, #1d5fd1 60%, #3b82f6); color: #eef4ff; border: 0; position: relative; overflow: hidden; }
.ins-brief::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); }
.ins-brief h3 { color: #fff; margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.ins-brief ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; line-height: 1.45; } .ins-brief b { color: #fff; }
.ins-brief .ins-time { color: #bfd3ff; font-size: .78rem; margin-top: 10px; }
.ins-score { display: grid; place-items: center; text-align: center; gap: 4px; }
.ins-ring { --v: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--ring, #10b981) calc(var(--v) * 1%), #e2e8f0 0); transition: --v 1s; }
.ins-ring > div { width: 104px; height: 104px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; }
.ins-ring b { font-size: 2rem; line-height: 1; } .ins-ring span { font-size: .72rem; color: var(--muted); }
.ins-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-top: 14px; }
.ins-card h3 { display: flex; align-items: center; gap: 8px; }
.ins-sev { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; border-radius: 6px; padding: 1px 7px; }
.sev-high { background: #fee2e2; color: #b91c1c; } .sev-mid { background: #fef3c7; color: #92400e; } .sev-low { background: #dcfce7; color: #166534; } .sev-info { background: #dbeafe; color: #1d4ed8; }
.ins-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ins-list li { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: .88rem; }
.ins-list li small { display: block; color: var(--muted); font-size: .76rem; }
.ins-list li b.v { font-variant-numeric: tabular-nums; }
.fc-table td.fc-short { background: #fee2e2; color: #b91c1c; font-weight: 700; } .fc-table td.fc-ok { background: #dcfce7; color: #166534; font-weight: 700; } .fc-table td.fc-near { background: #fef3c7; color: #92400e; font-weight: 700; }
.ins-why { font-size: .78rem; color: var(--muted); margin-top: 8px; }
/* replacements */
.wa-row-open td:first-child { box-shadow: inset 4px 0 0 #e11d48; } .wa-row-done td:first-child { box-shadow: inset 4px 0 0 #10b981; }
.wa-pill { font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; } .wa-open { background: #fee2e2; color: #b91c1c; } .wa-done { background: #dcfce7; color: #166534; } .wa-late { background: #ffedd5; color: #c2410c; }
@media (max-width: 900px) { .ins-hero { grid-template-columns: 1fr; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rpt-tile, :root:not([data-theme="light"]) .rpt-kpis > * { background: var(--surface); } :root:not([data-theme="light"]) td.warn-cell { background: #422006 !important; color: #fde68a; } :root:not([data-theme="light"]) td.ok-cell { background: #052e16 !important; color: #86efac; } }
@media print {
  @page { margin: 8mm; }
  .rpt-letter { display: block !important; } .rpt-sign { display: flex !important; justify-content: space-between; gap: 20px; margin-top: 34px; font-size: 10px; }
  .rpt-sign span { flex: 1; border-top: 1px solid #333; padding-top: 4px; text-align: center; }
  .rpt-tabs, .filters, .rpt-pager, .ob-bulk, .ob-act { display: none !important; }
  .rpt-kpis { grid-template-columns: repeat(6, 1fr); gap: 4px; } .rpt-kpis > * { padding: 4px 6px; box-shadow: none !important; animation: none !important; } .rpt-kpis b { font-size: 13px; } .rpt-kpis span { font-size: 8.5px; }
  .rpt-charts { display: grid !important; grid-template-columns: 1fr 1fr 1fr !important; gap: 6px; } .rpt-table { border: 0 !important; padding: 0 !important; }
  table.report { font-size: 8.5px; } table.report td, table.report th { padding: 1px 3px !important; }
  table.report tr { break-inside: avoid; } table.report thead { display: table-header-group; }
  td.ot-hi, td.warn-cell, td.ok-cell, td.flag, tr.ot-row td, tr.risk-row td, [class*="st-"] { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ins-brief { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.print-landscape { } 
}
.text-green { color: #047857; }
/* 1.84.22: in / out notification — the machine, and the person pop-up opened by a click */
.notify .n-mach { font-weight: 700; }
.notify.k-employee { cursor: pointer; }
.pb-dlg { width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 18px; background: var(--card, #fff); color: var(--text); box-shadow: 0 24px 60px rgba(0,0,0,.35); overflow: auto; }
.pb-dlg::backdrop { background: rgba(4,12,24,.5); }
.pb-head { display: flex; gap: 12px; align-items: center; padding: 16px 16px 10px; }
.pb-head img, .pb-av { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--surface-2); font-weight: 800; font-size: 1.4rem; }
.pb-head > div { flex: 1; min-width: 0; } .pb-head b { display: block; font-size: 1.15rem; } .pb-head small { display: block; color: var(--muted); }
.pb-x { align-self: flex-start; border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); }
.pb-state { margin: 0 16px; padding: 8px 12px; border-radius: 10px; font-weight: 700; } .pb-state span { font-weight: 400; color: var(--muted); margin-left: 6px; }
.pb-state.in { background: rgba(22,163,74,.1); color: #15803d; } .pb-state.out { background: var(--surface-2); color: var(--muted); }
.pb-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 12px 16px 0; }
.pb-kpis > div { padding: 8px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; } .pb-kpis b { display: block; font-size: 1rem; } .pb-kpis span { font-size: .75rem; color: var(--muted); }
@media (max-width: 480px) { .pb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pb-pad { padding: 0 16px; margin: 14px 0 6px; }
.pb-list { list-style: none; margin: 0; padding: 0 16px; display: grid; gap: 4px; }
.pb-list li { display: grid; grid-template-columns: 70px 44px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); font-size: .9rem; }
.pb-list li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-dir { font-weight: 800; font-size: .75rem; } .pb-list li.in .pb-dir { color: #15803d; } .pb-list li.out .pb-dir { color: #1d4ed8; }
.pb-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px 16px; }
.dash-att { margin-bottom: 14px; } .dash-att .rpt-kpis { margin-bottom: 4px; }
.dash-brief { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; } .dash-brief li { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
@media print {
  .dash-head .btn, .dash-head button { display: none !important; }
  .dash-charts { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 6px !important; }
  .dash-charts .span-wide { grid-column: 1 / -1; }
  .stats, .stats-x { grid-template-columns: repeat(4, 1fr) !important; gap: 6px !important; }
  .stat { box-shadow: none !important; padding: 6px 8px !important; } .stat b { font-size: 16px !important; } .stat::after { display: none; }
  .live-dot, .dash-projects form button { animation: none !important; }
  .chart-card, .card { break-inside: avoid; }
  .stat, .rpt-kpis > *, .chart, .chart *, .ch-ic, .tp-dash, .pv-track i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.ins-card h3 svg, .ins-brief h3 svg, .ins-card h3 .ic { width: 20px; height: 20px; flex-shrink: 0; }
.ins-card h3 { font-size: 1rem; margin: 0 0 10px; } .ins-card h3 .ins-sev { margin-left: auto; }
.tester-steps .btn { margin-top: 8px; } .tester-steps small { display: block; margin: 3px 2px 0; font-size: .76rem; } .tester-steps .ts-lock { opacity: .45; }
.tester-steps.compact .btn:first-of-type { margin-top: 0; }
/* 1.41.4: report header wraps on phones; filters fold away on small screens */
.rpt-head { flex-wrap: wrap; } .rpt-head > div:first-child { flex: 1 1 260px; }
@media (max-width: 700px) { .rpt-head > div:first-child { flex-basis: 100%; } .rpt-head .btn { flex: 0 0 auto; } }
.rpt-filt { margin: 0 0 12px; } .rpt-filt > summary { cursor: pointer; font-size: .85rem; color: var(--muted); padding: 6px 2px; list-style: none; }
.rpt-filt > summary::before { content: "▸ "; } .rpt-filt[open] > summary::before { content: "▾ "; }
.rpt-filt[open] > summary { margin-bottom: 6px; }
@media (min-width: 701px) { .rpt-filt > summary { display: none; } }

/* 1.42.0 TV screensaver admin */
.tvsl { display: grid; gap: 10px; padding: 8px; }
.tvsl-row { display: grid; grid-template-columns: 220px 1fr; gap: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card, #fff); }
.tvsl-row.off { opacity: .6; }
.tvsl-th { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #0b1220; }
.tvsl-th img, .tvsl-th video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tvsl-k { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; }
@media (max-width: 700px) { .tvsl-row { grid-template-columns: 1fr; } }

/* 1.42.1 sign-in on wide web screens: slides on the left, the sign-in on the right */
.auth-show { display: none; }
@media (min-width: 1000px) {
  .auth-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(460px, 1fr); place-items: stretch; height: 100vh; overflow: hidden; }
  .auth-split .auth-show { display: block; height: 100vh; }
  .auth-split .auth-show .tvl-s::after { background: linear-gradient(0deg, rgba(0,0,0,.45), transparent 45%); }
  .auth-split .auth-show .tvl-dots { left: 6%; bottom: 7%; }
  .auth-show-foot { position: absolute; right: 4%; bottom: 6.4%; z-index: 2; color: rgba(255,255,255,.8); font-size: 14px; font-weight: 600; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
  .auth-split > main.auth-wrap { max-width: none; height: 100vh; overflow-y: auto; box-sizing: border-box; display: flex; flex-direction: column; justify-content: safe center; padding: 32px clamp(24px, 4vw, 64px); }
  .auth-split > main.auth-wrap > * { width: 100%; max-width: 440px; margin-left: auto; margin-right: auto; }
  .auth-split > main.auth-wrap .demo-cols { display: block; }
  .auth-split > main.auth-wrap .demo-roles { margin-top: 18px; }
  .auth-split > main.auth-wrap .demo-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) { .auth-split > main.auth-wrap > .demo-cols > .demo-roles, .auth-split > main.auth-wrap > .demo-cols { max-width: 620px; } }

/* 1.43.0 Video QR admin */
.vq-langs { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.vq-top { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.vq-qr { width: 260px; text-align: center; } .vq-qr img { width: 100%; height: auto; image-rendering: pixelated; }
.vq-list { display: grid; gap: 10px; }
.vq-row { display: grid; grid-template-columns: 150px 1fr 1fr; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; align-items: start; }
.vq-lang b { display: block; font-size: 1.2rem; } .vq-lang small { color: var(--muted); }
.vq-slot { display: grid; gap: 6px; align-content: start; }
.vq-ok { color: #15803d; font-size: .9rem; word-break: break-word; }
.vq-slot .warn, .warn { color: #b45309; }
.vq-pick { justify-self: start; cursor: pointer; }
.vq-bar { height: 8px; border-radius: 6px; background: #e2e8f0; overflow: hidden; } .vq-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2563eb, #0ea5e9); transition: width .3s; }
.vq-prog { display: grid; gap: 4px; } .vq-stop { justify-self: start; }
@media (max-width: 760px) { .vq-row { grid-template-columns: 1fr; } .vq-qr { width: 100%; } }
.vq-prog[hidden], .vq-pick[hidden] { display: none; }
.vq-custom { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.vq-chip .check { background: #eef4ff; border-radius: 999px; padding: 2px 10px; }
.vq-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; } .vq-add-in { max-width: 420px; flex: 1; }

/* 1.43.2 Video QR upload window: blocks the page, ring with % in the middle */
html.vq-locked, html.vq-locked body { overflow: hidden; }
.vq-modal { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 16px; background: rgba(2, 8, 23, .62); backdrop-filter: blur(3px); }
.vq-modal[hidden] { display: none; }
.vqm-card { width: min(460px, 100%); background: var(--card, #fff); border-radius: 22px; padding: 22px 22px 18px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.vqm-t { font-weight: 800; font-size: 1.15rem; } .vqm-f { word-break: break-all; margin-top: 2px; }
.vqm-ring { position: relative; width: 190px; height: 190px; margin: 16px auto 8px; }
.vqm-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.vqm-bg { fill: none; stroke: #e2e8f0; stroke-width: 12; }
.vqm-arc { fill: none; stroke: #2563eb; stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .35s ease; }
.vq-modal.done .vqm-arc { stroke: #16a34a; } .vq-modal.err .vqm-arc { stroke: #dc2626; }
.vqm-mid { position: absolute; inset: 0; display: grid; place-items: center; }
.vqm-pc { font-size: 2.4rem; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.vqm-spin { position: absolute; inset: 22px; border-radius: 50%; border: 3px solid transparent; border-top-color: rgba(37, 99, 235, .35); animation: vqm-sp 1.1s linear infinite; }
.vq-modal.done .vqm-spin, .vq-modal.err .vqm-spin { display: none; }
@keyframes vqm-sp { to { transform: rotate(360deg); } }
.vqm-num { font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.vqm-speed { min-height: 1.2em; font-variant-numeric: tabular-nums; }
.vqm-st { min-height: 1.3em; margin-top: 8px; font-size: .92rem; } .vqm-st.warn { color: #b45309; } .vqm-st.ok { color: #15803d; } .vqm-st.err { color: #b91c1c; }
.vqm-btns { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.vqm-ask { margin-top: 12px; padding: 12px; border-radius: 14px; background: #fef2f2; } .vqm-ask p { margin: 0; }
.vq-modal [hidden] { display: none !important; }
/* 1.43.4 Video QR converter */
.vq-conv { padding: 10px 12px; border-radius: 12px; margin: 6px 0 10px; font-size: .92rem; }
.vq-conv.ok { background: #ecfdf5; color: #065f46; } .vq-conv.no { background: #fffbeb; color: #92400e; }
.vq-cv { display: grid; gap: 4px; }
.vq-modal.conv .vqm-arc { stroke: #7c3aed; }
.vq-steps { margin: 8px 0 8px 18px; padding: 0; display: grid; gap: 6px; } .vq-steps li.done { color: #065f46; } .vq-steps li.todo { color: #92400e; }
body > .vq-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100vw; height: 100vh; height: 100dvh; margin: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
body > .vq-modal[hidden] { display: none; }
/* 1.44.0 Video QR share */
.vq-qr canvas { width: 100%; height: auto; border-radius: 12px; }
.vq-share { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.vq-qr { width: 300px; }

/* 1.46: guests of a visitor on the scan screen */
.vg-list{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:6px}
.vg-item{display:flex;gap:10px;align-items:center;border:1px solid var(--line,#e5e7eb);border-radius:12px;padding:6px 8px;background:#fff}
.vg-item img,.vg-item .vg-ph{width:46px;height:46px;border-radius:50%;object-fit:cover;flex:none;display:grid;place-items:center;background:#f1f5f9;font-size:1.2rem}
.vg-item div{flex:1;min-width:0}.vg-item small{display:block;color:#64748b}
.vg-item.vg-miss{border-color:#fcd34d;background:#fffbeb}
/* 1.66.0: each person on a pass ticked and marked IN / OUT on his own */
.pp-row{padding:4px 8px 4px 4px}
.pp-pick{display:flex;gap:10px;align-items:center;flex:1;min-width:0;cursor:pointer;margin:0;padding:4px}
.pp-pick input[type=checkbox]{width:26px;height:26px;flex:none;margin:0;accent-color:#16a34a}
.pp-row.pp-in .pp-pick input[type=checkbox]{accent-color:#2563eb}
.pp-row.on{border-color:#16a34a;box-shadow:0 0 0 2px rgba(22,163,74,.25)}
.pp-row.pp-in.on{border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.25)}
.pp-row.pp-off .pp-pick{cursor:default}
.pp-row.pp-off .pp-pick input{opacity:.35}
.pp-why{font-style:normal;color:#b45309;font-weight:600}
.pp-tools{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 6px}
.btn-xl small{display:block;font-weight:500;opacity:.85;font-size:.7em}
.btn-xl:has(small){flex-direction:column;gap:2px}
.vg-warn{background:#fef3c7;color:#92400e;border-radius:10px;padding:8px 10px;font-weight:600;margin:6px 0}
.vg-form{margin-top:10px;display:grid;gap:8px;border:2px solid #2563eb}
.vg-form input{padding:10px;border:1px solid #cbd5e1;border-radius:10px;font-size:1rem}
.vg-cam{display:flex;gap:12px;align-items:center}
.vg-prev{width:84px;height:84px;border-radius:14px;background:#f1f5f9;display:grid;place-items:center;font-size:1.8rem;overflow:hidden}
.vg-prev img{width:100%;height:100%;object-fit:cover}
.wf-foreign{border:2px solid #c4b5fd;border-radius:14px;padding:12px;margin-top:10px;background:#faf5ff}
.wf-foreign legend{font-weight:700;color:#6d28d9;padding:0 6px}
.wf-docs{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px;margin-top:10px}
.wf-doc{border:1px dashed #c4b5fd;border-radius:10px;padding:8px;background:#fff}
.badge-violet{background:#ede9fe;color:#6d28d9}

/* 1.48: progress bar, page loader, dialogs */
.vp-topbar{position:fixed;top:0;left:0;height:3px;width:0;background:linear-gradient(90deg,#2563eb,#22c55e);z-index:100000;opacity:0;transition:width .3s,opacity .3s;pointer-events:none}
.vp-topbar.on{opacity:1;width:80%;transition:width 8s cubic-bezier(.1,.8,.2,1),opacity .2s}
.vp-topbar.done{opacity:0;width:100%;transition:width .2s,opacity .3s .1s}
.vp-loading{position:fixed;inset:0;background:rgba(15,23,42,.28);backdrop-filter:blur(1.5px);z-index:99999;display:none;align-items:center;justify-content:center}
.vp-loading.on{display:flex}
.vp-loading-box{background:#fff;border-radius:16px;padding:18px 26px;box-shadow:0 20px 50px rgba(0,0,0,.25);display:flex;flex-direction:column;align-items:center;gap:10px;min-width:180px}
.vp-loading-box b{font-size:1rem;color:#0f172a}.vp-loading-box small{color:#64748b}
.vp-spin{width:34px;height:34px;border:4px solid #dbeafe;border-top-color:#2563eb;border-radius:50%;animation:vpspin .8s linear infinite;display:inline-block}
.vp-spin.sm{width:14px;height:14px;border-width:2px;vertical-align:-2px;margin-right:4px}
@keyframes vpspin{to{transform:rotate(360deg)}}
button[disabled],.btn[disabled]{cursor:not-allowed}
.vp-dialog{border:0;border-radius:18px;padding:22px 24px;width:min(460px,94vw);box-shadow:0 30px 80px rgba(0,0,0,.35);background:#fff;color:#0f172a}
.vp-dialog::backdrop{background:rgba(15,23,42,.5)}
.vp-dialog .vd-ck{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border:1px solid #e2e8f0;border-radius:12px;margin:8px 0;cursor:pointer;font-weight:500;background:#f8fafc}
.vp-dialog .vd-ck:has(input:checked){border-color:#22c55e;background:#f0fdf4}
.vp-dialog .vd-ck input{width:20px;height:20px;flex:none;margin-top:1px}
.vp-dialog .actions{display:flex;gap:8px;justify-content:flex-end;margin-top:14px}
.vp-dialog .btn[disabled]{opacity:.45}

/* ---------------------------------------------------------------- 1.50.0 help assistant (💬) */
.asst { position: fixed; right: 20px; bottom: 20px; z-index: 950; font-size: 14px; }
.asst-fab { display: flex; align-items: center; gap: 8px; border: 0; cursor: pointer; padding: 12px 18px 12px 14px; border-radius: 999px; color: #fff; font: 700 15px/1 inherit;
  background: linear-gradient(135deg, #1d5fd1, #7c3aed); box-shadow: 0 10px 28px rgba(29,95,209,.35); transition: transform .2s var(--ease, ease), box-shadow .2s; }
.asst-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(29,95,209,.42); }
.asst-fab-i { font-size: 18px; }
.asst-panel[hidden] { display: none !important; }
.asst.open .asst-fab { display: none; }
.asst-panel { position: absolute; right: 0; bottom: 0; width: 420px; height: min(680px, calc(100vh - 40px)); display: flex; flex-direction: column; background: var(--surface, #fff);
  border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 60px rgba(10,27,61,.28); overflow: hidden; animation: asstIn .22s var(--ease, ease); }
@keyframes asstIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.asst-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: #fff; background: linear-gradient(135deg, #0a2a6b, #1d5fd1 60%, #6d28d9); }
.asst-head b { display: block; font-size: 15px; }
.asst-head small { display: block; opacity: .8; font-size: 12px; }
.asst-head .spacer { flex: 1; }
.asst-head button { background: rgba(255,255,255,.14); border: 0; color: #fff; width: 32px; height: 32px; border-radius: 10px; font-size: 18px; cursor: pointer; }
.asst-head button:hover { background: rgba(255,255,255,.26); }
.asst-logo { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.18); font-size: 17px; }
.asst-list { flex: 1; overflow-y: auto; padding: 14px 12px 6px; background: var(--bg); scroll-behavior: smooth; overscroll-behavior: contain; }
.asst-msg { display: flex; gap: 8px; margin: 0 0 12px; align-items: flex-start; }
.asst-msg.me { justify-content: flex-end; }
.asst-msg.me .asst-b { background: #1d5fd1; color: #fff; border-radius: 16px 16px 4px 16px; max-width: 82%; }
.asst-av { flex: 0 0 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 13px; background: linear-gradient(135deg, #1d5fd1, #7c3aed); }
.asst-b { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 10px 12px; line-height: 1.5; max-width: calc(100% - 36px); overflow-wrap: anywhere; }
.asst-msg.me .asst-b { border: 0; }
.asst-b p { margin: 0 0 8px; } .asst-b p:last-child { margin-bottom: 0; }
.asst-b h4 { margin: 8px 0 6px; font-size: 14px; }
.asst-b ul, .asst-b ol { margin: 4px 0 8px; padding-left: 20px; } .asst-b li { margin: 2px 0; } .asst-b li.sub { margin-left: 14px; list-style: circle; }
.asst-b code { background: var(--gray-bg); padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }
.asst-tw { overflow-x: auto; margin: 6px 0 8px; }
.asst-b table { border-collapse: collapse; font-size: 12.5px; min-width: 100%; }
.asst-b th, .asst-b td { border-bottom: 1px solid var(--line); padding: 5px 7px; text-align: left; white-space: nowrap; }
.asst-b th { background: var(--gray-bg); }
.asst-chart { margin: 10px 0 4px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.asst-chart figcaption { font-weight: 700; font-size: 12.5px; margin-bottom: 6px; color: var(--muted); }
.asst-chart svg { width: 100%; height: auto; max-height: 220px; }
.asst-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.asst-links a { font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: var(--brand-soft, #e8f0fe); color: var(--brand-2, #1d5fd1); text-decoration: none; }
.asst-links a:hover { background: #d6e4fd; }
.asst-docs { margin-top: 10px; display: grid; gap: 6px; }
.asst-doc { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px; border: 1px dashed var(--line); border-radius: 10px; }
.asst-doc span { flex: 1; min-width: 140px; }
.asst-note { margin: 8px 0 0; font-size: 12px; color: var(--amber); }
.asst-tools { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.asst-copy { border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 0; }
.asst-mode { font-size: 11px; color: var(--muted); }
.asst-day { text-align: center; font-size: 11px; color: var(--muted); margin: 0 0 10px; text-transform: uppercase; letter-spacing: .06em; }
.asst-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px 36px; }
.asst-sugg button { border: 1px solid #c7d7f5; background: var(--surface, #fff); color: var(--brand-2, #1d5fd1); border-radius: 99px; padding: 6px 11px; font-size: 12.5px; cursor: pointer; text-align: left; }
.asst-sugg button:hover { background: var(--brand-soft, #e8f0fe); }
.asst-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.asst-dots i { width: 6px; height: 6px; border-radius: 50%; background: #7c3aed; animation: asstDot 1s infinite ease-in-out; }
.asst-dots i:nth-child(2) { animation-delay: .15s; } .asst-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes asstDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.asst-st { color: var(--muted); font-size: 13px; }
.asst-foot { border-top: 1px solid var(--line); padding: 8px 10px 10px; background: var(--surface, #fff); }
.asst-opts { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.asst-page { border: 1px solid var(--line); background: none; color: var(--muted); border-radius: 99px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.asst-page.on { background: #ede9fe; border-color: #c4b5fd; color: #6d28d9; font-weight: 600; }
.asst-left { font-size: 11px; color: var(--muted); }
.asst-in { display: flex; gap: 6px; align-items: flex-end; }
.asst-in textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font: inherit; max-height: 140px; min-height: 42px; background: var(--bg); color: var(--text); }
.asst-in textarea:focus { outline: 2px solid #c7d7f5; border-color: #1d5fd1; }
.asst-send, .asst-mic { flex: 0 0 42px; height: 42px; border-radius: 13px; border: 0; cursor: pointer; font-size: 17px; }
.asst-send { background: linear-gradient(135deg, #1d5fd1, #7c3aed); color: #fff; }
.asst-send:disabled { opacity: .5; cursor: wait; }
.asst-mic { background: var(--gray-bg); }
.asst-mic.rec { background: #fee2e2; animation: asstDot 1s infinite; }
@media (max-width: 760px) {
  .asst { right: 12px; bottom: 12px; }
  .asst-fab-t { display: none; } .asst-fab { padding: 14px; }
  .asst.open { inset: 0; right: 0; bottom: 0; }
  .asst-panel { position: fixed; inset: 0; width: auto; height: 100%; border-radius: 0; border: 0; }
  .asst-in textarea { font-size: 16px; }
}
@media (prefers-color-scheme: dark) { .asst-links a { background: rgba(59,130,246,.18); } .asst-page.on { background: rgba(124,58,237,.2); } }
@media print { .asst { display: none !important; } }
.asst-sugg button.faq { border-color: #c4b5fd; color: #6d28d9; }
.asst-sugg button.faq::before { content: "⚡ "; }
.help-asst { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }

/* ---------------------------------------------------------------- 1.54.0 — professional forms on every page
   Clear borders, placeholders, help text in an (i) tooltip next to the label (assets/js/app.js → VP.forms),
   and the boxes of one row always on the same line. */
:root { --input-line: #b8c3d6; --input-line-hover: #8d9db8; --input-bg: #ffffff; --input-ph: #94a3b8; --input-ring: rgba(37,99,235,.18); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --input-line: #3d4f72; --input-line-hover: #5b6f96; --input-bg: #0f1a2e; --input-ph: #6b7a96; --input-ring: rgba(96,165,250,.25); } }
:root[data-theme="dark"] { --input-line: #3d4f72; --input-line-hover: #5b6f96; --input-bg: #0f1a2e; --input-ph: #6b7a96; --input-ring: rgba(96,165,250,.25); }
input, select, textarea { border-color: var(--input-line); box-shadow: inset 0 1px 2px rgba(15,27,51,.06); }
input:hover:not(:focus):not(:disabled), select:hover:not(:focus):not(:disabled), textarea:hover:not(:focus):not(:disabled) { border-color: var(--input-line-hover); }
.topbar select:hover, .site-pick select:hover { border-color: rgba(255,255,255,.45); }
.topbar select, .site-pick select { box-shadow: none; }
.tbl-tools .tbl-q, .asst-in textarea { border-color: var(--input-line); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-3, #2f6fe4); box-shadow: 0 0 0 3px var(--input-ring); }
input:disabled, select:disabled, textarea:disabled { opacity: .65; cursor: not-allowed; }
::placeholder { color: var(--input-ph); opacity: 1; font-weight: 400; }
select.fx-empty { color: var(--input-ph); } select.fx-empty option { color: var(--text); }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: #dc2626; }
input:user-invalid:focus, textarea:user-invalid:focus { box-shadow: 0 0 0 3px rgba(220,38,38,.15); }

/* the label: one line of words + the (i), the box right under it; boxes of a row line up at the bottom */
.fx-lbl { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; line-height: 1.3; }
.fx-req { color: #dc2626; font-weight: 700; margin-left: -2px; }
.fx-hidden { display: none !important; }
.fx-i { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; flex: none; cursor: help;
  font: italic 700 11px/1 Georgia, 'Times New Roman', serif; color: var(--brand-2, #1d5fd1); background: color-mix(in srgb, var(--brand-2, #1d5fd1) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-2, #1d5fd1) 35%, transparent); user-select: none; transition: background .15s, color .15s; }
.fx-i:hover, .fx-i:focus-visible { background: var(--brand-2, #1d5fd1); color: #fff; outline: none; }
.fx-tip { position: fixed; z-index: 10000; display: none; padding: 8px 11px; border-radius: 9px; background: #0f1b33; color: #f1f5fb; font-size: .8rem; line-height: 1.45;
  font-weight: 400; box-shadow: 0 8px 24px rgba(15,27,51,.25); pointer-events: none; }
.fx-tip::after { content: ""; position: absolute; left: var(--ax, 50%); top: 100%; margin-left: -6px; border: 6px solid transparent; border-top-color: #0f1b33; }
.fx-tip.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #0f1b33; }
form :is(.grid2, .grid3, .grid4, .fgrid), .form :is(.grid2, .grid3, .grid4, .fgrid) { align-items: end; }
form :is(.grid2, .grid3, .grid4, .fgrid) > label.check, .form :is(.grid2, .grid3, .grid4, .fgrid) > label.check { align-self: center; }
@media print { .fx-i, .fx-tip { display: none !important; } }
/* 1.55.0 — a box that failed the check */
input.fx-bad, select.fx-bad, textarea.fx-bad { border-color: #dc2626 !important; box-shadow: 0 0 0 3px rgba(220,38,38,.13); }

/* ================================================================ 1.56.0 — print that fits the paper, and a colourful dashboard
   Every page prints in portrait. 1.84.19: a block with a wide table (too many columns) is marked .pr-wide just before printing
   and its table is scaled down to the page width (assets/js/app.js) — no landscape pages. Colours and charts print as on screen. */
.pr-measure td, .pr-measure th { font-size: 8.5px !important; padding: 2px 4px !important; }
.pr-measure td, .pr-measure th { white-space: nowrap; }
.pr-measure th.sortable-th::after { content: none !important; }
@media print { th.sortable-th::after { content: none !important; } }
.pr-dense.pr-measure td, .pr-dense.pr-measure th { padding: 1px 2px !important; letter-spacing: 0 !important; }
@media print { table.pr-dense td, table.pr-dense th { padding: 1px 2px !important; letter-spacing: 0 !important; } table.pr-dense th { white-space: nowrap; } }
@media print {
  @page { size: A4 portrait; margin: 9mm 8mm; }
  html, body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* 1.84.53: portrait by default; a page with a wide table gets an A4 landscape @page from assets/js/app.js (#vp-print-landscape) */
  .pr-wide .table-wrap, .pr-wide .tbl-scroll { overflow: visible !important; max-height: none !important; }
  .pr-wide table { width: 100% !important; table-layout: auto; }
  .pr-wide table td, .pr-wide table th { font-size: 8.5px !important; padding: 2px 4px !important; }
  table thead { display: table-header-group; } table tfoot { display: table-footer-group; }
  table tr, .list-rich li, .timeline li { break-inside: avoid; }
  h1, h2, h3, h4, .card-head { break-after: avoid; }
  .card:has(table), .card:has(.table-wrap) { break-inside: auto; }
  .table-wrap { overflow: visible !important; }
  .pr-break { break-before: page; }
}

/* ---------- the dashboard: colourful on screen and on paper ---------- */
.content:has(.dash-head) .dash-head { position: relative; overflow: hidden; padding: 20px 22px; border-radius: 18px; color: #fff;
  background: radial-gradient(circle at 92% -20%, rgba(255,255,255,.22), transparent 42%), linear-gradient(118deg, #1e40af 0%, #4f46e5 42%, #7c3aed 70%, #c026d3 100%);
  box-shadow: 0 12px 30px -14px rgba(79,70,229,.6); margin-bottom: 16px; }
.content:has(.dash-head) .dash-head h1 { color: #fff; }
.content:has(.dash-head) .dash-head .muted, .content:has(.dash-head) .dash-head p { color: rgba(255,255,255,.88); }
.content:has(.dash-head) .dash-head b { color: #fff; }
.content:has(.dash-head) .dash-head .btn-light { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.35); }
.content:has(.dash-head) .dash-head .btn-light:hover { background: rgba(255,255,255,.28); }
.content:has(.dash-head) .rpt-kpis > a, .content:has(.dash-head) .rpt-kpis > div { background: linear-gradient(160deg, color-mix(in srgb, currentColor 13%, var(--surface)) 0%, var(--surface) 75%); border-color: color-mix(in srgb, currentColor 28%, var(--line)); }
.content:has(.dash-head) .rpt-kpis b { color: currentColor; }
.content:has(.dash-head) .stat { background: linear-gradient(160deg, color-mix(in srgb, var(--t, #1d5fd1) 12%, var(--surface)) 0%, var(--surface) 70%); border-color: color-mix(in srgb, var(--t, #1d5fd1) 24%, var(--line)); }
.content:has(.dash-head) .stat b { color: color-mix(in srgb, var(--t, #1d5fd1) 70%, var(--text)); }
.content:has(.dash-head) .card:has(> .card-head .ic-blue)   { --cc: #2563eb; }
.content:has(.dash-head) .card:has(> .card-head .ic-green)  { --cc: #059669; }
.content:has(.dash-head) .card:has(> .card-head .ic-amber)  { --cc: #d97706; }
.content:has(.dash-head) .card:has(> .card-head .ic-cyan)   { --cc: #0891b2; }
.content:has(.dash-head) .card:has(> .card-head .ic-violet) { --cc: #7c3aed; }
.content:has(.dash-head) .card:has(> .card-head .ch-ic) { border-top: 4px solid var(--cc, #2563eb); background: linear-gradient(180deg, color-mix(in srgb, var(--cc, #2563eb) 7%, var(--surface)) 0, var(--surface) 110px); }
.content:has(.dash-head) .card-head h3 { color: color-mix(in srgb, var(--cc, #2563eb) 55%, var(--text)); }
@media print {
  .content:has(.dash-head) .dash-head { padding: 10px 14px; border-radius: 10px; box-shadow: none; margin-bottom: 8px; }
  .content:has(.dash-head) .dash-head h1 { font-size: 18px; }
  .content:has(.dash-head) .chart { max-height: 190px !important; }
  .content:has(.dash-head) .donut { width: 110px; height: 110px; }
  .content:has(.dash-head) .card { border: 1px solid #dde3ee; border-top: 3px solid var(--cc, #2563eb); padding: 8px 10px !important; }
  .content:has(.dash-head) .dash-projects { flex-wrap: wrap; overflow: visible; }
  .content:has(.dash-head) .dash-lists { break-before: auto; }
  .content:has(.dash-head) .stats, .content:has(.dash-head) .rpt-kpis { break-inside: avoid; }
  .content:has(.dash-head) .dash-charts > .card { break-inside: avoid; }
  .content:has(.dash-head) .dash-charts .span-wide { grid-column: auto !important; }
  .content:has(.dash-head) .chart-card .chart { max-height: 150px !important; }
}

/* 1.57.0 — scan screen: amber = pass verified (not inside yet), green = marked IN, blue = exit, red = refused */
.result.ok { background: #fff7e6; border-color: #d97706; } .result.ok .result-head { color: #b45309; }
.result.done { background: var(--green-bg); border-color: #16a34a; } .result.done .result-head { color: #15803d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .result.ok { background: #3a2604; } :root:not([data-theme="light"]) .result.ok .result-head { color: #fbbf24; } :root:not([data-theme="light"]) .result.done .result-head { color: #4ade80; } }
:root[data-theme="dark"] .result.ok { background: #3a2604; } :root[data-theme="dark"] .result.ok .result-head { color: #fbbf24; } :root[data-theme="dark"] .result.done .result-head { color: #4ade80; }
.visitor-photo.vp-need { cursor: pointer; background: #fef3c7; color: #b45309; font-size: 1.6rem; border: 2px dashed #d97706; }
.vp-warn { margin: 0 0 12px; }
/* 1.59.0 — scan screen: the reason a pass is refused, and emergency access */
.scan-why { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; }
.scan-why b { display: block; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.scan-why p { margin: 2px 0 6px; font-size: 1.1rem; font-weight: 700; }
.scan-why small { display: block; font-size: .9rem; opacity: .92; }
.scan-emg { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #fff1f2; border: 2px solid #e11d48; color: #9f1239; font-weight: 600; }

/* 1.60.0: group pop-up on the scan screen — the main visitor and every guest on one pass.
   1.84.18: .grp-card / .grp-grid only inside .grp-pop — the Machine groups page has its own cards of those names */
.grp-pop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 14px; background: rgba(4,12,24,.62); backdrop-filter: blur(3px); }
.grp-pop .grp-card { width: min(760px, 100%); max-height: calc(100vh - 28px); overflow: auto; background: var(--card, #fff); color: var(--text, #0f172a); border-radius: 20px; box-shadow: 0 24px 70px rgba(0,0,0,.45); border-top: 10px solid #16a34a; animation: grpIn .25s ease-out both; }
.grp-out .grp-card { border-top-color: #2563eb; }
@keyframes grpIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.grp-head { padding: 16px 18px 4px; } .grp-head b { display: block; font-size: 1.3rem; color: #15803d; } .grp-out .grp-head b { color: #1d4ed8; }
.grp-head span { color: var(--muted, #64748b); font-size: .9rem; }
.grp-say { margin: 6px 18px 10px; font-weight: 600; }
.grp-pop .grp-grid { list-style: none; margin: 0; padding: 0 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.grp-c { position: relative; text-align: center; padding: 8px; border-radius: 14px; border: 2px solid var(--line, #e2e8f0); cursor: pointer; user-select: none; transition: border-color .15s, background .15s; }
.grp-c img, .grp-c > span { display: grid; place-items: center; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 28%; border-radius: 10px; background: #ede9fe; color: #6d28d9; font-size: 2.4rem; font-weight: 900; }
.grp-c b { display: block; margin-top: 6px; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-c small { display: block; color: var(--muted, #64748b); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-main { border-color: #a78bfa; } .grp-main small { color: #6d28d9; font-weight: 700; }
.grp-tick { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 900; background: rgba(255,255,255,.9); color: transparent; border: 2px solid #cbd5e1; }
.grp-c.on { border-color: #16a34a; background: rgba(22,163,74,.08); } .grp-c.on .grp-tick { background: #16a34a; color: #fff; border-color: #16a34a; }
.grp-foot { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; margin-top: 12px; background: inherit; border-top: 1px solid var(--line, #e2e8f0); }
.grp-foot span { font-weight: 700; color: var(--muted, #64748b); } .grp-all .grp-foot span { color: #15803d; }
@media (max-width: 520px) { .grp-pop .grp-grid { grid-template-columns: repeat(2, 1fr); } .grp-head b { font-size: 1.1rem; } }

/* 1.61.0: top bar = ☰ · logo · project · profile; language, punch sound and "Login as a role" are in the profile menu */
.topbar .brand { flex: 0 1 auto; min-width: 0; }
.topbar .site-pick, .topbar .site-chip { min-width: 0; }
.um { position: relative; margin-left: auto; flex: none; }
.um > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
.um > summary::-webkit-details-marker { display: none; }
.um > summary:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.um[open] > summary .avatar { box-shadow: inset 0 0 0 2px #fff; background: rgba(255,255,255,.28); }
.um-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 270px; max-width: calc(100vw - 16px); background: var(--surface, #fff); color: var(--text, #0f1b33); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(10,27,60,.28); border: 1px solid var(--line, #e2e8f0); padding: 6px; z-index: 60; animation: umIn .15s ease-out both; }
@keyframes umIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.um-head { display: flex; gap: 10px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line, #e2e8f0); margin-bottom: 4px; }
.um-head .avatar { color: #fff; flex: none; } .um-head div { min-width: 0; } .um-head b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-head small { color: var(--muted, #64748b); font-size: .8rem; }
.um-item, .um-lang { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 10px; color: inherit; background: none; border: 0; font: inherit; font-weight: 600; text-align: left; cursor: pointer; text-decoration: none; min-height: 44px; }
.um-item:hover, .um-item:focus-visible { background: var(--surface-2, #f1f5f9); text-decoration: none; outline: none; }
.um-ic { width: 22px; flex: none; display: grid; place-items: center; font-size: 1.05rem; } .um-ic svg { width: 20px; height: 20px; }
.um-state { margin-left: auto; font-style: normal; font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: #dcfce7; color: #15803d; }
.snd-toggle.off .um-state { background: #fee2e2; color: #b91c1c; } .snd-toggle.wait .um-state { background: #fef3c7; color: #92400e; }
.um .snd-toggle.off { opacity: 1; } .um .snd-toggle.wait { animation: none; }
.um-lang { cursor: default; flex-wrap: wrap; } .um-lbl { flex: 1; }
.um-langs { display: inline-flex; gap: 2px; background: var(--surface-2, #f1f5f9); border-radius: 99px; padding: 3px; }
.um-langs a { color: inherit; text-decoration: none; font-weight: 700; font-size: .78rem; padding: 6px 10px; border-radius: 99px; opacity: .75; }
.um-langs a.on { background: var(--brand, #1d5fd1); color: #fff; opacity: 1; }
.um-out { color: #b91c1c; border-top: 1px solid var(--line, #e2e8f0); border-radius: 0 0 10px 10px; margin-top: 4px; }
@media (max-width: 560px) {
  .topbar { gap: 6px; padding: 0 8px; }
  .topbar .brand { flex: none; }
  .topbar .brand-logo { height: 30px; max-width: 104px; width: auto; }
  .topbar .site-pick { flex: 1 1 auto; display: flex; justify-content: flex-end; }
  .topbar .site-pick select { max-width: 100%; width: 100%; min-width: 0; text-overflow: ellipsis; }
}
@media (max-width: 700px) { .topbar .site-chip { display: inline-block; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; } }
.topbar .um-head .avatar { background: var(--brand, #1d5fd1); box-shadow: none; } .um-state:empty { display: none; }

/* 1.63.0 Smart insights 2: section links, the analysis, AI analyst, next 7 days, past shortfalls, plan tracking, calculators, exceptions */
.ins-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 0; position: sticky; top: calc(var(--top-h, 56px) + 4px); z-index: 5; background: color-mix(in srgb, var(--bg, #f3f6fb) 88%, transparent); backdrop-filter: blur(6px); padding: 6px 0; }
.ins-nav a { padding: 6px 12px; border-radius: 99px; background: var(--surface, #fff); border: 1px solid var(--line); font-weight: 700; font-size: .82rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.ins-nav a:hover { border-color: var(--brand-2, #2563eb); color: var(--brand-2, #2563eb); }
.ins-analyst { margin-top: 14px; border-top: 4px solid #8b5cf6; }
.ins-an-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.ins-an { border-radius: 12px; padding: 12px 14px; background: var(--surface-2, #f8fafc); }
.ins-an h4 { margin: 0 0 8px; font-size: .95rem; }
.ins-an ul, .ins-an ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: .9rem; line-height: 1.45; }
.ins-an-0 { background: #fef2f2; } .ins-an-1 { background: #eff6ff; } .ins-an-2 { background: #f5f3ff; } .ins-an-3 { background: #ecfdf5; }
.ins-ai { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.ins-ai-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.ins-ai-row { margin-bottom: 8px; }
.btn-violet { background: linear-gradient(100deg, #7c3aed, #6366f1); color: #fff; border-color: transparent; }
.btn-violet:hover { filter: brightness(1.08); color: #fff; }
.ins-ai-ask { display: flex; gap: 8px; } .ins-ai-ask input { flex: 1; min-width: 0; }
.ins-ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ins-ai-chips .chip { cursor: pointer; background: var(--surface, #fff); font-size: .8rem; padding: 4px 10px; }
.ins-ai-chips .chip:hover { border-color: #8b5cf6; color: #6d28d9; }
.ins-ai-out:empty { display: none; }
.ins-ai-out { margin-top: 12px; }
.ins-ai-wait { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; }
.ins-ai-ans { border-radius: 12px; padding: 12px 16px; background: linear-gradient(180deg, #faf5ff, #fff); border: 1px solid #ddd6fe; line-height: 1.5; }
.ins-ai-ans h4 { margin: 12px 0 6px; color: #6d28d9; } .ins-ai-ans h4:first-child { margin-top: 0; }
.ins-ai-ans ul, .ins-ai-ans ol { padding-left: 22px; } .ins-ai-q { font-weight: 700; } .ins-ai-note { font-size: .75rem; color: var(--muted); margin-bottom: 0; }
.ins-2col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; align-items: start; }
.ins-short-days { display: grid; gap: 4px; margin-top: 10px; font-size: .85rem; }
.ins-patterns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 12px; }
.ins-pat { border-radius: 12px; padding: 10px 12px; background: #fff7ed; border: 1px solid #fed7aa; }
.ins-pat b { display: inline; margin-right: 6px; } .ins-pat p { margin: 6px 0 0; font-size: .84rem; }
.ins-why-list { margin: 0; padding-left: 16px; font-size: .82rem; } .ins-why-list li { margin: 1px 0; }
.ins-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ins-bars li { display: grid; grid-template-columns: minmax(120px, 1fr) 1.2fr 48px; gap: 10px; align-items: center; }
.ins-bars small { display: block; color: var(--muted); font-size: .75rem; }
.ins-bar { height: 10px; border-radius: 99px; background: var(--surface-2, #eef2f7); overflow: hidden; } .ins-bar i { display: block; height: 100%; border-radius: 99px; }
.ins-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.ins-tabs button { border: 0; background: none; font: inherit; font-weight: 700; padding: 8px 14px; border-bottom: 3px solid transparent; color: var(--muted); cursor: pointer; }
.ins-tabs button.on { color: var(--brand-2, #2563eb); border-bottom-color: var(--brand-2, #2563eb); }
.ins-calc-grid { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 18px; align-items: start; }
.ins-in { display: grid; gap: 10px; } .ins-in label { display: grid; gap: 4px; font-weight: 600; font-size: .84rem; }
.ins-pair { display: flex; gap: 6px; } .ins-pair input { flex: 1; min-width: 0; } .ins-pair select { width: auto; }
.ins-ks { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 10px; }
.ins-k { border-radius: 12px; padding: 10px 12px; background: var(--surface-2, #f1f5f9); border-left: 4px solid #94a3b8; }
.ins-k span { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; } .ins-k b { display: block; font-size: 1.45rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ins-k small { display: block; font-size: .76rem; color: var(--muted); }
.ins-k.k-ok { border-left-color: #10b981; background: #ecfdf5; } .ins-k.k-bad { border-left-color: #e11d48; background: #fff1f2; } .ins-k.k-warn { border-left-color: #f59e0b; background: #fffbeb; }
.ins-res p { margin: 8px 0; } .ins-opts { margin: 4px 0; padding-left: 20px; display: grid; gap: 4px; }
.ins-burn { width: 100%; height: auto; margin-top: 12px; }
.ins-burn .b-goal { stroke: #94a3b8; stroke-dasharray: 4 4; } .ins-burn .b-dead { stroke: #e11d48; stroke-dasharray: 3 3; }
.ins-burn .b-need { stroke: #6366f1; stroke-width: 3; fill: none; } .ins-burn .b-mine { stroke: #10b981; stroke-width: 3; fill: none; }
.ins-burn .b-t { font-size: 11px; fill: var(--muted, #64748b); }
.ins-exc { display: grid; gap: 8px; }
.ins-exc-i { border-radius: 12px; border: 1px solid var(--line); border-left: 5px solid #94a3b8; padding: 8px 12px; background: var(--surface, #fff); }
.ins-exc-i.sev-b-high { border-left-color: #e11d48; } .ins-exc-i.sev-b-mid { border-left-color: #f59e0b; } .ins-exc-i.sev-b-low { border-left-color: #3b82f6; }
.ins-exc-i summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; } .ins-exc-i summary::-webkit-details-marker { display: none; }
.ins-exc-i summary em { margin-left: auto; font-style: normal; font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.ins-exc-i ol { margin: 8px 0; padding-left: 22px; font-size: .88rem; }
.ins-tips { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: .88rem; }
.ins-h2 { font-size: 1.05rem; margin: 18px 0 0; }
@media (max-width: 900px) { .ins-2col, .ins-calc-grid { grid-template-columns: 1fr; } .ins-bars li { grid-template-columns: 1fr 1fr 44px; } }
@media print { .ins-nav, .ins-ai, .ins-tabs, .ins-in { display: none !important; } .ins-tab[hidden] { display: block !important; } .ins-exc-i { break-inside: avoid; } .ins-exc-i:not([open]) ol { display: block; } }
.ins-burn { max-width: 760px; display: block; } #cdChart .chart-legend { max-width: 760px; } .ins-sh { white-space: nowrap; line-height: 1.5; }

/* 1.64.0 Work planning */
.wp-tabs { margin-bottom: 14px; flex-wrap: wrap; }
.wp-start .wp-steps { display: grid; gap: 8px; padding-left: 22px; line-height: 1.5; }
.wp-kpis { margin-bottom: 0; }
.wp-bar { position: relative; display: block; height: 10px; min-width: 90px; overflow: visible; }
.wp-bar i { display: block; height: 100%; border-radius: 99px; }
.wp-bar em { position: absolute; top: -3px; width: 2px; height: 16px; background: #0f172a; opacity: .55; border-radius: 2px; }
.wp-sites li { grid-template-columns: minmax(130px, 1fr) 1.2fr 48px 70px; }
.wp-spark svg { width: 70px; height: 22px; }
.wp-scurve { width: 100%; height: auto; } .wp-scurve .grid { stroke: var(--line, #e2e8f0); } .wp-scurve .ax { font-size: 10px; fill: var(--muted, #64748b); }
.wp-scurve .s-plan { fill: none; stroke: #94a3b8; stroke-width: 2.5; stroke-dasharray: 6 4; } .wp-scurve .s-act { fill: none; stroke: #10b981; stroke-width: 3; }
.wp-scurve .s-dot { fill: #10b981; } .wp-scurve .s-lbl { font-size: 11px; font-weight: 700; fill: #047857; }
.wp-hist td { text-align: center; } .wp-hist td:first-child { text-align: left; }
.wp-tasks .wp-grp td { background: var(--surface-2, #f1f5f9); font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.wp-sub { display: block; font-size: .74rem; color: var(--muted); font-weight: 500; }
.wp-ch-high { color: #047857 !important; } .wp-ch-medium { color: #b45309 !important; } .wp-ch-low, .wp-ch-missed { color: #b91c1c !important; }
.wp-fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.wp-fgrid label { display: grid; gap: 4px; font-weight: 600; font-size: .84rem; } .wp-fgrid .wp-wide { grid-column: span 2; }
.wp-live { margin: 14px 0; padding: 12px; border-radius: 12px; background: var(--surface-2, #f8fafc); }
.wp-pro, .wp-con { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; font-size: .84rem; }
.wp-pro li::before { content: '✔ '; color: #059669; font-weight: 800; } .wp-con li::before { content: '✘ '; color: #e11d48; font-weight: 800; }
.wp-pro li { color: #065f46; } .wp-con li { color: #9f1239; }
.wp-weeknav { margin-bottom: 12px; align-items: center; }
.wp-week { display: grid; gap: 10px; }
.wp-row { display: grid; grid-template-columns: minmax(200px, 1.3fr) 170px 110px 2fr; gap: 12px; align-items: start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); border-left: 5px solid #94a3b8; background: var(--surface, #fff); }
.wp-row.wp-v-good { border-left-color: #10b981; } .wp-row.wp-v-ok { border-left-color: #f59e0b; } .wp-row.wp-v-risk { border-left-color: #e11d48; background: #fff7f8; }
.wp-row-h small { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; }
.wp-qty { display: grid; gap: 2px; font-size: .78rem; font-weight: 600; } .wp-qty input { max-width: 110px; } .wp-qty em { font-style: normal; align-self: center; color: var(--muted); }
.wp-crew span { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; } .wp-crew b { font-size: 1.3rem; }
.wp-pc .wp-pro, .wp-pc .wp-con { margin-top: 0; }
.wp-reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .wp-reasons p { margin: 4px 0 0; font-size: .84rem; }
.wp-sitelist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; } .wp-sitelist input { min-width: 0; flex: 1; }
.wp-home .row-gap { flex-wrap: wrap; }
@media (max-width: 900px) { .wp-row { grid-template-columns: 1fr 1fr; } .wp-row-h, .wp-pc { grid-column: 1 / -1; } .wp-fgrid .wp-wide { grid-column: auto; } .wp-sites li { grid-template-columns: 1fr 1fr 44px; } .wp-spark { display: none; } }
.wp-row { grid-template-columns: minmax(200px, 1.3fr) 170px 150px 2fr; } .wp-crew small { font-size: .78rem; font-weight: 600; color: var(--muted); display: block; }
.wp-prog input { min-width: 70px; } form.filters label input[type=date] { width: auto; }
@media (max-width: 900px) { .wp-row { grid-template-columns: 1fr 1fr; } }

/* 1.67.0: modules per project (developer) and the trial note */
.alert.mod-trial{background:#fffbeb;color:#92400e;border:1px solid #fcd34d;border-left:4px solid #f59e0b}
.mp-sites{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 6px}
.mp-sites .chip{display:inline-flex;align-items:center;gap:4px;padding:6px 12px;border-radius:999px;border:1px solid var(--line,#e5e7eb);background:#fff;color:inherit;text-decoration:none;font-size:.9rem}
.mp-sites .chip.on{background:#1d5fd1;border-color:#1d5fd1;color:#fff}
.mp-list{display:grid;gap:8px;margin-top:8px}
.mp-row{display:grid;grid-template-columns:minmax(220px,1.4fr) auto minmax(260px,1.6fr);gap:10px 16px;align-items:center;border:1px solid var(--line,#e5e7eb);border-left:4px solid #10b981;border-radius:12px;padding:10px 12px;background:#fff}
.mp-row.mp-trial{border-left-color:#f59e0b}.mp-row.mp-off{border-left-color:#94a3b8;background:#f8fafc}
.mp-name b{display:block}.mp-name small{display:block;color:#64748b;line-height:1.35}.mp-name .mp-now{margin-top:4px;color:#334155}
.form .mp-modes{display:flex;gap:4px;flex-wrap:wrap}
.form .mp-modes label{margin:0;display:inline-flex;cursor:pointer}
.mp-modes input{position:absolute;opacity:0;pointer-events:none}
.mp-modes span{padding:6px 12px;border:1px solid var(--line,#d1d5db);border-radius:8px;font-size:.88rem;background:#fff;white-space:nowrap}
.mp-modes input:checked+span{background:#1e293b;color:#fff;border-color:#1e293b}
.mp-modes input[value=trial]:checked+span{background:#d97706;border-color:#d97706}
.mp-modes input[value=full]:checked+span{background:#059669;border-color:#059669}
.mp-modes input:focus-visible+span{outline:2px solid #1d5fd1;outline-offset:2px}
.mp-core{font-size:.8rem;color:#64748b;align-self:center;padding:0 6px}
.form .mp-lim{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.form .mp-lim label{margin:0;font-size:.75rem;color:#64748b;display:flex;flex-direction:column;gap:2px}
.form .mp-lim input{padding:6px 8px;font-size:.88rem;min-width:0}
.mp-row:not(.mp-trial) .mp-lim{opacity:.55}
.mp-matrix td,.mp-matrix th{white-space:nowrap}
@media (max-width:900px){.mp-row{grid-template-columns:1fr}.form .mp-lim{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* 1.69.0: guests seen before — name search on the visitor request */
.gk-wrap{position:relative}
.gk-list{position:absolute;z-index:30;left:0;right:0;top:100%;margin-top:4px;background:#fff;border:1px solid #d6dde8;border-radius:12px;box-shadow:0 12px 30px rgba(15,27,45,.14);padding:4px;max-height:320px;overflow:auto}
.gk-item{display:flex;gap:10px;align-items:center;width:100%;text-align:left;background:none;border:0;border-radius:8px;padding:6px 8px;cursor:pointer;font:inherit;color:inherit}
.gk-item:hover,.gk-item:focus-visible{background:#eef4ff;outline:none}
.gk-item img,.gk-ini{width:34px;height:34px;border-radius:50%;object-fit:cover;flex:none;background:#e2e8f0;display:grid;place-items:center;font-weight:700;color:#475569}
.gk-item b{display:block;font-weight:600}.gk-item small{display:block;color:#64748b;font-size:.78rem}
.gk-new{display:block;padding:6px 8px;color:#64748b}
.gk-on{display:block;padding:9px 0;color:#047857;font-weight:600}
.vg-known{display:block;color:#047857;margin-top:4px}
/* 1.70.0 — suggestions while typing (assets/js/suggest.js) */
.sg-box{position:absolute;z-index:40;left:0;right:0;top:100%;margin-top:4px;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 30px rgba(15,27,45,.16);padding:4px;max-height:300px;overflow:auto;font-size:.92rem;text-align:left}
.sg-head{display:block;padding:6px 8px 4px;color:var(--muted);font-size:.74rem;font-weight:600;letter-spacing:.03em;text-transform:uppercase}
.sg-head.sg-warn{color:#b45309;text-transform:none;letter-spacing:0;font-size:.8rem}
.sg-opt{display:flex;justify-content:space-between;gap:10px;align-items:center;width:100%;background:none;border:0;border-radius:8px;padding:7px 8px;cursor:pointer;font:inherit;color:inherit;text-align:left;text-decoration:none}
.sg-opt em{font-style:normal;color:var(--muted);font-size:.75rem}
.sg-opt:hover,.sg-opt.on{background:color-mix(in srgb,#2563eb 10%,var(--surface))}
.sg-rec{display:block}.sg-rec b{display:block;font-weight:600}.sg-rec small{display:block;color:var(--muted);font-size:.78rem}
.sg-foot{display:block;padding:6px 8px;color:var(--muted);font-size:.78rem}
.sg-note{margin-top:4px;padding:6px 10px;border-radius:8px;background:#fff7e6;color:#92400e;font-size:.82rem;line-height:1.35}
.sg-note a{color:inherit;font-weight:700}
:root[data-theme="dark"] .sg-note{background:#3a2604;color:#fcd34d}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .sg-note{background:#3a2604;color:#fcd34d}}
.gk-ph2{margin-top:6px}
.sg-box.sg-inline{position:static;margin-top:6px;box-shadow:none;border-color:#f5d79a;background:color-mix(in srgb,#f59e0b 6%,var(--surface));max-height:none}
.form label > .sg-note, .form label > .sg-box { order: 1; }
/* 1.71.0 — licence requests (developer console → Licence requests, Licences) */
.lr-banner{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;padding:12px 16px;margin:0 0 16px;border-radius:14px;background:#fff4dc;border:1px solid #f5d79a;color:#7c2d12;text-decoration:none}
.lr-banner span{font-size:.88rem;color:#92400e;flex:1 1 260px}.lr-banner em{font-style:normal;font-weight:700}
:root[data-theme="dark"] .lr-banner{background:#3a2604;border-color:#7c4a03;color:#fde68a}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .lr-banner{background:#3a2604;border-color:#7c4a03;color:#fde68a}}
.lr-card{border-left:4px solid #f59e0b}
.lr-head{display:flex;gap:12px;align-items:flex-start}.lr-head>div{flex:1;min-width:0}.lr-head h3{margin:0 0 2px}.lr-head p{margin:0}
.lr-no{font:800 1rem/1 var(--font-head,inherit);background:#fff4dc;color:#92400e;border-radius:10px;padding:8px 10px}
.lr-note{margin:10px 0;padding:8px 12px;border-left:3px solid var(--line);color:var(--text);background:color-mix(in srgb,var(--line) 25%,transparent);border-radius:0 8px 8px 0}
.lr-form{display:flex;flex-wrap:wrap;gap:10px 14px;align-items:flex-end;margin-top:10px}
.lr-form label{flex:0 0 110px}.lr-form .lr-grow{flex:1 1 220px}.lr-form label.check{flex:0 0 auto;align-self:center}
.lr-btns{display:flex;flex-wrap:wrap;gap:8px;flex:1 1 100%}
.lr-keys{display:flex;flex-direction:column;gap:4px;margin-top:6px}.lr-keys span{font-size:.85rem}.lr-keys em{font-style:normal;font-size:.7rem}
.lr-done tr.lr-hl td{background:color-mix(in srgb,#f59e0b 10%,transparent)}
.lr-mine{display:grid;gap:10px}.lr-item{border:1px solid var(--line);border-radius:12px;padding:10px 12px}
.lr-item-h{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap}
.kv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:0 24px}
:target.lr-card,:target.lr-item{box-shadow:0 0 0 3px #f59e0b55}
/* 1.71.0 — roles by module */
.role-mods{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}.role-mods i{font-style:normal;font-size:.72rem;font-weight:600;padding:2px 8px;border-radius:999px;background:color-mix(in srgb,var(--rc,#1d5fd1) 12%,transparent);color:var(--rc,#1d5fd1)}
.role-modpick{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:8px;margin-top:8px}
.role-modpick label.check{border:1px solid var(--line);border-radius:12px;padding:10px 12px;align-items:flex-start}.role-modpick label.check span{display:flex;flex-direction:column}.role-modpick small{color:var(--muted);font-weight:400}
/* 1.71.0 — search for the whole application */
.gs-open{display:inline-flex;align-items:center;gap:8px;height:38px;padding:0 12px;border-radius:10px;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.1);color:#fff;font:inherit;font-size:.9rem;cursor:pointer;min-width:0}
.gs-open:hover{background:rgba(255,255,255,.18)}
/* 1.84.23: live headcount in the top bar */
.tb-live{position:relative;display:inline-flex;align-items:center;gap:7px;height:38px;padding:0 12px;border-radius:10px;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.1);color:#fff;font-size:.9rem;font-weight:600;text-decoration:none;flex:none}
.tb-live:hover{background:rgba(255,255,255,.18);text-decoration:none;color:#fff}
.tb-live svg{width:18px;height:18px;flex:none}
.tb-live-dot{position:absolute;top:6px;left:8px;width:7px;height:7px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 0 rgba(34,197,94,.7);animation:tbLive 1.8s infinite}
@keyframes tbLive{0%{box-shadow:0 0 0 0 rgba(34,197,94,.7)}70%{box-shadow:0 0 0 7px rgba(34,197,94,0)}100%{box-shadow:0 0 0 0 rgba(34,197,94,0)}}
@media (prefers-reduced-motion:reduce){.tb-live-dot{animation:none}}
@media (max-width:640px){.tb-live span:last-child{display:none}.tb-live{width:40px;padding:0;justify-content:center;border:0;background:transparent}.tb-live svg{width:22px;height:22px}}
@media print{.tb-live{display:none!important}}
.gs-open svg{width:18px;height:18px;flex:none}
.gs-open kbd{font:600 .7rem/1 inherit;padding:3px 5px;border-radius:5px;background:rgba(255,255,255,.16);color:#e6eeff}
@media (min-width:900px){.gs-open{min-width:220px}.gs-open span{flex:1;text-align:left;opacity:.85}}
@media (max-width:899px){.gs-open{width:40px;padding:0;justify-content:center;border:0;background:transparent}.gs-open span,.gs-open kbd{display:none}.gs-open svg{width:22px;height:22px}}
.gs-dlg{border:0;padding:0;background:transparent;max-width:none;max-height:none;width:100%;height:100%;margin:0}
.gs-dlg::backdrop{background:rgba(10,20,40,.45);backdrop-filter:blur(2px)}
.gs-box{width:min(680px,calc(100% - 24px));margin:9vh auto 0;background:var(--surface);color:var(--text);border-radius:16px;box-shadow:0 24px 60px rgba(0,0,0,.3);display:flex;flex-direction:column;max-height:78vh;overflow:hidden}
.gs-in{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--line)}
.gs-in svg{width:20px;height:20px;color:var(--muted);flex:none}
.gs-in input{flex:1;border:0;outline:0;background:transparent;color:inherit;font:inherit;font-size:1.05rem;padding:6px 0;min-width:0}
.gs-in input::-webkit-search-cancel-button{display:none}
.gs-box kbd{font:600 .72rem/1 inherit;padding:3px 6px;border-radius:5px;border:1px solid var(--line);color:var(--muted);background:var(--bg)}
.gs-list{overflow:auto;padding:6px 8px 10px}
.gs-g h4{margin:10px 8px 4px;font-size:.72rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
.gs-item{display:flex;gap:12px;align-items:flex-start;padding:8px 10px;border-radius:10px;color:inherit;text-decoration:none}
.gs-item:hover,.gs-item.on{background:color-mix(in srgb,#2563eb 10%,var(--surface));text-decoration:none}
.gs-ic{flex:none;width:32px;height:32px;border-radius:9px;display:grid;place-items:center;background:color-mix(in srgb,#2563eb 10%,var(--surface));color:#1d5fd1}
.gs-ic svg{width:18px;height:18px}
.gs-tx{min-width:0;display:flex;flex-direction:column}.gs-tx b{font-weight:600}
.gs-tx small{color:var(--muted);font-size:.8rem;line-height:1.35;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.gs-empty,.gs-tip{color:var(--muted);font-size:.88rem;padding:14px 10px;margin:0}
.gs-recent{display:flex;flex-wrap:wrap;gap:6px;padding:2px 8px 4px}.gs-recent button{border:1px solid var(--line);background:var(--bg);color:inherit;border-radius:999px;padding:4px 10px;font:inherit;font-size:.82rem;cursor:pointer}
.gs-foot{display:flex;gap:16px;padding:8px 16px;border-top:1px solid var(--line);font-size:.75rem;color:var(--muted)}.gs-foot kbd{margin-right:2px}
@media (max-width:640px){.gs-box{margin-top:0;width:100%;max-height:100vh;height:100%;border-radius:0}.gs-foot{display:none}}
.gs-in input,.gs-in input:focus{border:0!important;box-shadow:none!important;outline:0!important;background:transparent!important;padding:6px 0!important}
.gs-in:focus-within{box-shadow:inset 0 -2px 0 #2563eb}
/* 1.72.0 — billing as in the quotation */
.qb-t input[type=number]{width:120px;text-align:right}
.qb-t td small{font-size:.75rem}
.qb-row{display:flex;gap:10px;align-items:center;padding:7px 4px;border-bottom:1px solid var(--line)}
.qb-row span{flex:1}.qb-row b{font-weight:600;white-space:nowrap}
.qb-switch{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 12px}
.qb-switch button{border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:999px;padding:8px 16px;font:inherit;font-weight:600;cursor:pointer}
.qb-switch button.on{background:#1d5fd1;border-color:#1d5fd1;color:#fff}
.qb-sum{border:1px solid var(--line);border-radius:12px;padding:6px 12px;margin:12px 0}
.qb-sum>div{display:flex;justify-content:space-between;gap:12px;padding:5px 0;font-size:.92rem}
.qb-sum>div.t{border-top:1px solid var(--line);font-weight:700}.qb-sum>div.big{font-size:1.1rem}
.qb-sum [data-dis] b{color:var(--green)}
.qb-pane .grid2,.qb-prices .grid2{align-items:start}
.qb-t td.n,.qb-t th.n{white-space:nowrap}
/* 1.73.0 — licence key fields, seller header preview */
.lic-key-field input{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.03em}
.lic-key-field .hint a{font-weight:600}
.lic-key-state{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.lic-key-state .alert{flex:1 1 100%;display:flex;flex-wrap:wrap;gap:8px 12px;align-items:flex-end}
.lic-key-state .alert .lic-key-field{flex:1 1 260px;margin:0}
.lic-inline{align-items:flex-end;margin-top:6px}.lic-inline .lic-key-field{flex:1 1 240px;margin:0}
.ven-preview{border:1px dashed var(--line);border-radius:12px;padding:16px;margin:0 0 14px;background:#fff;color:#0f1b33;overflow:auto}
/* 1.74.0 — licences follow the modules chosen */
.qb-t tr.qb-off td{opacity:.45}.qb-t tr.qb-off input{pointer-events:none}
.qb-dim{opacity:.4;pointer-events:none}
/* 1.75.0: module names and points on the Prices page */
.qb-mods .qb-mname { width: 100%; font-weight: 600; }
.qb-pts { margin-top: 4px; } .qb-pts summary { cursor: pointer; font-size: 12px; color: var(--muted, #64748b); }
.qb-pts textarea { width: 100%; margin-top: 4px; font-size: 13px; }
.qb-row small.qb-pl { display: block; font-size: 11.5px; color: var(--muted, #64748b); font-weight: 400; }
/* 1.75.0: copy button next to licence keys */
.key-copy { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.copy-btn { border: 1px solid var(--line, #d8e0ec); background: var(--card, #fff); color: var(--muted, #64748b); border-radius: 6px; padding: 2px 5px; cursor: pointer; line-height: 0; }
.copy-btn:hover { color: var(--brand, #1d5fd1); border-color: currentColor; } .copy-btn.copied { color: var(--green, #16a34a); border-color: currentColor; }
/* 1.75.0: a link into a switched-off module */
a[data-modoff] { pointer-events: none; opacity: .45; cursor: not-allowed; text-decoration: none; filter: grayscale(1); }
/* 1.75.0: Induction & medical fitness */
.ind-who { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.ind-who small { display: block; color: var(--muted, #64748b); }
.ind-ph { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; background: var(--line, #e2e8f0); }
.ind-who.big .ind-ph { width: 72px; height: 72px; border-radius: 12px; font-size: 24px; }
.ind-ini { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted, #64748b); }
.ind-t td small { display: block; color: var(--muted, #64748b); font-size: 11.5px; }
.ind-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ind-pick .ind-who { border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 8px; }
.ind-pick .ind-who:hover { border-color: var(--brand, #1d5fd1); }
.ind-sess { margin-top: 14px; border: 1px dashed var(--line, #cbd5e1); border-radius: 12px; padding: 12px 14px; }
.ind-sess legend { font-weight: 700; padding: 0 6px; }
.ind-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 14px; margin: 10px 0; }
.ind-topics .lbl { grid-column: 1 / -1; }
.ind-res { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.ind-res .choice { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 6px 10px; cursor: pointer; }
.ind-res .choice:has(input:checked) { border-color: var(--brand, #1d5fd1); box-shadow: 0 0 0 2px rgba(29, 95, 209, .15); }
/* 1.75.0: Goods & document vehicles */
.gd-shots { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 720px) { .gd-shots { grid-template-columns: 1fr; } }
.gd-shot { border: 1px dashed var(--line, #cbd5e1); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.gd-cam { align-self: flex-start; cursor: pointer; }
.gd-prev { display: flex; flex-wrap: wrap; gap: 6px; }
.gd-pv { position: relative; } .gd-pv img { width: 92px; height: 70px; object-fit: cover; border-radius: 8px; display: block; }
.gd-pv button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #dc2626; color: #fff; cursor: pointer; line-height: 1; }
.gd-out .gd-pv img { width: 48px; height: 36px; }
.plate { font-weight: 800; letter-spacing: .06em; font-family: ui-monospace, Menlo, Consolas, monospace; background: #fef9c3; border: 1px solid #a16207; color: #1f2937; border-radius: 6px; padding: 1px 7px; text-decoration: none; display: inline-block; }
.gd-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.gd-card { border: 1px solid var(--line, #e2e8f0); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.gd-th { display: inline-flex; gap: 4px; align-items: center; } .gd-th img { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; display: block; }
.gd-th em { font-style: normal; font-size: 12px; color: var(--muted, #64748b); }
.gd-big { display: flex; flex-wrap: wrap; gap: 8px; } .gd-big img { max-width: 260px; max-height: 200px; border-radius: 10px; display: block; }
/* 1.75.0: Visitor transport */
.tr-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.tr-card { border: 1px solid var(--line, #e2e8f0); border-left-width: 4px; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; }
.tr-card.tr-requested { border-left-color: #d97706; } .tr-card.tr-assigned { border-left-color: #2563eb; } .tr-card.tr-picked { border-left-color: #7c3aed; }
.tr-route { display: flex; align-items: center; gap: 8px; font-weight: 600; } .tr-route i { font-style: normal; color: var(--muted, #64748b); }
.tr-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.tr-n.tr-amber { color: #b45309; } .tr-n.tr-blue { color: #1d4ed8; } .tr-n.tr-violet { color: #6d28d9; } .tr-n.tr-green { color: var(--green, #16a34a); }
/* 1.76.0: Workforce management */
.wfm-green { color: var(--green, #16a34a); } .wfm-amber { color: #b45309; } .wfm-red { color: #dc2626; }
.wfm-kpi .lic-tile b small { font-weight: 600; }
.wfm-tree .card h3 small { font-weight: 500; font-size: 12px; }
.wfm-sup { border-left: 3px solid var(--line, #e2e8f0); padding: 4px 0 8px 12px; margin: 8px 0 0 6px; }
.wfm-sup-h { margin-bottom: 6px; }
.wfm-crews { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.wfm-crew { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 8px 10px; color: inherit; text-decoration: none; font-size: 13px; }
.wfm-crew:hover { border-color: var(--brand, #1d5fd1); } .wfm-crew span { color: var(--muted, #64748b); font-size: 12px; }
.wfm-list { max-height: 360px; overflow: auto; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; }
.wfm-att td { vertical-align: middle; } .wfm-att tr.wfm-abs td { opacity: .55; }
.wfm-miss summary { cursor: pointer; font-size: 12px; color: var(--muted, #64748b); white-space: nowrap; }
.wfm-miss[open] div { display: grid; gap: 2px; padding: 6px 0; min-width: 190px; }
.wfm-bar { display: grid; grid-template-columns: minmax(120px, 1.3fr) 2fr 52px; gap: 8px; align-items: center; font-size: 13px; margin: 5px 0; }
.wfm-bar i { height: 8px; background: var(--line, #e2e8f0); border-radius: 6px; overflow: hidden; display: block; } .wfm-bar em { display: block; height: 100%; border-radius: 6px; }
.wfm-bar b { text-align: right; } .bg-green { background: #16a34a; } .bg-amber { background: #d97706; } .bg-red { background: #dc2626; } .bg- { background: #94a3b8; }
.wfm-roles { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .wfm-roles span { border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 6px 10px; display: flex; flex-direction: column; }
.wfm-roles small { color: var(--muted, #64748b); font-size: 11.5px; } .wfm-roles i { font-style: normal; color: var(--muted, #64748b); }
/* 1.77.0: AI in workforce management */
.ai-box { border-top: 3px solid #8b5cf6; }
.ai-jump { margin: 0 0 10px; } .ai-jump a { text-decoration: none; }
.ai-warn { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 8px 10px; border-left: 4px solid #94a3b8; background: var(--soft, #f8fafc); border-radius: 8px; margin: 6px 0; }
.ai-warn > small { grid-column: 1 / -1; justify-self: start; } .ai-warn b { grid-column: 1; } .ai-warn span, .ai-warn em { grid-column: 1; font-size: 13px; } .ai-warn em { color: #475569; }
.ai-warn a { grid-column: 2; grid-row: 1 / span 4; align-self: center; font-size: 13px; }
.ai-warn.ai-high { border-left-color: #dc2626; } .ai-warn.ai-medium { border-left-color: #d97706; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; } .ai-chip { border-radius: 999px; padding: 3px 10px; font-size: 12.5px; background: #f1f5f9; }
.ai-chip.ai-high { background: #fee2e2; color: #991b1b; } .ai-chip.ai-medium { background: #fef3c7; color: #92400e; } .ai-chip b { margin-left: 4px; }
.ai-gap { border-bottom: 1px solid var(--line, #e2e8f0); padding: 8px 0; } .ai-gap ol { margin: 4px 0 0 18px; padding: 0; }
.ai-task { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 6px 0; border-bottom: 1px solid var(--line, #e2e8f0); } .ai-task .badge { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.ai-grade { display: inline-flex; width: 24px; height: 24px; border-radius: 6px; align-items: center; justify-content: center; font-weight: 800; color: #fff; background: #94a3b8; }
.ai-gA { background: #16a34a; } .ai-gB { background: #65a30d; } .ai-gC { background: #d97706; } .ai-gD { background: #ea580c; } .ai-gE { background: #dc2626; }
.ai-sug { align-items: flex-start; } .ai-sug small { display: block; }

/* 1.77.0 AI document reader */
.docai-bar { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0 0 12px; padding: 8px 10px; border: 1px dashed var(--line, #cbd5e1); border-radius: 10px; background: rgba(29,95,209,.04); grid-column: 1 / -1; }
.docai-bar .hint { font-size: 12px; }
.docai-out { flex-basis: 100%; }
.docai-out:empty { display: none; }
.docai-tbl { border-collapse: collapse; margin: 6px 0; font-size: 13px; }
.docai-tbl th { text-align: left; padding: 3px 10px 3px 4px; font-weight: 600; white-space: nowrap; }
.docai-tbl td { padding: 3px 4px; }
.docai-filled { outline: 2px solid #10b981 !important; transition: outline .3s; }

/* 1.77.0 Help & user guide */
.ug-lang { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.ug-lang a { padding: 3px 9px; border-radius: 14px; text-decoration: none; border: 1px solid var(--line, #d6dce6); }
.ug-lang a.on { background: #1f5fbf; color: #fff; border-color: #1f5fbf; }
.ug-top { position: sticky; top: 0; z-index: 3; background: var(--bg, #f5f7fb); padding: 8px 0 10px; }
.ug-top input { width: 100%; max-width: 420px; }
.ug-toc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ug-toc a { font-size: 12.5px; padding: 3px 9px; border-radius: 12px; background: rgba(31,95,191,.08); text-decoration: none; }
.ug-sec h2 { display: flex; gap: 8px; align-items: center; font-size: 1.15rem; margin: 0 0 6px; }
.ug-sec h2 .ic { width: 20px; height: 20px; color: #1f5fbf; }
.ug-sec h3 { font-size: .95rem; margin: 12px 0 4px; }
.ug-sec ol, .ug-sec ul { margin: 0 0 0 20px; padding: 0; }
.ug-sec li { margin: 3px 0; }
.ug-go { margin: 10px 0 0; }

/* 1.77.0: an icon inside a page title never grows to the page width */
.page-head h1 > .ic, main h1 > .ic { width: 1.05em; height: 1.05em; vertical-align: -0.15em; flex-shrink: 0; color: var(--brand, #1d5fd1); }
/* 1.77.0: the calculators of Smart insights fit a phone (a grid column never grows wider than the screen) */
@media (max-width: 900px) { .ins-calc-grid { grid-template-columns: minmax(0, 1fr); } .ins-calc-grid > *, .ins-in, .ins-res { min-width: 0; } .ins-in input, .ins-in select { max-width: 100%; } }
/* 1.77.0: small add-forms laid out in one row (e.g. Holidays: date, name, paid, Add) wrap on a phone instead of running off the screen */
@media (max-width: 560px) { form.cred-add[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; } form.cred-add > * { min-width: 0; } form.cred-add > button, form.cred-add > .btn { grid-column: 1 / -1; } }

/* 1.84.27: today's IN / OUT times on the in / out notification + Summary button */
.notify .n-day { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; align-items: center; }
.notify .n-day-l { font-size: 11px; color: var(--muted); margin-right: 2px; }
.notify .n-day i { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: rgba(22,163,74,.12); color: #15803d; white-space: nowrap; }
.notify .n-day i.nd-out { background: rgba(234,88,12,.12); color: #c2410c; }
.notify .n-day i.nd-last { outline: 2px solid currentColor; outline-offset: -1px; }
.notify .n-sum { position: absolute; right: 30px; top: 6px; font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.notify .n-sum:hover { color: var(--text); }
.notify .n-kind { padding-right: 60px; }
.pb-head b a { color: inherit; text-decoration: none; } .pb-head b a:hover { text-decoration: underline; }

/* 1.84.50: Back button · name in any table → the person's details · dialogs always close */
.tb-back { width: auto; padding: 0 10px 0 6px; gap: 2px; display: inline-flex; align-items: center; font: inherit; font-size: 14px; font-weight: 600; border: 1px solid rgba(255,255,255,.22); height: 34px; }
.tb-back svg { width: 20px; height: 20px; }
@media (max-width: 899px) { .tb-back span { display: none; } .tb-back { padding: 0 6px; } }
td.pn-link, .pn-link { cursor: pointer; }
td.pn-link > :first-child:not(a):not(button), td.pn-link.pn-txt { text-decoration: underline dotted rgba(37,99,235,.55); text-underline-offset: 3px; }
td.pn-link:hover { color: #1d4ed8; }
.pb-extra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; padding: 4px 18px 10px; font-size: 13px; }
.pb-extra div { display: flex; flex-direction: column; } .pb-extra span { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; }
.dsg-dlg { width: min(860px, calc(100vw - 24px)); } .dsg-bar { display: flex; gap: 10px; align-items: center; padding: 6px 18px; flex-wrap: wrap; } .dsg-bar input[type=search] { flex: 1; min-width: 160px; }
.dsg-body { padding: 0 12px; max-height: 60vh; overflow: auto; } .dsg-body select { min-width: 170px; }
/* 1.84.50: weekly plan — contractor by contractor */
.cb { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 10px 0; background: var(--surface, #fff); }
.cb.cb-incomplete { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.12); }
.cb-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; } .cb-head b { font-size: 15px; }
.cb-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.cb-chips { display: contents; }
.cb-chip, .form label.cb-chip { display: inline-flex; flex-direction: row; align-items: center; gap: 5px; font-weight: 500; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; cursor: pointer; user-select: none; }
.cb-chip:has(input:checked) { border-color: #2563eb; background: rgba(37,99,235,.08); color: #1d4ed8; font-weight: 600; }
.cb-chip em { font-style: normal; font-size: 11px; color: var(--muted); }
.cb-other { max-width: 220px; }
.cb-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 1px dashed var(--line); border-radius: 14px; padding: 10px 14px; margin-top: 6px; }
.cb-add select { max-width: 360px; }
input.cb-bad { border-color: #f59e0b !important; }
.cb-chip input { width: auto; margin: 0; }

/* ================================================================ 1.84.54 — professional print, every page
   Running header and footer on every sheet (organisation · page title · printed on · page x of y — set by assets/js/app.js),
   tables with a dark heading row that repeats on every page, light grid lines, rows never cut in two, a block or chart
   that fits on a page never split (it moves to the next page whole), headings kept with what follows, charts sized for
   paper. A page that needs its own layout keeps it (its rules come later or are more specific). */
@media print {
  html, body { background: #fff !important; color: #111 !important; }
  body { font-family: Arial, Helvetica, sans-serif !important; font-size: 10px; line-height: 1.35; }
  .content { max-width: none !important; }
  a { color: inherit !important; text-decoration: none !important; }
  .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; border-bottom: 2px solid #1f2a5c; padding-bottom: 4px; margin: 0 0 8px !important; }
  .page-head h1 { font-size: 16px !important; margin: 0 !important; color: #1f2a5c !important; }
  .page-head .muted, .page-head small { font-size: 9px; }
  /* tables: the heading row on every page, grid lines, rows kept whole */
  table { border-collapse: collapse !important; }
  table.table { width: 100%; }
  table.table > thead { display: table-header-group; } table.table > tfoot { display: table-footer-group; }
  table.table:not(.pr-own) > thead th { background: #1f2a5c !important; color: #fff !important; border: 1px solid #1f2a5c !important; font-weight: 700; text-transform: none; letter-spacing: 0; vertical-align: middle; }
  table.table td { border: 1px solid #c3cad6 !important; vertical-align: middle; }
  table.table > tbody > tr:last-child > td { border-bottom: 1.5px solid #1f2a5c !important; }
  table.table tr, table.table td, table.table th { break-inside: avoid; page-break-inside: avoid; }
  /* one compact, even type size on paper: about 30 rows a portrait page instead of 10 */
  table.table:not(.pr-own) td, table.table:not(.pr-own) th { padding: 2px 5px !important; font-size: 9px !important; line-height: 1.25 !important; }
  table.table:not(.pr-own) td small, table.table:not(.pr-own) td .small, table.table:not(.pr-own) td.small { font-size: 8px !important; }
  table.table:not(.pr-own) td .badge, table.table:not(.pr-own) td .pill, table.table:not(.pr-own) td .chip, table.table:not(.pr-own) td [class^="tp-"] { display: inline-block; padding: 0 4px !important; border-radius: 3px !important; font-size: 8px !important; line-height: 1.3 !important; box-shadow: none !important; }
  table.table:not(.pr-own) td img { max-height: 26px; width: auto; }
  table.table tbody { break-inside: auto; }
  table.table td, table.table th, .table thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* blocks: one that fits on a page is not split; a long table may run on, its heading stays with it */
  .card, .chart-card, .stat, .stats, .stats-x, .rpt-kpis, .kpis6, .rpt-tile, .ins-card, .ins-brief, .donut-wrap, .chart-legend, figure, img, svg { break-inside: avoid; page-break-inside: avoid; }
  .card:has(table.table), .card:has(.table-wrap), .card:has(.table-scroll), .card:has(.tbl-scroll), section.rpt-table { break-inside: auto; page-break-inside: auto; }
  h1, h2, h3, h4, .card-head, .page-head, .rpt-letter, .rpt-note { break-after: avoid; page-break-after: avoid; }
  .card-head + *, h2 + *, h3 + * { break-before: avoid; page-break-before: avoid; }
  p, li { orphans: 3; widows: 3; }
  .card { border: 1px solid #c9d1de !important; border-radius: 6px !important; box-shadow: none !important; padding: 8px 10px !important; margin: 0 0 8px !important; background: #fff !important; }
  .card-head { margin-bottom: 6px !important; padding-bottom: 4px; border-bottom: 1px solid #e2e7ef; }
  .card-head h3, .card h3 { font-size: 11.5px !important; color: #1f2a5c; margin: 0 !important; }
  .ch-ic { display: none !important; }
  /* charts: two side by side, a fixed height, never split */
  .dash-charts, .rpt-charts, .report-charts { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .dash-charts > *, .rpt-charts > * { break-inside: avoid; min-width: 0; }
  html.pr-land .rpt-charts, html.pr-land .report-charts { grid-template-columns: repeat(3, 1fr) !important; }
  .rpt-charts .chart, .report-charts .chart { max-height: 150px !important; }
  .rpt-charts .donut, .report-charts .donut { width: 90px !important; height: 90px !important; }
  .chart { width: 100% !important; height: auto !important; max-height: 185px !important; }
  .chart-legend { font-size: 8.5px !important; }
  .donut { width: 105px !important; height: 105px !important; }
  /* the paper's own letterhead (reports) and signature lines */
  .rpt-letter { margin-bottom: 8px; }
  .rpt-sign { break-inside: avoid; page-break-inside: avoid; }
  /* screen-only furniture */
  .rpt-pager, .tbl-pager, .tbl-tools, .pagination, nav.pager, .rpt-filt, form.filters, .filters, .no-print, .toast, .notify-stack { display: none !important; }
  .table-scroll, .table-wrap, .tbl-scroll, .io-wrap { overflow: visible !important; max-height: none !important; }
  /* the letterhead (logo · organisation · printed on) heads page 1 only; later pages get the running header */
  body:has(main.content) { padding-top: 0 !important; }
  body:has(main.content) .brand-print { position: static !important; margin: 0 0 8px; padding: 0 0 6px !important; }
  /* a block holding a long table loses its box on paper (a box cut by the page edge looks broken) */
  .card:has(table.table), section.rpt-table { border: 0 !important; padding: 0 !important; border-radius: 0 !important; }
  /* greeting banners and live widgets mean nothing on paper */
  .page-head.dash-head, .tb-live, .live-dot { display: none !important; }
  /* page breaks with their reference (assets/js/app.js): a short table is kept whole with its heading; a long one
     repeats a "section · continued" line and its column heading on every page */
  table.pr-keep { break-inside: avoid; page-break-inside: avoid; }
  table.table > thead tr.pr-ref th { background: #e8edf7 !important; color: #1f2a5c !important; text-align: left !important; font-size: 9px !important; font-weight: 700; border: 1px solid #c3cad6 !important; padding: 2px 6px !important; }
  /* a report's printed letterhead already names the report: the screen heading above it is not repeated */
  .page-head:has(+ .rpt-letter), .page-head:has(~ .rpt-letter) { display: none !important; }
}
@media screen { tr.pr-ref { display: none; } }

/* 1.84.59 — each user's own notification pop-up: size and place on the screen (user menu → Notifications…) */
.notify-stack { will-change: transform; z-index: 2147483000; }   /* above the chat button and every floating bar */
.notify-stack.ns-br { right: 16px; bottom: 16px; left: auto; top: auto; }
.notify-stack.ns-bl { left: 16px; bottom: 16px; right: auto; top: auto; }
.notify-stack.ns-bc { left: 50%; bottom: 16px; right: auto; top: auto; margin-left: calc(min(380px, 100vw - 32px) / -2); }
.notify-stack.ns-tr { right: 16px; top: 72px; left: auto; bottom: auto; }
.notify-stack.ns-tl { left: 16px; top: 72px; right: auto; bottom: auto; }
.notify-stack.ns-tc { left: 50%; top: 72px; right: auto; bottom: auto; margin-left: calc(min(380px, 100vw - 32px) / -2); }
.notify-stack.ns-s { width: min(290px, calc(100vw - 32px)); gap: 6px; }
.notify-stack.ns-s.ns-bc, .notify-stack.ns-s.ns-tc { margin-left: calc(min(290px, 100vw - 32px) / -2); }
.notify-stack.ns-s .notify { padding: 7px 30px 7px 9px !important; gap: 8px; border-radius: 11px; font-size: .86em; }
.notify-stack.ns-s .notify img, .notify-stack.ns-s .notify .n-av { width: 32px; height: 32px; font-size: .8rem; }
.notify-stack.ns-s .n-kind, .notify-stack.ns-s .n-sub, .notify-stack.ns-s .n-day, .notify-stack.ns-s .n-sum { display: none !important; }
.notify-stack.ns-s .n-top b { font-size: .92rem; }
.notify-stack.ns-l { width: min(500px, calc(100vw - 32px)); }
.notify-stack.ns-l.ns-bc, .notify-stack.ns-l.ns-tc { margin-left: calc(min(500px, 100vw - 32px) / -2); }
.notify-stack.ns-l .notify { padding: 16px 40px 16px 16px !important; gap: 16px; font-size: 1.12em; }
.notify-stack.ns-l .notify img, .notify-stack.ns-l .notify .n-av { width: 66px; height: 66px; font-size: 1.3rem; }
.notify-stack.ns-l .n-top b { font-size: 1.25rem; }
.notify-stack.ns-tl .notify.n-hide, .notify-stack.ns-bl .notify.n-hide { transform: translateX(-30px); }
.notify-stack.ns-tc .notify.n-hide, .notify-stack.ns-bc .notify.n-hide { transform: translateY(20px); }
@media (max-width: 640px) {
  /* phones: always across the screen, pinned to the visible screen (assets/js/app.js follows the visual viewport) */
  .notify-stack[class*="ns-"] { left: 8px !important; right: 8px !important; width: auto !important; margin-left: 0 !important; }
  .notify-stack.ns-br, .notify-stack.ns-bl, .notify-stack.ns-bc { bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .notify-stack.ns-tr, .notify-stack.ns-tl, .notify-stack.ns-tc { top: calc(62px + env(safe-area-inset-top, 0px)); }
}
/* the settings dialog */
.np-dlg { width: min(620px, calc(100vw - 20px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.35); background: var(--surface, #fff); color: var(--text); }
.np-dlg::backdrop { background: rgba(15,27,51,.45); }
.np-form { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.np-h { position: relative; padding: 16px 48px 12px 18px; border-bottom: 1px solid var(--line); }
.np-h b { font-size: 1.1rem; display: block; } .np-h small { color: var(--muted); }
.np-h .pb-x { position: absolute; top: 10px; right: 10px; }
.np-body { overflow: auto; padding: 12px 18px; display: grid; gap: 12px; }
.np-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.np-row input { width: 20px; height: 20px; margin-top: 2px; } .np-row small { display: block; color: var(--muted); }
.np-set { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; margin: 0; display: grid; gap: 10px; }
.np-set legend { font-weight: 700; padding: 0 6px; font-size: .9rem; }
.np-set.np-dim { opacity: .45; }
.np-f > span, .np-f label > span { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.np-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.np-2 select, .np-2 input[type=range] { width: 100%; }
.np-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.np-seg label, .np-pos label { cursor: pointer; }
.np-seg input, .np-pos input { position: absolute; opacity: 0; pointer-events: none; }
.np-seg span { display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 9px; font-weight: 600; font-size: .9rem; }
.np-seg input:checked + span, .np-pos input:checked + span { background: var(--brand-2, #1d4ed8); border-color: var(--brand-2, #1d4ed8); color: #fff; }
.np-seg input:focus-visible + span, .np-pos input:focus-visible + span { outline: 2px solid var(--brand-3, #3b82f6); outline-offset: 2px; }
.np-pos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 420px; }
.np-pos span { display: block; text-align: center; padding: 8px 6px; border: 1px dashed var(--line); border-radius: 9px; font-size: .82rem; font-weight: 600; }
.np-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.np-checks label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.np-note { margin: 0; font-size: .8rem; color: var(--muted); }
.np-foot { display: flex; gap: 8px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.np-foot [data-np-save] { margin-left: auto; }
.np-msg { font-size: .88rem; font-weight: 600; } .np-msg.ok { color: #15803d; } .np-msg.err { color: #b91c1c; }
@media (max-width: 560px) { .np-2 { grid-template-columns: 1fr; } .np-pos span { font-size: .75rem; padding: 8px 2px; } }

/* 1.84.60 — complimentary modules: a gift mark in the menu and on the page's note */
.comp-mark { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; margin-left: 6px; border-radius: 6px; background: linear-gradient(135deg, #fde68a, #f59e0b); color: #7c2d12; box-shadow: 0 1px 3px rgba(180, 83, 9, .35); vertical-align: middle; font-style: normal; }
.comp-mark svg { width: 12px; height: 12px; }
.sidenav a .comp-mark, .sidenav summary .comp-mark { margin-left: auto; }
.sidenav a .comp-mark + .count, .sidenav summary .comp-mark + .count { margin-left: 6px; }
.sidenav summary .comp-mark + em.count + .nav-chev, .sidenav summary .comp-mark + .nav-chev { margin-left: 6px; }
.comp-mark.cm-banner { width: 22px; height: 22px; margin: 0 8px 0 0; }
.comp-mark.cm-banner svg { width: 14px; height: 14px; }
.comp-legend { display: flex; align-items: center; gap: 8px; margin: 10px 8px 2px; padding: 8px 10px; border-radius: 10px; background: #fffbeb; border: 1px dashed #fcd34d; color: #92400e; font-size: .8rem; font-weight: 600; }
.comp-legend .comp-mark { margin: 0; }
.comp-legend span { flex: 1; min-width: 0; }
.comp-legend .comp-tg { border: 0; background: #f59e0b; color: #fff; font: inherit; font-weight: 700; padding: 4px 10px; border-radius: 8px; cursor: pointer; }
.comp-legend .comp-tg:hover { background: #d97706; }
.um-ic.comp-um svg { width: 18px; height: 18px; color: #d97706; }
body.nav-mini .comp-legend span, body.nav-mini .comp-legend .comp-tg { display: none; }
@media print { .comp-mark, .comp-legend { display: none !important; } }

/* 1.84.64 — home page: the whole manpower (company payroll + contractor staff) */
.mw-card { margin-bottom: 14px; }
.mw-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 12px; margin: 4px 0 12px; }
.mw-total, .mw-grp { position: relative; display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; }
.mw-total { background: linear-gradient(135deg, #0a2a6b, #1d4ed8); color: #fff; border: 0; }
.mw-total > span, .mw-grp > span { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.mw-total > b, .mw-grp > b { font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.05; font-variant-numeric: tabular-nums; }
.mw-total > small, .mw-grp > small { opacity: .8; }
.mw-row { display: flex; gap: 18px; margin-top: 8px; }
.mw-row b { display: block; font-size: 1.25rem; font-variant-numeric: tabular-nums; } .mw-row small { font-size: .78rem; opacity: .8; }
.mw-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; margin-top: 10px; background: rgba(255,255,255,.2); }
.mw-bar i.g-p { background: #38bdf8; } .mw-bar i.g-c { background: #f59e0b; }
.mw-grp.g-p { border-top: 4px solid #0ea5e9; } .mw-grp.g-c { border-top: 4px solid #f59e0b; }
.mw-grp.g-p > span { color: #0369a1; } .mw-grp.g-c > span { color: #b45309; }
.mw-grp:hover { text-decoration: none; border-color: var(--brand-3); }
.mw-meter { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 8px; }
.mw-meter i { display: block; height: 100%; background: #16a34a; }
.mw-t { margin-bottom: 8px; }
.mw-ags summary { cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--muted); }
.mw-ags ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; }
.mw-ags li { display: flex; gap: 6px; align-items: baseline; border-bottom: 1px dashed var(--line); padding: 3px 0; }
.mw-ags li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mw-ags li small { color: var(--muted); }
@media (max-width: 760px) { .mw-grid { grid-template-columns: 1fr; } }
.agency-tag.own-tag { background: #e0f2fe; color: #075985; }   /* 1.84.65: company payroll in All manpower */
/* 1.84.66: registered = everybody; active / deactivated under it; tiles' head is a link */
.mw-lnk { display: grid; gap: 2px; color: inherit; text-decoration: none; } .mw-lnk:hover { text-decoration: none; }
.mw-lnk > span { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.mw-lnk > b { font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.05; font-variant-numeric: tabular-nums; } .mw-lnk > small { opacity: .8; }
.mw-grp.g-p .mw-lnk > span { color: #0369a1; } .mw-grp.g-c .mw-lnk > span { color: #b45309; }
.mw-st { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mw-st a { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: .8rem; font-weight: 700; text-decoration: none; background: var(--bg-soft, #f1f5f9); color: var(--text); border: 1px solid var(--line); }
.mw-st a:hover { border-color: var(--brand-3); text-decoration: none; }
.mw-st i { width: 8px; height: 8px; border-radius: 50%; } .mw-st i.ok { background: #16a34a; } .mw-st i.off { background: #94a3b8; }
.mw-total .mw-st a { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.25); }
.st-count { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 99px; font-size: .75rem; background: var(--bg-soft, #f1f5f9); color: var(--muted); }
.mr-sum { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; } .mr-sum span { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: .9rem; }
.mr-off td { color: var(--muted); }
@media print { .mw-st a { border: 0; padding: 0; } }
/* 1.84.65 — the web version under the menu, "All" next to the complimentary line */
.sidenav-foot .sv-ver { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 6px; background: rgba(37,99,235,.12); color: var(--brand-2, #1d4ed8); font-size: .72rem; font-weight: 800; text-decoration: none; vertical-align: middle; }
.sidenav-foot .sv-ver:hover { text-decoration: underline; }
.comp-legend .comp-list { color: #92400e; font-weight: 800; text-decoration: underline; }
body.nav-mini .comp-legend .comp-list { display: none; }

/* 1.84.67: the pop-up never grows wider than the screen — long names, codes or machine names wrap / shorten inside it */
.notify-stack > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
.notify > div { flex: 1 1 auto; min-width: 0; }
.notify .n-top { min-width: 0; } .notify .n-top b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notify .n-label { flex: none; }
.notify .n-sub, .notify .n-time { overflow-wrap: anywhere; word-break: break-word; }
.notify .n-day i { white-space: normal; }
.notify-stack.ns-phone .notify { padding: 8px 34px 8px 10px !important; gap: 10px; }
.notify-stack.ns-phone.ns-l .notify img, .notify-stack.ns-phone.ns-l .notify .n-av { width: 52px; height: 52px; }
.notify-stack.ns-phone.ns-l .notify { font-size: 1em; }
