/* Spark Agency HR — Spark Plus hubs (v44): LIVE hub, HR hub, Work hub. */
@media screen {
  .hub-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    min-width: 0;
    max-width: 100%;
  }
  .hub-body > * {
    min-width: 0;
  }
  .hub-page small,
  .hub-dialog small,
  .portal-plus small,
  .lh-tv small {
    letter-spacing: 0;
  }
  .hub-dialog-body p {
    margin: 6px 0;
  }
  .hub-page input[type="checkbox"],
  .hub-page input[type="radio"],
  .hub-dialog input[type="checkbox"],
  .hub-dialog input[type="radio"],
  .portal-plus input[type="checkbox"] {
    width: auto;
    min-height: 0;
    flex: none;
    margin: 0;
  }
  .hr-ob-items label,
  .hub-checks label,
  .hub-form label.hub-check,
  .sg-agree {
    display: flex !important;
    justify-content: flex-start;
    text-align: left;
  }
  .hr-ob-items small {
    letter-spacing: 0;
  }
  .hub-page[hidden] {
    display: none;
  }
  .hub-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: #e9f0ef;
    overflow-x: auto;
    scrollbar-width: none;
    width: max-content;
    max-width: 100%;
  }
  .hub-tabs[hidden] {
    display: none;
  }
  .hub-tabs button {
    margin: 0;
    min-height: 34px;
    padding: 6px 14px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-2);
    font-weight: 650;
    box-shadow: none;
    white-space: nowrap;
  }
  .hub-tabs button[aria-selected="true"] {
    background: #fff;
    color: var(--teal-deep);
    box-shadow: 0 1px 3px #0f2a361f;
  }
  .hub-body {
    display: grid;
    gap: 14px;
    min-width: 0;
  }
  .hub-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px 16px;
  }
  .hub-head h2 {
    margin: 0;
    font-size: 20px;
  }
  .hub-head p {
    margin: 4px 0 0;
    max-width: 70ch;
  }
  .hub-head.is-small {
    align-items: center;
    margin-bottom: 8px;
  }
  .hub-head.is-small h3 {
    margin: 0;
  }
  .hub-actions,
  .hub-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
  .hub-actions > *,
  .hub-buttons > * {
    margin: 0;
  }
  .hub-error {
    color: var(--rose);
    font-weight: 600;
  }
  .hub-note {
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--amber-soft);
    color: #7a4f10;
  }
  .hub-table {
    width: 100%;
    border-collapse: collapse;
  }
  .hub-table th {
    text-align: left;
    font-size: 12px;
    color: var(--text-2);
    font-weight: 650;
    padding: 6px 8px;
    border-bottom: 1px solid var(--line);
  }
  .hub-table td {
    padding: 8px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
  }
  .hub-table td small,
  .hub-table td > b + small {
    display: block;
    color: var(--text-2);
    font-size: 12px;
  }
  .panel:has(> .hub-table),
  .panel:has(> details > .hub-table) {
    overflow-x: auto;
  }
  button.link {
    background: none;
    border: 0;
    box-shadow: none;
    color: var(--teal-deep);
    padding: 2px 4px;
    min-height: 0;
    text-decoration: underline;
    font-weight: 600;
  }
  button.danger {
    background: var(--rose);
    border-color: var(--rose);
    color: #fff;
  }
  .hub-dialog {
    width: min(560px, calc(100vw - 24px));
    max-height: calc(100vh - 32px);
    border: 0;
    border-radius: 18px;
    padding: 0;
    box-shadow: 0 30px 80px #0f2a3640;
  }
  .hub-dialog.is-wide {
    width: min(820px, calc(100vw - 24px));
  }
  .hub-dialog::backdrop {
    background: #0f2a3666;
  }
  .hub-dialog-body {
    padding: 20px 22px;
  }
  .hub-form {
    display: grid;
    gap: 12px;
  }
  .hub-form h2 {
    margin: 0;
  }
  .hub-form label {
    display: grid;
    gap: 4px;
    font-weight: 600;
    font-size: 13px;
  }
  .hub-form label.hub-check,
  .hub-checks label {
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 500;
  }
  .hub-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .hub-checks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 6px 14px;
    max-height: 260px;
    overflow: auto;
    padding: 4px;
  }
  .hub-checks small {
    color: var(--text-2);
  }
  .hub-checks.is-inline {
    display: flex;
    flex-wrap: wrap;
    max-height: none;
  }
  .hub-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
  }
  .hub-inline label {
    display: grid;
    gap: 4px;
    font-weight: 600;
    font-size: 13px;
  }
  .lh-month {
    display: grid;
    gap: 2px;
    font-size: 12px;
    color: var(--text-2);
    font-weight: 600;
  }

  /* ---------- LIVE: leaderboard ---------- */
  .lh-wrap {
    position: relative;
    overflow: hidden;
    padding: 0;
  }
  .lh-board {
    --bg: #0f2a36;
    padding: 22px;
    background: radial-gradient(120% 140% at 100% 0%, #10474f 0%, #0f2a36 55%, #0c222c 100%);
    color: #e9f4f3;
    border-radius: var(--radius);
  }
  .lh-board-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 18px;
  }
  .lh-kicker {
    margin: 0;
    color: #7fd3cf;
    font-weight: 650;
    letter-spacing: 0.02em;
  }
  .lh-board-head h2 {
    margin: 2px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
  }
  .lh-board-head h2 small {
    font-size: 0.42em;
    font-weight: 500;
    color: #a9c7c6;
    letter-spacing: 0;
  }
  .lh-clock {
    display: flex;
    gap: 6px;
  }
  .lh-clock span {
    display: grid;
    justify-items: center;
    min-width: 58px;
    padding: 8px 6px;
    border-radius: 12px;
    background: #ffffff12;
    font-size: 11px;
    color: #a9c7c6;
  }
  .lh-clock b {
    font-size: 24px;
    color: #fff;
    font-variant-numeric: tabular-nums;
  }
  .lh-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr);
    gap: 18px;
  }
  .lh-teams {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
    align-content: start;
  }
  .lh-team {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 14px;
    background: #ffffff0d;
    border: 1px solid #ffffff14;
  }
  .lh-team.is-done {
    border-color: color-mix(in srgb, var(--c) 70%, transparent);
    background: color-mix(in srgb, var(--c) 18%, transparent);
  }
  .lh-rank {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--c);
    color: #fff;
    font-weight: 800;
  }
  .lh-team-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
  }
  .lh-team-top b {
    font-size: 17px;
  }
  .lh-team-coins {
    font-variant-numeric: tabular-nums;
    font-weight: 750;
    font-size: 18px;
  }
  .lh-team-coins small {
    color: #a9c7c6;
    font-weight: 500;
    font-size: 12px;
  }
  .lh-bar {
    position: relative;
    height: 12px;
    margin: 8px 0 6px;
    border-radius: 99px;
    background: #ffffff1a;
    overflow: hidden;
  }
  .lh-bar i {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--w);
    border-radius: inherit;
    background: var(--c);
    transition: width 0.8s var(--ease-out);
  }
  .lh-bar em {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--w);
    width: 2px;
    background: #fff;
    opacity: 0.7;
  }
  .lh-team-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 12px;
    color: #a9c7c6;
  }
  .lh-team-foot span:first-child {
    color: #fff;
    font-weight: 700;
  }
  .lh-hit {
    color: #ffe08a !important;
    font-weight: 700;
  }
  .lh-warn {
    color: #ffb4a8;
    font-weight: 650;
  }
  .lh-side {
    display: grid;
    gap: 14px;
    align-content: start;
  }
  .lh-side h3 {
    margin: 0 0 8px;
    font-size: 13px;
    color: #a9c7c6;
    font-weight: 650;
  }
  .lh-star {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #e2b04a, #c98a1b);
    color: #2a1b00;
  }
  .lh-star.is-empty {
    display: grid;
    background: #ffffff0d;
    color: #a9c7c6;
  }
  .lh-star-face {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    color: #8a5a00;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 0 0 3px #fff6;
  }
  .lh-star div {
    display: grid;
  }
  .lh-star small {
    font-weight: 750;
    letter-spacing: 0;
    color: #5a3c00;
  }
  .lh-board small {
    letter-spacing: 0;
  }
  .lh-star b {
    font-size: 18px;
  }
  .lh-top ol,
  .lh-next ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
  }
  .lh-top li {
    display: grid;
    grid-template-columns: 22px 1fr auto auto;
    grid-template-areas: "p n l c" "p s s s";
    gap: 0 8px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    background: #ffffff0a;
    border-left: 3px solid var(--c);
  }
  .lh-pos {
    grid-area: p;
    color: #a9c7c6;
    font-weight: 700;
  }
  .lh-top li b {
    grid-area: n;
  }
  .lh-top li .lh-level {
    grid-area: l;
  }
  .lh-h-coins {
    grid-area: c;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
  }
  .lh-top li small {
    grid-area: s;
    color: #a9c7c6;
    font-size: 11px;
  }
  .lh-next li {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 0 8px;
    padding: 6px 10px;
    border-radius: 10px;
    background: #ffffff0a;
    border-left: 3px solid var(--c);
  }
  .lh-next li b {
    grid-row: span 2;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
  }
  .lh-next li small {
    color: #a9c7c6;
  }
  .lh-level {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 750;
    background: #dfe8e7;
    color: #2b4650;
  }
  .lh-level.is-silver {
    background: linear-gradient(135deg, #eef2f4, #c4ced3);
    color: #33444c;
  }
  .lh-level.is-gold {
    background: linear-gradient(135deg, #fde7a6, #e2b04a);
    color: #5a3c00;
  }
  .lh-level.is-diamond {
    background: linear-gradient(135deg, #c9f1ff, #7cc7f0 60%, #b9a6ff);
    color: #0b3550;
  }
  .lh-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
  }
  .lh-tv {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: #0c222c;
    overflow: auto;
  }
  .lh-tv-in .lh-board {
    min-height: 100vh;
    border-radius: 0;
    padding: clamp(20px, 3vw, 48px);
    font-size: clamp(14px, 1.2vw, 20px);
  }
  .lh-board.is-tv .lh-team-top b {
    font-size: 1.5em;
  }
  .lh-board.is-tv .lh-team-coins {
    font-size: 1.6em;
  }
  .lh-board.is-tv .lh-bar {
    height: 20px;
  }
  .lh-board.is-tv .lh-clock b {
    font-size: 2.2em;
  }
  .lh-board.is-tv .lh-clock span {
    min-width: 5.5em;
  }
  .lh-tv-close {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 4;
    background: #ffffff1f;
    color: #fff;
    border: 1px solid #ffffff33;
  }

  /* ---------- LIVE: schedule ---------- */
  .lh-week {
    min-width: 128px;
    text-align: center;
  }
  .lh-sum {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
  }
  .lh-sum span {
    padding: 3px 10px;
    border-radius: 99px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 12px;
    font-weight: 650;
  }
  .lh-sum .is-done {
    color: var(--teal-deep);
  }
  .lh-sum .is-noshow {
    color: var(--rose);
  }
  .lh-week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .lh-day {
    display: grid;
    gap: 6px;
    align-content: start;
    min-height: 160px;
    padding: 8px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--line);
  }
  .lh-day.is-today {
    border-color: var(--teal);
    box-shadow: inset 0 3px 0 var(--teal);
  }
  .lh-day h4 {
    margin: 0 0 2px;
    font-size: 13px;
  }
  .lh-empty {
    margin: 0;
  }
  .lh-sess {
    display: grid;
    text-align: left;
    gap: 1px;
    margin: 0;
    padding: 7px 8px;
    border-radius: 9px;
    border: 0;
    border-left: 4px solid var(--c);
    background: color-mix(in srgb, var(--c) 10%, #fff);
    color: var(--text);
    box-shadow: none;
    min-height: 0;
  }
  .lh-sess b {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
  }
  .lh-sess span {
    font-size: 13px;
    font-weight: 600;
  }
  .lh-sess small {
    font-size: 11px;
    color: var(--text-2);
  }
  .lh-sess.is-done small {
    color: var(--teal-deep);
    font-weight: 700;
  }
  .lh-sess.is-noshow {
    background: var(--rose-soft);
    border-left-color: var(--rose);
  }
  .lh-sess.is-noshow small {
    color: var(--rose);
    font-weight: 700;
  }
  .lh-sess.is-live {
    box-shadow: 0 0 0 2px var(--c);
  }
  .lh-sess.is-live small::before {
    content: "● ";
    color: #e11d48;
  }
  .lh-sess.is-cancelled {
    opacity: 0.55;
    text-decoration: line-through;
  }
  .lh-swaps ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
  }
  .lh-swaps li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
  }
  .lh-swaps h3 {
    margin: 0 0 8px;
  }
  .lh-zones {
    display: flex;
    gap: 8px;
  }
  .lh-zones span {
    display: grid;
    padding: 6px 10px;
    border-radius: 10px;
    background: var(--mist);
  }
  .lh-zones small {
    color: var(--text-2);
  }
  .lh-state {
    font-weight: 700;
  }
  .lh-state.is-noshow {
    color: var(--rose);
  }
  .lh-state.is-done {
    color: var(--teal-deep);
  }
  .lh-mark,
  .lh-swap {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    background: var(--mist);
  }
  .lh-swap h3 {
    margin: 0;
    font-size: 14px;
  }
  .lh-mark label,
  .lh-swap label {
    display: grid;
    gap: 4px;
    font-weight: 600;
    font-size: 13px;
  }
  .hub-dialog .lh-mark,
  .hub-dialog .lh-swap {
    margin: 10px 0;
  }

  /* ---------- LIVE: hosts ---------- */
  .lh-hosts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
  }
  .lh-host {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    grid-template-areas: "f n l" "c c c" "x x x" "b b b";
    gap: 6px 10px;
    align-items: center;
    text-align: left;
    margin: 0;
    padding: 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-top: 4px solid var(--c);
    color: var(--text);
    box-shadow: none;
    min-height: 0;
  }
  .lh-host:hover {
    border-color: var(--c);
  }
  .lh-host.is-former {
    opacity: 0.6;
  }
  .lh-face {
    grid-area: f;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--c) 18%, #fff);
    color: color-mix(in srgb, var(--c) 70%, #000);
    font-weight: 800;
  }
  .lh-face.is-big {
    width: 64px;
    height: 64px;
    font-size: 22px;
  }
  .lh-host-name {
    grid-area: n;
    display: grid;
  }
  .lh-host-name small {
    color: var(--text-2);
  }
  .lh-host > .lh-level {
    grid-area: l;
  }
  .lh-host-coins {
    grid-area: c;
    font-size: 22px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }
  .lh-host-coins small {
    margin-left: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
  }
  .lh-host-left {
    grid-area: x;
    font-size: 12px;
    color: var(--teal-deep);
    font-weight: 650;
  }
  .lh-badges {
    grid-area: b;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .lh-badges i {
    font-style: normal;
    font-size: 11px;
    font-weight: 750;
    padding: 1px 7px;
    border-radius: 99px;
    background: #fdf3e2;
    color: #8a5a00;
  }
  .lh-profile header {
    display: flex;
    gap: 14px;
    align-items: center;
  }
  .lh-profile header h2 {
    margin: 0;
  }
  .lh-profile header p {
    margin: 2px 0 0;
  }
  .lh-profile header .lh-level {
    margin-left: auto;
    font-size: 13px;
    padding: 4px 12px;
  }
  .lh-profile h3 {
    margin: 18px 0 8px;
    font-size: 14px;
  }
  .lh-p-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    margin-top: 14px;
  }
  .lh-p-stats span {
    display: grid;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--mist);
    font-size: 12px;
    color: var(--text-2);
  }
  .lh-p-stats b {
    font-size: 20px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
  }
  .lh-p-level {
    margin-top: 14px;
  }
  .lh-prog {
    height: 10px;
    border-radius: 99px;
    background: #e3ecea;
    overflow: hidden;
  }
  .lh-prog i {
    display: block;
    height: 100%;
    width: var(--w);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--teal), #3fc6c0);
  }
  .lh-prog.is-top i {
    background: linear-gradient(90deg, #e2b04a, #f6d27b);
  }
  .lh-prog-text {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-2);
  }
  .lh-prog-text b {
    color: var(--text);
  }
  .lh-levels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .lh-levels span {
    padding: 2px 10px;
    border-radius: 99px;
    background: var(--mist);
    font-size: 12px;
    color: var(--text-2);
  }
  .lh-levels span.is-got {
    background: var(--teal-soft);
    color: var(--teal-deep);
    font-weight: 700;
  }
  .lh-chart {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    align-items: end;
    height: 170px;
    padding: 10px 6px 0;
    border-bottom: 1px solid var(--line);
  }
  .lh-col {
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100%;
    justify-items: center;
    gap: 4px;
  }
  .lh-col i {
    align-self: end;
    width: 70%;
    height: var(--h);
    min-height: 2px;
    border-radius: 8px 8px 2px 2px;
    background: var(--c, var(--teal));
  }
  .lh-col small {
    color: var(--text-2);
    font-size: 12px;
  }
  .lh-col-v {
    font-size: 12px;
    font-weight: 700;
    align-self: end;
  }
  .lh-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .lh-badge {
    padding: 4px 10px;
    border-radius: 99px;
    border: 1px dashed var(--line-strong);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 650;
  }
  .lh-badge.is-got {
    border: 1px solid #e2b04a;
    background: #fdf3e2;
    color: #7a4f10;
  }
  .lh-pk-mini {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
  }
  .lh-pk-mini li {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--mist);
    border-left: 3px solid var(--line-strong);
  }
  .lh-pk-mini li.is-win {
    border-left-color: var(--teal);
  }
  .lh-pk-mini li.is-loss {
    border-left-color: var(--rose);
  }

  /* ---------- LIVE: PK ---------- */
  .lh-pk-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(240px, 1fr);
    gap: 14px;
  }
  .lh-pk-grid h3,
  .panel > h3 {
    margin: 0 0 8px;
  }
  .lh-rivals {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
  }
  .lh-rivals li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--mist);
  }
  .lh-rec {
    grid-row: span 2;
    align-self: center;
    font-size: 18px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }
  .lh-rivals small {
    color: var(--text-2);
  }
  .lh-res {
    font-weight: 700;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 99px;
    background: var(--mist);
  }
  .lh-res.is-win {
    background: var(--teal-soft);
    color: var(--teal-deep);
  }
  .lh-res.is-loss {
    background: var(--rose-soft);
    color: var(--rose);
  }
  .lh-bracket {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .lh-round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 10px;
    min-width: 160px;
  }
  .lh-round h4 {
    margin: 0;
    font-size: 12px;
    color: var(--text-2);
  }
  .lh-match {
    display: grid;
    gap: 2px;
    padding: 4px;
    border-radius: 10px;
    background: var(--mist);
  }
  .lh-match button {
    margin: 0;
    min-height: 30px;
    padding: 4px 10px;
    text-align: left;
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: none;
    font-weight: 600;
  }
  .lh-match button:disabled {
    color: var(--text-2);
    cursor: default;
  }
  .lh-match button.is-win {
    border-color: var(--teal);
    background: var(--teal-soft);
    color: var(--teal-deep);
  }
  .lh-match button.is-win::after {
    content: " ✓";
  }
  .lh-champ .lh-match {
    padding: 12px;
    background: #fdf3e2;
  }

  /* ---------- LIVE: bonus ---------- */
  .lh-bn-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
  }
  .lh-bn-level {
    display: grid;
    padding: 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
  }
  .lh-bn-level span {
    font-size: 12px;
    color: var(--text-2);
  }
  .lh-bn-level strong {
    margin-top: 6px;
    font-size: 22px;
  }
  .lh-bn-level.is-silver {
    background: linear-gradient(160deg, #fff, #eef2f4);
  }
  .lh-bn-level.is-gold {
    background: linear-gradient(160deg, #fff, #fdf0cc);
    border-color: #f0d27d;
  }
  .lh-bn-level.is-diamond {
    background: linear-gradient(160deg, #fff, #e2f5ff);
    border-color: #a6dcf5;
  }
  .lh-bn-level.is-team {
    background: var(--teal-soft);
    border-color: #b8e1df;
  }
  .lh-bn-teams {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .lh-bn-teams span {
    padding: 3px 10px;
    border-radius: 99px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 12px;
    font-weight: 650;
  }
  .lh-bn-teams .is-ok {
    background: var(--teal-soft);
    color: var(--teal-deep);
    border-color: #b8e1df;
  }
  .lh-st {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    background: var(--amber-soft);
    color: #7a4f10;
  }
  .lh-st.is-ok {
    background: var(--teal-soft);
    color: var(--teal-deep);
  }
  .lh-st.is-no {
    background: var(--rose-soft);
    color: var(--rose);
  }
  .lh-bn-set summary {
    font-weight: 700;
    cursor: pointer;
  }
  .lh-bn-set form {
    display: grid;
    gap: 12px;
    margin-top: 12px;
  }
  .lh-bn-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr auto;
    gap: 8px;
    align-items: end;
  }
  .lh-bn-row label,
  .lh-bn-set .hub-two label {
    display: grid;
    gap: 4px;
    font-size: 12px;
    font-weight: 650;
  }
  .lh-bn-rows {
    display: grid;
    gap: 8px;
  }

  /* ---------- LIVE: report ---------- */
  .lh-report {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
  }
  .lh-report header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--teal);
  }
  .lh-report header img {
    height: 48px;
  }
  .lh-report h1 {
    margin: 0;
    font-size: 22px;
  }
  .lh-report header p {
    margin: 2px 0 0;
    color: var(--text-2);
  }
  .lh-report h2 {
    font-size: 15px;
    margin: 20px 0 8px;
    display: flex;
    justify-content: space-between;
  }
  .lh-report table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  .lh-report th,
  .lh-report td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }
  .lh-r-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 16px;
  }
  .lh-r-kpis div {
    display: grid;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--mist);
  }
  .lh-r-kpis small {
    color: var(--text-2);
    font-size: 11px;
  }
  .lh-r-kpis b {
    font-size: 20px;
  }
  .lh-r-foot {
    margin-top: 18px;
    font-size: 11px;
    color: var(--text-2);
  }

  /* ---------- HR: check in & attendance ---------- */
  .hr-me {
    display: grid;
    gap: 12px;
    justify-items: start;
  }
  .hr-me-state {
    display: grid;
    gap: 2px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--mist);
    border-left: 4px solid var(--line-strong);
    margin: 0;
  }
  .hr-me-state.is-in {
    background: var(--teal-soft);
    border-left-color: var(--teal);
  }
  .hr-me-state.is-out {
    border-left-color: var(--teal-deep);
  }
  .hr-me-state b {
    font-size: 17px;
  }
  #hr-cam video {
    width: min(360px, 100%);
    border-radius: 12px;
    background: #000;
  }
  .hr-checked {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 6px;
    padding: 10px;
  }
  .hr-checked h2 {
    margin: 0;
  }
  .hr-tick {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    font-size: 32px;
    font-weight: 800;
  }
  .hr-checked.is-bad h2 {
    color: var(--rose);
  }
  .hr-att-top {
    display: grid;
    grid-template-columns: minmax(220px, 300px) 1fr;
    gap: 14px;
    align-items: start;
  }
  .hr-qr {
    display: grid;
    justify-items: center;
    gap: 6px;
  }
  .qr-svg {
    width: 100%;
    max-width: 260px;
    height: auto;
    border-radius: 10px;
  }
  .hr-qr-time {
    margin: 0;
    color: var(--text-2);
    font-size: 12px;
  }
  .hr-late {
    color: var(--rose) !important;
  }
  .hr-in {
    color: var(--teal-deep);
    font-weight: 700;
  }
  .hr-att-set {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
  }
  .hr-att-set summary,
  .panel > details > summary {
    cursor: pointer;
    font-weight: 700;
  }
  .hr-kiosk {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: radial-gradient(120% 120% at 50% 0%, #10474f, #0f2a36 60%);
    color: #fff;
    display: grid;
    place-items: center;
    overflow: auto;
  }
  .hr-kiosk-in {
    display: grid;
    justify-items: center;
    gap: 14px;
    padding: 30px;
    text-align: center;
  }
  .hr-kiosk-in img {
    height: 54px;
    filter: brightness(0) invert(1);
  }
  .hr-kiosk-in h1 {
    margin: 0;
    font-size: clamp(24px, 4vw, 44px);
  }
  .hr-kiosk-qr {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 18px;
    border-radius: 24px;
    background: #fff;
    color: var(--text-2);
  }
  .hr-kiosk-qr .qr-svg {
    width: min(64vh, 80vw);
    max-width: none;
  }
  .hr-kiosk-clock {
    font-size: 28px;
    font-variant-numeric: tabular-nums;
    margin: 0;
  }

  /* ---------- HR: leave calendar ---------- */
  .hr-cal-wrap {
    overflow-x: auto;
  }
  .hr-cal {
    display: grid;
    gap: 3px;
    min-width: 760px;
  }
  .hr-cal-row {
    display: grid;
    grid-template-columns: 150px repeat(var(--n, 31), 1fr);
    gap: 2px;
    align-items: center;
  }
  .hr-cal[data-n="28"] .hr-cal-row {
    --n: 28;
  }
  .hr-cal[data-n="29"] .hr-cal-row {
    --n: 29;
  }
  .hr-cal[data-n="30"] .hr-cal-row {
    --n: 30;
  }
  .hr-cal-row > span {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hr-cal-row i {
    height: 22px;
    border-radius: 5px;
    background: var(--mist);
    font-style: normal;
  }
  .hr-cal-row.is-head i {
    height: auto;
    background: none;
    text-align: center;
    font-size: 11px;
    color: var(--text-2);
  }
  .hr-cal-row.is-head i.is-we {
    color: var(--rose);
  }
  .hr-cal-row.is-head i.is-today {
    color: var(--teal-deep);
    font-weight: 800;
  }
  .hr-cal-row i.is-on {
    background: var(--teal);
  }
  .hr-cal-row i.is-sick,
  .hr-cal-legend .is-sick::before {
    background: #f59e0b;
  }
  .hr-cal-row i.is-unpaid,
  .hr-cal-legend .is-unpaid::before {
    background: var(--rose);
  }
  .hr-cal-row i.is-other,
  .hr-cal-row i.is-maternity,
  .hr-cal-legend .is-other::before {
    background: #8b5cf6;
  }
  .hr-cal-row i.is-pending,
  .hr-cal-legend .is-pending::before {
    opacity: 0.45;
  }
  .hr-cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--text-2);
  }
  .hr-cal-legend span::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 5px;
    vertical-align: -2px;
    background: var(--teal);
  }
  .hr-cal-empty {
    padding: 10px 0;
  }
  .hr-neg {
    color: var(--rose);
  }
  .hr-over ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
  }
  .hr-over li {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
  }

  /* ---------- HR: expiry ---------- */
  .hr-ex-sum {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .hr-ex-sum span,
  .hr-when {
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
    background: #fff;
    border: 1px solid var(--line);
  }
  .is-gone.hr-when,
  .hr-ex-sum .is-gone {
    background: var(--rose);
    color: #fff;
    border-color: var(--rose);
  }
  .is-soon.hr-when,
  .hr-ex-sum .is-soon {
    background: var(--rose-soft);
    color: var(--rose);
    border-color: #f2c6cb;
  }
  .is-near.hr-when,
  .hr-ex-sum .is-near {
    background: var(--amber-soft);
    color: #7a4f10;
    border-color: #f1d9a8;
  }

  /* ---------- HR: onboarding ---------- */
  .hr-ob-runs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
  }
  .hr-ob {
    display: grid;
    gap: 10px;
    align-content: start;
  }
  .hr-ob header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }
  .hr-ob h3 {
    margin: 0;
  }
  .hr-ob header p {
    margin: 2px 0 0;
  }
  .hr-ob-count {
    font-size: 22px;
    font-weight: 800;
    color: var(--teal-deep);
  }
  .hr-ob.is-done {
    border-color: #b8e1df;
    background: linear-gradient(180deg, var(--teal-soft), #fff 40%);
  }
  .hr-ob-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
  }
  .hr-ob-items label {
    display: flex;
    gap: 8px;
    align-items: center;
  }
  .hr-ob-items input:checked + span {
    color: var(--text-2);
    text-decoration: line-through;
  }
  .hr-ob-items small {
    display: block;
    margin-left: 26px;
    color: var(--text-2);
    font-size: 11px;
  }
  .hr-ob-add {
    display: flex;
    gap: 6px;
  }
  .hr-ob-add input {
    flex: 1;
  }
  .hr-ob-welcome {
    padding: 10px 12px;
    border-radius: 12px;
    background: #e8f7ee;
    border: 1px solid #c4ead2;
  }
  .hr-ob-welcome p {
    margin: 0 0 8px;
  }
  a.button {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 14px;
    border-radius: 10px;
    background: #128c4a;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
  }
  label.button {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
  }
  .hr-ob-tpls {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 10px;
  }
  .hr-ob-tpl h4 {
    margin: 0;
    text-transform: capitalize;
  }

  /* ---------- HR: signatures ---------- */
  .sg-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
  }
  .sg-list li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--mist);
  }
  .sg-list li.is-waiting {
    background: var(--amber-soft);
  }
  .sg-list li span {
    display: grid;
  }
  .sg-list small {
    color: var(--text-2);
  }
  .sg-st {
    font-weight: 700;
    font-size: 12px;
  }
  .sg-st.is-signed {
    color: var(--teal-deep);
  }
  .sg-st.is-declined {
    color: var(--rose);
  }
  .sg-st.is-waiting {
    color: #7a4f10;
  }
  .sg-doc h2 {
    margin: 0;
  }
  .sg-body {
    max-height: 44vh;
    overflow: auto;
    margin: 12px 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
  }
  .sg-form {
    display: grid;
    gap: 8px;
  }
  .sg-form p {
    margin: 0;
  }
  .sg-pad {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    border: 2px dashed var(--line-strong);
    background: repeating-linear-gradient(0deg, transparent 0 139px, #c9d8d7 139px 140px), #fbfdfd;
    touch-action: none;
    cursor: crosshair;
  }
  .sg-agree {
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 600;
  }
  .sg-copy header {
    display: flex;
    gap: 14px;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--teal);
  }
  .sg-copy header img {
    height: 44px;
  }
  .sg-copy h1 {
    margin: 0;
    font-size: 20px;
  }
  .sg-copy header p {
    margin: 0;
    color: var(--text-2);
  }
  .sg-copy .sg-body {
    max-height: none;
    border: 0;
    padding: 0;
  }
  .sg-stamp {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
  }
  .sg-stamp img {
    width: 100%;
    border-bottom: 1px solid var(--text);
  }
  .sg-stamp dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    margin: 0;
    font-size: 13px;
  }
  .sg-stamp dt {
    color: var(--text-2);
  }
  .sg-stamp dd {
    margin: 0;
    font-weight: 600;
  }
  .sg-foot {
    font-size: 11px;
    color: var(--text-2);
  }

  /* ---------- Work: tasks ---------- */
  .wk-tasks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
  }
  .wk-task {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--mist);
    border-left: 4px solid var(--line-strong);
  }
  .wk-task input {
    width: 20px;
    height: 20px;
    accent-color: var(--teal);
  }
  .wk-task.is-high {
    border-left-color: var(--rose);
  }
  .wk-task.is-late {
    background: var(--rose-soft);
  }
  .wk-task.is-late small {
    color: var(--rose);
    font-weight: 650;
  }
  .wk-task.is-done {
    opacity: 0.6;
  }
  .wk-task.is-done b {
    text-decoration: line-through;
  }
  .wk-task-main {
    display: grid;
    text-align: left;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    color: var(--text);
    min-height: 0;
  }
  .wk-task-main small {
    color: var(--text-2);
    font-weight: 500;
  }
  .wk-pri {
    font-size: 11px;
    font-weight: 750;
    color: var(--rose);
  }
  .wk-empty {
    padding: 16px;
    text-align: center;
  }
  .wk-detail header h2 {
    margin: 0;
  }
  .wk-notes {
    white-space: pre-wrap;
    padding: 10px 12px;
    background: var(--mist);
    border-radius: 10px;
  }
  .wk-comments {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    display: grid;
    gap: 8px;
    max-height: 40vh;
    overflow: auto;
  }
  .wk-comments li {
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--mist);
  }
  .wk-comments small {
    margin-left: 8px;
    color: var(--text-2);
  }
  .wk-comments p {
    margin: 4px 0 0;
    white-space: pre-wrap;
  }
  .wk-comments img {
    display: block;
    margin-top: 6px;
    max-width: 100%;
    max-height: 320px;
    border-radius: 10px;
  }
  .wk-comment {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
  }

  /* ---------- Work: announcements & polls ---------- */
  .wk-posts,
  .wk-polls {
    display: grid;
    gap: 12px;
  }
  .wk-polls {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
  .wk-post header,
  .wk-poll header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
  }
  .wk-post h3,
  .wk-poll h3 {
    margin: 0;
  }
  .wk-post header small,
  .wk-poll header small {
    color: var(--text-2);
  }
  .wk-post.is-unread {
    border-left: 4px solid var(--amber);
  }
  .wk-post.is-pinned {
    background: linear-gradient(180deg, #fffaf0, #fff 50%);
  }
  .wk-body {
    white-space: pre-wrap;
    margin: 10px 0;
    max-width: 75ch;
    line-height: 1.55;
  }
  .wk-read {
    color: var(--teal-deep);
    font-weight: 700;
    font-size: 13px;
  }
  .wk-readers summary {
    cursor: pointer;
    font-size: 13px;
    color: var(--text-2);
    font-weight: 600;
  }
  .wk-readers ul {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .wk-readers li {
    padding: 3px 10px;
    border-radius: 99px;
    background: var(--rose-soft);
    font-size: 12px;
  }
  .wk-readers li.is-read {
    background: var(--teal-soft);
  }
  .wk-readers li small {
    margin-left: 6px;
    color: var(--text-2);
  }
  .wk-aud summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
  }
  .wk-poll form {
    display: grid;
    gap: 6px;
    margin-top: 10px;
  }
  .wk-opt {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    overflow: hidden;
    cursor: pointer;
  }
  .wk-opt > * {
    position: relative;
    z-index: 1;
  }
  .wk-opt.is-mine {
    border-color: var(--teal);
  }
  .wk-opt em {
    font-style: normal;
    font-weight: 700;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
  }
  .wk-opt small {
    grid-column: 2 / -1;
    color: var(--text-2);
    font-size: 11px;
  }
  .wk-opt-bar {
    position: absolute !important;
    z-index: 0 !important;
    inset: 0 auto 0 0;
    width: var(--w);
    background: var(--teal-soft);
  }
  .wk-opts-edit {
    display: grid;
    gap: 8px;
  }
  .wk-poll.is-closed {
    opacity: 0.85;
  }

  /* ---------- employee portal ---------- */
  .portal-plus h2 {
    margin-top: 0;
  }
  .portal-lives {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
  }

  @media (max-width: 860px) {
    .lh-grid,
    .lh-pk-grid,
    .hr-att-top,
    .hr-att-set {
      grid-template-columns: 1fr;
    }
    .lh-board {
      padding: 16px;
    }
    .lh-clock span {
      min-width: 48px;
    }
    .lh-clock b {
      font-size: 20px;
    }
    .sg-stamp {
      grid-template-columns: 1fr;
    }
  }
  @media (max-width: 560px) {
    .hub-actions {
      width: 100%;
    }
    .lh-week {
      min-width: 0;
      flex: 1;
    }
    .hub-two,
    .lh-bn-row {
      grid-template-columns: 1fr;
    }
    .lh-week-grid {
      grid-template-columns: repeat(7, 78vw);
      scroll-snap-type: x mandatory;
    }
    .lh-day {
      scroll-snap-align: start;
    }
    .hub-dialog-body {
      padding: 16px;
    }
    .wk-polls,
    .hr-ob-runs {
      grid-template-columns: 1fr;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .lh-bar i {
      transition: none;
    }
  }
}
@media print {
  .lh-report {
    border: 0;
    padding: 0;
  }
  .lh-report header img,
  .sg-copy header img {
    height: 40px;
  }
  .lh-report table,
  .sg-stamp dl {
    font-size: 11px;
  }
  .lh-r-kpis {
    display: flex;
    gap: 12px;
  }
  .sg-stamp {
    display: flex;
    gap: 20px;
  }
  .sg-stamp img {
    width: 220px;
  }
}

/* ---------- v44: permissions grouped, with switches ---------- */
@media screen {
  .acc-tools {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 6px 0 10px;
  }
  .acc-search {
    flex: 1;
    max-width: 360px;
  }
  .acc-sections {
    display: grid;
    gap: 8px;
  }
  .acc-sec {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .acc-sec[open] {
    border-color: #b8e1df;
    box-shadow: 0 6px 18px #0f2a360d;
  }
  .acc-sec[hidden] {
    display: none;
  }
  .acc-sec > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    list-style: none;
    user-select: none;
  }
  .acc-sec > summary::-webkit-details-marker {
    display: none;
  }
  .acc-ico {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--teal-soft);
    color: var(--teal-deep);
    flex: none;
    transition: transform 0.25s var(--ease-out);
  }
  .acc-sec[open] .acc-ico {
    transform: scale(1.06);
    background: var(--teal);
    color: #fff;
  }
  .acc-ico svg {
    width: 18px;
    height: 18px;
  }
  .acc-title {
    display: grid;
    flex: 1;
    min-width: 0;
  }
  .acc-title small {
    color: var(--text-2);
    text-align: left;
    letter-spacing: 0;
  }
  .acc-count {
    padding: 2px 10px;
    border-radius: 99px;
    background: var(--mist);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    transition: background 0.2s, color 0.2s;
  }
  .acc-count.is-on {
    background: var(--teal-soft);
    color: var(--teal-deep);
  }
  .acc-all {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.2s;
  }
  .acc-sec[open] .acc-all,
  .acc-sec > summary:hover .acc-all,
  .acc-sec > summary:focus-within .acc-all {
    opacity: 1;
  }
  .acc-all .link {
    font-size: 12px;
  }
  .acc-chev {
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--text-2);
    border-bottom: 2px solid var(--text-2);
    transform: rotate(45deg);
    transition: transform 0.25s var(--ease-out);
    margin: 0 4px 4px;
  }
  .acc-sec[open] .acc-chev {
    transform: rotate(225deg);
    margin: 4px 4px 0;
  }
  .acc-sec[open] .acc-inner {
    animation: acc-open 0.28s var(--ease-out);
  }
  @keyframes acc-open {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }
  }
  .acc-inner {
    padding: 0 14px 14px;
  }
  .acc-inner .access-hint {
    margin: 0 0 8px;
  }
  .acc-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 6px 14px;
  }
  .acc-sw[hidden] {
    display: none !important;
  }
  /* Every permission tick box is a switch. */
  .permission-grid label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    border-radius: 10px;
    transition: background 0.15s;
    cursor: pointer;
    text-align: left;
  }
  .permission-grid label:hover {
    background: var(--mist);
  }
  .permission-grid input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    flex: none;
    width: 38px !important;
    height: 22px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: #cdd9d8;
    cursor: pointer;
    transition: background 0.22s var(--ease-out);
  }
  .permission-grid input[type="checkbox"]::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px #0f2a3640;
    transition: transform 0.22s var(--ease-out);
  }
  .permission-grid input[type="checkbox"]:checked {
    background: var(--teal);
  }
  .permission-grid input[type="checkbox"]:checked::before {
    transform: translateX(16px);
  }
  .permission-grid input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--teal-deep);
    outline-offset: 2px;
  }
  .permission-grid input[type="checkbox"]:checked + .acc-text,
  .permission-grid input[type="checkbox"]:checked + * {
    color: var(--text);
    font-weight: 600;
  }

  /* ---------- Settings: sections slide in ---------- */
  .set-enter {
    animation: set-in 0.35s var(--ease-out) both;
    animation-delay: var(--d, 0ms);
  }
  @keyframes set-in {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  }
  .set-plus {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
  }
  .set-plus-card {
    display: grid;
    gap: 2px;
    align-content: start;
    text-align: left;
    margin: 0;
    padding: 16px;
    min-height: 0;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    box-shadow: none;
    transition: transform 0.2s var(--ease-out), border-color 0.2s, box-shadow 0.2s;
  }
  .set-plus-card:hover {
    transform: translateY(-2px);
    border-color: var(--teal);
    box-shadow: 0 10px 24px #0f2a3614;
  }
  .set-plus-ico {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-bottom: 8px;
    border-radius: 12px;
    background: var(--teal-soft);
    color: var(--teal-deep);
    font-size: 18px;
  }
  .set-plus-card small {
    color: var(--text-2);
    text-align: left;
  }
  .set-plus-card span:last-child {
    margin-top: 6px;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
  }
  .set-dupe {
    padding: 14px;
    margin-top: 10px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
  }
  .set-dupe h4 {
    margin: 0 0 8px;
  }
  .set-dupe-rows {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }
  .set-dupe-row {
    display: flex !important;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
  }
  .set-dupe-row:has(input:checked) {
    border-color: var(--teal);
    background: var(--teal-soft);
  }
  .set-dupe-row input {
    width: auto;
    margin-top: 3px;
  }
  .set-dupe-row span {
    display: grid;
  }
  .set-dupe-row small {
    color: var(--text-2);
    letter-spacing: 0;
  }
  .set-dupe-none {
    padding: 14px;
    border-radius: 12px;
    background: var(--teal-soft);
    color: var(--teal-deep);
    font-weight: 650;
  }
  @media (prefers-reduced-motion: reduce) {
    .set-enter,
    .acc-sec[open] .acc-inner {
      animation: none;
    }
    .permission-grid input[type="checkbox"],
    .permission-grid input[type="checkbox"]::before {
      transition: none;
    }
  }
}

