/* =====================================================================
   StaffHive v12 — motion polish, theme & language toggles, quick profile
   popup, announcements, schedule, clock countdown, print. Loaded last.
   Every animation uses transform / opacity / clip-path only (GPU, 60fps)
   and turns off under "reduce motion".
   ===================================================================== */
:root { --ease-smooth: cubic-bezier(.22, .9, .24, 1); --ease-in-soft: cubic-bezier(.4, 0, .9, .6); }

/* ---------- Theme & language toggles ---------- */
.toggles { display: inline-flex; align-items: center; gap: 8px; }
.theme-tog, .lang-tog { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  height: 36px; border-radius: 999px; -webkit-tap-highlight-color: transparent; transition: border-color .2s, background .2s, transform .15s var(--ease-smooth); }
.theme-tog:hover, .lang-tog:hover { border-color: var(--accent); }
.theme-tog:active, .lang-tog:active { transform: scale(.94); }
.theme-tog:focus-visible, .lang-tog:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-tog { width: 36px; display: grid; place-items: center; padding: 0; color: var(--accent); }
.theme-tog svg { overflow: visible; }
/* sun ⇄ moon: the sun grows into a full disc, a second circle slides in to carve the crescent, the rays spin away */
.tt-body { transition: r .5s var(--ease-smooth); }
.tt-cut { transition: cx .5s var(--ease-smooth), cy .5s var(--ease-smooth); }
.tt-rays { transform-origin: 12px 12px; transition: transform .5s var(--ease-smooth), opacity .3s; }
.theme-tog svg { transition: transform .5s var(--ease-smooth); }
.theme-tog[aria-pressed="true"] svg { transform: rotate(-40deg); }
.theme-tog[aria-pressed="true"] .tt-body { r: 9px; }
.theme-tog[aria-pressed="true"] .tt-cut { cx: 17px; cy: 7px; }
.theme-tog[aria-pressed="true"] .tt-rays { transform: rotate(90deg) scale(.4); opacity: 0; }

.lang-tog { position: relative; width: 74px; padding: 0 3px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; isolation: isolate; }
.lt-opt { position: relative; z-index: 1; text-align: center; font-size: 13px; font-weight: 600; line-height: 1; transition: color .3s var(--ease-smooth); color: var(--muted); }
.lt-ar { font-family: 'IBM Plex Sans Arabic', var(--font); font-size: 16px; }
.lt-knob { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px;
  background: var(--honey-grad); box-shadow: 0 1px 3px rgba(42, 31, 18, .25); transition: transform .38s var(--ease-spring); }
.lang-tog[data-on="ar"] .lt-knob { transform: translateX(100%); }
.lang-tog[data-on="en"] .lt-en, .lang-tog[data-on="ar"] .lt-ar { color: var(--honey-ink); }
.side .toggles .theme-tog, .side .toggles .lang-tog { background: var(--side-2); border-color: transparent; color: var(--side-ink); }

/* ---------- Page transitions ---------- */
/* language: old page drifts out and blurs, new one settles in from the reading side */
:root[data-lang-switch]::view-transition-old(root) { animation: lang-out .24s var(--ease-in-soft) both; }
:root[data-lang-switch]::view-transition-new(root) { animation: lang-in .42s var(--ease-smooth) both; }
:root[data-lang-switch="ar"] { --lx: 14px; }
:root[data-lang-switch="en"] { --lx: -14px; }
@keyframes lang-out { to { opacity: 0; transform: translateX(var(--lx)); filter: blur(3px); } }
@keyframes lang-in { from { opacity: 0; transform: translateX(calc(var(--lx) * -1)); filter: blur(3px); } }
/* theme: no cross-fade, the new theme opens as a circle (the clip-path is animated from JS) */
:root[data-theme-switch]::view-transition-old(root), :root[data-theme-switch]::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
:root[data-theme-switch]::view-transition-old(root) { z-index: 1; }
:root[data-theme-switch]::view-transition-new(root) { z-index: 2; }
/* every page swap fades up a little */
.view > * { animation: view-in .32s var(--ease-smooth) backwards; }
.view > :nth-child(2) { animation-delay: .03s; } .view > :nth-child(3) { animation-delay: .06s; } .view > :nth-child(n+4) { animation-delay: .09s; }
.view.is-refreshing > * { animation: none; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }

/* text that is being translated: shown as typed, then the translation fades in */
.tx-wait { transition: opacity .25s; }
.tx-in { animation: tx-in .35s var(--ease-smooth); }
@keyframes tx-in { from { opacity: .25; filter: blur(2px); } }

/* ---------- Smoother popups (open and close) ---------- */
.modal-bg { transition: opacity .22s var(--ease-smooth), backdrop-filter .22s; backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.modal { transition: transform .32s var(--ease-smooth), opacity .22s var(--ease-smooth); will-change: transform; }
@starting-style { .modal-bg { opacity: 0; } .modal-bg .modal { opacity: 0; transform: translateY(14px) scale(.97); } }
.modal-bg.closing { opacity: 0; pointer-events: none; }
.modal-bg.closing .modal { opacity: 0; transform: translateY(10px) scale(.98); transition-duration: .18s; }
@media (max-width: 640px) {
  @starting-style { .modal-bg:not(.cmdk-bg) .modal { transform: translateY(100%); opacity: 1; } }
  .modal-bg.closing:not(.cmdk-bg) .modal { transform: translateY(100%); opacity: 1; transition: transform .24s var(--ease-in-soft); }
}
.toast { transition: opacity .3s var(--ease-smooth), transform .3s var(--ease-smooth); }
@starting-style { .toast { opacity: 0; transform: translateY(10px) scale(.98); } }
.tabs button { transition: background .2s, color .2s, box-shadow .2s; }
#tabPanel > * { animation: view-in .28s var(--ease-smooth) backwards; }
.card.emp-card, .kpi, .ann-card { transition: transform .2s var(--ease-smooth), box-shadow .2s, border-color .2s; }
@media (hover: hover) { .card.emp-card:hover { transform: translateY(-2px); } }
.card.emp-card:active { transform: scale(.98); }

/* ---------- Quick profile popup (Employees → click a person) ---------- */
.qp-head { display: flex; gap: 16px; align-items: center; }
.qp-photo { position: relative; flex-shrink: 0; }
.qp-photo .avatar { width: 88px !important; height: 88px !important; border-radius: 24px; object-fit: cover; font-size: 30px !important; }
.qp-photo .photo-edit { position: absolute; inset-inline-end: -6px; bottom: -6px; }
.qp-name h3 { font-size: 20px; }
.qp-name p { margin: 2px 0 0; }
.qp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 4px; }
.qp-stats > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 2px; text-align: center; }
.qp-stats span { font-size: 12px; color: var(--muted); }
.qp-stats strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.qp-quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.qp-quick .btn { flex: 1 1 auto; justify-content: center; }
.qp-form { margin-top: 12px; }
.qp-form .grid2 { gap: 10px; }
.qp-foot { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; }

/* ---------- Announcements ---------- */
.ann-list { display: grid; gap: 12px; }
.ann-card { position: relative; border-inline-start: 4px solid var(--honey); }
.ann-card.pinned { background: linear-gradient(135deg, var(--honey-soft), var(--surface) 60%); }
.ann-card h3 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ann-card .ann-body { white-space: pre-wrap; margin: 8px 0 0; overflow-wrap: anywhere; }
.ann-card .ann-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.ann-card.unread::after { content: ''; position: absolute; top: 14px; inset-inline-end: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }
@media (prefers-reduced-motion: no-preference) { .ann-card.unread::after { animation: ping 1.8s var(--ease-smooth) infinite; } }
@keyframes ping { 50% { box-shadow: 0 0 0 7px transparent; } }
.ann-strip { display: grid; gap: 10px; margin-bottom: 16px; }
.seen-btn.done { pointer-events: none; }

/* ---------- Schedule (week grid) ---------- */
.sched-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); -webkit-overflow-scrolling: touch; }
.sched { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 760px; }
.sched th, .sched td { border-bottom: 1px solid var(--line); padding: 6px; text-align: center; font-size: 13px; }
.sched th { position: sticky; top: 0; background: var(--surface-2); font-weight: 600; z-index: 1; }
.sched th.today { color: var(--accent); }
.sched td:first-child, .sched th:first-child { position: sticky; inset-inline-start: 0; background: var(--surface); text-align: start; z-index: 2; min-width: 150px; }
.sched th:first-child { background: var(--surface-2); z-index: 3; }
.sh-cell { font: inherit; width: 100%; min-height: 46px; border: 1px dashed var(--line); background: none; border-radius: 10px; cursor: pointer; color: var(--muted);
  display: grid; place-items: center; line-height: 1.2; transition: background .15s, border-color .15s, transform .15s var(--ease-smooth); }
