/* Zoni: calm, neutral business UI. One accent (blue); colour otherwise only carries meaning (paid / part / unpaid). */
:root {
  --bg: #f6f7f9; --surface: #fff; --surface-2: #f9fafb; --ink: #111827; --ink-2: #374151; --muted: #4b5563; --faint: #6b7280;
  --line: #e5e7eb; --line-2: #eef0f3;
  --accent: #2f5bea; --accent-hover: #2349c8; --accent-soft: #eef2fe; --accent-ring: rgba(47, 91, 234, .18);
  --ok: #067647; --ok-soft: #ecfdf3; --warn: #b54708; --warn-soft: #fffaeb; --bad: #b42318; --bad-soft: #fef3f2;
  /* Shifts (Rota, Attendance, My work): one family of Zoni blues, so day and night read as the same brand. */
  --day: #2349c8; --day-soft: #eef2fe; --day-line: #c9d6fb;
  --night: #1b2f7a; --night-ink: #ffffff; --night-line: #1b2f7a;
  --rest: #98a2b3; --rest-soft: #f6f7f9; --leave: var(--ok); --leave-soft: var(--ok-soft);
  --r: 12px; --r-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 20px 40px -12px rgba(16, 24, 40, .22);
  --side: 236px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
h1, h2, h3 { margin: 0 0 4px; color: var(--ink); letter-spacing: -.015em; }
h1 { font-size: 24px; font-weight: 650; line-height: 1.25; }
h2 { font-size: 15px; font-weight: 600; line-height: 1.4; }
a { color: var(--accent); }
.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }
.muted { color: var(--muted); margin: 0 0 12px; }
.muted-inline { color: var(--muted); font-size: 13px; font-weight: 400; }
.fine { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.kicker { font-size: 12px; font-weight: 500; color: var(--muted); margin: 0 0 2px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ---- Brand ---- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .mark { width: 28px; height: 28px; flex: none; }
.brand span { font-size: 15px; font-weight: 500; letter-spacing: -.01em; color: var(--ink-2); }
.brand b { font-weight: 700; color: var(--ink); }

/* ---- Buttons & inputs ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: 500 14px/1 inherit; font-family: inherit;
  cursor: pointer; text-decoration: none; box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); border-color: #d1d5db; color: var(--ink); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-ring); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; height: 40px; }
/* main action: solid accent */
.btn:not(.ghost):not(.danger):not(.primary-off) { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:not(.ghost):not(.danger):not(.primary-off):hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.btn.danger { background: var(--surface); color: var(--bad); border-color: #fecdca; }
.btn.danger:hover { background: var(--bad-soft); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.linkish:hover { text-decoration: underline; }
.linkish.danger { color: var(--bad); }

.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-weight: 500; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.field small { font-weight: 400; color: var(--faint); }
input, select, textarea { font: inherit; font-size: 14px; width: 100%; height: 38px; padding: 0 12px; border: 1px solid #d0d5dd; border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
input[type=checkbox] { width: 16px; height: 16px; padding: 0; box-shadow: none; accent-color: var(--accent); }
select { padding-right: 32px; appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
textarea { height: auto; min-height: 140px; padding: 10px 12px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
input::placeholder, textarea::placeholder { color: var(--faint); }
.field.invalid input, .field.invalid select { border-color: #fda29b; }
.field.invalid input:focus { box-shadow: 0 0 0 4px rgba(240, 68, 56, .15); }
.field .err { display: none; color: var(--bad); font-size: 12.5px; margin-top: 5px; font-style: normal; }
.field.invalid .err { display: block; }
.msg { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r-sm); font-size: 13.5px; border: 1px solid transparent; }
.msg.err { background: var(--bad-soft); color: var(--bad); border-color: #fee4e2; }
.msg.ok { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.stack { display: grid; gap: 2px; }

/* ---- Login ---- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.login-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: var(--shadow-lg); }
.login-card .brand { margin-bottom: 24px; }
.login-card h1 { font-size: 20px; }
.login-split { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: var(--faint); font-size: 12px; font-weight: 500; }
.login-split::before, .login-split::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn.google { background: var(--surface); color: var(--ink); border-color: var(--line); gap: 10px; text-decoration: none; }
.btn.google:hover:not(:disabled) { background: var(--surface-2); border-color: #d1d5db; color: var(--ink); }
.btn.google svg { flex: none; }

/* ---- App shell: sidebar + content ---- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 18px 12px; background: var(--surface); border-right: 1px solid var(--line); }
.side .brand { padding: 4px 8px 18px; }
.tabs { display: grid; gap: 2px; }
.tabs a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14px; }
.tabs a svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--faint); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs a:hover { background: var(--surface-2); color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.tabs a[aria-current="page"] svg { stroke: var(--accent); }
.me { margin-top: auto; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.me .avatar { grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 600; font-size: 12px; }
.me b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me small { display: block; font-size: 12px; color: var(--muted); }
.me .linkish { grid-column: 2; justify-self: start; font-size: 12.5px; color: var(--muted); }
.page { min-width: 0; padding: 28px 0 64px; }

/* Phone menu button, page title and small avatar: only shown on small screens. On computers the menu sheet is invisible. */
.nav-open-btn, .m-title, .me-mini { display: none; }
.nav-sheet { display: contents; }

/* ---- Page header & cards ---- */
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.head-row .muted { margin: 2px 0 0; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.head-actions select { width: auto; min-width: 180px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.card h2 { margin-bottom: 12px; }
.card.empty { text-align: center; padding: 48px 20px; }
.card.empty h2 { font-size: 17px; margin-bottom: 6px; }
.warn-card { background: var(--warn-soft); border-color: #fedf89; color: #93370d; }
.warn-card a { color: inherit; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.grid2 > .card { margin: 0 0 16px; }

/* stat cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.stat span { display: block; order: -1; font-size: 13px; color: var(--muted); }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat b { font-size: 24px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat.red b { color: var(--bad); }
.stat .meter { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin-top: 2px; }
.stat .meter i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr 1fr; } .stat { padding: 12px 14px; } .stat b { font-size: 18px; } }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.list li:first-child { border-top: 0; padding-top: 0; }
.list small { color: var(--muted); }

.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 56px minmax(60px, 1fr) auto; gap: 12px; align-items: center; font-size: 13px; color: var(--ink-2); }
.bar { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }

/* ---- Toolbar, filters, menus ---- */
.toolbar { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tool-left, .tool-right { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 4px; min-width: 260px; }
.menu-pop a { display: block; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--ink-2); text-decoration: none; font-size: 13.5px; }
.menu-pop a:hover { background: var(--surface-2); color: var(--ink); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.lock-note { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 12px; font-size: 13.5px; color: var(--ink-2); margin: 0 0 12px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters input { max-width: 300px; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.seg button { border: 0; background: none; font: 500 13px inherit; font-family: inherit; padding: 5px 12px; border-radius: 7px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
table.pay { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.pay th, table.pay td { padding: 11px 14px; border-top: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
table.pay thead th { border-top: 0; font-size: 12px; font-weight: 500; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.pay tbody tr:hover { background: #fafbfc; }
table.pay td b { font-weight: 600; }
table.pay tfoot td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--line); }
table.pay td small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.cell-btn { background: none; border: 1px solid transparent; border-radius: 6px; padding: 3px 6px; margin: -3px -6px; font: inherit; cursor: pointer; color: inherit; text-align: inherit; }
.cell-btn:hover:not(:disabled) { border-color: var(--line); background: var(--surface); box-shadow: var(--shadow-sm); color: var(--accent); }
.cell-btn:disabled { cursor: default; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.paid { background: var(--ok-soft); color: var(--ok); border-color: #abefc6; }
.pill.part { background: var(--warn-soft); color: var(--warn); border-color: #fedf89; }
.pill.unpaid { background: var(--bad-soft); color: var(--bad); border-color: #fecdca; }
.pill.off { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.receipt-link { font-size: 12.5px; text-decoration: none; }
.receipt-link:hover { text-decoration: underline; }

/* ---- Dialogs ---- */
dialog { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(560px, 100% - 24px); box-shadow: var(--shadow-lg); color: var(--ink); }
dialog::backdrop { background: rgba(17, 24, 39, .4); backdrop-filter: blur(2px); }
dialog form { padding: 24px; max-height: 88vh; overflow: auto; }
dialog h2 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
dialog.wide { width: min(820px, 100% - 24px); }
.dlg-actions { display: flex; flex-direction: row-reverse; gap: 8px; justify-content: flex-start; flex-wrap: wrap; margin: 20px -24px -24px; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 14px 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }
.preview { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-sm); margin-top: 10px; }
.preview table { width: 100%; border-collapse: collapse; font-size: 13px; }
.preview td, .preview th { padding: 7px 10px; border-top: 1px solid var(--line-2); text-align: left; }
.preview tr:first-child td, .preview tr:first-child th { border-top: 0; }
.drop { display: block; border: 1px dashed #d0d5dd; border-radius: var(--r-sm); padding: 16px; text-align: center; color: var(--muted); font-size: 13.5px; cursor: pointer; background: var(--surface-2); transition: border-color .15s, background .15s; }
.drop:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.drop.has { border-style: solid; border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px;
  border-radius: 10px; font-size: 13.5px; font-weight: 500; z-index: 100; box-shadow: var(--shadow-lg); }
.stat span::first-letter { text-transform: uppercase; }
#pr-table td:nth-child(2), #st-table td:nth-child(2) { min-width: 190px; }
#pr-table td:nth-child(2) small, #st-table td:nth-child(2) small { white-space: nowrap; }
#pr-table td:nth-child(3) { min-width: 180px; }
#pr-table td:nth-child(4) { min-width: 170px; }

/* Staff multi-select */
table.pay th.ck, table.pay td.ck { width: 1%; padding-right: 4px; }
.pay tr.sel td { background: #eef2ff; }
.selbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 0 0 12px; border: 1px solid #c7d2fe; background: #eef2ff; border-radius: 10px; font-size: 14px; }
.selbar span { margin-right: auto; }
.danger-card { border-color: #fecdca; }

/* Pasted spreadsheet text: keep each row on one line, columns lined up, scroll sideways if wide */
textarea[wrap=off] { white-space: pre; overflow: auto; tab-size: 22; -moz-tab-size: 22; }
.preview .total td { border-top: 1px solid var(--line, #e4e7ec); font-weight: 600; }
.preview small.was { color: var(--faint, #98a2b3); }
.preview .num { text-align: right; }

/* ---- Step-by-step month guide ---- */
.steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface, #fff); border: 1px solid var(--line, #e4e7ec); border-radius: 12px; padding: 14px; }
.steps li.done { background: #f6fef9; border-color: #abefc6; }
.steps .num-badge { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: #eef2ff; color: var(--accent, #2f5bea); }
.steps li.done .num-badge { background: #12b76a; color: #fff; }
.steps b { font-size: 14px; }
.steps p { margin: 3px 0 10px; font-size: 13px; color: var(--muted, #667085); line-height: 1.45; }
.steps p b { color: var(--ink, #101828); font-size: 13px; }
.steps .btn { white-space: normal; text-align: left; }
.tool-left input[type=search] { width: 220px; }
.table-hint { margin: 0 0 8px; }
.name-btn { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.name-btn:hover b { color: var(--accent, #2f5bea); text-decoration: underline; }
.pay .of, .preview .of { color: var(--faint, #98a2b3); font-weight: 400; }
.pay .minus, .preview .minus { color: #d92d20; }
.pay .plus { color: #079455; }
.pay .faint { color: var(--faint, #98a2b3); }
.pay b.big { font-size: 15px; }
.pay td small.minus { display: block; }
.warn-text { color: #b54708; }
.seg.src { margin: 4px 0 12px; }
label.check { display: flex; gap: 8px; align-items: center; margin: 12px 0 4px; font-size: 14px; cursor: pointer; }
label.check input { width: 16px; height: 16px; }
.preview tr.sub td, table.pay tr.sub td { background: #f9fafb; font-size: 12px; color: var(--muted, #667085); font-weight: 600; }
.preview tr.zeroed td { color: #b42318; }
#paste-box textarea { margin-bottom: 8px; }

.wd-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.wd-picks .chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink); }
.wd-picks .chip.on { border-color: var(--accent); background: #eef2ff; color: var(--accent); }
#pr-sub .linkish { font-size: inherit; }

/* ===================== Zoni modules ===================== */
/* Menu groups, avatars with Google photos, guest mode */
.nav-group { margin: 14px 12px 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tabs .guest-only { display: none; }
body.is-guest .tabs .guest-only { display: flex; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-grid; place-items: center;
  font-weight: 600; font-size: 13px; flex: none; overflow: hidden; }
.avatar.small { width: 30px; height: 30px; font-size: 11px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.pill.role { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.pill.role::before { display: none; }
.pill.role-owner { background: var(--accent-soft); color: var(--accent); border-color: #c7d4fb; }
.pill.role-guest { color: var(--muted); }
details.more { margin: 4px 0 8px; }
details.more summary { cursor: pointer; color: var(--accent); font-size: 13px; margin-bottom: 8px; }
label.check.inline { margin: 0; font-size: 13px; color: var(--ink-2); }
.login-split { white-space: nowrap; }

/* Home */
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.home-card { display: grid; gap: 8px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.home-card:hover { border-color: #c7d4fb; box-shadow: var(--shadow); }
.home-card .kicker { margin: 0; }
.home-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.home-big b { font-size: 30px; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.home-big span { color: var(--ink-2); font-weight: 500; }
.home-wide { grid-column: 1 / -1; }
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pipeline span { background: var(--surface-2); border-radius: var(--r-sm); padding: 6px 8px; font-size: 12px; color: var(--muted); display: grid; }
.pipeline b { font-size: 16px; color: var(--ink); }

/* Stage pills */
.pill.stage-applied { background: var(--accent-soft); color: var(--accent); border-color: #c7d4fb; }
.pill.stage-screening { background: #f4f3ff; color: #5925dc; border-color: #d9d6fe; }
.pill.stage-interview { background: var(--warn-soft); color: var(--warn); border-color: #fedf89; }
.pill.stage-offer { background: #ecfdff; color: #0e7090; border-color: #a5f0fc; }
.pill.stage-hired { background: var(--ok-soft); color: var(--ok); border-color: #abefc6; }
.pill.stage-rejected { background: var(--surface-2); color: var(--muted); border-color: var(--line); }

/* Candidates board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; min-height: 240px; }
.col.over { border-color: var(--accent); background: var(--accent-soft); }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.col-head b { color: var(--muted); font-size: 13px; }
.col-body { padding: 8px; display: grid; gap: 8px; align-content: start; }
.col-empty { color: var(--faint); font-size: 13px; text-align: center; margin: 18px 0; }
.cand { display: flex; gap: 10px; text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px; font: inherit; color: inherit; cursor: pointer; box-shadow: var(--shadow-sm); }
.cand:hover { border-color: #c7d4fb; }
.cand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cand-main { display: grid; gap: 2px; min-width: 0; }
.cand-main small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cand-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: 11px; color: var(--faint); }
.tag { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; color: var(--ink-2); }
.stars-mini { color: #f79009; letter-spacing: 1px; }
.stars { display: inline-flex; gap: 2px; }
.stars button { border: 0; background: none; padding: 0 1px; font-size: 18px; line-height: 1; color: var(--line); cursor: pointer; }
.stars button.on { color: #f79009; }
.stars button:disabled { cursor: default; }

/* Candidate page (dialog) */
dialog.wide:has(.cand-dialog) { max-width: min(1080px, 96vw); }
.cand-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cand-head h2 { margin: 0; }
.cand-head p { margin: 0; }
.cand-head .pill { margin-left: auto; }
.cand-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 18px; }
.cand-side h3 { font-size: 13px; margin: 14px 0 6px; color: var(--ink-2); }
.facts { display: grid; grid-template-columns: 80px 1fr; gap: 6px 10px; margin: 0 0 8px; font-size: 13px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; overflow-wrap: anywhere; }
.cover { white-space: pre-wrap; font-size: 13px; background: var(--surface-2); border-radius: var(--r-sm); padding: 10px; margin: 0; }
.note-add { display: grid; gap: 6px; } .note-add .btn { justify-self: start; }
.notes { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; max-height: 220px; overflow: auto; }
.notes li { border-left: 2px solid var(--line); padding-left: 10px; }
.notes p { margin: 0; font-size: 13px; white-space: pre-wrap; }
.notes small { color: var(--faint); font-size: 12px; }
.cand-cv iframe { width: 100%; height: 62vh; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.cv-none { border: 1px dashed var(--line); border-radius: var(--r-sm); padding: 28px; text-align: center; color: var(--muted); display: grid; gap: 8px; }
.cv-links { font-size: 13px; margin: 6px 0 0; }
@media (max-width: 800px) { .cand-grid { grid-template-columns: 1fr; } .cand-cv iframe { height: 50vh; } }

/* Jobs */
.apply-link { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; margin-bottom: 14px; }
.apply-link p { margin: 2px 0 0; }
.apply-link code { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 10px; font-size: 13px; overflow-wrap: anywhere; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.job-list { display: grid; gap: 10px; }
.job { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; }
.job h2 { display: flex; gap: 8px; align-items: center; margin: 0; }
.job p { margin: 2px 0 0; }
.job.closed { opacity: .75; }
.job-stats { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.job-stats a { color: var(--accent); text-decoration: none; }
.job-stats b { color: var(--ink); font-size: 15px; }
@media (max-width: 760px) { .apply-link, .job { grid-template-columns: 1fr; } }

/* Attendance */
.meter.none i { width: 0 !important; }
.meter.none { background: var(--bad-soft); }

/* Guest welcome */
.welcome { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 8px; }
.welcome h1 { font-size: 32px; margin: 4px 0 10px; }
.lede { font-size: 16px; color: var(--ink-2); max-width: 60ch; }
.ticks { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.ticks li { padding-left: 26px; position: relative; color: var(--ink-2); }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--ok-soft); color: var(--ok);
  font-size: 11px; font-weight: 700; display: grid; place-items: center; }
@media (max-width: 860px) { .welcome { grid-template-columns: 1fr; } }

/* Public apply page */
body.apply-page { background: var(--bg); }
.apply-top { background: var(--surface); border-bottom: 1px solid var(--line); }
.apply-top .brand { display: flex; align-items: center; gap: 10px; font-size: 16px; padding: 14px 0; }
.apply-top .mark { width: 28px; height: 28px; }
.apply-wrap { max-width: 760px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right)); }
main.apply-wrap { padding-top: 28px; padding-bottom: 48px; }
.apply-wrap h1 { font-size: 26px; margin: 8px 0 4px; }
.apply-jobs { display: grid; gap: 10px; margin-top: 18px; }
.apply-job { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.apply-job b { font-size: 16px; } .apply-job .muted { grid-column: 1; margin: 0; font-size: 13px; }
.apply-job .go { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--accent); font-weight: 600; }
.apply-job:hover { border-color: #c7d4fb; }
.job-desc { margin: 14px 0 20px; color: var(--ink-2); line-height: 1.6; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#back { margin-bottom: 6px; }
.home-grid .card, .apply-jobs .card, .job-list .card { margin: 0; }
.meter { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.filters select, .filters input[type=search] { width: auto; min-width: 200px; flex: 0 1 280px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.note-add textarea { min-height: 64px; font: inherit; }
.apply-page textarea, .welcome textarea { font: inherit; min-height: 96px; }
.home-wide .list a { text-decoration: none; color: inherit; }
.home-wide .list a:hover b { color: var(--accent); }

/* ===== Attendance ===== */
#at-tabs button { padding: 6px 14px; }
.row-actions.end { justify-content: flex-end; align-items: center; }
td.row-actions { display: table-cell; white-space: nowrap; text-align: right; }
td.row-actions .btn { margin-right: 8px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.toolbar p { margin: 0; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.filters .field.small { margin: 0; min-width: 140px; }
.filters .field.small input, .filters .field.small select { width: auto; min-width: 140px; }
.office-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.office-head h2 { margin: 0; }
.office-head .row-actions { margin-left: auto; }
.office-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.office-grid h3 { font-size: 13px; margin: 0 0 8px; color: var(--ink-2); }
.nets { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; font-size: 13px; }
code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
@media (max-width: 800px) { .office-grid { grid-template-columns: 1fr; } }

/* Phone check-in page */
body.phone-page { min-height: 100vh; display: grid; place-items: start center; padding: max(24px, env(safe-area-inset-top)) 16px 32px; background: var(--bg); }
.phone-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.phone-card .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 15px; }
.phone-card .mark { width: 28px; height: 28px; }
.phone-card h1 { font-size: 22px; margin: 6px 0; }
.state { text-align: center; display: grid; justify-items: center; gap: 4px; padding: 8px 0; }
.state-icon { width: 64px; height: 64px; border-radius: 50%; padding: 12px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.state.ok .state-icon { background: var(--ok-soft); color: var(--ok); }
.state.out .state-icon { background: var(--surface-2); color: var(--ink-2); }
.state.warn .state-icon { background: var(--warn-soft); color: var(--warn); }
.state.err .state-icon { background: var(--bad-soft); color: var(--bad); }
.state .note { background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; font-size: 13px; margin: 10px 0 0; }
.state .btn { margin-top: 12px; }
.steps-list { text-align: left; font-size: 14px; margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); }
.spin { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.8s linear infinite; margin: 8px 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }
.prefixed { display: flex; align-items: stretch; border: 1px solid #d0d5dd; border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.prefixed b { background: var(--surface-2); color: var(--muted); font-weight: 500; padding: 0 10px; display: grid; place-items: center; font-size: 13px; border-right: 1px solid var(--line); white-space: nowrap; }
.prefixed input { border: 0; border-radius: 0; box-shadow: none; letter-spacing: .15em; font-weight: 600; }
.field.invalid .prefixed { border-color: var(--bad); }

/* QR screen (tablet / TV / print) */
body.screen-page { background: var(--surface); min-height: 100vh; }
.screen { min-height: 100vh; display: grid; grid-template-columns: 1fr minmax(320px, 46vh); gap: 6vw; align-items: center; padding: 5vh 6vw; }
.screen .brand { display: flex; gap: 10px; align-items: center; font-size: 18px; margin-bottom: 4vh; }
.screen .mark { width: 34px; height: 34px; }
.screen h1 { font-size: clamp(32px, 5vw, 56px); margin: 4px 0 3vh; letter-spacing: -.02em; }
.screen-steps { font-size: clamp(16px, 1.8vw, 22px); color: var(--ink-2); display: grid; gap: 1.4vh; padding-left: 1.3em; margin: 0 0 4vh; }
.screen-counts { display: flex; gap: 32px; margin-bottom: 3vh; }
.screen-counts div { display: grid; }
.screen-counts b { font-size: 36px; font-variant-numeric: tabular-nums; }
.screen-counts span { color: var(--muted); }
.screen-right { text-align: center; }
.screen .qr svg { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: #fff; }
@media (max-width: 760px) { .screen { grid-template-columns: 1fr; } .screen-right { order: -1; } }
@media print { .screen-actions, #s-link { display: none !important; } .screen { min-height: auto; } }
.field span.prefixed { display: flex; margin: 0; font-weight: 400; color: inherit; }
.field span.prefixed b { display: grid; }
.field span.prefixed input { flex: 1; min-width: 0; }
.stat.gold b { color: var(--warn); }
.loc-set { font-size: 13px; margin: 0 0 10px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.screen-steps .late-note { color: var(--warn); }
.menu-pop a.danger { color: var(--bad); }

/* ---- Website events, What's on, Zoni Meeting ---- */
textarea.plain { font: 14px/1.5 Inter, system-ui, sans-serif; min-height: 0; }
.pre { white-space: pre-wrap; }
.row-actions { align-items: center; }
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.event-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; margin: 0; }
.event-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--surface-2); }
.event-card > div { padding: 16px 18px 18px; display: grid; gap: 6px; justify-items: start; }
.event-card h2 { margin: 0; font-size: 16px; }
.event-card p { margin: 0; }
.event-card details summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.ev-img { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ev-img img { width: 128px; height: 72px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }
.drop.small { padding: 10px 14px; cursor: pointer; }
.card.mini { padding: 14px 16px; margin: 14px 0 0; display: grid; gap: 4px; justify-items: start; }
.card.mini .fine { margin: 0 0 6px; }
.meet-page { margin: 0; height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.meet-bar { display: flex; align-items: center; gap: 16px; padding: 10px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.meet-title { flex: 1; min-width: 0; display: grid; }
.meet-title b, .meet-title small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meet-title small { color: var(--muted); font-size: 12.5px; }
.meet-room { flex: 1; min-height: 0; background: #111827; }
.meet-room iframe { display: block; border: 0; }
.meet-card-wrap { flex: 1; display: grid; place-items: center; padding: 24px; }
.meet-card { width: min(520px, 100%); display: grid; gap: 10px; justify-items: start; }
.meet-card h2 { font-size: 19px; margin: 0; }
@media (max-width: 640px) { .meet-bar .brand span { display: none; } .meet-bar { gap: 10px; padding: 8px 12px; } }

/* ---- Confirm / ask boxes (replace the browser's pop-ups) ---- */
dialog.zn-box { width: min(440px, 100% - 32px); }
dialog.zn-box form { padding: 22px 22px 18px; }
.zn-box-head { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.zn-box-head h2 { font-size: 16px; margin: 2px 0 6px; }
.zn-box-head p { margin: 0 0 6px; color: var(--ink-2); font-size: 14px; }
.zn-box-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); }
.zn-box-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.zn-box-icon.danger { background: var(--bad-soft); }
.zn-box-icon.danger svg { stroke: var(--bad); }
dialog.zn-box .dlg-actions { margin-top: 18px; }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger.solid:hover { background: #912018; border-color: #912018; color: #fff; }
.copy-field { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
dialog[open].zn-box { animation: zn-pop .14s ease-out; }
@keyframes zn-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---- Roles: one colour per role ---- */
.pill.role::before { display: none; }
.pill.role-owner { background: #111827; color: #fff; border-color: #111827; }
.pill.role-admin { background: var(--accent-soft); color: var(--accent); border-color: #c7d4fb; }
.pill.role-accountant { background: var(--ok-soft); color: var(--ok); border-color: #abefc6; }
.pill.role-hr { background: #f4f3ff; color: #5925dc; border-color: #d9d6fe; }
.pill.role-auditor { background: var(--warn-soft); color: var(--warn); border-color: #fedf89; }
.pill.role-manager { background: #ecfdff; color: #0e7090; border-color: #a5f0fc; }
.pill.role-employee { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.pill.role-user, .pill.role-guest { background: var(--surface); color: var(--muted); border-color: var(--line); }

/* ---- Admin portal ---- */
.nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11.5px; display: grid; place-items: center; font-weight: 600; }
.role-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.role-chips .chip b { font-weight: 600; margin-left: 4px; color: var(--muted); }
.role-chips .chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.role-chips .chip.on b { color: rgba(255, 255, 255, .7); }
#people .menu { display: inline-block; }
#people .menu-pop { min-width: 210px; text-align: left; }
.role-opts { display: grid; gap: 6px; margin: 4px 0 12px; }
.role-opt { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
.role-opt:hover { border-color: #c7d4fb; background: #fafbff; }
.role-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.role-opt input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--accent); box-shadow: none; }
.role-opt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.role-opt.off { opacity: .55; cursor: not-allowed; }
.role-guide { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.role-card { margin: 0; display: grid; gap: 6px; align-content: start; justify-items: start; }
.role-card p { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.role-card.note { grid-column: 1 / -1; background: var(--surface-2); }
.pick-list { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-sm); margin: 8px 0 12px; }
.pick-list label { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line-2); cursor: pointer; }
.pick-list label:first-child { border-top: 0; }
.pick-list label:hover { background: var(--surface-2); }
.pick-list input { width: 16px; height: 16px; box-shadow: none; }
.admin-page .side { background: #fcfcfd; }
.danger-card { border-color: #fecdca; }

/* ---- Teams and leave ---- */
.team-list { display: grid; gap: 10px; }
.team-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; }
.team-card h2 { margin: 0 0 2px; }
.team-card .fine { margin: 0; }
.pick-list.tall { max-height: 380px; }
.pick-row { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line-2); }
.pick-row:first-child { border-top: 0; }
.pick-row label { border-top: 0 !important; flex: 1; }
.pick-row label.mgr { flex: none; font-size: 12.5px; color: var(--muted); }

/* ---- Zoni Meeting on LiveKit ---- */
.meet-room { position: relative; display: flex; overflow: hidden; }
.lk-grid { flex: 1; display: grid; gap: 10px; padding: 12px 12px 84px; grid-template-columns: 1fr; grid-auto-rows: 1fr; min-height: 0; }
.lk-grid[data-n="2"] { grid-template-columns: 1fr 1fr; }
.lk-grid[data-n="3"], .lk-grid[data-n="4"] { grid-template-columns: 1fr 1fr; }
.lk-grid[data-n="5"], .lk-grid[data-n="6"] { grid-template-columns: repeat(3, 1fr); }
.lk-grid[data-n="7"], .lk-grid[data-n="8"], .lk-grid[data-n="9"] { grid-template-columns: repeat(3, 1fr); }
.lk-grid.has-screen { grid-template-columns: 3fr 1fr; grid-auto-rows: minmax(0, 1fr); }
.lk-grid.has-screen .lk-tile.screen { grid-row: span 3; }
@media (max-width: 700px) { .lk-grid[data-n] { grid-template-columns: 1fr 1fr; } .lk-grid[data-n="1"] { grid-template-columns: 1fr; } .lk-grid.has-screen { grid-template-columns: 1fr; } }
.lk-tile { position: relative; background: #1f2937; border-radius: 12px; overflow: hidden; display: grid; place-items: center; min-height: 0; border: 2px solid transparent; transition: border-color .15s; }
.lk-tile.speaking { border-color: #4ade80; }
.lk-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lk-tile.me video { transform: scaleX(-1); }
.lk-tile.screen video { object-fit: contain; background: #000; transform: none; }
.lk-avatar { width: 84px; height: 84px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font: 600 28px/1 Inter, sans-serif; }
.lk-avatar.sm { width: 28px; height: 28px; font-size: 11px; flex: none; }
.lk-name { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px; align-items: center; background: rgba(17, 24, 39, .72); color: #fff; font-size: 12.5px; padding: 4px 9px; border-radius: 8px; max-width: calc(100% - 20px); }
.lk-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-mic:empty { display: none; }
.lk-mic svg { width: 14px; height: 14px; fill: none; stroke: #f87171; stroke-width: 2; stroke-linecap: round; display: block; }
.lk-bar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 10px; padding: 8px 10px; border-radius: 16px; background: rgba(17, 24, 39, .85); backdrop-filter: blur(6px); }
.lk-btn { position: relative; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #374151; color: #fff; display: grid; place-items: center; cursor: pointer; }
.lk-btn:hover { background: #4b5563; }
.lk-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lk-btn.off { background: #fef3f2; color: #b42318; }
.lk-btn.active { background: var(--accent); }
.lk-btn.leave { background: #d92d20; width: 60px; border-radius: 24px; }
.lk-btn.leave:hover { background: #b42318; }
.lk-btn b { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: #fff; color: #111827; font-size: 11px; display: grid; place-items: center; padding: 0 4px; }
.lk-people { width: 260px; background: #fff; border-left: 1px solid var(--line); padding: 14px; overflow: auto; }
.lk-people h3 { font-size: 14px; margin: 0 0 10px; }
.lk-person { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-size: 13.5px; }
.lk-person .lk-mic { margin-left: auto; }
.lk-audio-btn { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); }
.lk-preview { width: 100%; aspect-ratio: 16 / 9; background: #1f2937; border-radius: 12px; overflow: hidden; display: grid; place-items: center; }
.lk-preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.lk-lobby-ctrls { display: flex; gap: 10px; justify-content: center; width: 100%; }
.lk-lobby-ctrls .lk-btn.on { background: #e5e7eb; color: #111827; }
@media (max-width: 640px) { .lk-people { position: absolute; right: 0; top: 0; bottom: 0; z-index: 5; } }

/* ---- Everything that opens something looks clickable ---- */
a.home-card { transition: border-color .15s, box-shadow .15s, transform .15s; }
a.home-card:hover { border-color: #c7d4fb; box-shadow: 0 6px 18px rgba(16, 24, 40, .08); transform: translateY(-1px); }
[data-go] { cursor: pointer; }
.go-link:hover, .pipeline [data-go]:hover b { text-decoration: underline; text-underline-offset: 3px; }
.pipeline [data-go] { border-radius: 8px; transition: background .15s; }
.pipeline [data-go]:hover { background: var(--accent-soft); }
.stat[data-go] { transition: border-color .15s, box-shadow .15s; }
.stat[data-go]:hover { border-color: #c7d4fb; box-shadow: 0 6px 18px rgba(16, 24, 40, .08); }


/* ================= Phones and small tablets ================= */
@media (max-width: 900px) {
  /* rows: the top bar keeps its height; a short page doesn't stretch it (that left a gap above the page). */
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-content: start; }
  .page { padding: 16px 0 calc(48px + env(safe-area-inset-bottom)); min-width: 0; }
  .wrap { width: calc(100% - 28px); }

  /* Top bar: menu button, page title, avatar. The full menu slides in from the left. */
  .side { position: sticky; top: 0; z-index: 40; height: 56px; padding: 0 10px 0 6px; flex-direction: row; align-items: center; gap: 6px;
    border-right: 0; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); }
  .side > .brand { padding: 0; }
  .side > .brand span { display: none; }
  .nav-open-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; border-radius: 10px; color: var(--ink); cursor: pointer; flex: none; }
  .nav-open-btn:active { background: var(--surface-2); }
  .nav-open-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .m-title { display: block; flex: 1; min-width: 0; font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side .tabs, .side .me { display: none; }
  .side::after { content: ""; }
  .me-mini { display: block; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: var(--accent-soft); color: var(--accent);
    font: 600 13px/34px Inter, sans-serif; text-align: center; flex: none; }
  .me-mini img { width: 100%; height: 100%; object-fit: cover; }

  body.nav-open { overflow: hidden; }
  /* The open menu covers the screen; keep the page where it was (the top bar leaves the layout while it is open). */
  body.nav-open .page { margin-top: 56px; }
  body.nav-open .side { animation: zn-fade .18s ease-out; }
  @keyframes zn-fade { from { background: rgba(17, 24, 39, 0); } }
  body.nav-open .side { position: fixed; inset: 0; height: auto; z-index: 60; flex-direction: column; align-items: stretch; gap: 0; padding: 0;
    background: rgba(17, 24, 39, .45); backdrop-filter: none; border: 0; }
  body.nav-open .side > * { display: none; }
  body.nav-open .side .tabs, body.nav-open .side .me, body.nav-open .side > .brand, body.nav-open .side .nav-close-row { display: flex; }
  body.nav-open .side .nav-sheet { display: flex; }
  .nav-sheet { display: none; flex-direction: column; width: min(320px, 86vw); height: 100%; background: var(--surface); box-shadow: 8px 0 30px rgba(0, 0, 0, .18);
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); overflow-y: auto; animation: zn-menu-in .2s cubic-bezier(.2, .8, .2, 1); }
  @keyframes zn-menu-in { from { transform: translateX(-100%); } to { transform: none; } }
  .nav-sheet .brand { display: flex !important; padding: 6px 6px 14px; }
  .nav-sheet .brand span { display: inline !important; }
  .nav-sheet .tabs { display: grid !important; gap: 2px; }
  .nav-sheet .tabs a { padding: 12px 12px; font-size: 15px; }
  .nav-sheet .tabs a svg { display: block; width: 20px; height: 20px; }
  .nav-sheet .me { display: grid !important; margin-top: auto; padding-top: 14px; }
  .nav-sheet .me .avatar, .nav-sheet .me small { display: grid; }
  .nav-sheet .me small { display: block; }

  /* Page headers: title on top, actions in a scrollable row underneath. */
  h1 { font-size: 21px; }
  .head-row { align-items: stretch; gap: 10px; margin-bottom: 14px; }
  .head-row > div:first-child { width: 100%; }
  .head-actions { width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .head-actions::-webkit-scrollbar { display: none; }
  .head-actions .btn { flex: none; }
  .head-actions select { min-width: 0; flex: 1; }
  .filters { gap: 8px; }
  .filters input[type=search] { max-width: none; width: 100%; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { white-space: nowrap; }
  .toolbar { gap: 8px; }
  .tool-left, .tool-right { width: 100%; }

  /* Cards and tables */
  .card { padding: 16px; border-radius: 12px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .home-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .table-wrap { margin: 0 -14px; border-radius: 0; border-left: 0; border-right: 0; -webkit-overflow-scrolling: touch; }
  table.pay { font-size: 13.5px; }
  table.pay th, table.pay td { padding: 10px 12px; }
  table.pay td:first-child, table.pay th:first-child { padding-left: 14px; }
  .list li { flex-wrap: wrap; }
  .row-actions { flex-wrap: wrap; }
  .welcome h1 { font-size: 26px; }

  /* Forms open as a full-height sheet; 16px text so phones don't zoom in while typing. */
  input, select, textarea { font-size: 16px; }
  input, select { height: 44px; }
  .btn { min-height: 40px; }
  dialog, dialog.wide { width: 100%; max-width: 100%; max-height: 100dvh; margin: auto 0 0; border-radius: 16px 16px 0 0; border: 0; }
  dialog form { max-height: 92dvh; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); }
  dialog .dlg-actions { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom)); margin: 16px -16px calc(-16px - env(safe-area-inset-bottom));
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-radius: 0; flex-wrap: nowrap; }
  dialog .dlg-actions .btn { flex: 1 1 0; min-width: 0; padding: 0 10px; }
  dialog .dlg-actions .btn[style*="margin-right:auto"] { flex: 0 1 auto; }
  dialog.zn-box { margin: auto; border-radius: 14px; width: calc(100% - 32px); }
  dialog.zn-box .dlg-actions { position: static; margin: 18px -22px -18px; padding: 12px 16px; border-radius: 0 0 14px 14px; }
  .toast { left: 12px; right: 12px; transform: none; bottom: calc(16px + env(safe-area-inset-bottom)); text-align: center; }

  /* Login */
  .login { padding: 16px; align-items: start; padding-top: 10vh; }
  .login-card { padding: 24px 20px; }
}
@media (max-width: 330px) { .cards { grid-template-columns: minmax(0, 1fr); } }

/* =====================================================================
   Update 7: staff profile, documents, Messages + calls, Phone calls, Complaints, Resources
   ===================================================================== */
.faint { color: var(--faint); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card.flat { box-shadow: none; background: var(--surface-2); padding: 16px; margin: 0; }
.card.flat h3 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 10px; }
.danger-text { color: var(--bad); }
.btn svg, .icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok:hover { background: #05603a; }
.form-sub { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 18px 0 6px; padding-top: 12px; border-top: 1px solid var(--line-2); }

/* Staff profile (read-only) */
.sv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.sv-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.sv-id { flex: 1 1 220px; min-width: 0; }
.sv-id h2 { font-size: 20px; margin: 0; }
.sv-id .muted { margin: 2px 0 6px; }
.sv-id > p:not(.muted) { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.sv-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.sv-actions .btn.icon-only { width: 34px; padding: 0; justify-content: center; }
.avatar.big { width: 56px; height: 56px; font-size: 18px; flex: none; }
.sv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sv-cover { margin: 10px 0 0; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); max-height: 180px; overflow: auto; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; }
.kv > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.kv.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; margin-bottom: 12px; }
table.pay.compact th, table.pay.compact td { padding: 8px 10px; }
table.pay tfoot td { border-top: 2px solid var(--line); }
@media (max-width: 700px) { .sv-grid, .kv.cols { grid-template-columns: minmax(0, 1fr); } .kv > div { grid-template-columns: 120px minmax(0, 1fr); } }

/* Directory: paperclip, message and call buttons */
.ico-col { width: 1%; white-space: nowrap; text-align: right; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; margin-left: 4px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.icon-btn.has { color: var(--accent); }
.icon-btn i { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: #fff;
  font: 600 10px/16px Inter, sans-serif; font-style: normal; }

/* Messages */
.chat { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: calc(100dvh - 64px); min-height: 460px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.chat-side { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.chat-side-head { padding: 16px; border-bottom: 1px solid var(--line-2); display: grid; gap: 10px; }
.chat-side-head h1 { font-size: 20px; margin: 0; }
.chat-side-head input { width: 100%; }
.chat-people { list-style: none; margin: 0; padding: 6px; overflow: auto; flex: 1; }
.chat-person { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.chat-person:hover { background: var(--surface-2); }
.chat-person.on { background: var(--accent-soft); }
.chat-person .avatar { position: relative; flex: none; }
.chat-person .nav-count { margin-left: auto; }
.cp-text { display: grid; min-width: 0; flex: 1; }
.cp-text b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-text small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #d0d5dd; border: 2px solid var(--surface); }
.dot.live { background: #12b76a; }
.chat-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-empty { margin: auto; text-align: center; max-width: 360px; padding: 24px; }
.chat-empty svg { width: 16px; height: 16px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.chat-empty .state-icon svg { width: 28px; height: 28px; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.chat-head > div { flex: 1; display: grid; min-width: 0; }
.chat-head small { color: var(--muted); font-size: 12px; }
.chat-back { display: none; font-size: 26px; line-height: 1; padding: 0 6px; }
.chat-log { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); }
.chat-day, .chat-hint { align-self: center; font-size: 12px; color: var(--muted); margin: 8px 0; }
.msg-b { max-width: min(560px, 80%); align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 8px 12px; }
.msg-b.mine { align-self: flex-end; background: var(--accent); border-color: var(--accent); color: #fff; border-radius: 14px 14px 4px 14px; }
.msg-b.mine a { color: #fff; }
.msg-b p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-b small { display: block; font-size: 11px; opacity: .7; margin-top: 2px; text-align: right; }
.chat-send { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line-2); align-items: flex-end; }
.chat-send textarea { flex: 1; resize: none; min-height: 40px; max-height: 140px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.chat-send textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
@media (max-width: 760px) {
  .chat { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 120px); border-radius: 0; margin: 0 -14px; border-left: 0; border-right: 0; }
  .chat.in-thread .chat-side { display: none; }
  .chat:not(.in-thread) .chat-pane { display: none; }
  .chat-back { display: inline; }
  .chat-head .btn span { display: none; }
}
/* Incoming call */
.ring-box { position: fixed; z-index: 90; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--ink);
  color: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); animation: ringIn .25s ease-out; max-width: calc(100vw - 24px); }
.ring-box > div { display: grid; margin-right: 6px; }
.ring-box small { opacity: .75; }
.ring-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #12b76a; animation: ringPulse 1.2s infinite; }
.ring-icon svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.8; }
@keyframes ringIn { from { transform: translateY(12px); opacity: 0; } }
@keyframes ringPulse { 50% { box-shadow: 0 0 0 10px rgba(18, 183, 106, .25); } }
@media (max-width: 760px) { .ring-box { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); flex-wrap: wrap; } }

/* Phone calls */
.live-call { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); }
.live-call > div { flex: 1; display: grid; }
.live-call small { color: var(--muted); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.num.neg { color: var(--bad); }
.num.pos { color: var(--ok); }
.warn-card { border-color: #fedf89; background: var(--warn-soft); }

/* Complaints */
.comp-row { cursor: pointer; }
.comp-row:hover b { color: var(--accent); }
.comp-list .comp-row span:first-child { min-width: 0; display: grid; }
#comp-filter { margin: 4px 0 10px; }
.comp-thread { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; padding: 14px; background: var(--surface-2); border-radius: 10px; max-height: 50vh; overflow: auto; }
.comp-thread .msg-b { max-width: 90%; }
.comp-thread .msg-b.staff { align-self: flex-end; background: var(--accent-soft); border-color: #c7d4fb; border-radius: 14px 14px 4px 14px; }

/* Admin: resources & tech tools */
.filters .seg { margin-left: 8px; }
.res-group { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 22px 0 10px; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.res-card { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.res-top { display: flex; gap: 12px; align-items: center; }
.res-top > div { display: grid; min-width: 0; }
.res-top small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.res-icon.resource { background: var(--ok-soft); color: var(--ok); }
.res-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.res-desc { margin: 0; color: var(--ink-2); font-size: 13.5px; white-space: pre-wrap; }
.res-card .row-actions { margin-top: auto; }
.list li.muted { display: block; }
.chat-person .avatar { overflow: visible; }
.chat-person .avatar img { border-radius: 50%; }
@media (max-width: 760px) { .chat { height: calc(100dvh - 76px); } }
/* Profile photos */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar.big { width: 72px; height: 72px; font-size: 22px; }
.sv-photo { display: grid; justify-items: center; gap: 2px; }
.photo-pick { font-size: 12.5px; cursor: pointer; }
.me-photo { display: flex; gap: 16px; align-items: center; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.me-photo > div { display: grid; gap: 4px; justify-items: start; }
.me-photo small { color: var(--muted); }

/* Update 8: call log (calls CRM) and recordings */
.rec-dot { display: inline-flex; align-items: center; gap: 4px; font: 700 10.5px/1 Inter, sans-serif; letter-spacing: .04em; color: var(--bad); padding: 3px 6px; border: 1px solid #fecdca; border-radius: 6px; background: var(--bad-soft); margin-right: 6px; }
.rec-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); }
.rec-dot.on::before { animation: ringPulse 1.2s infinite; }
.dial-hist { margin-top: 4px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); border: 1px solid #fedf89; font-size: 13px; }
.dial-hist p { margin: 6px 0 0; }
.dial-hist small { color: var(--muted); }
.cl-sum { max-width: 360px; color: var(--ink-2); font-size: 13px; }
.cl-detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 14px; }
.cl-detail .pre, .cl-transcript { margin: 8px 0; white-space: pre-wrap; }
.cl-transcript { max-height: 260px; overflow: auto; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; }
section.card.flat + section.card.flat { margin-top: 14px; }
.filters select { height: 38px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background-color: var(--surface); }
/* Number suggestions while typing */
.suggest-host { position: relative; }
.num-suggest { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% - 2px); margin: 0; padding: 4px; list-style: none; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); max-height: 320px; overflow: auto; }
.num-suggest li { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.num-suggest li b { font-variant-numeric: tabular-nums; }
.num-suggest li span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num-suggest li small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.num-suggest li.on, .num-suggest li:hover { background: var(--accent-soft); }
/* Zoni dropdown lists (replace the browser's grey list; see select.js) */
select[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.zsel-list { position: fixed; z-index: 1000; margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow-lg); overflow: auto; font-size: 14px; animation: zselIn .12s ease-out; }
.zsel-list li { position: relative; padding: 8px 32px 8px 10px; border-radius: 7px; cursor: pointer; white-space: nowrap; color: var(--ink); }
.zsel-list li.on { background: var(--accent-soft); color: var(--accent); }
.zsel-list li.sel { font-weight: 600; }
.zsel-list li.sel::after { content: ""; position: absolute; right: 10px; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.zsel-list li.off { color: var(--faint); cursor: default; }
@keyframes zselIn { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .zsel-list { animation: none; } }
/* Summary numbers you can click (Attendance today) */
button.stat-btn { font: inherit; text-align: left; cursor: pointer; width: 100%; transition: border-color .15s, box-shadow .15s, transform .05s; }
button.stat-btn:hover { border-color: var(--accent); }
button.stat-btn:active { transform: translateY(1px); }
button.stat-btn.picked { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
button.stat-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-ring); }

/* ---- Close (×) on every pop-up; outside click closes when nothing was changed ---- */
dialog .dlg-x { position: absolute; top: 12px; right: 12px; z-index: 3; width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
dialog .dlg-x:hover { background: var(--surface-2); color: var(--ink); }
dialog .dlg-x:focus-visible { outline: 2px solid var(--brand, #2563eb); outline-offset: 1px; }
dialog .dlg-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
#dlg-form > :first-child:not(.sv), #dlg-form .sv-head { padding-right: 34px; }
dialog.nudge { animation: dlg-nudge .3s ease; }
@keyframes dlg-nudge { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (max-width: 900px) { dialog .dlg-x { top: 10px; right: 8px; } .sv-actions .btn.icon-only { width: 40px; } }

/* ---- Zoni phone (call centre softphone) ---- */
#sp-root { position: fixed; right: 20px; bottom: 20px; z-index: 55; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
#sp-root > * { pointer-events: auto; }
.sp-fab { order: 2; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; box-shadow: var(--shadow-lg); cursor: pointer; position: relative; }
.sp-fab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.sp-fab:hover { border-color: var(--accent); }
.sp-fab:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-ring), var(--shadow-lg); }
.sp-fab.busy { background: var(--ok); border-color: var(--ok); color: #fff; }
.sp-fab.ringing { background: var(--accent); border-color: var(--accent); color: #fff; animation: sp-ring 1.2s ease-in-out infinite; }
@keyframes sp-ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(47, 91, 234, .45), var(--shadow-lg); } 50% { box-shadow: 0 0 0 10px rgba(47, 91, 234, 0), var(--shadow-lg); } }
@media (prefers-reduced-motion: reduce) { .sp-fab.ringing { animation: none; } }
.sp-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--faint); flex: none; }
.sp-dot.ok { background: #12b76a; } .sp-dot.wait { background: #f79009; } .sp-dot.bad { background: var(--bad); } .sp-dot.live { background: #fff; }
.sp-fab .sp-dot { position: absolute; top: 9px; left: 26px; box-shadow: 0 0 0 2px var(--surface); }
.sp-fab.busy .sp-dot, .sp-fab.ringing .sp-dot { box-shadow: none; }
.sp { order: 1; width: 340px; max-height: calc(100dvh - 100px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 14px 16px 16px; }
.sp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.sp-head b { display: block; font-size: 15px; }
.sp-head small { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sp .field { margin-bottom: 8px; }
.sp-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0 8px; }
.sp-keys button { height: 46px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font: inherit; cursor: pointer; display: grid; place-content: center; line-height: 1.1; color: var(--ink); }
.sp-keys button b { font-size: 18px; font-weight: 550; }
.sp-keys button small { font-size: 9.5px; letter-spacing: .08em; color: var(--muted); min-height: 10px; }
.sp-keys button:hover { background: var(--accent-soft); border-color: #c7d4fb; }
.sp-keys button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.sp-keys.small button { height: 38px; }
.sp-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sp-call { width: 100%; justify-content: center; height: 42px; background: var(--ok); border-color: var(--ok); }
.sp-call:hover:not(:disabled) { background: #05603a; border-color: #05603a; }
.sp-call svg, .sp-ctl .btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.sp-sip { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); }
.sp-sip b { display: block; font-size: 13px; } .sp-sip small { color: var(--muted); overflow-wrap: anywhere; } .sp-sip .fine { margin-top: 4px; }
.sp-foot { border-top: 1px solid var(--line-2); padding-top: 10px; }
.sp-who { display: flex; gap: 12px; align-items: center; margin: 4px 0 14px; }
.sp-who > div { display: grid; min-width: 0; }
.sp-who b { font-size: 17px; overflow-wrap: anywhere; }
.sp-who small { color: var(--muted); }
.sp-ctl { display: flex; gap: 8px; justify-content: space-between; margin-bottom: 10px; }
.sp-ctl .btn { flex: 1; justify-content: center; height: 42px; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok:hover { background: #05603a; }
.sp-round { flex: 1; display: grid; justify-items: center; gap: 4px; padding: 8px 0 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font: inherit; color: var(--ink-2); }
.sp-round svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sp-round small { font-size: 11.5px; }
.sp-round:hover:not(:disabled) { background: var(--surface-2); }
.sp-round.on { background: var(--accent-soft); border-color: #c7d4fb; color: var(--accent); }
.sp-round.end { background: var(--bad); border-color: var(--bad); color: #fff; }
.sp-round.end:hover { background: #912018; }
.sp-round:disabled { opacity: .45; cursor: default; }
.sp-round:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.sp-note { margin: 0 0 10px; color: var(--warn); }
.sp-hist { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.sp-hist b { font-size: 12.5px; }
.sp-hist p { margin: 6px 0 0; display: grid; font-size: 13px; }
.sp-hist small { color: var(--muted); }
.sp-notes { display: grid; gap: 8px; border-top: 1px solid var(--line-2); padding-top: 10px; }
.sp-notes b { font-size: 13px; }
.sp-notes .btn { justify-self: end; }
@media (max-width: 900px) {
  #sp-root { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); left: 12px; }
  .sp { width: 100%; max-height: calc(100dvh - 90px); }
  .sp-fab { height: 48px; }
}

.sp-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-color: #c7d4fb; background: var(--accent-soft); }
.sp-banner .muted { margin: 0; }
.cl-dir { color: var(--accent) !important; }
/* Admin → Phone lines */
.lines-num { font-size: 22px; font-weight: 650; letter-spacing: -.01em; margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.copy-row { display: flex; gap: 8px; margin-top: 6px; }
.copy-row input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--surface-2); }
.radio-set { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.radio-set legend { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; padding: 0; }
.ok-text { color: var(--ok); }
code.sip { font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line-2); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.setup-steps summary { cursor: pointer; list-style: revert; }
.setup-steps[open] summary { margin-bottom: 4px; }
/* Call list: hidden numbers */
td.masked { color: var(--faint); letter-spacing: .12em; font-variant-numeric: tabular-nums; }
#call-list .filters { margin-top: 6px; }
/* Profile photos always fill their circle exactly (tall or wide photos never spill out, even where the online dot needs room) */
.avatar { position: relative; }
.avatar > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar > .dot { z-index: 1; }
/* New staff: finish your details */
.setup-nudge { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; padding: 12px 16px;
  border: 1px solid #fedf89; background: var(--warn-soft); border-radius: var(--r); }
.setup-nudge > div { display: grid; }
.setup-nudge small { color: var(--ink-2); }
/* Broadcasts */
.seg-opt { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 13.5px; color: var(--ink-2); }
.seg-opt:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 550; }
.seg-opt input { margin: 0; }
.bc-count { margin: 4px 0 0; font-size: 14px; }
.seg-opt input[type=radio] { width: 15px; height: 15px; min-height: 0; padding: 0; flex: none; accent-color: var(--accent); }
#bc-form textarea { font: inherit; }
#bc-form .seg { align-self: flex-start; }

/* One-off payments */
.pill.todo { background: var(--accent-soft); color: var(--accent); border-color: #c7d4fb; }
[data-af] { cursor: pointer; }
[data-af]:hover b { text-decoration: underline; text-underline-offset: 3px; }
.ad-steps { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 4px; }
.ad-cash-steps { margin: 4px 0 14px; padding-left: 20px; display: grid; gap: 4px; }
.field.invalid .drop { border-color: var(--bad); }
.pay th.sel, .pay td.sel { width: 40px; padding-right: 0; }
.pay th.sel input, .pay td.sel input { width: 17px; height: 17px; cursor: pointer; }

/* One-off payments: headings, progress, people picker */
.inline-lbl { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.inline-lbl select { min-width: 170px; }
.crumbs { margin: 0 0 8px; font-size: 14px; }
.crumbs a { color: var(--accent); text-decoration: none; }
.ad-gtitle { margin: 0; font-size: 22px; }
.ad-bar { height: 6px; width: 120px; max-width: 100%; border-radius: 99px; background: var(--line); overflow: hidden; margin: 4px 0 2px; }
.ad-bar i { display: block; height: 100%; background: #12a150; border-radius: 99px; }
.ad-words { margin: -6px 0 10px; color: var(--muted); }
.ad-people { max-height: 300px; overflow: auto; margin: 4px 0 6px; }
.ad-people input { width: 100%; }
.ad-people td.num input { text-align: right; }
.ad-bank3 { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 6px; margin-top: 6px; }
.ad-total { margin: 6px 0 0; text-align: right; }
.pick { position: relative; }
.pick-q { width: 100%; }
.pick-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .12); max-height: 320px; overflow: auto; padding: 4px; }
.pick-opt, .pick-all { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit; }
.pick-opt small { display: block; color: var(--muted); font-size: 12px; }
.pick-opt.on, .pick-opt:hover { background: var(--accent-soft); }
.pick-all { color: var(--accent); font-weight: 600; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.pick-more { margin: 0; padding: 8px 10px; color: var(--muted); font-size: 13px; }
@media (max-width: 640px) { .ad-bank3 { grid-template-columns: 1fr; } .inline-lbl { width: 100%; } .inline-lbl select { flex: 1; }
  .filters input[type=search] { flex: 1 1 100%; max-width: none; } .hide-sm { display: none; } }

/* Group-by section rows (any table) */
.grp-row td { background: #f6f7fb; padding: 9px 14px !important; font-size: 13px; border-top: 1px solid var(--line); }
.grp-row b { font-weight: 700; }
.grp-row span { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: 99px; background: #e6e9f2; color: var(--muted); font-size: 12px; }
.grp-row em { font-style: normal; float: right; color: var(--muted); }
.grp-row:hover td { background: #f6f7fb; }
.grp-li { list-style: none; padding: 10px 4px 4px !important; font-size: 13px; border: 0 !important; background: none !important; cursor: default !important; }
.grp-li span { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: 99px; background: #e6e9f2; color: var(--muted); font-size: 12px; }

/* Zoni Mail */
.mail { display: grid; grid-template-columns: 210px 360px minmax(0, 1fr); height: calc(100dvh - 190px); min-height: 480px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.mail-folders { border-right: 1px solid var(--line); overflow: auto; padding: 10px 8px; background: var(--surface-2); }
.mail-folders ul { list-style: none; margin: 8px 0 0; padding: 0; }
.mail-me { padding: 4px 8px 8px; border-bottom: 1px solid var(--line-2); display: grid; gap: 2px; font-size: 13px; overflow-wrap: anywhere; }
.mail-folder { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; cursor: pointer; font: inherit; color: var(--ink); text-align: left; }
.mail-folder:hover { background: #eceff5; }
.mail-folder.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.mail-list-col { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.mail-tools { padding: 10px; border-bottom: 1px solid var(--line-2); display: grid; gap: 6px; }
.mail-tools input[type=search] { width: 100%; }
.mail-list { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; }
.mail-list .pad, .mail-read .pad { padding: 16px; }
.mail-item { width: 100%; display: grid; gap: 2px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line-2); background: none; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.mail-item:hover { background: var(--surface-2); }
.mail-item.on { background: var(--accent-soft); }
.mail-item.unread .mi-top b, .mail-item.unread .mi-sub { font-weight: 700; }
.mail-item.unread { box-shadow: inset 3px 0 0 var(--accent); }
.mi-top { display: flex; justify-content: space-between; gap: 8px; }
.mi-top b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-top small, .mi-sum { color: var(--muted); font-size: 12px; }
.mi-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.mi-sum { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-read { overflow: auto; min-width: 0; display: flex; flex-direction: column; }
.mail-head { display: flex; gap: 8px; padding: 16px 18px 6px; }
.mail-head h2 { margin: 0 0 4px; font-size: 19px; overflow-wrap: anywhere; }
.mail-head .fine { margin: 0; overflow-wrap: anywhere; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 18px 10px; border-bottom: 1px solid var(--line-2); }
.mail-atts { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 18px 0; }
.mail-atts .chip { text-decoration: none; }
.mail-frame { width: 100%; min-height: 420px; border: 0; flex: none; background: #fff; }
.mail-connect { text-align: center; max-width: 560px; margin: 24px auto; }
.mail-connect .state-icon { font-size: 34px; }
.mail-pick { margin: -6px 0 6px; }
.mail-attlist { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; font-size: 14px; }
.steps-list { padding-left: 20px; display: grid; gap: 6px; }
.btn.wide { width: calc(100% - 20px); margin: 10px; }
@media (max-width: 1100px) { .mail { grid-template-columns: 170px 300px minmax(0, 1fr); } }
@media (max-width: 860px) {
  .mail { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; border-radius: 0; margin: 0 -14px; border-left: 0; border-right: 0; }
  .mail-folders { border-right: 0; border-bottom: 1px solid var(--line); padding: 6px; }
  .mail-folders ul { display: flex; gap: 4px; overflow-x: auto; margin: 4px 0 0; }
  .mail-folder { white-space: nowrap; }
  .mail-list-col { border-right: 0; max-height: none; }
  .mail-list { max-height: none; }
  .mail:not(.reading) .mail-read { display: none; }
  .mail.reading .mail-folders, .mail.reading .mail-list-col { display: none; }
  .mail .chat-back { display: inline; }
}
textarea { font: inherit; }

/* Rota */
.pill.night { background: var(--night); color: var(--night-ink); border-color: var(--night-line); }
.pill.day { background: var(--day-soft); color: var(--day); border-color: var(--day-line); }
.rt-nav { display: inline-flex; align-items: center; gap: 6px; }
.rt-nav b { min-width: 190px; text-align: center; font-size: 14px; }
.rt-table th.rt-h, .rt-cal th.rt-h { text-align: center; width: 54px; }
.rt-h small { display: block; font-weight: 400; color: var(--muted); }
.rt-h.today { color: var(--accent); }
.pay td.rt-c, .rt-c { text-align: center; font-weight: 700; font-size: 13px; padding: 6px 4px !important; position: relative; cursor: default; }
.rt-c[data-cell] { cursor: pointer; }
.rt-c[data-cell]:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.rt-c.d { background: var(--day-soft); color: var(--day); }
.rt-c.n { background: var(--night); color: var(--night-ink); }
.rt-c.rest { color: var(--rest); font-weight: 400; background: var(--rest-soft); }
.rt-c.leave { background: var(--leave-soft); color: var(--leave); font-weight: 500; }
.rt-c.ch::after { content: ''; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.rt-n { text-align: center; font-weight: 600; color: var(--muted); }
.rt-n.zero { color: var(--bad); background: var(--bad-soft); }
.rt-sum td { background: var(--surface-2); font-size: 13px; }
.rt-tag { display: inline-block; margin: 3px 4px 0 0; padding: 0 7px; border-radius: 99px; font-size: 11px; background: var(--accent-soft); color: var(--accent); }
.rt-tag.mgr { background: var(--night); color: var(--night-ink); }
.rt-gaps { border: 1px solid #fecdca; background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; font-size: 14px; }
.rt-gaps ul { margin: 6px 0 0; padding-left: 18px; }
.rt-ok { color: var(--ok); font-size: 14px; margin: 0 0 10px; }
.rt-cal td.rt-c { width: 28px; min-width: 28px; font-size: 11px; }
.rt-cal th.rt-h { width: 28px; font-size: 11px; }
.rt-mine { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.rt-mday { border: 1px solid var(--line); border-radius: 10px; padding: 6px; text-align: center; display: grid; gap: 1px; font-size: 12px; position: relative; }
.rt-mday b { font-size: 16px; }
.rt-mday.d { background: var(--day-soft); color: var(--day); border-color: var(--day-line); }
.rt-mday.n { background: var(--night); color: var(--night-ink); border-color: var(--night-line); }
.rt-mday.rest { color: var(--rest); background: var(--rest-soft); }
.rt-mday.leave { color: var(--leave); background: var(--leave-soft); border-color: #abefc6; }
.rt-mday.ch::after { content: ''; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.sv-rota { margin: 4px 0 0; }
@media (max-width: 640px) { .rt-nav b { min-width: 0; } }

/* Performance */
.pf-bar { margin-bottom: 14px; }
.pf-bar-w { height: 6px; width: 90px; border-radius: 99px; background: var(--line); overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 8px; }
.pf-bar-w i { display: block; height: 100%; background: #98a2b3; }
.pf-bar-w i.paid { background: #12a150; } .pf-bar-w i.part { background: #f0a400; } .pf-bar-w i.unpaid { background: #d92d20; }
.pf-w { text-align: center; font-weight: 600; font-size: 13px; }
.pf-w.paid { background: #ecfdf3; color: #067647; } .pf-w.part { background: #fffaeb; color: #b54708; } .pf-w.unpaid { background: #fef3f2; color: #b42318; }
.pf-enter input, .pf-enter select { width: 100%; }
.pf-yellow { background: #fffbe6; }
.pf-files { list-style: none; margin: 0 0 4px; padding: 0; font-size: 13px; }
.pf-files li { margin: 2px 0; word-break: break-word; }
.pf-files small { color: var(--muted, #667085); margin-left: 4px; }
.pf-add { cursor: pointer; }
.pf-ok { display: block; font-weight: 600; } .pf-ok small { display: block; font-weight: 400; }
.ok-text { color: #067647; font-size: 13px; display: block; }
.stat[data-show] { cursor: pointer; }
@media print {
  body * { visibility: hidden; }
  .pf-print, .pf-print * { visibility: visible; }
  .pf-print { position: absolute; left: 0; top: 0; width: 100%; }
  .pf-print .table-wrap { overflow: visible; }
}

/* Attendance: Day shift / Night shift switch */
.shift-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.shift-bar .seg button { padding: 7px 14px; font-size: 14px; }
.shift-bar .seg button b { font-weight: 600; margin-left: 4px; color: var(--muted); }
.shift-bar .seg button.on b { color: var(--ink); }
.sdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }
.sdot.day { background: var(--day-soft); box-shadow: inset 0 0 0 2px var(--day); }
.sdot.night { background: var(--night); }

/* ---------- Rota on phones: Shift and Rest go under the name; the name column stays put while the days scroll ---------- */
.rt-m, .rt-phone { display: none; }
@media (max-width: 760px) {
  .rt-table .rt-wide { display: none; }
  .rt-table .rt-phone { display: table-cell; }
  .rt-m { display: flex; align-items: baseline; gap: 6px; margin-top: 3px; font-size: 12px; line-height: 1.3; color: var(--muted); white-space: normal; }
  .rt-m .sdot { flex: none; margin: 0; }
  .rt-table .rt-stick { overflow: hidden; }
  .rt-table .rt-stick, .rt-cal td:first-child, .rt-cal th:first-child {
    position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 1px 0 0 var(--line); min-width: 118px; max-width: 132px; }
  .rt-table tr.grp-row .rt-stick, .rt-table tr.rt-sum .rt-stick { background: var(--surface-2); }
  .rt-table .rt-stick .name-btn b, .rt-cal td:first-child b { white-space: normal; line-height: 1.25; }
  .pay td.rt-c, .rt-c { min-width: 42px; }
  .rt-cal td:first-child small { white-space: normal; }
}
/* Number boxes on phones: two per row, a little tighter. */
@media (max-width: 560px) { .cards { gap: 10px; } .stat { padding: 12px 14px; } .stat b { font-size: 20px; } }

/* Leave: a request opens in full (reason + proof) */
.lv-open { cursor: pointer; border-radius: 6px; }
.lv-open:hover b { color: var(--accent); }
.lv-open:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.lv-reason { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; margin: 6px 0 0; white-space: pre-wrap; }
.lv-proof { display: block; max-width: 100%; max-height: 360px; border-radius: var(--r-sm); border: 1px solid var(--line); margin: 6px 0 8px; object-fit: contain; background: var(--surface-2); }

/* ---------- One person's attendance calendar (Attendance → click a name; My work → My attendance calendar) ---------- */
.ac-nav { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.ac-nav b { min-width: 140px; text-align: center; }
.ac-sum { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }
.ac-sum b { color: var(--ink); }
.ac-sum .bad b { color: var(--bad); } .ac-sum .warn b { color: var(--warn); }
.ac-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.ac-wd { text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; padding-bottom: 2px; }
.ac-day { position: relative; display: grid; grid-template-rows: auto 10px auto; justify-items: center; gap: 2px; min-height: 64px; padding: 6px 2px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.ac-day:hover { border-color: var(--accent); }
.ac-day.sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.ac-day.today .ac-n { color: var(--accent); }
.ac-n { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 3px; }
.ac-l { font-size: 11px; line-height: 1.2; color: var(--muted); text-align: center; }
.ac-day .sdot { margin: 0; width: 8px; height: 8px; }
.ac-day.present { background: var(--ok-soft); border-color: #abefc6; } .ac-day.present .ac-l { color: var(--ok); font-weight: 600; }
.ac-day.late { background: var(--warn-soft); border-color: #fedf89; } .ac-day.late .ac-l { color: var(--warn); font-weight: 600; }
.ac-day.absent { background: var(--bad-soft); border-color: #fecdca; } .ac-day.absent .ac-l { color: var(--bad); font-weight: 600; }
.ac-day.leave { background: var(--day-soft); border-color: var(--day-line); } .ac-day.leave .ac-l { color: var(--day); font-weight: 600; }
.ac-day.rest { background: var(--rest-soft); } .ac-day.rest .ac-n, .ac-day.rest .ac-l { color: var(--rest); }
.ac-day.planned, .ac-day.before { background: var(--surface); } .ac-day.before { opacity: .45; }
.ac-day.notyet .ac-l { color: var(--ink-2); }
.ac-note { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ac-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.ac-legend .sdot { margin-right: 4px; }
.ac-key { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 4px; vertical-align: -1px; border: 1px solid var(--line); }
.ac-key.present { background: var(--ok-soft); border-color: #abefc6; } .ac-key.late { background: var(--warn-soft); border-color: #fedf89; }
.ac-key.absent { background: var(--bad-soft); border-color: #fecdca; } .ac-key.leave { background: var(--day-soft); border-color: var(--day-line); }
.ac-key.rest { background: var(--rest-soft); }
.ac-detail { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.ac-detail h3 { margin: 0 0 8px; font-size: 15px; }
.ac-detail p { margin: 6px 0; }
.ac-notebox { margin-top: 8px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); }
.ac-notebox p { margin: 4px 0; }
.cal-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.cal-link b { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.cal-link:hover b, .cal-link:focus-visible b { color: var(--accent); text-decoration-color: currentColor; }
@media (max-width: 560px) {
  .ac-grid { gap: 4px; }
  .ac-day { min-height: 54px; padding: 5px 1px; border-radius: 8px; }
  .ac-n { font-size: 14px; }
  .ac-l { font-size: 10px; }
}
/* Broadcasts: SMS company connection line, who-gets-it switch, buttons */
.bc-conn { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; }
.bc-conn > div { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.bc-ok { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); font-weight: 700; flex: none; }
.seg.bc-src { margin: 0 0 4px; }
.bc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.bc-count .warn-text { display: block; margin-top: 4px; }
@media (max-width: 640px) { .bc-actions .btn { flex: 1; } }
#bc-form .field > small.fine { display: block; }
.seg.bc-src .seg-opt { white-space: nowrap; }
@media (max-width: 640px) { .seg.bc-src .seg-opt { padding: 6px 9px; } }
.bc-provs { display: grid; gap: 8px; }
.bc-prov { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.bc-prov.on { border-color: #abefc6; background: color-mix(in srgb, var(--ok-soft) 50%, transparent); }
.bc-prov > div:not(.bc-prov-act) { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 2px; }
.bc-prov .bc-ok:empty { background: var(--surface-2); border: 1px dashed var(--line); }
.bc-prov-act { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bc-actions { align-items: center; }
/* Bulk SMS: who may send, groups */
.bc-senders { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; }
.bc-senders > div { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.bc-whos { display: grid; gap: 4px; max-height: 52vh; overflow: auto; }
.bc-who { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.bc-who:hover { background: var(--surface-2); }
.bc-who input { width: 17px; height: 17px; accent-color: var(--accent); flex: none; min-height: 0; }
.bc-who span { display: flex; flex-direction: column; }
.bc-from { margin: 6px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.bc-g-act { text-align: right; white-space: nowrap; }
.bc-g-act .linkish + .linkish { margin-left: 12px; }
@media (max-width: 640px) { .bc-g-act { white-space: normal; } .bc-g-act .linkish { display: block; margin: 4px 0 0 !important; } }
.bc-full { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.bc-full input { width: 16px; height: 16px; min-height: 0; accent-color: var(--accent); }
/* Editing a person in an SMS group */
.gv-act { text-align: right; white-space: nowrap; }
.gv-act .linkish + .linkish, .gv-act .btn + .linkish { margin-left: 12px; }
.gv-edit td { vertical-align: top; }
.gv-edit input { width: 100%; min-width: 90px; padding: 7px 9px; min-height: 0; font-size: 14px; }
.gv-err { display: block; white-space: normal; text-align: left; margin-top: 4px; }
/* SMS account & reports */
.sa-acc { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px; }
.sa-acc + .sa-acc { margin-top: 12px; }
.sa-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.sa-top .kicker { margin: 0; }
.sa-bal { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0; color: var(--ink); }
.sa-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sa-wallets { display: flex; gap: 18px; flex-wrap: wrap; }
.sa-wallets span, .sa-tiles > div { display: flex; flex-direction: column; gap: 2px; }
.sa-meta { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); }
.sa-ids { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sa-hook { margin: 0; word-break: break-all; }
.sa-hook code { font-size: 12px; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.sa-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.sa-tiles > div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.sa-tiles b { font-size: 20px; }
.sa-range { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sa-range label { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.sa-range input { min-height: 0; padding: 6px 8px; }
.sa-views { margin-bottom: 10px; flex-wrap: wrap; }
.msg.warn { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 8px 12px; }
.sa-okc { color: var(--ok); }
.cl-costs { margin: 0 0 12px; }
.cl-costs summary { cursor: pointer; font-weight: 600; color: var(--ink-2); padding: 6px 0; }
.cl-rate { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; text-align: center; }
.bc-cost { display: block; margin-top: 4px; }

/* ---- Training videos ---- */
.tr-todo { margin: 0 0 14px; color: var(--ink-2); }
.tr-todo.done { color: var(--ok); }
.tr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tr-card { margin: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.tr-card.hidden-video { opacity: .7; }
.tr-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: #0b1220; cursor: pointer; }
.tr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tr-play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,.6); display: grid; place-items: center; transition: background .15s; }
.tr-play svg { width: 26px; height: 26px; fill: #fff; margin-left: 3px; }
.tr-thumb:hover .tr-play, .tr-thumb:focus-visible .tr-play { background: var(--accent); }
.tr-len { position: absolute; right: 8px; bottom: 10px; background: rgba(0,0,0,.75); color: #fff; font-size: 12px; padding: 1px 6px; border-radius: 4px; }
.tr-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.25); }
.tr-bar i { display: block; height: 100%; background: var(--bad); }
.tr-info { padding: 12px 14px 14px; display: grid; gap: 6px; }
.tr-info h3 { margin: 0; font-size: 15px; line-height: 1.35; }
.tr-info h3 .linkish { text-align: left; font: inherit; color: inherit; }
.tr-info p { margin: 0; }
.tr-mgr { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px !important; font-size: 13px; }
.tr-watch { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
/* the player always fits the screen: as wide as it can be without being taller than the window (phones, tablets, laptops) */
.tr-stage { min-width: 0; }
.tr-frame { position: relative; aspect-ratio: 16 / 9; width: min(100%, calc((100svh - 90px) * 16 / 9)); margin-inline: auto; background: #000; border-radius: var(--r); overflow: hidden; }
.tr-watch.is-tall { grid-template-columns: minmax(0, 1fr) minmax(260px, 1fr); }
.is-tall .tr-frame { aspect-ratio: 9 / 16; width: min(100%, 460px, calc((100svh - 90px) * 9 / 16)); }
.tr-fs { text-align: center; margin: 8px 0 0; }
@media (hover: hover) and (pointer: fine) { .tr-fs { display: none; } }
.tr-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tr-side h2 { margin: 0 0 4px; }
.tr-progress { margin: 14px 0; }
.tr-progress .meter { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.tr-progress .meter i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.tr-progress p { margin: 6px 0 0; }
.tr-desc { white-space: pre-line; }
@media (max-width: 860px) { .tr-watch, .tr-watch.is-tall { grid-template-columns: minmax(0, 1fr); } }
/* phone turned sideways: the video takes the whole screen height, the text goes below it */
@media (orientation: landscape) and (max-height: 500px) { .tr-watch, .tr-watch.is-tall { grid-template-columns: minmax(0, 1fr); } }
/* voice recordings */
.tr-thumb.is-audio { background: linear-gradient(135deg, #1f3a8a, #2f5bea 60%, #6b8afc); }
.tr-voice { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: #fff; }
.tr-voice svg { width: 44px; height: 44px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; opacity: .9; }
.tr-voice b { font-size: 12px; font-weight: 600; letter-spacing: .02em; opacity: .85; }
.tr-thumb.is-audio .tr-play { top: auto; bottom: 14px; right: 14px; left: auto; margin: 0; width: 40px; height: 40px; }
.tr-thumb.is-audio .tr-play svg { width: 20px; height: 20px; }
.tr-listen { max-width: 640px; margin: 0 auto; text-align: center; padding: 28px 22px; }
.tr-voice.big { position: static; width: 84px; height: 84px; margin: 0 auto 12px; border-radius: 50%; background: linear-gradient(135deg, #1f3a8a, #2f5bea); }
.tr-voice.big svg { width: 40px; height: 40px; }
.tr-listen audio { width: 100%; margin: 14px 0 4px; }
.tr-listen .tr-progress { text-align: left; }
.tr-kind { margin: 4px 0 14px; }
.tr-rec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.tr-rec-btn .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #fff; margin-right: 2px; }
.tr-rec-btn.recording { background: var(--bad) !important; border-color: var(--bad) !important; }
.tr-rec-btn.recording .dot { animation: tr-blink 1s steps(2, start) infinite; }
@keyframes tr-blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .tr-rec-btn.recording .dot { animation: none; } }
.tr-rec-time { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 14px; }
.tr-preview { width: 100%; margin: 4px 0 8px; }
.tr-up { width: 100%; height: 8px; }
.tr-up-msg { margin: 4px 0 12px; }
/* uploaded videos */
.tr-frame video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; object-fit: contain; }
.tr-busy { display: grid !important; place-content: center; justify-items: center; gap: 6px; padding: 16px; text-align: center; color: #e8ecf7; cursor: default; background: #1b2236; }
.tr-busy b { font-size: 14px; } .tr-busy small { font-size: 12px; opacity: .8; max-width: 32ch; }
.tr-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: tr-spin 1s linear infinite; }
@keyframes tr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tr-spin { animation: none; } }
.tr-storage { margin-top: 16px; }
.tr-vid-name { margin: 6px 0 0; }
.tr-upbox { margin: 6px 0 0; }
.tr-kind { flex-wrap: wrap; }
/* sharing a video */
.tr-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tr-share { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.tr-share-ic { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; vertical-align: -2px; margin-right: 4px; }
.tr-share .tr-share-ic { margin-right: 0; }
.tr-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.tr-share-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.tr-link { font-size: 13px; }
/* full-screen links: #training/12/phone and #training/12/tv */
body.tr-full { overflow: hidden; }
body.tr-full .tr-watch { position: fixed; inset: 0; z-index: 3000; background: #000; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; margin: 0; }
body.tr-full .tr-side, body.tr-full .tr-fs { display: none; }
body.tr-full .tr-stage { width: 100%; display: flex; justify-content: center; }
body.tr-full .tr-frame { border-radius: 0; margin: 0 auto; }
.tr-fs-top { display: none; }
body.tr-full .tr-fs-top { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; font-size: 15px; z-index: 5; position: relative; }
body.tr-full-phone .tr-fs-top { position: absolute; top: 0; left: 0; right: 0; background: linear-gradient(rgba(0,0,0,.7), transparent); padding-bottom: 26px; }
body.tr-full-tv .tr-fs-top { font-size: 20px; padding: 14px 24px; }
.tr-fs-top b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-fs-x { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 16px; cursor: pointer; }
.tr-fs-x:hover, .tr-fs-x:focus-visible { background: rgba(255,255,255,.3); }
.tr-fs-go { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border: 0; background: rgba(0,0,0,.45); color: #fff; font: 600 17px/1.3 inherit; cursor: pointer; }
.tr-fs-go span { width: 74px; height: 74px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-size: 28px; padding-left: 5px; box-shadow: 0 6px 24px rgba(0,0,0,.4); }
body.tr-full-tv .tr-fs-go { font-size: 22px; } body.tr-full-tv .tr-fs-go span { width: 96px; height: 96px; font-size: 36px; }
.tr-fs-help { color: #b9bfcc; font-size: 15px; margin: 12px 0 0; }
.tr-fs-help kbd { background: #2a2f3a; border: 1px solid #444b59; border-radius: 4px; padding: 1px 7px; font: inherit; font-size: 13px; color: #fff; }
.tr-watch:fullscreen .tr-fs-help, body.tr-full-tv .tr-watch:fullscreen .tr-fs-top { display: none; }
body.tr-full-phone .tr-watch:fullscreen .tr-fs-top { position: absolute; }
.tr-linkrow { display: flex; gap: 8px; }
.tr-linkrow input { flex: 1; min-width: 0; }
/* phone view: fill the screen; the "turn sideways" hint */
.tr-fs-fill { margin-left: auto; flex: none; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.35); color: #fff; border-radius: 999px; padding: 6px 12px; font: 600 13px/1 inherit; cursor: pointer; }
.tr-rotate { color: #d6dae3; font-size: 14px; margin: 14px 0 0; text-align: center; }
body.tr-full-phone .tr-frame video { background: #000; }

/* Bulk SMS paid from your Zoni balance */
.bc-wallet { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; margin: 0 0 16px; border: 1px solid var(--line, #e4e7ec); border-radius: 12px; background: var(--bg, #f7f8fa); }
.bc-wallet > div { display: grid; gap: 2px; }
.bc-wallet b { font-size: 22px; line-height: 1.2; }
#bc-price { align-items: flex-end; gap: 14px; }
#bc-price .check { margin-bottom: 10px; }

/* Power dialler */
.pd-card .filters { align-items: flex-end; gap: 12px; }
.pd-next { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.pd-next > div { display: grid; gap: 2px; min-width: 0; }
.pd-next b { font-size: 20px; line-height: 1.25; }
.pd-next .fine { margin: 4px 0 0; }
.copy-row code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); font-size: 12.5px; }
.zo-steps { margin: 0 0 18px; padding-left: 20px; display: grid; gap: 10px; }
.zo-steps li { padding-left: 4px; line-height: 1.55; }
.zo-steps .copy-row { margin-top: 6px; }
.zc-tabs { margin: 0 0 16px; }
.seg a { font: 500 13px inherit; font-family: inherit; padding: 5px 14px; border-radius: 7px; color: var(--muted); text-decoration: none; }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.zc-detail { display: block; white-space: pre-wrap; word-break: break-all; font-size: 12px; margin-top: 4px; }

/* ---- Radio: On Air card (Home / Welcome) and the "now playing" bar ---- */
.rd-card { padding: 18px 20px; }
.rd-top { display: flex; align-items: center; gap: 14px; }
.rd-title h2 { margin: 0; font-size: 17px; }
.rd-title .fine { margin: 2px 0 0; }
.rd-play { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.rd-play:hover { background: var(--accent-hover); }
.rd-play:focus-visible, .rd-mini:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-ring); }
.rd-play.on { background: var(--bad); }
.rd-play svg { width: 22px; height: 22px; }
.rd-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 14px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line-2); }
.rd-status .fine { margin: 0; }
.rd-next b { font-weight: 600; }
.rd-count { font-variant-numeric: tabular-nums; }
.rd-onair { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12.5px; letter-spacing: .06em; color: #fff; background: #d92d20; padding: 3px 10px 3px 8px; border-radius: 999px; }
.rd-onair i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: rd-pulse 1.2s ease-in-out infinite; }
@keyframes rd-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .rd-onair i { animation: none; } }
.rd-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; }
.rd-vol { display: inline-flex; align-items: center; gap: 8px; }
.rd-vol .fine { margin: 0; }
.rd-vol input[type=range] { width: 140px; height: 4px; padding: 0; border: 0; box-shadow: none; accent-color: var(--accent); background: transparent; }
.rd-msg { margin: 0; }
.rd-h { font-size: 13px; font-weight: 600; margin: 18px 0 6px; color: var(--ink-2); }
.rd-eps { list-style: none; margin: 0; padding: 0; }
.rd-eps li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.rd-eps li:first-child { border-top: 0; }
.rd-mini { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--accent); display: grid; place-items: center; cursor: pointer; }
.rd-mini:hover { background: var(--accent-soft); }
.rd-mini.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.rd-mini svg { width: 15px; height: 15px; }
.rd-ep-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rd-ep-text b { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-ep-text .fine { margin: 0; }
.rd-share { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #128c4a; }
.rd-share:hover { background: #ecfdf3; }
.rd-dl { color: var(--accent); }
.rd-dl:hover { background: var(--accent-soft); }
.rd-share svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.rd-play svg, .rd-mini svg { fill: currentColor; }
.rd-more { display: inline-block; margin-top: 10px; font-weight: 500; text-decoration: none; }
.rd-more:hover { text-decoration: underline; }
.radio-bar { position: fixed; z-index: 60; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
  padding: 8px 8px 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-lg); font-size: 13px; }
.radio-bar svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.7; }
.radio-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin-top: 10px; }
.rd-links .rd-more { margin-top: 0; }
.rd-edit { flex: none; font-size: 13px; padding: 0 6px; }
.rd-admin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; margin: 4px 0 10px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line-2); }
.rd-admin .fine { margin: 0; }
.rd-all { max-height: 55vh; overflow: auto; }
.rd-file { margin-top: 4px; }
.rd-file-name { margin: 6px 0 12px; }
.rd-up { width: 100%; height: 8px; margin-top: 8px; accent-color: var(--accent); }