/* ---------- v45.1: check in by name after scanning ---------- */
@media screen {
  .hr-scan-page {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 16px;
    background: radial-gradient(120% 120% at 50% 0%, #10474f, #0f2a36 60%);
    animation: set-in 0.35s var(--ease-out) both;
  }
  .hr-scan-card {
    display: grid;
    justify-items: center;
    gap: 12px;
    width: min(420px, 100%);
    padding: 28px 22px;
    border-radius: 24px;
    background: #fff;
    text-align: center;
    box-shadow: 0 30px 80px #0007;
  }
  .hr-scan-card img {
    height: 46px;
  }
  .hr-scan-card h1 {
    margin: 0;
    font-size: 26px;
  }
  .hr-scan-clock {
    margin: 0;
    font-size: 40px;
    font-weight: 800;
    color: var(--teal-deep);
    font-variant-numeric: tabular-nums;
  }
  .hr-scan-card label {
    display: grid;
    gap: 6px;
    width: 100%;
    text-align: left;
    font-weight: 650;
  }
  .hr-scan-card label[hidden] {
    display: none;
  }
  .hr-scan-card input {
    min-height: 52px;
    font-size: 18px;
  }
  .hr-scan-go,
  .hr-scan-done {
    width: 100%;
    min-height: 54px;
    font-size: 18px;
  }
  .hr-scan-msg {
    min-height: 20px;
    margin: 0;
    color: var(--rose);
    font-weight: 650;
  }
  .hr-scan-card .hr-tick {
    width: 84px;
    height: 84px;
    font-size: 42px;
    animation: fun-pop 0.6s cubic-bezier(0.2, 1.4, 0.3, 1) both;
  }
  .hr-scan-card .hr-tick.is-out {
    background: var(--ink, #0f2a36);
  }
  .hr-team-dot::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--c, var(--teal));
  }
  .hr-shifts input[type="time"] {
    max-width: 140px;
  }
}