.sh-cell:hover { border-color: var(--accent); }
.sh-cell:active { transform: scale(.96); }
.sh-cell.on { border-style: solid; border-color: transparent; background: var(--accent-soft); color: var(--ink); font-weight: 500; }
.sh-cell.off { border-style: solid; border-color: transparent; background: var(--surface-2); }
.sh-cell small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.sh-cell.saved { animation: pop .4s var(--ease-spring); }
@keyframes pop { 40% { transform: scale(1.06); } }
.my-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.my-week > div { border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; text-align: center; display: grid; gap: 2px; font-size: 12px; min-width: 0; }
.my-week > div.today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.my-week b { font-size: 13px; }
.my-week .t { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 520px) { .my-week { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Clock countdown (Attendance + My page) ---------- */
.sync-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin: 0 0 16px; }
.sync-ring { --p: 0; width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--accent) calc(var(--p) * 1turn), var(--line) 0); -webkit-mask: radial-gradient(circle 12px, transparent 98%, #000); mask: radial-gradient(circle 12px, transparent 98%, #000);
  transition: --p 1s linear; }
@property --p { syntax: '<number>'; inherits: false; initial-value: 0; }
.sync-bar .sync-txt { display: grid; line-height: 1.3; }
.sync-bar .sync-left { font-variant-numeric: tabular-nums; font-weight: 600; }
.sync-bar.pulling .sync-ring { animation: spin 1s linear infinite; background: conic-gradient(var(--accent) .3turn, var(--line) 0); }
@keyframes spin { to { transform: rotate(1turn); } }