/* v47: big hubs — sections row + tabs row */
@media screen {
  .hub-tabs.hub-tabs-2 {
    display: grid;
    gap: 6px;
    padding: 0;
    background: none;
    width: auto;
    overflow: visible;
  }
  .hub-sections {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }
  .hub-tabs .hub-section {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid #d6e2e1;
    border-radius: 999px;
    background: #fff;
    color: var(--text-2);
    font-weight: 700;
    box-shadow: none;
    transition: background-color 0.18s, color 0.18s, border-color 0.18s;
  }
  .hub-tabs .hub-section span {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e9f0ef;
    font-size: 11px;
  }
  .hub-tabs .hub-section[aria-pressed="true"] {
    background: var(--teal-deep, #0b6b6d);
    border-color: transparent;
    color: #fff;
  }
  .hub-tabs .hub-section[aria-pressed="true"] span {
    background: #ffffff2e;
  }
  .hub-sub {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: #e9f0ef;
    overflow-x: auto;
    scrollbar-width: none;
    width: max-content;
    max-width: 100%;
    animation: hub-sub-in 0.22s cubic-bezier(.22,.8,.3,1);
  }
  .hub-sub button {
    margin: 0;
    min-height: 34px;
    padding: 6px 14px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-2);
    font-weight: 650;
    box-shadow: none;
    white-space: nowrap;
  }
  .hub-sub button[aria-selected="true"] {
    background: #fff;
    color: var(--teal-deep);
    box-shadow: 0 1px 3px #0f2a361f;
  }
  @keyframes hub-sub-in {
    from { opacity: 0; transform: translateY(-4px); }
  }
  @media (prefers-reduced-motion: reduce) {
    .hub-sub { animation: none; }
  }
}