/* ---------- Employee "my page" extras ---------- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 18px; margin: 0; }
.info-grid div { display: grid; gap: 1px; min-width: 0; }
.info-grid dt { font-size: 12px; color: var(--muted); }
.info-grid dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.ro-note { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.req-list .tag { margin-inline-start: 6px; }

/* ---------- Print & export ---------- */
.print-only { display: none; }
.print-head { display: none; }
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  :root, :root[data-theme="dark"] { --bg: #fff; --surface: #fff; --surface-2: #f6f3ee; --ink: #111; --muted: #555; --line: #ddd; --grid: #eee; --accent: #8a4500; color-scheme: light; }
  body { background: #fff !important; font-size: 11pt; }
  .side, .top, .tabbar, .scrim, #buzz, #toasts, .demo-bar, .ro-bar, .toolbar, .actions, .prof-actions, .row-actions, .photo-edit, .no-print,
  .modal-bg, .back-link, .view-toggle, .tabs, .btn, .theme-tog, .lang-tog, .sync-bar, .trial-card { display: none !important; }
  .shell, .main { display: block !important; margin: 0 !important; padding: 0 !important; }
  .view { padding: 0 !important; max-width: none !important; }
  .view > * { animation: none !important; }
  .card, .kpi { box-shadow: none !important; break-inside: avoid; border-color: #ccc; }
  .table-wrap { overflow: visible !important; border: 0; }
  .table { font-size: 9.5pt; } .table th { background: #f2efe9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tag, .pct { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-only { display: block; }
  .print-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #111; padding-bottom: 6px; margin-bottom: 12px; }
  .print-head h1 { font-size: 16pt; } .print-head span { font-size: 9pt; color: #555; }
  canvas { max-width: 100% !important; height: auto !important; }
  a { color: inherit; text-decoration: none; }
  body.printing-sheets > :not(#printSheets) { display: none !important; }
}
/* printed profiles (one or all): an A4 sheet per person */
#printSheets { display: none; }
@media print { body.printing-sheets #printSheets { display: block; } }
.sheet { break-after: page; page-break-after: always; font-size: 10.5pt; color: #111; }
.sheet:last-child { break-after: auto; page-break-after: auto; }
.sheet-head { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 12px; }
.sheet-head img, .sheet-head .ph { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: #eee; display: grid; place-items: center; font-size: 22pt; font-weight: 600; }
.sheet-head h1 { font-size: 17pt; margin: 0; } .sheet-head p { margin: 2px 0 0; color: #444; }
.sheet-co { margin-inline-start: auto; text-align: end; font-size: 9pt; color: #555; }
.sheet h2 { font-size: 11.5pt; margin: 14px 0 6px; border-bottom: 1px solid #ccc; padding-bottom: 3px; }
.sheet dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 14px; margin: 0; }
.sheet dt { font-size: 8.5pt; color: #666; } .sheet dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
.sheet th, .sheet td { border: 1px solid #ccc; padding: 4px 6px; text-align: start; }
.sheet th { background: #f2efe9; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet .sign { display: flex; justify-content: space-between; margin-top: 28px; font-size: 9.5pt; }
.sheet .sign span { border-top: 1px solid #111; padding-top: 4px; min-width: 40%; }

@media (prefers-reduced-motion: reduce) {
  .view > *, #tabPanel > *, .tx-in, .sh-cell.saved { animation: none !important; }
  .lt-knob, .tt-body, .tt-cut, .tt-rays, .theme-tog svg { transition: none !important; }
}

/* ---------- small layout bits ---------- */
.modal footer .foot-extra { margin-inline-end: auto; display: flex; gap: 8px; }
.ops-grid { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); margin-bottom: 16px; }
.ops-grid .people-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ops-grid .people-list li > a { min-width: 0; flex: 1; }
.print-tog { color: var(--muted); }
.print-tog:hover { color: var(--ink); }
@media (max-width: 640px) { .top .print-tog { display: none; } } /* phones print from the browser menu */
@media print {
  .sched-wrap { overflow: visible !important; border: 0; }
  .sched { min-width: 0 !important; font-size: 8pt; }
  .sh-cell { min-height: 0; border: 0 !important; padding: 2px; }
  .sched td:first-child, .sched th:first-child { position: static; min-width: 0; }
  .ann-card.unread::after { display: none; }
}
.sh-cell .sh-end { color: var(--muted); font-size: 12px; }
.sh-cell { gap: 1px; padding: 4px 2px; }
.me-hero { flex-wrap: wrap; }
.me-hero > div:nth-child(2) { flex: 1 1 180px; min-width: 0; }
.sheet-co { white-space: nowrap; }
.ops-grid .row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; flex-shrink: 0; }
.ops-grid .row-actions .btn.ghost.sm { min-width: 0; padding-inline: 10px; }
@media (max-width: 520px) { .req-list .row-actions { flex-direction: column; align-items: stretch; } }

/* =====================================================================
   v12b — sections, bell, quick actions, Today page, quiz, Arabic sizing
   ===================================================================== */
/* menu: one link per section */
#nav .nav-count { margin-inline-start: auto; font-size: 11px; opacity: .55; font-variant-numeric: tabular-nums; }
/* in-page tabs for the current section */
.sec-tabs-wrap:empty { display: none; }
.sec-tabs { display: flex; gap: 4px; padding: 10px 24px 0; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); background: var(--surface); }
.sec-tabs::-webkit-scrollbar { display: none; }
.sec-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px 11px; color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; transition: color .2s, border-color .25s var(--ease-smooth); }
.sec-tabs a:hover { color: var(--ink); }
.sec-tabs a.on { color: var(--ink); border-bottom-color: var(--honey); }
.sec-tabs svg { width: 16px; height: 16px; }
@media (max-width: 900px) { .sec-tabs { padding-inline: 12px; } }

/* bell */
.bell-btn { position: relative; color: var(--muted); }
.bell-btn:hover { color: var(--ink); }
.bell-n { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
@media (prefers-reduced-motion: no-preference) { .bell-btn.ringing svg { animation: bell-ring .8s var(--ease-smooth) 2; transform-origin: 50% 10%; } }
@keyframes bell-ring { 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } 75% { transform: rotate(2deg); } }
.bell-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bell-list a { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; color: var(--ink); text-decoration: none; transition: background .15s; }
.bell-list a:hover { background: var(--surface-2); }
.bell-ico { font-size: 18px; width: 26px; text-align: center; }
.modal-bg.bell-bg { align-items: start; padding-top: calc(60px + var(--sa-t, 0px)); }
@media (min-width: 641px) { .modal-bg.bell-bg { justify-items: end; padding-inline-end: 24px; } .bell-bg .modal { max-width: 380px; } }

/* "+" in the phone tab bar, and the quick-action sheet */
.tab-plus { align-self: center; justify-self: center; width: 52px; height: 52px; margin-top: -18px; border-radius: 50%; border: 0; background: var(--honey-grad); color: var(--honey-ink);
  display: grid; place-items: center; box-shadow: 0 4px 0 #c97c06, 0 8px 22px rgba(245, 158, 11, .35); cursor: pointer; transition: transform .2s var(--ease-spring); }
.tab-plus:active { transform: scale(.92) translateY(2px); }
.qa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.qa { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; cursor: pointer; text-align: start; transition: opacity .3s var(--ease-smooth), transform .3s var(--ease-smooth), border-color .15s; }
.qa:hover { border-color: var(--honey); } .qa:active { transform: scale(.97); }
.qa span { font-size: 24px; } .qa b { font-weight: 600; }
@starting-style { .qa { opacity: 0; transform: translateY(8px); } }

/* one person row everywhere */
.person { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; }
.person .avatar { flex-shrink: 0; }
.person-txt { display: grid; min-width: 0; line-height: 1.25; }
.person-txt strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-txt small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* empty states that guide */
.empty-cta { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 28px 16px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); background: var(--surface); }
.empty-cta p { margin: 0; max-width: 46ch; }
.empty-cta .big { font-size: 34px; }
.card .empty-cta { border: 0; padding: 16px 8px; background: none; }

/* employee: Today card + swipeable tabs */
.today-card { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; background: linear-gradient(135deg, var(--honey-soft), var(--surface) 70%); margin-bottom: 14px; }
.today-main { display: grid; gap: 4px; justify-items: start; }
.today-lbl { font-size: 13px; color: var(--muted); font-weight: 500; }
.today-shift { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.today-next { display: grid; text-align: end; }
.me-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; position: sticky; top: 0; z-index: 4; padding: 8px 0; background: var(--bg); margin-bottom: 8px; }
.me-tabs::-webkit-scrollbar { display: none; }
.me-tabs button { flex: none; font: inherit; font-weight: 500; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; transition: background .2s, color .2s, border-color .2s; min-height: 40px; }
.me-tabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.me-panel > * + * { margin-top: 14px; }
.me-panel.from-r { animation: panel-r .32s var(--ease-smooth); }
.me-panel.from-l { animation: panel-l .32s var(--ease-smooth); }
@keyframes panel-r { from { opacity: 0; transform: translateX(28px); } }
@keyframes panel-l { from { opacity: 0; transform: translateX(-28px); } }
[dir=rtl] .me-panel.from-r { animation-name: panel-l; } [dir=rtl] .me-panel.from-l { animation-name: panel-r; }

/* quiz */
.quiz-form { display: grid; gap: 16px; }
.quiz-q { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.quiz-q legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.quiz-opt { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; min-height: 44px; }
.quiz-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.quiz-opt.right { border-color: var(--good); background: var(--good-bg); }
.quiz-opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.quiz-score { display: flex; gap: 12px; align-items: center; font-size: 20px; }
.q-opt .check { flex-direction: column; align-items: stretch; }
li.good { color: var(--good); font-weight: 600; }

/* Arabic reads best a little bigger and airier */
html[lang=ar] body { font-size: 16px; line-height: 1.7; }
html[lang=ar] .small, html[lang=ar] .muted.small { font-size: 14px; }
html[lang=ar] .tag { font-size: 13px; }
html[lang=ar] h1 { font-size: 26px; }
html[lang=ar] h3 { font-size: 17px; }
html[lang=ar] .kpi span { font-size: 14px; }
html[lang=ar] .table { font-size: 15px; }
html[lang=ar] input, html[lang=ar] select, html[lang=ar] textarea, html[lang=ar] .btn { font-size: 16px; }

/* phones: tab bar always above the page; the "+" keeps its own look; one-row top bar */
@media (max-width: 900px) {
  .tabbar { z-index: 45; isolation: isolate; align-items: stretch; }
  .tabbar .tab-plus { flex: 0 0 56px; width: 56px; height: 56px; min-height: 0; padding: 0; margin: -14px 2px 0; border-radius: 50%; background: var(--honey-grad); color: var(--honey-ink); display: grid; place-items: center; align-self: flex-start; }
}
@media (max-width: 640px) {
  .top { gap: 8px; }
  .top-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; }
  .top .cmdk-btn, .top .print-tog { display: none; }
  .top .company-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38vw; display: inline-block; }
}
.bell-btn { color: var(--ink); }
.bell-btn svg { position: relative; z-index: 0; }

/* ---------- sidebar dropdown sections ---------- */
.nav-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--side-muted); font: inherit; font-weight: 500; cursor: pointer; text-align: start; position: relative; transition: background .15s, color .15s; }
.nav-head:hover { background: var(--side-2); color: var(--side-ink); }
.nav-head.active { color: #fff; }
.nav-head.active > svg:first-child { color: var(--honey); }
.nav-head:focus-visible { outline: 2px solid var(--honey); outline-offset: 2px; }
.nav-chev { margin-inline-start: auto; opacity: .7; transition: transform .3s var(--ease-smooth); }
.nav-sec.open .nav-chev { transform: rotate(180deg); }
.nav-drop { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s var(--ease-smooth); }
.nav-sec.open .nav-drop { grid-template-rows: 1fr; }
.nav-drop-in { overflow: hidden; min-height: 0; display: grid; gap: 2px; padding-inline-start: 14px; margin-inline-start: 18px; border-inline-start: 1px solid rgba(255, 255, 255, .12); }
.nav-sec.open .nav-drop-in { padding-block: 2px 6px; }
.nav-drop a { opacity: 0; transform: translateY(-4px); transition: opacity .25s var(--ease-smooth), transform .25s var(--ease-smooth), background .15s, color .15s; font-size: 14px; padding-block: 7px !important; }
.nav-sec.open .nav-drop a { opacity: 1; transform: none; }
.nav-sec.open .nav-drop a:nth-child(2) { transition-delay: .03s; } .nav-sec.open .nav-drop a:nth-child(3) { transition-delay: .06s; }
.nav-sec.open .nav-drop a:nth-child(4) { transition-delay: .09s; } .nav-sec.open .nav-drop a:nth-child(5) { transition-delay: .12s; }
.nav-drop a svg { width: 16px; height: 16px; }
#nav .nav-drop a.active::before { inset-inline-start: -15px; }
@media (max-width: 900px) { .nav-head { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .nav-drop, .nav-drop a, .nav-chev { transition: none !important; } }

/* top bar buttons in one row on every screen size */
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }

/* ---------- account button (top bar) ---------- */
.acct { position: relative; }
.acct-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 2px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer; overflow: hidden; transition: border-color .2s, transform .15s var(--ease-smooth); }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { border-color: var(--honey); }
.acct-btn:active { transform: scale(.94); }
.acct-btn .avatar { width: 34px !important; height: 34px !important; font-size: 13px !important; }
.acct-menu { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 60; width: 270px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.18); padding: 8px;
  opacity: 0; transform: translateY(-6px) scale(.97); transform-origin: top right; transition: opacity .18s var(--ease-smooth), transform .22s var(--ease-smooth); }
[dir=rtl] .acct-menu { transform-origin: top left; }
.acct-menu.open { opacity: 1; transform: none; }
.acct-head { display: flex; gap: 12px; align-items: center; padding: 8px 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.acct-head > div { display: grid; min-width: 0; line-height: 1.3; }
.acct-head strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-head span, .acct-head small { color: var(--muted); font-size: 13px; }
.acct-item { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; min-height: 44px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; text-align: start; cursor: pointer; text-decoration: none; transition: background .15s; }
.acct-item:hover, .acct-item:focus-visible { background: var(--surface-2); outline: none; }
.acct-item.danger { color: var(--bad); }
@media (prefers-reduced-motion: reduce) { .acct-menu { transition: none; } }

/* ---------- v13: "لا ينطبق" on the rate page ---------- */
.na-btn { font: inherit; font-size: 13px; border: 1px dashed var(--line); background: none; color: var(--muted); border-radius: 10px; padding: 7px 10px; min-height: 36px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.na-btn:hover { border-color: var(--muted); color: var(--ink); }
.na-btn.on { background: var(--ink); border-style: solid; border-color: var(--ink); color: var(--surface); font-weight: 600; }
.rate-item.is-na { border-color: var(--line); border-style: dashed; background: var(--surface-2); }
.rate-item.is-na > :first-child { opacity: .55; text-decoration: line-through; text-decoration-color: var(--muted); }
.rate-item.is-na .seg, .rate-item.is-na [data-num] { opacity: .45; }
.table .na-row td { color: var(--muted); font-style: italic; }
@media (max-width: 640px) { .na-btn { min-height: 44px; } }

/* ---------- v13: dashboard insights ---------- */
.perf-head { margin: 22px 0 10px; } .perf-head .sec-title { margin: 0; }
.ins-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 14px; }
.ins-card { display: flex; flex-direction: column; gap: 6px; }
.ins-k { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.ins-big { font-size: 34px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.delta { font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--muted); }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); }
.eom { background: linear-gradient(135deg, var(--honey-soft), var(--surface) 70%); border-color: var(--honey); }
.eom-who { display: flex; align-items: center; gap: 12px; } .eom-who > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.eom-who strong { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ins-lists { margin-bottom: 18px; }
.ins-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ins-list li { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 10px; }
.ins-list li.clickable:hover { background: var(--surface-2); cursor: pointer; }
.ins-list .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ins-list .grow strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-list.cp .grow { flex-direction: row; } .ins-list.cp .meter { width: 70px; flex: none; }
.ins-lists h4 { margin: 8px 0 2px; color: var(--muted); font-weight: 600; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: middle; }
#brTable { margin-top: 10px; }
.logo-pick { display: flex; align-items: center; gap: 12px; margin: 6px 0 12px; }
.logo-prev { width: 84px; height: 84px; border: 1px dashed var(--line); border-radius: 14px; display: grid; place-items: center; overflow: hidden; background: var(--surface-2); text-align: center; padding: 4px; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- v13: certificate (printed A4 landscape) ---------- */
.sheet.cert { height: 188mm; display: flex; color: #1b1b1b; }
.cert-frame { flex: 1; border: 3px double #b8892b; outline: 1px solid #b8892b; outline-offset: -9px; border-radius: 6px; padding: 14mm 18mm 12mm; display: flex; flex-direction: column; align-items: center; text-align: center;
  background: radial-gradient(circle at 50% 0, #fdf6e3, #fff 60%); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cert-top { display: flex; align-items: center; gap: 10px; } .cert-logo { max-height: 26mm; max-width: 60mm; object-fit: contain; }
.cert-co { font-size: 13pt; font-weight: 600; color: #444; }
.cert-kicker { margin: 7mm 0 0; letter-spacing: .25em; text-transform: uppercase; font-size: 10.5pt; color: #b8892b; font-weight: 600; }
.cert h1 { font-size: 30pt; margin: 2mm 0 6mm; }
.cert-to { margin: 0; color: #555; font-size: 12pt; }
.sheet .cert-name { font-size: 34pt; margin: 3mm 0 1mm; border: 0; padding: 0 12mm 2mm; border-bottom: 1.5px solid #b8892b; }
.cert-role { margin: 0; color: #555; }
.cert-why { margin: 7mm auto 0; max-width: 190mm; font-size: 13pt; line-height: 1.6; }
.cert-sign { margin-top: auto; width: 100%; display: flex; justify-content: space-between; gap: 30mm; }
.cert-sign span { flex: 1; font-size: 9.5pt; color: #555; display: flex; flex-direction: column; }
.cert-sign b { font-size: 11pt; color: #1b1b1b; min-height: 1.4em; border-bottom: 1px solid #333; padding-bottom: 1mm; margin-bottom: 1.5mm; }


/* ---------- v14: phone menu, dashboard layout and polish ---------- */
/* The closed phone menu used to sit just off-screen. In Arabic it showed up inside the theme/language
   switch animation (the page jumped sideways) and its links were still reachable with Tab. */
@media (max-width: 760px) {
  .side { visibility: hidden; transition: transform .2s ease-out, visibility 0s linear .2s; }
  .side.open { visibility: visible; transition: transform .2s ease-out, visibility 0s; }
  .shell { overflow-x: clip; }
}

/* insight lists: 2 × 2 on wide screens so no card is left alone on a row */
.hr-grid.ins-lists { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
@media (min-width: 1100px) { .hr-grid.ins-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ins-lists .card-head { flex-direction: column; align-items: flex-start; gap: 2px; }
.ins-lists .card-head h3 { text-wrap: balance; }
.ins-card .ins-k, .sec-title, .card-head h3 { text-wrap: balance; }
.ins-card .muted.small, .ins-list .muted.small { text-wrap: pretty; }

/* rows line up from one person to the next: name | before → after | change */
.ins-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; align-items: center; column-gap: 10px; }
.ins-list li > .small[dir=ltr] { min-width: 9.5em; text-align: end; }
.ins-list .delta { min-width: 6.4em; text-align: end; }
.ins-list li > .btn { justify-self: end; }
.ins-list.cp li { grid-template-columns: minmax(0, 1fr) 72px 4.2em; }
.ins-list.cp .pct { text-align: end; }
.ins-big, .delta, .ins-list, .kpi strong, .pct, #brTable td { font-variant-numeric: tabular-nums; }

/* employee of the month: buttons fill their row instead of one dangling alone */
.ins-acts .btn { flex: 1 1 auto; justify-content: center; }
.eom-who .pct { font-size: 18px; font-weight: 700; }
.ins-card .meter { margin-top: auto; }

/* gentle entrance for the insight cards, once, 60ms apart */
@media (prefers-reduced-motion: no-preference) {
  .ins-grid > .card, .ins-lists > .card { animation: insIn .32s cubic-bezier(.2, .8, .3, 1) both; }
  .ins-grid > .card:nth-child(2), .ins-lists > .card:nth-child(2) { animation-delay: 60ms; }
  .ins-grid > .card:nth-child(3), .ins-lists > .card:nth-child(3) { animation-delay: 120ms; }
  .ins-lists > .card:nth-child(4) { animation-delay: 180ms; }
}
@keyframes insIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* small icon buttons get a 40px tap area without changing how they look */
.icon-btn { position: relative; }
.icon-btn::after { content: ''; position: absolute; inset: -4px; }
/* a chart redrawn mid-switch can't stretch its column any more */
.chart-grid > .card, .chart-box { min-width: 0; }
.chart-box canvas { max-width: 100%; }
/* phones: the before → after numbers go under the name, the change stays on the side */
@media (max-width: 600px) {
  .ins-list:not(.cp) li { grid-template-columns: 28px minmax(0, 1fr) auto; row-gap: 2px; }
  .ins-list:not(.cp) li > .avatar, .ins-list:not(.cp) li > img { grid-row: 1 / span 2; }
  .ins-list:not(.cp) li > .small, .ins-list:not(.cp) li > .muted { grid-column: 2; grid-row: 2; min-width: 0; text-align: start; justify-self: start; }
  .ins-list:not(.cp) li > .delta, .ins-list:not(.cp) li > .btn { grid-column: 3; grid-row: 1 / span 2; }
  .ins-list.cp li { grid-template-columns: minmax(0, 1fr) 56px 4em; }
}

/* ---------- v15: employee of the month per branch, tests, activity, notifications ---------- */
.eom-list { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 6px; }
.eom-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "br acts" "who acts"; align-items: center; column-gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.eom-list li:last-child { border-bottom: 0; }
.eom-list .eom-br { grid-area: br; font-size: 12px; color: var(--muted); font-weight: 600; }
.eom-list .eom-who, .eom-list > li > .muted { grid-area: who; display: flex; align-items: center; gap: 8px; min-width: 0; }
.eom-list .eom-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eom-list .eom-acts { grid-area: acts; display: flex; gap: 4px; }
.eom-hist { margin: 4px 0 2px; } .eom-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 13px; }
.cert-note { margin: 3mm auto 0; max-width: 170mm; font-style: italic; color: #444; font-size: 12pt; }
.round-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.round-card > div { display: flex; flex-direction: column; gap: 2px; }
.mb-set { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 4px 0 10px; display: grid; gap: 4px; }
.mb-set legend { font-weight: 600; padding: 0 4px; }
.act-list { list-style: none; margin: 0; padding: 0; }
.act-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.act-list li:last-child { border-bottom: 0; }
.act-ic { font-size: 18px; line-height: 1.4; text-align: center; }
.act-when { text-align: end; white-space: nowrap; }
.ann-history { margin-top: 18px; } .ann-history summary { cursor: pointer; color: var(--muted); font-weight: 600; padding: 8px 0; }
.ann-history .ann-card { opacity: .75; }
.push-state { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.push-state.on { background: var(--good-bg); } .push-state.denied, .push-state.unsupported { background: var(--bad-bg); }
@media (max-width: 600px) { .act-list li { grid-template-columns: 24px minmax(0, 1fr); } .act-when { grid-column: 2; text-align: start; } }

/* phones: the profile button (sign out, notifications) must always fit — the company name gives way first */
@media (max-width: 640px) {
  .top { padding-inline: calc(14px + var(--sa-l)) calc(14px + var(--sa-r)); }
  .top .company-name { flex: 1 1 auto; min-width: 0; overflow: hidden; }
  .top .company-name span { display: block; max-width: none; min-width: 0; }
  .top-actions, .top .acct, .top #menuBtn { flex: none; }
}
@media (max-width: 360px) { .top { gap: 6px; } .top-actions { gap: 4px; } .top .toggles { gap: 4px; } }

/* ---------- v16: presentation pack ---------- */
.duo-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); margin-bottom: 14px; }
.attn-card { border-color: var(--honey); margin-bottom: 14px; }
.attn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.attn-list li { display: flex; gap: 10px; align-items: baseline; } .attn-list a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.bday-card { margin-bottom: 14px; }
.now-branches { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.now-branches li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .now-branches strong { flex: 1; min-width: 0; }
.flash { animation: flashRing 1.6s ease-out; border-radius: 16px; }
@keyframes flashRing { 0% { box-shadow: 0 0 0 0 var(--honey); } 30% { box-shadow: 0 0 0 6px var(--honey); } 100% { box-shadow: 0 0 0 0 transparent; } }
/* map */
.map-box { height: min(68vh, 620px); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.place-bar { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 10px; }
.map-pin-wrap { background: none; border: 0; }
.map-pin { transform: translate(-50%, -100%); display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: #10302f; color: #fff; font: 600 12px/1 var(--font); white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.35); border: 2px solid #fff; }
.map-pin b { display: grid; place-items: center; min-width: 26px; height: 26px; border-radius: 50%; background: #1baf7a; font-size: 13px; }
.map-pin.has-late b { background: #eb6834; }
.map-pop { display: grid; gap: 2px; margin-top: 6px; font-size: 13px; } .map-pop b { margin-top: 6px; }
/* my month */
.my-month { margin-bottom: 14px; display: grid; gap: 8px; } .my-eom { margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--honey-soft); font-weight: 600; }
.mm-hours strong { font-size: 28px; font-variant-numeric: tabular-nums; } .mm-kpis { margin: 4px 0 0; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.badge-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; }
/* highlights + compare + labour */
.hl-title { margin: 0 0 12px; text-wrap: balance; }
.hl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.hl-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 16px; background: linear-gradient(160deg, var(--honey-soft), var(--surface) 70%); border: 1px solid var(--line); }
.hl-ic { font-size: 26px; } .hl-k { color: var(--muted); font-size: 12.5px; font-weight: 600; } .hl-card strong { font-size: 22px; line-height: 1.2; } .hl-sub { color: var(--muted); font-size: 12.5px; }
.cmp-table td.win { color: var(--good); font-weight: 700; } .cmp-table { margin-top: 12px; }
.labour-card { margin-bottom: 14px; } .labour-bars { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.labour-bars li { display: grid; grid-template-columns: minmax(80px, 1fr) 2fr auto auto; gap: 10px; align-items: center; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .labour-bars li { grid-template-columns: 1fr auto; } .labour-bars .meter { grid-column: 1 / -1; } }
.report-sheet h2 { margin-top: 12px; } .hl-sheet .hl-card { break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
/* TV screen */
.tv { position: fixed; inset: 0; z-index: 2000; background: #0d1f1e; color: #fff; display: grid; grid-template-rows: auto 1fr auto; padding: 2.4vw 3vw; font-size: clamp(16px, 1.6vw, 30px); }
.tv-top { display: flex; align-items: center; gap: 2vw; font-size: 1.2em; } .tv-top span { margin-inline-start: auto; font-variant-numeric: tabular-nums; opacity: .8; }
.tv-x { background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 50%; width: 2em; height: 2em; font-size: 1em; cursor: pointer; }
.tv-stage { display: grid; align-items: center; overflow: hidden; } .tv-slide { animation: tvIn .6s ease-out both; }
@keyframes tvIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.tv h2 { font-size: 2.2em; margin: 0 0 .8em; color: #ffb627; }
.tv-league { list-style: none; margin: 0; padding: 0; display: grid; gap: .5em; }
.tv-league li { display: grid; grid-template-columns: 2em 1fr auto auto; gap: 1em; align-items: center; padding: .5em .8em; border-radius: .6em; background: rgba(255,255,255,.06); font-size: 1.3em; }
.tv-rank { font-weight: 800; color: #ffb627; } .tv-val { font-weight: 800; font-variant-numeric: tabular-nums; } .tv-sub { opacity: .7; font-size: .7em; }
.tv-now, .tv-eom, .tv-anns { display: grid; grid-template-columns: repeat(auto-fit, minmax(14em, 1fr)); gap: 1em; }
.tv-now div, .tv-eom div, .tv-anns div { padding: 1em; border-radius: .8em; background: rgba(255,255,255,.06); display: grid; gap: .3em; justify-items: center; text-align: center; }
.tv-now b { font-size: 3.4em; color: #1baf7a; line-height: 1; } .tv-now small { color: #eb6834; }
.tv-eom strong { font-size: 1.4em; } .tv-anns div { justify-items: start; text-align: start; } .tv-anns p { margin: 0; opacity: .85; }
.tv-hl .hl-card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #fff; } .tv-hl .hl-k, .tv-hl .hl-sub { color: rgba(255,255,255,.7); }
.tv-dots { display: flex; justify-content: center; gap: .5em; } .tv-dots span { width: .5em; height: .5em; border-radius: 50%; background: rgba(255,255,255,.25); } .tv-dots span.on { background: #ffb627; }
@media (prefers-reduced-motion: reduce) { .tv-slide { animation: none; } }
/* guided tour */
.tour { position: fixed; inset: 0; z-index: 1500; }
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(0,0,0,.6); transition: all .3s ease; pointer-events: none; }
.tour-dim { position: fixed; inset: 0; background: rgba(0,0,0,.6); }
.tour-tip { position: fixed; width: min(320px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 8px; }
.tour-tip p { margin: 0; line-height: 1.5; } .tour-acts { display: flex; justify-content: space-between; gap: 8px; }

/* ---------- v17: settings, inbox, interviews, half points ---------- */
.set-grid { display: grid; gap: 14px; }
.set-card { display: grid; gap: 10px; } .set-card .card-head { margin: 0; } .set-save { display: flex; justify-content: flex-end; }
.set-sw { display: flex; align-items: center; gap: 8px; } .chips { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.set-table input { min-width: 80px; } .grid3 { display: grid; grid-template-columns: 1fr 1.4fr auto auto; gap: 8px; align-items: center; margin-bottom: 6px; }
@media (max-width: 600px) { .grid3 { grid-template-columns: 1fr 1fr; } }
.ib-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ib-list li { display: grid; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); transition: opacity .25s; } .ib-list li:last-child { border-bottom: 0; }
.ib-who { display: flex; gap: 10px; align-items: flex-start; } .ib-amt { font-weight: 800; font-variant-numeric: tabular-nums; margin-inline-start: 6px; }
.ib-act { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .ib-act input { flex: 1 1 160px; } .ib-act select { width: auto; }
#ibLeave { margin-top: 14px; }
.adv-pick { max-height: 52vh; overflow: auto; } .adv-pick input { min-width: 70px; } .adv-q { margin-bottom: 8px; }
.mm-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.half-btn { font: inherit; font-size: 13px; border: 1px dashed var(--line); background: none; color: var(--muted); border-radius: 10px; padding: 7px 10px; min-height: 36px; cursor: pointer; }
.half-btn.on { background: var(--accent); color: var(--accent-ink); border-style: solid; border-color: var(--accent); font-weight: 700; }
.no-eom-pick [data-eom=pick] { display: none; }
.iv-form { display: grid; gap: 10px; } .iv-sec { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 14px 0 2px; padding: 10px 14px; border-radius: 12px; background: #111; color: #fff; font-size: 16px; }
.iv-sec span { color: #f2e200; font-weight: 800; } .iv-sec small { color: #bbb; font-size: 12px; font-weight: 400; width: 100%; }
.iv-q { display: grid; gap: 6px; padding: 8px 0; border-bottom: 1px dashed var(--line); } .iv-q p { margin: 0; } .iv-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #f2e200; color: #111; font-size: 12px; margin-inline-end: 4px; }
.iv-exp { background: var(--honey-soft); border-inline-start: 3px solid #f2e200; padding: 6px 10px; border-radius: 6px; font-size: 13px; }
.iv-marks, .iv-yn { display: flex; gap: 6px 16px; flex-wrap: wrap; align-items: center; } .iv-yn > span { flex: 1 1 220px; font-weight: 600; } .iv-label { margin: 6px 0 0; font-weight: 600; }
.iv-score td, .iv-score th { text-align: center; } .iv-score td:first-child { text-align: start; } .iv-total { font-size: 16px; }
.iv-crit { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 6px; } .iv-crit div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }
.iv-sheet .iv-pq { break-inside: avoid; margin-bottom: 6px; } .iv-sheet .iv-pq p { margin: 2px 0; } .iv-sheet .iv-exp { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
/* interview page: big tap targets, score stays visible */
.iv-page { max-width: 900px; margin: 0 auto; }
.iv-sticky { position: sticky; top: 64px; z-index: 6; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 16px; }
.iv-sticky b { font-size: 22px; font-variant-numeric: tabular-nums; }
.pill { position: relative; display: inline-flex; } .pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span { display: inline-grid; place-items: center; min-height: 44px; min-width: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface-2); font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.pill input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pill.num span { padding: 0; }
.iv-crow { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px dashed var(--line); } .iv-crow > span { font-weight: 600; flex: 1 1 180px; }
.iv-save { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 12px 0; background: var(--surface); }
@media (max-width: 760px) { .iv-sticky { top: 0; } .iv-save { bottom: 70px; } }

/* =====================================================================
   v18 — sidebar scroll + icon-only mode, bulk select, pull to refresh, offline badge,
   text size, payroll report / envelopes, warnings, suggestions, exit checklist
   ===================================================================== */
/* the sidebar scrolls on its own when the menu is longer than the screen */
.side { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; max-height: 100vh; max-height: 100dvh; }
.side::-webkit-scrollbar { width: 6px; } .side::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .22); border-radius: 6px; }
.side-mini-btn { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; background: none; border: 0; color: var(--side-muted, rgba(255,255,255,.7)); font: inherit; cursor: pointer; }
.side-mini-btn:hover { background: var(--side-2); color: #fff; }
[dir=rtl] .side-mini-btn svg { transform: scaleX(-1); }
@media (max-width: 760px) { .side-mini-btn { display: none; } }
@media (min-width: 761px) {
  .nav-mini .side { width: 68px; padding-inline: 8px; }
  .nav-mini .side .wordmark, .nav-mini #nav a > span, .nav-mini .nav-head, .nav-mini .nav-key, .nav-mini .side-mini-btn span, .nav-mini .side .toggles { display: none; }
  .nav-mini #nav a { justify-content: center; padding-inline: 0; }
  .nav-mini .nav-drop { grid-template-rows: 1fr; }
  .nav-mini .nav-drop-in { padding: 0 !important; margin: 0; border: 0; }
  .nav-mini .nav-drop a { opacity: 1; transform: none; }
  .nav-mini .nav-sec { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 4px; margin-top: 4px; }
  .nav-mini #nav a.active::before { inset-inline-start: -8px; }
  .nav-mini .side-mini-btn { justify-content: center; }
  .nav-mini .side-mini-btn svg { transform: scaleX(-1); }
  [dir=rtl] .nav-mini .side-mini-btn svg { transform: none; }
}

/* text size (account menu) */
html[data-text=lg] body { zoom: 1.12; }
html[data-text=xl] body { zoom: 1.25; }

/* offline badge */
.off-badge { display: none; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); white-space: nowrap; }
html.offline .off-badge { display: inline-flex; }
@media (max-width: 520px) { html.offline .off-badge { position: fixed; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); inset-inline: 16px; justify-content: center; z-index: 60; box-shadow: var(--shadow); } }

/* pull to refresh */
.ptr { position: fixed; top: calc(8px + env(safe-area-inset-top, 0px)); left: 50%; z-index: 90; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--accent); box-shadow: var(--shadow); font-size: 20px; font-weight: 700; opacity: var(--p, 0);
  transform: translate(-50%, var(--y, 0)) rotate(calc(var(--p, 0) * 300deg)); pointer-events: none; }
.ptr.ready { background: var(--accent); color: var(--accent-ink, #1f1a14); }
.ptr.spin { animation: ptr-spin .7s linear infinite; opacity: 1; }
.ptr.out { opacity: 0; transition: opacity .2s; }
@keyframes ptr-spin { to { transform: translate(-50%, var(--y, 0)) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ptr.spin { animation: none; } }

/* bulk select on Employees */
.bulk-on a.emp-card, .bulk-on tr[data-href] { cursor: pointer; }
.bulk-on a.emp-card { outline: 2px dashed transparent; outline-offset: 2px; }
a.emp-card.picked, tr[data-href].picked { outline: 2px solid var(--accent) !important; background: var(--accent-soft); }
.bulk-bar { position: fixed; z-index: 70; inset-inline: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center;
  padding: 10px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 760px; margin-inline: auto; }
@media (max-width: 760px) { .bulk-bar { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); } }
.bulk-bar strong { margin-inline-end: auto; }
.bulk-bar[hidden] { display: none; }
/* the full interview inside its window (same markup as the printout, in screen colours) */
.iv-full { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 4px; }
.iv-full .sheet { color: inherit; font-size: 15px; } .iv-full .sheet-head { border-color: var(--line); } .iv-full .sheet h2 { border-color: var(--line); font-size: 16px; margin-top: 18px; }
.iv-full .sheet dt, .iv-full .sheet-head p, .iv-full .sheet-co { color: var(--muted); } .iv-full .sheet th, .iv-full .sheet td { border-color: var(--line); }
.iv-full .sheet-head h1 { font-size: 18px; } .iv-full .sign { display: none; } .iv-full .iv-pq { padding: 6px 0; border-bottom: 1px dashed var(--line); }
@media (max-width: 600px) { .iv-full .sheet dl { grid-template-columns: 1fr 1fr; } }

/* warnings, history, my money, suggestions */
.warn-flag { margin-inline-start: 6px; white-space: nowrap; }
.prof-hero .warn-flag { display: inline-block; margin: 6px 0 0; }
.warn-list li { align-items: flex-start; }
.me-extra { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.sug-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sug-list li p { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sug-list li.unseen { border-inline-start: 4px solid var(--accent); }
.sug-list .muted { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sug-list .muted .btn { margin-inline-start: auto; }
.lv-left { margin: 4px 0; font-size: 14px; } .lv-left.good { color: var(--good, #2f7d4f); } .lv-left.bad { color: var(--bad, #c0392b); }
label.check { display: flex; align-items: center; gap: 8px; }

/* exit checklist */
.exit-card { display: grid; gap: 10px; }
.exit-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.exit-item input { width: 22px; height: 22px; margin-top: 2px; flex-shrink: 0; }
.exit-item span { display: grid; gap: 2px; }
.exit-item:has(input:checked) { background: var(--accent-soft); border-color: transparent; }

/* dashboard: what changed today */
.chg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chg-chips .chip { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--surface-2, rgba(0,0,0,.04)); font-size: 14px; }
.chg-card details { margin-top: 10px; } .chg-card summary { cursor: pointer; color: var(--muted); font-size: 14px; }

/* payroll tools */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px; }
.tool-btn { display: grid; gap: 4px; text-align: start; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; min-height: 44px; }
.tool-btn:hover:not([disabled]) { border-color: var(--accent); background: var(--accent-soft); }
.tool-btn[disabled] { opacity: .55; cursor: not-allowed; }
.tool-btn small { color: var(--muted); }
.col-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.sheet.pay-report table.pr-table { font-size: 8pt; }
.sheet.pay-report .pr-table th, .sheet.pay-report .pr-table td { padding: 3px 4px; }
.sheet.pay-report .pr-table td.sig { min-width: 90px; }
.sheet.pay-report .pr-table tr.tot td { border-top: 2px solid #111; }
.env-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.envelope { border: 1.5px dashed #555; border-radius: 10px; padding: 10px 12px; break-inside: avoid; display: grid; gap: 6px; }
.env-top { display: flex; justify-content: space-between; font-size: 11pt; }
.env-amt { font-size: 20pt; font-weight: 700; }
.env-sign { display: grid; gap: 10px; margin-top: 8px; font-size: 9pt; }

/* =====================================================================
   v19 — leave summary, year view, people overview, waitlist, notification banner,
   call / copy actions, Today buttons, bigger date pickers, print preview, interview on phones
   ===================================================================== */
.leave-sum { margin: 12px 0; }
.leave-sum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 10px; }
.leave-sum-grid > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2, rgba(0,0,0,.04)); }
.leave-sum-grid span { font-size: 13px; color: var(--muted); } .leave-sum-grid strong { font-size: 20px; font-variant-numeric: tabular-nums; }

/* year view */
.year-cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.yc-month b { display: block; font-size: 13px; margin-bottom: 4px; }
.yc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.yc-day { aspect-ratio: 1; border-radius: 3px; background: var(--surface-2, rgba(0,0,0,.06)); }
.yc-work { background: #2f9e6e; } .yc-sick { background: #e0a100; } .yc-leave { background: #3a86d4; } .yc-unpaid { background: #8a7f9c; } .yc-absent { background: #d64545; } .yc-future { opacity: .35; }
.yc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.sum-table td:first-child { white-space: nowrap; }

/* people overview: sortable headers */
.ov-table th.sortable button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; font-weight: 600; }
.ov-table th.sortable button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.ov-table th.asc button::after { content: '▲'; font-size: 9px; } .ov-table th.desc button::after { content: '▼'; font-size: 9px; }
.ov-table td.num, .ov-table th.num { white-space: nowrap; }

/* interviews: waitlist */
.wait-card h4 { margin: 12px 0 6px; font-size: 14px; color: var(--muted); }
.wait-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wait-list li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.wait-open { all: unset; cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1 1 220px; min-height: 44px; }
.wait-open small { flex-basis: 100%; }

/* notifications */
.push-banner { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 10px 16px 0; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); border: 1px solid var(--accent); }
.push-banner .pb-acts { display: flex; gap: 8px; }
.push-stat .meter { margin: 6px 0 10px; }
.push-stat details summary { cursor: pointer; color: var(--muted); }

/* phone / ID / IBAN actions */
.ph-acts { display: inline-flex; gap: 2px; margin-inline-start: 6px; vertical-align: middle; }
.ph-acts a, .ph-acts button { display: inline-grid; place-items: center; min-width: 32px; min-height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: inherit; text-decoration: none; font-size: 14px; cursor: pointer; padding: 0 4px; }
.ph-acts a:hover, .ph-acts button:hover { border-color: var(--accent); }
@media print { .ph-acts, .copy-in, .today-btn { display: none !important; } }
label:has(> .copy-in) { position: relative; }
.copy-in { position: absolute; inset-inline-end: 6px; bottom: 6px; min-width: 32px; min-height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: inherit; cursor: pointer; }
label:has(> .copy-in) > input { padding-inline-end: 44px; }

/* Today buttons + bigger date / time pickers */
.date-wrap { display: flex; gap: 6px; align-items: stretch; min-width: 0; }
.date-wrap > input { flex: 1 1 auto; min-width: 0; }
.today-btn { flex: none; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; min-height: 44px; }
.today-btn:hover { border-color: var(--accent); }
input[type=date], input[type=time], input[type=month], input[type=datetime-local] { min-height: 48px; font-size: 16px; padding-block: 8px; }
input[type=date]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator, input[type=month]::-webkit-calendar-picker-indicator { width: 22px; height: 22px; padding: 4px; cursor: pointer; }
.toolbar .date-wrap > input { min-height: 40px; } .toolbar .today-btn { min-height: 40px; }

/* print preview */
.print-prev { position: fixed; inset: 0; z-index: 120; background: rgba(20, 18, 14, .78); display: flex; flex-direction: column; }
.pp-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.pp-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.pp-pages { flex: 1; overflow: auto; padding: 20px 16px 40px; display: grid; justify-items: center; gap: 18px; }
.pp-pages .sheet { width: min(210mm, 100%); min-height: 120px; background: #fff; color: #111; padding: 14mm 12mm; box-shadow: 0 6px 24px rgba(0,0,0,.35); border-radius: 4px; box-sizing: border-box; overflow-x: auto; }
.pp-pages .sheet.pay-report { width: min(297mm, 100%); }
.pp-pages > style { display: none; }
@media print { .print-prev { display: none !important; } }
@media (max-width: 600px) { .pp-pages .sheet { padding: 16px 12px; font-size: 13px; } }

/* interview window on phones: full screen, one column, buttons that fit */
@media (max-width: 600px) {
  .modal-bg:has(.iv-full) { padding: 0; align-items: stretch; }
  .modal-bg:has(.iv-full) .modal { width: 100%; max-width: none; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .iv-view .iv-crit { grid-template-columns: 1fr; }
  .iv-full .sheet-head { display: none; }
  .iv-full .sheet dl { grid-template-columns: 1fr !important; }
  .iv-full .sheet table { font-size: 14px; }
  .modal-bg:has(.iv-full) footer { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .modal-bg:has(.iv-full) footer .foot-extra { display: contents; }
  .modal-bg:has(.iv-full) footer .btn { width: 100%; min-height: 44px; justify-content: center; padding-inline: 8px; }
  .modal-bg:has(.iv-full) footer [data-v=hire] { grid-column: 1 / -1; order: -1; }
}

.iv-wait-note { padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent); }

/* ===== v20: support access, help & support ===== */
.sup-card { grid-column: 1 / -1; }
.sup-opts { display: grid; gap: 8px; margin: 10px 0; }
.sup-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.sup-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.sup-opt input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.sup-opt span { display: grid; gap: 2px; }
.sup-opt small { color: var(--muted); }
.sup-acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.sup-log-h { margin: 16px 0 6px; font-size: 14px; }
.sup-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 320px; overflow-y: auto; }
.sup-log li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: baseline; padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.sup-log li.muted { display: block; border: 0; }
.sup-lock { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 14px; }
/* public Privacy and Help pages */
.pub-page { max-width: 820px; margin: 0 auto; padding: 28px calc(16px + var(--sa-r, 0px)) 24px calc(16px + var(--sa-l, 0px)); line-height: 1.7; }
.pub-page h1 { font-size: clamp(26px, 5vw, 36px); margin: 0 0 6px; }
.policy-lead { font-size: 17px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); border: 1px solid var(--accent); margin: 16px 0; }
.policy-toc { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; background: var(--surface); margin: 0 0 8px; }
.policy-toc ol { margin: 0; padding-inline-start: 22px; columns: 2 240px; }
.policy-toc a { color: inherit; }
.policy section { padding-top: 10px; scroll-margin-top: 80px; }
.policy h2, .help-page h2 { font-size: 20px; margin: 18px 0 6px; }
.policy ul { padding-inline-start: 22px; margin: 6px 0; }
.policy li { margin: 4px 0; }
.help-contacts { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 4px; }
.help-contacts .btn { min-height: 44px; }
.help-card { margin: 16px 0; }
.help-hours { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.help-hours .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); display: inline-block; }
.help-hours .dot.on { background: #2e9d5b; box-shadow: 0 0 0 4px rgba(46, 157, 91, .18); }
.help-faq .faq { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin: 8px 0; }
.help-faq .faq summary { cursor: pointer; padding: 12px 14px; font-weight: 600; list-style-position: inside; }
.help-faq .faq p { margin: 0; padding: 0 14px 14px; color: var(--muted); }
.privacy-note a { color: inherit; text-decoration: underline; }
/* tickets and support inbox */
.tk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tk-row { width: 100%; display: flex; gap: 10px; align-items: center; text-align: start; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; min-height: 52px; }
.tk-row:hover, .tk-row:focus-visible { border-color: var(--accent); }
.tk-id { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; flex: none; }
.tk-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tk-t strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.tk-thread { display: grid; gap: 8px; max-height: 48vh; overflow-y: auto; padding: 4px 2px 8px; }
.tk-msg { max-width: 88%; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.tk-msg p { margin: 4px 0 0; white-space: pre-wrap; }
.tk-msg.sup { justify-self: end; background: var(--accent-soft); border-color: var(--accent); }
.tk-who { font-size: 12px; color: var(--muted); }
.tk-shot { max-width: 100%; max-height: 220px; border-radius: 10px; margin-top: 8px; display: block; }
.tk-ctx dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 13px; margin: 8px 0; }
.tk-fb { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.tk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0 0 14px; }
.tk-stats .stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 2px; }
.tk-stats .stat b { font-size: 24px; font-variant-numeric: tabular-nums; }
.tk-stats .stat span { color: var(--muted); font-size: 13px; }
.tk-stats .stat.bad { border-color: #c0392b; }
.tk-stats .stat.wide { grid-column: span 2; }
@media (max-width: 560px) { .tk-stats .stat.wide { grid-column: 1 / -1; } }
.site-set summary { cursor: pointer; list-style: none; }
.site-set summary h3 { display: inline; }
.site-set h4 { margin: 18px 0 6px; font-size: 14px; }
.faq-ed { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 10px 40px 10px 10px; margin: 8px 0; display: grid; gap: 6px; }
.faq-ed .icon-btn { position: absolute; top: 6px; inset-inline-end: 6px; }
.site-banner { padding: 10px 14px; border-radius: 12px; margin: 0 0 12px; background: var(--accent-soft); border: 1px solid var(--accent); font-weight: 500; }
.site-banner.warn { background: rgba(192, 57, 43, .12); border-color: #c0392b; }
.wn-list { margin: 0; padding-inline-start: 20px; display: grid; gap: 8px; line-height: 1.6; }
.help-links { margin-top: 18px; }
/* clients */
.table.clients td { vertical-align: top; }
.mini-date { font: inherit; font-size: 12px; padding: 2px 4px; margin-top: 4px; max-width: 140px; }
.bad-t { color: #c0392b; }
/* setup checklist */
.setup-card .card-head { gap: 10px; }
.setup-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 4px 0 10px; }
.setup-bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s ease; }
.setup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.setup-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.setup-list li.ok strong { color: var(--muted); text-decoration: line-through; font-weight: 500; }
.setup-tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; font-size: 13px; }
.setup-list li.ok .setup-tick { background: #2e9d5b; border-color: #2e9d5b; color: #fff; }
.setup-list details p { margin: 6px 0; }
.bk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bk-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.danger-zone { border-color: rgba(192, 57, 43, .5); }
/* interviews */
.iv-second, .iv-shares { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); margin: 0 0 10px; }
.iv-shares { list-style: none; display: grid; gap: 6px; }
.pick-list { display: grid; gap: 6px; max-height: 40vh; overflow-y: auto; margin: 8px 0; }
.iv-crit-ed { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.iv-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 0 0 14px; }
.iv-cards h3 { margin: 0 0 8px; font-size: 15px; }
.qr-prev { border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin: 10px 0; background: #fff; color: #111; }
.qr-sheet { text-align: center; }
.qr-sheet h1 { font-size: 28px; margin: 0 0 4px; }
.qr-sheet h2 { font-size: 20px; margin: 0 0 12px; }
.qr-box svg { width: min(320px, 80%); height: auto; }
.qr-big { font-size: 18px; font-weight: 600; margin: 10px 0 2px; }
.qr-br { font-size: 16px; margin-top: 8px; }
.rehire-q { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin: 8px 0; display: grid; gap: 6px; }
.alert.good-a { background: rgba(46, 157, 91, .12); border-color: #2e9d5b; }
.eom-best { margin: 4px 0 8px; padding-inline-start: 20px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
/* staff */
.prof-skills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.kudos-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 12px 0; }
.kudo { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--accent-soft); border: 1px solid var(--accent); }
.kudo-e { font-size: 24px; line-height: 1; }
.kudo p { margin: 0 0 2px; }
.emoji-pick { font-size: 20px; }
.v20-dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin: 0 0 14px; }
.v20-dash h3 { margin: 0 0 6px; font-size: 15px; }
/* schedule coverage */
.sched .cov-row th, .sched .cov-row td { font-size: 12px; padding: 4px; vertical-align: top; border-bottom: 1px solid var(--line); }
.sched td.cov { display: table-cell; }
.sched td.cov b { font-size: 14px; }
.sched td.cov.short b { color: #c0392b; }
.cov-miss { display: block; color: #b35c00; line-height: 1.3; margin-top: 2px; }
/* pricing: savings calculator, offers, support */
.px-extra { display: grid; gap: 18px; margin-top: 24px; }
.px-extra h2 { font-size: 20px; margin: 0 0 10px; }
.pc-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 12px 0; }
.pc-out .stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 2px; }
.pc-out .stat b { font-size: 24px; font-variant-numeric: tabular-nums; }
.pc-out .stat span { color: var(--muted); font-size: 13px; }
.pc-out .stat.good { border-color: var(--accent); background: var(--accent-soft); }
.px-offer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.px-o { display: grid; gap: 6px; align-content: start; }
.px-o p, .px-o ul { margin: 0; color: var(--muted); }
.px-o ul { padding-inline-start: 18px; }
.px-o.hot { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
/* home page: silent tour of real screens */
.htour { position: relative; border-radius: 26px; overflow: hidden; background: var(--side, #10302f); }
.htour-stage { position: relative; aspect-ratio: 16 / 10; }
.htour-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .7s ease; display: flex; align-items: center; justify-content: center; }
.htour-slide.on { opacity: 1; }
.htour-slide img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.htour-slide.phone img { width: auto; height: 92%; object-fit: contain; border-radius: 22px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.htour-slide figcaption { position: absolute; inset-inline: 16px; bottom: 16px; padding: 10px 16px; border-radius: 14px; background: rgba(10, 24, 23, .82); color: #fff8ec; font-weight: 600; font-size: clamp(14px, 2.2vw, 19px); text-align: center; backdrop-filter: blur(4px); }
.htour-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: rgba(10, 24, 23, .9); }
.htour-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.htour-dot { width: 26px; height: 26px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.htour-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 248, 236, .35); transition: background .2s, transform .2s; }
.htour-dot.on::before { background: #f2a71b; transform: scale(1.3); }
.htour-dot:focus-visible, .htour-pause:focus-visible { outline: 2px solid #f2a71b; outline-offset: 2px; border-radius: 8px; }
.htour-pause { font: inherit; font-size: 13px; color: #fff8ec; background: none; border: 1px solid rgba(255, 248, 236, .35); border-radius: 99px; padding: 6px 12px; cursor: pointer; }
@media (max-width: 680px) { .htour { border-radius: 18px; } .htour-stage { aspect-ratio: 4 / 3; } .htour-slide figcaption { inset-inline: 8px; bottom: 8px; padding: 8px 10px; } }
@media (prefers-reduced-motion: reduce) { .htour-slide { transition: none; } }
.err-card { margin: 0 0 14px; } .err-card summary { cursor: pointer; list-style: none; } .err-card summary h3 { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.err-row { padding: 8px 0; border-bottom: 1px solid var(--line); } .err-row small { display: block; } .err-row pre { white-space: pre-wrap; font-size: 12px; max-height: 200px; overflow: auto; background: var(--surface-2); padding: 8px; border-radius: 8px; }
.mfa-steps { padding-inline-start: 20px; display: grid; gap: 12px; margin: 0; }
.mfa-qr { background: #fff; display: inline-block; padding: 10px; border-radius: 12px; margin: 8px 0; }
.mfa-qr img { display: block; }
#mfaForm .err { color: #c0392b; min-height: 1em; margin: 0; }

/* ---------- v21 ---------- */
.modal footer { flex-wrap: wrap; }                       /* many buttons wrap instead of running off the screen */
.px-calc .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.px-calc .grid3 label { display: grid; justify-content: stretch; gap: 4px; font-size: 13px; }
.px-calc .grid3 input { width: 100%; min-width: 0; }
.set-grid > * { min-width: 0; }                          /* a long word can't push a settings card wider than the phone */
.sup-opt span, .sup-log li { overflow-wrap: anywhere; }
.sh-cell.warn { box-shadow: inset 0 0 0 2px var(--bad, #c0392b); }
.sh-warn { color: var(--bad, #c0392b); font-size: 11px; display: block; }
.sched-warns { margin: 0 0 10px; }
.sched-warns summary { cursor: pointer; }
.qz-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-bottom: 14px; }
.qz-card { display: grid; gap: 6px; text-align: start; cursor: pointer; border: 1px solid var(--line); }
.qz-card.on { border-color: var(--accent); background: var(--accent-soft); }
.qz-card h3 { margin: 0; font-size: 16px; }
.qz-row { cursor: pointer; }
.qz-row:hover td { background: var(--surface-2); }
.qz-hard li { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.qz-bar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--grid, #eee); overflow: hidden; }
.qz-bar i { display: block; height: 100%; background: var(--bad, #c0392b); }
.qz-ans { display: grid; gap: 10px; }
.qz-ans li { list-style: none; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.qz-ans .opt { display: block; padding: 2px 0; }
.qz-ans .opt.right { color: var(--good, #1baf7a); font-weight: 700; }
.qz-ans .opt.wrong { color: var(--bad, #c0392b); text-decoration: line-through; }
.qz-q { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; display: grid; gap: 6px; }
.qz-q legend { font-weight: 700; padding: 0 4px; }
.qz-q .q-opt { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; }
.qz-q .q-opt input[type=text] { width: 100%; }
.qz-q details summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.qz-mine li { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.note-list li { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.note-list .row-actions { justify-self: end; }