/* v58: the attendance screen by link (TV / tablet at the entrance) */
@media screen {
  body.att-screen-on { overflow: hidden; }
  .att-screen {
    position: fixed; inset: 0; z-index: 5000; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 4vmin;
    padding: 5vmin 6vmin; color: #fff; overflow: hidden;
    background: radial-gradient(90% 120% at 100% 0%, #1d4f63 0%, transparent 60%), linear-gradient(160deg, #21345a 0%, #0f2a36 70%);
    font-family: "Manrope", "IBM Plex Sans Arabic", Arial, sans-serif;
  }
  .att-s-side { display: grid; align-content: space-between; gap: 3vmin; min-width: 0; }
  .att-s-brand { display: grid; gap: 1.2vmin; }
  .att-s-brand img { width: min(26vmin, 240px); height: auto; }
  .att-s-brand span { font-size: max(14px, 2vmin); opacity: .75; letter-spacing: .02em; }
  .att-s-clock { display: grid; gap: .5vmin; }
  .att-s-clock b { font-family: "Anton", "Manrope", sans-serif; font-weight: 400; font-size: min(22vmin, 190px); line-height: .9; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
  .att-s-clock span { font-size: max(16px, 2.8vmin); opacity: .8; }
  .att-s-how h1 { margin: 0; font-size: max(22px, 4.4vmin); line-height: 1.1; }
  .att-s-how p { margin: .6vmin 0 2vmin; font-size: max(18px, 3vmin); opacity: .85; }
  .att-s-how ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4vmin; }
  .att-s-how li { display: flex; align-items: center; gap: 1.6vmin; font-size: max(14px, 2.1vmin); opacity: .9; }
  .att-s-how li span { display: grid; place-items: center; flex: none; width: max(26px, 4vmin); height: max(26px, 4vmin); border-radius: 50%; background: #4a90bf; font-weight: 800; }
  .att-s-recent h2 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 1.2vmin; font-size: max(13px, 1.8vmin); text-transform: uppercase; letter-spacing: .18em; opacity: .7; }
  .att-s-recent h2 em { font-style: normal; letter-spacing: 0; text-transform: none; color: #7fe0d0; }
  .att-s-recent ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .8vmin; }
  .att-s-recent li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.6vmin; padding: 1vmin 1.6vmin; border-radius: 1.4vmin; background: #ffffff12; font-size: max(13px, 1.9vmin); animation: att-s-in .5s ease both; }
  .att-s-recent li:first-child { background: #0a9a9c3d; }
  .att-s-recent li b { font-size: 1.1em; }
  .att-s-recent li span { opacity: .75; }
  .att-s-recent li.is-out span { color: #f6c453; opacity: 1; }
  .att-s-recent time { font-variant-numeric: tabular-nums; opacity: .85; }
  .att-s-main { display: grid; place-items: center; min-width: 0; min-height: 0; }
  .att-s-card { display: grid; gap: 2vmin; justify-items: center; padding: 3.4vmin; border-radius: 4vmin; background: #fff; color: #0f2a36; box-shadow: 0 4vmin 10vmin #0007; }
  .att-s-qr { width: min(64vmin, 46vw, 640px); aspect-ratio: 1; display: grid; place-items: center; }
  .att-s-qr .qr-svg { width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; display: block; }
  .att-s-qr.is-new { animation: att-s-flip .6s cubic-bezier(.2,.8,.2,1); }
  .att-s-wait { width: 14vmin; height: 14vmin; border-radius: 50%; border: 1.2vmin solid #e5edf5; border-top-color: #0a9a9c; animation: fun-spin .9s linear infinite; }
  .att-s-bar { width: 100%; height: 1vmin; min-height: 6px; border-radius: 99px; background: #e5edf5; overflow: hidden; }
  .att-s-bar i { display: block; height: 100%; width: calc(var(--p, 1) * 100%); background: linear-gradient(90deg, #0a9a9c, #4a90bf); transition: width 1s linear; }
  .att-s-left { margin: 0; font-size: max(13px, 1.9vmin); color: #4b6470; }
  .att-s-full { position: fixed; right: 2vmin; bottom: 2vmin; padding: 10px 16px; border-radius: 99px; border: 0; background: #ffffff1f; color: #fff; box-shadow: none; font-size: 14px; }
  .att-s-off { position: fixed; left: 50%; top: 2vmin; transform: translateX(-50%); margin: 0; padding: 10px 18px; border-radius: 99px; background: #f43f5e; color: #fff; font-weight: 700; }
  .att-s-gone { grid-column: 1 / -1; display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; }
  .att-s-gone img { width: 220px; margin-bottom: 20px; }
  .att-s-gone h1 { margin: 0; font-size: max(24px, 4vmin); }
  .att-s-gone p { margin: 0; opacity: .8; font-size: max(16px, 2.4vmin); }
  @keyframes att-s-flip { from { transform: rotateY(90deg) scale(.96); opacity: .2; } }
  @keyframes att-s-in { from { transform: translateX(-20px); opacity: 0; } }
  /* a screen standing up (portrait tablet / TV on its side) */
  @media (orientation: portrait) {
    .att-screen { display: flex; flex-direction: column; gap: 3vh; padding: 4vh 6vw; overflow: auto; }
    .att-s-side { display: contents; }
    .att-s-brand { order: 1; }
    .att-s-clock { order: 2; }
    .att-s-main { order: 3; }
    .att-s-how { order: 4; }
    .att-s-recent { order: 5; }
    .att-screen > *, .att-s-side > * { flex: none; }
    .att-s-main { min-height: auto; }
    .att-s-qr { width: min(74vw, 46vh); }
    .att-s-clock b { font-size: min(13vh, 150px); }
    .att-s-how ol { display: none; }
    .att-s-recent li:nth-child(n + 4) { display: none; }
  }
  @media (prefers-reduced-motion: reduce) { .att-s-qr.is-new, .att-s-recent li, .att-s-wait { animation: none; } }
  .att-link-url { display: flex; gap: 8px; align-items: center; }
  .att-link-url input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: 13px; }
  .att-link-made { margin: 0; font-size: 12px; }
  .att-link-how { border: 1px solid #d9e4e3; border-radius: 12px; padding: 10px 14px; }
  .att-link-how summary { cursor: pointer; font-weight: 700; }
  .att-link-how ol { margin: 8px 0 0; padding-inline-start: 20px; display: grid; gap: 6px; }
}

/* v60: pick your name from a list on the check-in page; the office changes times */
@media screen {
  .hr-scan-find { display: grid; gap: 6px; text-align: start; }
  .hr-scan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: start; }
  .hr-scan-list:empty { display: none; }
  .hr-scan-list button { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0; padding: 10px 12px; min-height: 0; border-radius: 14px; border: 1px solid #dfe8ea; background: #fff; color: #10262f; box-shadow: none; font-weight: 400; text-align: start; animation: hr-pop-in .18s ease both; }
  .hr-scan-list button:hover, .hr-scan-list button:focus-visible { border-color: #0a9a9c; background: #f0faf9; }
  .hr-scan-list span:last-child { display: grid; min-width: 0; }
  .hr-scan-list b { font-size: 16px; }
  .hr-scan-list small, .hr-scan-me small { color: #6b7f86; font-size: 12px; }
  .hr-scan-av { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #4a90bf, #0a9a9c); color: #fff; font-weight: 800; font-size: 14px; }
  .hr-scan-hint { padding: 8px 4px; color: #6b7f86; font-size: 14px; }
  .hr-scan-hint.is-bad { color: #be123c; }
  .hr-scan-me { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 2px solid #0a9a9c; background: #f0faf9; text-align: start; animation: hr-pop-in .25s ease both; }
  .hr-scan-me > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
  .hr-scan-me .link { margin: 0; }
  .hr-scan-me[hidden], .hr-scan-find[hidden] { display: none; }
  @keyframes hr-pop-in { from { opacity: 0; transform: translateY(6px); } }
  .hr-edited { display: block; color: #4a90bf; font-size: 11px; }
  .hr-days { display: grid; gap: 14px; }
  .hr-day-form { padding: 14px; border-radius: 14px; background: #f6f9fa; }
  .hr-day-teams { display: flex; flex-wrap: wrap; gap: 8px 18px; }
  .hr-day-teams .hr-team-dot::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, #0a9a9c); margin-inline-end: 4px; }
  .hr-days-list tr.is-today td { background: #fff8e6; }
  .hr-days-list small { display: block; color: #6b7f86; font-size: 11px; }
  @media (prefers-reduced-motion: reduce) { .hr-scan-list button, .hr-scan-me { animation: none; } }
}
@media screen {
  .hr-scan-card .hr-scan-list, .hr-scan-card .hr-scan-list li, .hr-scan-card .hr-scan-me, .hr-scan-card .hr-scan-find { width: 100%; justify-self: stretch; align-self: stretch; }
  .hr-scan-list button { justify-content: flex-start; }
  .hr-att-set > details:last-child { grid-column: 1 / -1; }
  .hr-today-time { margin: -4px 0 10px; font-size: 13px; color: #4b6470; }
  .hr-today-time b { color: #b45309; }
}
@media screen {
  .hr-att-who { display: flex; align-items: center; gap: 12px; margin: 0; }
  .hr-att-who > span:last-child { display: grid; }
  .hr-att-who small { color: #6b7f86; font-size: 12px; }
  .hr-att-times { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  @media (max-width: 560px) { .hr-att-times { grid-template-columns: 1fr; } }
  .hr-att-times input.is-nudged { animation: hr-nudge .35s ease; }
  @keyframes hr-nudge { 40% { background: #e5f6f4; border-color: #0a9a9c; } }
  .hr-nudge { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
  .hr-nudge button { margin: 0; min-height: 0; padding: 5px 9px; border-radius: 9px; border: 1px solid #d9e4e3; background: #f6f9fa; color: #21345a; box-shadow: none; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .hr-nudge button:hover { border-color: #0a9a9c; background: #e5f6f4; }
  .hr-nudge [data-now], .hr-nudge [data-clear] { color: #0a7d7f; }
  .hr-att-preview { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #f6f9fa; font-size: 13px; }
  .hr-att-preview:empty { display: none; }
  .hr-att-preview span { padding: 4px 10px; border-radius: 99px; background: #fff; border: 1px solid #e3eaed; }
  .hr-att-preview .is-ok { background: #e3f6f3; border-color: #bfe8e1; color: #0a5f60; font-weight: 700; }
  .hr-att-preview .is-bad { background: #ffe4e8; border-color: #fecdd3; color: #be123c; font-weight: 700; }
  .hr-att-preview em { font-style: normal; color: #b45309; }
  .hr-change { margin: 0; min-height: 0; padding: 6px 12px; border-radius: 10px; font-size: 13px; }
}
