/* Polylon Fabrics edition (PF-23 stage 1): the pages that keep their earlier layout (payroll, reports, leave, rules, logs, templates,
   gate phones, team accounts, offline photos, scan log, enrollment, More, Approvals) restyled with the same tokens as polylon-theme.css.
   Loaded after polylon-theme.css. Nothing here is a second design: every colour, radius and size comes from the tokens. */

/* ---------- More, Approvals ---------- */
.workspace-tools { display: grid; gap: 12px; }
.workspace-tool { display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 14px 16px; text-decoration: none; color: inherit; transition: box-shadow var(--quick) ease, transform var(--quick) var(--ease); }
.workspace-tool:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.workspace-tool > div { flex: 1; min-width: 0; }
.workspace-tool h2 { font-size: 17px; margin-bottom: 3px; }
.workspace-tool p { font-size: 14px; color: var(--muted); line-height: 1.45; }
.workspace-tool > .icon:last-child { color: var(--muted); }
.tool-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.workspace-signout { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.workspace-signout h2 { font-size: 17px; }
.approval-grid { display: grid; gap: 12px; }
.approval-card { display: flex; align-items: center; gap: 14px; padding: 16px; text-decoration: none; color: inherit; min-height: 88px; }
.approval-card:hover { box-shadow: var(--shadow-lg); }
.approval-card .need-count { margin-left: auto; }
.approval-card .need-count.zero { background: var(--surface-2); color: var(--muted); }
@media (min-width: 768px) { .workspace-tools, .approval-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .workspace-tools, .approval-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- section heads, profile sections ---------- */
.profile-section-head { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; }
.profile-section-head > div { min-width: 0; flex: 1 1 220px; }
.profile-section-head p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.profile-section-head > .badge { flex: none; }
.app-access { display: grid; gap: 10px; }
.app-access h3 { font-size: 17px; }
.app-access p { font-size: 15px; }
.template-card { display: grid; gap: 12px; }
.template-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.template-head > div:first-child { flex: 1 1 280px; min-width: 0; }
.template-head h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 17px; }
.template-head p { font-size: 14px; line-height: 1.55; }
.template-head .actions { margin: 0; flex: none; }
.template-history summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; font-weight: 700; color: var(--brand); }
.template-history ul { margin: 6px 0 0; padding-left: 20px; font-size: 14px; line-height: 1.8; }
.weekday-picks, .weekly-offs { border: 1.5px solid var(--line-2); border-radius: var(--r); display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 10px 14px; }
.weekday-picks legend, .weekly-offs legend { font-size: 14px; font-weight: 650; padding: 0 6px; }
.people-picks { max-height: 320px; overflow: auto; display: grid; gap: 2px; }
.dept-picks { margin-top: 0; }
.summary-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.summary-strip > div { background: var(--surface-2); border-radius: var(--r); padding: 10px 12px; text-align: left; }
.summary-strip strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.15; }
.summary-strip span { font-size: 12px; color: var(--muted); font-family: var(--font-mono); letter-spacing: .04em; text-transform: uppercase; }
.context-rail { padding: 22px; background: var(--brand-soft); border-radius: var(--r-card); color: var(--brand-2); }
.context-rail h2 { margin-bottom: 12px; }
.context-rail p { font-size: 15px; line-height: 1.6; }
.steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; counter-reset: step; }
.steps li { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.steps li::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; flex: none; font-size: 14px; font-weight: 700; }

/* ---------- finance, payroll ---------- */
.finance-panel { min-width: 0; }
.finance-panel .profile-section-head { align-items: center; }
.salary-current { padding: 4px 0 20px; border-bottom: 1px solid var(--line); }
.salary-current > span { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.salary-current > strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(32px, 6vw, 44px); letter-spacing: -.02em; margin: 8px 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.salary-current p { font-size: 14px; color: var(--muted); }
.finance-history-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin: 24px 0 6px; }
.salary-history, .payment-history { list-style: none; margin: 0; padding: 0; }
.salary-history > li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.salary-history strong { font-size: 16px; }
.salary-history strong > span { font-weight: 500; font-size: 13px; color: var(--muted); }
.salary-history p { font-size: 14px; margin: 4px 0 0; color: var(--muted); }
.record-meta { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.record-meta small, .payment-history footer small { font-size: 12px; line-height: 1.5; color: var(--muted); }
.finance-form { display: grid; gap: 14px; }
.finance-form fieldset:disabled { opacity: .7; }
.finance-form > p.muted { font-size: 14px; line-height: 1.55; }
.finance-empty { padding: 14px 0; font-size: 15px; }
.finance-disclosure { font-size: 14px; line-height: 1.55; background: var(--surface-2); border-left: 4px solid var(--brand); padding: 12px 14px; margin: 0 0 16px; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.payment-history > li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.payment-row-head { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; }
.payment-row-head strong { font-family: var(--font-display); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }
.payment-row-head p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.payment-history dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.payment-history dt { font-size: 12px; color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.payment-history dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; white-space: pre-wrap; }
.payment-wide { grid-column: 1 / -1; }
.payment-history footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.void-context { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.void-note { padding: 12px 14px; background: var(--saffron-soft); margin: 12px 0; border-radius: var(--r-sm); overflow-wrap: anywhere; color: #5B3207; }
.void-note strong { font-size: 14px; }
.void-note small { display: block; margin-top: 4px; font-size: 12px; }
.batch-period { display: flex; align-items: flex-end; gap: 12px; max-width: 520px; flex-wrap: wrap; }
.batch-period .field { flex: 1 1 200px; }
.batch-filters { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(200px, 1.6fr); gap: 16px; margin: 16px 0; }
.batch-selection-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.batch-table-wrap { overflow-x: auto; }
.batch-table { min-width: 760px; }
.batch-table td { vertical-align: top; padding-block: 16px; }
.batch-table td:first-child, .batch-table th:first-child { width: 44px; padding-left: 4px; }
.batch-table .is-selected td { background: var(--brand-soft); }
.batch-summary { display: flex; gap: 20px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 18px 22px; background: var(--brand-2); color: #fff; border-radius: var(--r-card); position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 24px); box-shadow: var(--shadow-lg); }
.batch-summary > div { display: grid; gap: 4px; }
.batch-summary strong { font-family: var(--font-display); font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.batch-summary strong span { font-size: 14px; color: rgba(255, 255, 255, .75); }
.batch-summary small { font-size: 13px; color: rgba(255, 255, 255, .8); }
.batch-summary .primary { background: #fff; color: var(--brand); border-color: #fff; }
.batch-summary :focus-visible { outline-color: #fff; }
.batch-review-stats { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 16px; border-block: 1px solid var(--line); padding: 18px 0; }
.batch-review-stats > div { display: grid; gap: 6px; }
.batch-review-stats span { font-size: 12px; color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
.batch-review-stats strong { font-size: 16px; }
.batch-review-stats > div:first-child strong { font-family: var(--font-display); font-size: 26px; color: var(--brand); }
.batch-review-table td:last-child { overflow-wrap: anywhere; max-width: 220px; }
.batch-review-table td:nth-child(2) { white-space: nowrap; font-variant-numeric: tabular-nums; }
#batch-submit .check { margin-top: 12px; }
.batch-receipt-title { margin-top: 14px !important; }
.batch-receipt-list { list-style: none; padding: 0; margin: 18px 0; }
.batch-receipt-list li { display: flex; justify-content: space-between; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.batch-receipt-list li > div { min-width: 0; }
.batch-receipt-list small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.batch-receipt-list li > strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.payroll-view-link { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 18px; border: 1.5px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--brand); text-decoration: none; font-weight: 700; font-size: 15px; }
.history-filter { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.history-filter .field { width: 230px; max-width: 100%; }
.saved-batch-list { list-style: none; padding: 0; margin: 0; }
.saved-batch-list > li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 1fr) auto; gap: 20px; align-items: center; padding: 20px 0; border-top: 1px solid var(--line); }
.saved-batch-title > strong { font-size: 16px; }
.saved-batch-title > strong > span { font-size: 13px; font-weight: 500; color: var(--muted); }
.saved-batch-title p { margin: 6px 0; font-size: 14px; overflow-wrap: anywhere; }
.saved-batch-title small { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.saved-batch-totals { margin: 0; display: grid; gap: 10px; }
.saved-batch-totals > div { display: flex; gap: 16px; justify-content: space-between; }
.saved-batch-totals dt { font-size: 13px; color: var(--muted); }
.saved-batch-totals dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.receipt-payment-details { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-bottom: 1px solid var(--line); padding: 2px 0 18px; margin-bottom: 18px; }
.receipt-payment-details p { display: grid; gap: 4px; min-width: 0; }
.receipt-payment-details strong { font-size: 12px; color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.receipt-wide { grid-column: 1 / -1; }
@media (max-width: 1100px) { .batch-review-stats { grid-template-columns: 1fr 1fr; } .saved-batch-list > li { grid-template-columns: minmax(0, 1fr) minmax(180px, 1fr); } .saved-batch-list > li > button { grid-column: 1 / -1; justify-self: end; } }
@media (max-width: 767px) {
  .batch-filters { grid-template-columns: 1fr; }
  .batch-table { min-width: 0; display: block; }
  .batch-table thead { display: block; border-bottom: 1px solid var(--line); }
  .batch-table thead tr { display: flex; gap: 10px; align-items: center; }
  .batch-table th:not(:first-child) { display: none; }
  .batch-table thead tr::after { content: "Select all visible employees"; font-size: 14px; color: var(--muted); }
  .batch-table tbody { display: block; }
  .batch-table tbody tr { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px 10px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
  .batch-table tbody td { border: 0; padding: 0; width: auto !important; }
  .batch-table tbody td:first-child { grid-column: 1; grid-row: 1; }
  .batch-table tbody td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .batch-table tbody td:nth-child(3), .batch-table tbody td:nth-child(4) { grid-column: 2; }
  .batch-table tbody td:nth-child(3)::before { content: "Actual amount paid · INR"; font-size: 13px; color: var(--muted); display: block; margin-bottom: 6px; }
  .batch-table tbody td:nth-child(4)::before { content: "Individual reference (optional)"; font-size: 13px; color: var(--muted); display: block; margin-bottom: 6px; }
  .batch-summary { padding: 16px; }
  .batch-summary .primary { width: 100%; }
  .batch-review-table { min-width: 460px; }
  #batch-submit .actions button { width: 100%; }
  .saved-batch-list > li { grid-template-columns: 1fr; gap: 14px; }
  .saved-batch-list > li > button { justify-self: stretch; }
  .receipt-payment-details, .payment-history dl { grid-template-columns: 1fr; }
  .record-meta { max-width: 46%; }
  .history-filter .field { width: 100%; }
}

/* ---------- reports, rules, leave ---------- */
.report-controls, .report-catalogue { margin-bottom: 16px; }
.report-filter-grid { display: grid; grid-template-columns: 1fr 1fr 1.25fr auto; gap: 14px; align-items: end; }
.month-shortcut { display: flex; gap: 12px; align-items: end; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.month-shortcut .field { max-width: 240px; }
.month-shortcut > span { font-size: 13px; color: var(--muted); align-self: center; }
.report-view-filters { display: flex; gap: 16px; align-items: end; margin-bottom: 16px; flex-wrap: wrap; }
.report-view-filters > .field { flex: 1; max-width: 420px; min-width: 200px; }
.report-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 20px 0; }
.report-summary > div { display: grid; gap: 6px; border-left: 3px solid var(--brand-soft); padding-left: 14px; }
.report-summary span { font-size: 12px; color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
.report-summary strong { font-family: var(--font-display); font-weight: 800; font-size: 30px; }
.report-print-heading { display: none; }
.report-department { margin: 22px 0; }
.report-department > h2 { font-size: 18px; margin: 0 0 14px; display: flex; align-items: center; gap: 14px; }
.report-department > h2::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.attendance-report-card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg); padding: 18px; margin-bottom: 12px; break-inside: avoid; }
.attendance-report-card > header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.attendance-report-card h3 { margin-bottom: 4px; }
.attendance-report-card header p { font-size: 13px; line-height: 1.5; color: var(--muted); }
.attendance-report-card header > p { text-align: right; flex: none; }
.report-card-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 14px; margin: 18px 0; }
.report-card-metrics dt { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.report-card-metrics dd { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.attendance-report-card footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); padding-top: 12px; flex-wrap: wrap; }
.attendance-report-card footer small { font-size: 13px; color: var(--muted); }
.report-calendar { margin: 8px 0 20px; }
.attendance-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 16px; }
.calendar-weekday, .eh-weekday { text-align: center; font-size: 12px; font-family: var(--font-mono); color: var(--muted); padding: 6px 0; }
.calendar-date { min-height: 76px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 10px 8px; gap: 6px; border-radius: 12px; background: var(--surface-2); text-align: left; border-color: transparent; }
.calendar-date strong { font-size: 16px; }
.calendar-date span { font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.calendar-date[aria-pressed=true] { outline: 3px solid var(--brand); outline-offset: 1px; }
.status-present { background: var(--green-soft); color: #0B4F35; }
.status-absent { background: var(--red-soft); color: #7A1A14; }
.status-half_day { background: var(--sky-soft); color: #173D7A; }
.status-review_required { background: var(--saffron-soft); color: var(--saffron-ink); }
.status-leave, .status-public_holiday { background: var(--violet-soft); color: var(--violet-ink); }
.status-paid_holiday { background: var(--gold-soft); color: var(--gold-ink); }
.status-weekly_off { background: var(--brand-soft); color: var(--brand-2); }
.status-not_marked { background: var(--surface-2); color: var(--ink-2); }
.day-detail { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.day-detail > p { font-size: 14px; line-height: 1.6; color: var(--muted); }
.day-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.day-metrics dt { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.day-metrics dd { font-size: 16px; margin: 0; font-weight: 700; }
.day-punches { list-style: none; padding: 0; margin: 18px 0; }
.day-punches li { display: flex; gap: 16px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding: 14px 0; flex-wrap: wrap; }
.day-punches small { display: block; font-size: 13px; margin-top: 3px; color: var(--muted); }
.rule-version-list, .leave-entry-list { list-style: none; padding: 0; margin: 16px 0 0; }
.rule-version-list li, .leave-entry-list li { border-top: 1px solid var(--line); padding: 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rule-version-list p, .leave-entry-list p { font-size: 14px; line-height: 1.6; margin: 6px 0; }
.rule-version-list small, .leave-entry-list small { color: var(--muted); font-size: 13px; line-height: 1.7; }
.leave-balance-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 8px 0 20px; }
.leave-balance-metrics > div { display: grid; gap: 6px; }
.leave-balance-metrics span { font-size: 12px; color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
.leave-balance-metrics strong { font-family: var(--font-display); font-weight: 800; font-size: 30px; }
.report-table-scroll { overflow: auto; max-height: 70vh; }
.report-data-table { min-width: 900px; table-layout: auto; }
.report-data-table th { white-space: normal; position: sticky; top: 0; z-index: 1; }
.report-data-table td { font-size: 13px; line-height: 1.5; max-width: 230px; overflow-wrap: anywhere; vertical-align: top; }
.report-person-link { padding: 0 !important; min-height: 44px; border: 0 !important; border-radius: 0; background: none !important; color: var(--brand); text-align: left; font-size: inherit; font-weight: 700; }
.report-person-link:hover { text-decoration: underline; }
.muster-grid { min-width: 1000px; }
.muster-grid th, .muster-grid td { padding: 10px 6px; text-align: center; min-width: 31px; }
.muster-grid th:nth-child(-n+3), .muster-grid td:nth-child(-n+3) { text-align: left; min-width: 75px; }
.muster-grid td:first-child { min-width: 130px; }
.muster-legend, .report-generated { font-size: 13px; line-height: 1.7; color: var(--muted); }
.report-limitations { margin-top: 20px; }
.report-table-panel .profile-section-head { margin-bottom: 14px; }
.report-category-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; }
.report-category-grid h3 { font-size: 14px; margin: 0 0 10px; color: var(--ink-2); }
.report-kind-list { display: flex; gap: 8px; flex-wrap: wrap; }
.report-kind-list button[aria-pressed=true] { background: var(--brand); color: #fff; border-color: var(--brand); }

/* report library */
.report-library { display: block; padding: 20px; }
.report-library-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 0 18px; }
.report-library-heading h2 { font-size: 22px; margin: 6px 0 8px; }
.report-library-heading p { line-height: 1.55; }
.report-library-count { flex: none; font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1.1; color: var(--brand); text-align: right; }
.report-library-count small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 12px; color: var(--muted); margin-top: 4px; }
.report-library-tabs { display: flex; gap: 6px; padding: 6px; background: var(--surface-2); border-radius: 999px; margin-bottom: 18px; }
.report-library-tabs button { flex: 1; border: 0; background: transparent; border-radius: 999px; min-height: 44px; padding: 0 10px; color: var(--muted); }
.report-library-tabs button[aria-current=page] { background: var(--brand); color: #fff; }
.report-library-search { margin-bottom: 18px; }
.report-library-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.report-library-categories { display: grid; gap: 4px; background: var(--surface-2); padding: 8px; border-radius: var(--r-lg); }
.report-library-categories button { justify-content: space-between; text-align: left; border: 0; background: transparent; min-height: 46px; padding: 0 12px; font-size: 14px; }
.report-library-categories button small { font-size: 12px; color: var(--muted); }
.report-library-categories button[aria-current=page] { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.report-library-categories details { border-top: 1px solid var(--line-2); margin-top: 8px; padding-top: 4px; }
.report-library-categories summary { min-height: var(--tap); display: flex; align-items: center; font-size: 14px; color: var(--muted); cursor: pointer; padding: 0 8px; }
.report-library-results { border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; overflow: hidden; }
.report-library-results > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface-2); padding: 14px 16px; }
.report-library-results > header h3 { font-size: 16px; }
.report-library-results > header > span { font-size: 13px; color: var(--muted); }
.report-library-row { display: flex; gap: 14px; align-items: center; padding: 16px; border-top: 1px solid var(--line); min-width: 0; }
.report-library-row > div:not(.actions) { flex: 1; min-width: 0; }
.report-library-row h3 { font-size: 16px; line-height: 1.35; margin: 0 0 4px; overflow-wrap: anywhere; }
.report-library-row p { font-size: 14px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.report-library-row small { font-size: 12px; color: var(--muted); line-height: 1.5; }
.report-row-category { display: block; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin-bottom: 4px; }
.report-library-row.is-selected { background: var(--brand-soft); box-shadow: inset 4px 0 var(--brand); }
.report-library-row > button:not(.report-star) { flex: none; min-width: 94px; }
.report-star { width: var(--tap); min-width: var(--tap); padding: 0; border: 0; background: transparent; color: var(--brand); }
.report-star svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; }
.report-star[aria-pressed=true] svg { fill: currentColor; }
.report-library-empty { padding: 26px 18px; max-width: 600px; }
.report-library-empty h3 { margin-bottom: 8px; }
.report-library-empty p { line-height: 1.6; color: var(--muted); }
.report-library-list-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 4px 0 16px; flex-wrap: wrap; }
.report-library-list-head h3 { margin-bottom: 6px; }
.report-library-list-head p { font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 650px; }
.report-library-list .report-library-row { padding-left: 0; padding-right: 0; }
.report-save-form { display: grid; gap: 12px; }
.report-save-form .field { max-width: 100%; }
@media (max-width: 1100px) { .report-filter-grid { grid-template-columns: 1fr 1fr; } .report-library-layout { grid-template-columns: 180px minmax(0, 1fr); } }
@media (max-width: 767px) {
  .report-filter-grid { grid-template-columns: 1fr; }
  .report-summary { grid-template-columns: 1fr 1fr; }
  .report-card-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .attendance-calendar { gap: 4px; }
  .calendar-date { min-height: 66px; padding: 8px 4px; }
  .calendar-date span { font-size: 12px; }
  .day-metrics, .leave-balance-metrics { grid-template-columns: 1fr 1fr; }
  .report-category-grid { grid-template-columns: 1fr; }
  .report-library-layout { grid-template-columns: 1fr; }
  .report-library-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-library-categories details { grid-column: 1 / -1; }
  .report-library-row { flex-wrap: wrap; }
  .report-library-row > div:not(.actions) { flex-basis: calc(100% - 60px); }
  .report-library-row > button:not(.report-star) { margin-left: auto; }
  .report-library-count { font-size: 28px; }
}

/* ---------- employee attendance (person page tab) ---------- */
.employee-history { display: grid; gap: 14px; min-width: 0; }
.eh-overview { padding: 20px; }
.eh-overview > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.eh-overview h2 { margin-bottom: 6px; }
.eh-overview header p { color: var(--muted); }
.eh-export { display: flex; gap: 8px; flex-wrap: wrap; }
.eh-period-controls { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 18px 0; border-bottom: 1px solid var(--line); }
.eh-period-controls label { display: grid; gap: 6px; min-width: 0; }
.eh-period-controls label span { font-size: 13px; color: var(--muted); }
.eh-count { font-size: 13px; color: var(--muted); margin-left: auto; align-self: center; }
.eh-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0 0; }
.eh-totals div { background: var(--surface-2); border-radius: var(--r); padding: 12px; min-width: 0; }
.eh-totals dt { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.eh-totals dd { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.2; }
.eh-demo { font-size: 13px !important; color: var(--saffron-ink) !important; margin: 16px 0 0; background: var(--saffron-soft); padding: 10px 12px; border-radius: var(--r-sm); }
.eh-tabs { display: flex; gap: 6px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); }
.eh-tabs button { flex: 1; border: 0; background: transparent; color: var(--muted); border-radius: 999px; min-height: 44px; padding: 0 12px; }
.eh-tabs button[aria-pressed=true] { background: var(--brand); color: #fff; }
.eh-daily { display: grid; gap: 12px; }
.eh-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; min-width: 0; box-shadow: var(--shadow); }
.eh-day.is-open { border-color: var(--brand); }
.eh-day-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.eh-day h3 { font-size: 17px; }
.eh-day-heading small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.eh-status { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; line-height: 1.3; }
.eh-status b { border-right: 1px solid currentColor; padding-right: 8px; font-size: 12px; }
.eh-day-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.eh-day-times span { display: block; color: var(--muted); font-size: 12px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.eh-day-times strong { font-size: 16px; }
.eh-day footer { border-top: 1px solid var(--line); padding-top: 12px; display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.eh-day footer > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.eh-day footer small { font-size: 13px; color: var(--muted); }
.eh-indicator { font-size: 12px; color: var(--saffron-ink); background: var(--saffron-soft); border-radius: 999px; padding: 4px 10px; font-weight: 700; }
.eh-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; min-width: 0; }
.eh-calendar-day { min-height: 98px; padding: 10px 8px; text-align: left; border: 2px solid transparent; border-radius: 12px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 6px; min-width: 0; font-weight: 500; }
.eh-calendar-day.is-open { border-color: var(--brand); }
.eh-calendar-number { font-size: 16px; font-weight: 700; line-height: 1.2; }
.eh-calendar-number small { display: inline; font-size: 12px; margin-left: 4px; font-weight: 500; }
.eh-calendar-code { display: inline-block; border: 1px solid currentColor; border-radius: 6px; padding: 2px 5px; font-size: 12px; font-weight: 700; }
.eh-calendar-label { font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.eh-calendar-day.status-present, .eh-status.status-present { background: #DFF5E7; color: #11522E; }
.eh-calendar-day.status-absent, .eh-status.status-absent { background: #FDE3E1; color: #7A1A14; }
.eh-calendar-day.status-half_day, .eh-status.status-half_day { background: #DFEAFE; color: #173D7A; }
.eh-calendar-day.status-paid_holiday, .eh-status.status-paid_holiday { background: #FFF4C4; color: #5E4700; }
.eh-calendar-day.status-weekly_off, .eh-status.status-weekly_off { background: var(--brand-soft); color: var(--brand-2); }
.eh-calendar-day.status-leave, .eh-status.status-leave { background: var(--violet-soft); color: var(--violet-ink); }
.eh-calendar-day.status-public_holiday, .eh-status.status-public_holiday { background: #E2F3F1; color: #1D5E5A; }
.eh-calendar-day.status-review_required, .eh-status.status-review_required { background: var(--saffron-soft); color: var(--saffron-ink); }
.eh-calendar-day.status-not_marked, .eh-status.status-not_marked { background: var(--surface-2); color: var(--ink-2); }
.eh-logs { margin-top: 14px; background: var(--surface-2); border-radius: var(--r-lg); padding: 16px; min-width: 0; }
.eh-logs > header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.eh-logs p { font-size: 14px; line-height: 1.55; }
.eh-logs > small { display: block; font-size: 12px; line-height: 1.6; color: var(--muted); }
.eh-day-metrics { display: flex; gap: 16px; flex-wrap: wrap; margin: 14px 0; color: var(--muted); font-size: 13px; }
.eh-day-metrics strong { display: block; color: var(--ink); margin-top: 4px; font-size: 15px; }
.eh-punches { list-style: none; padding: 0; margin: 16px 0; }
.eh-punches li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.eh-punches li > div { flex: 1; min-width: 0; }
.eh-punches small { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.eh-punch-dot, .event-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--brand); }
.eh-punch-dot.in, .event-dot.in { background: var(--green); }
.eh-no-punches { padding: 12px 0; color: var(--muted); }
.eh-legend { display: flex; gap: 8px; flex-wrap: wrap; }
.eh-legend span { font-size: 12px; padding: 6px 10px; border-radius: 999px; display: flex; align-items: center; gap: 6px; background: var(--surface-2); }
.eh-explanation { font-size: 14px; line-height: 1.6; color: var(--muted); }
.eh-explanation summary { min-height: var(--tap); cursor: pointer; display: flex; align-items: center; color: var(--brand); font-weight: 700; }
.eh-set-day { display: grid; gap: 8px; margin: 10px 0; }
.eh-set-day > div { display: flex; flex-wrap: wrap; gap: 8px; }
.eh-choice { border-radius: 999px; padding: 0 16px; font-weight: 700; border: 2px solid transparent; }
.eh-choice.choice-present { background: #DFF5E7; border-color: #36A565; }
.eh-choice.choice-absent { background: #FDE3E1; border-color: #D6453B; }
.eh-choice.choice-half_day { background: #DFEAFE; border-color: #3B74D6; }
.eh-choice.choice-paid_holiday { background: #FFF4C4; border-color: #E0B100; }
.eh-choice.choice-auto { background: var(--surface-2); border-color: var(--line-2); }
.eh-choice.is-current { box-shadow: 0 0 0 3px rgba(26, 33, 51, .3); }
@media (max-width: 767px) {
  .eh-totals { grid-template-columns: 1fr 1fr; }
  .eh-day-times { gap: 8px; }
  .eh-calendar { gap: 3px; }
  .eh-calendar-day { min-height: 80px; padding: 8px 3px; }
  .eh-calendar-label { display: none; }
  .eh-calendar-number small { display: block; margin-left: 0; }
  .eh-count { width: 100%; margin: 4px 0 0; }
}

/* ---------- logs, pay reports, range picker ---------- */
.range-picker { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: flex-end; margin-bottom: 14px; }
.range-picker .field { min-width: 150px; }
.range-shown { margin: 0; font-size: 14px; align-self: center; color: var(--muted); }
.logs-table td small { display: block; margin-top: 3px; color: var(--muted); }
.logs-filters .actions { margin-top: 12px; }
.pay-report-table td, .pay-report-table th { font-size: 13px; }
.pay-name { font-weight: 700; }
.toolbar { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.toolbar p { font-size: 14px; color: var(--muted); }
@media (max-width: 767px) {
  .logs-table thead { display: none; }
  .logs-table, .logs-table tbody, .logs-table tr, .logs-table td { display: block; }
  .logs-table tr { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; padding: 8px; background: var(--surface); }
  .logs-table td { border: 0; padding: 6px 8px; }
  .logs-table td::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
  .history-table { min-width: 540px; }
}

/* ---------- team accounts ---------- */
.accounts-layout { display: grid; gap: 16px; }
.accounts-count { font-size: 13px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; background: var(--surface-2); font-weight: 700; }
.accounts-roster { list-style: none; margin: 14px 0 0; padding: 0; }
.accounts-roster > li { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.account-avatar { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; color: var(--brand); background: var(--brand-soft); font-family: var(--font-display); font-size: 17px; font-weight: 800; }
.account-person { flex: 1 1 200px; min-width: 0; }
.account-person > strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.account-person > span, .account-person > small { display: block; overflow-wrap: anywhere; color: var(--muted); line-height: 1.5; font-size: 13px; }
.account-you { font-size: 12px; color: var(--muted); font-weight: 600; padding-left: 4px; }
.account-labels { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.account-role { display: inline-block; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-2); }
.account-role.admin { background: var(--violet-soft); color: var(--violet-ink); }
.account-role.station { background: var(--green-soft); color: var(--green-ink); }
.account-state { font-size: 12px; color: var(--muted); }
.accounts-empty { padding: 22px 0; color: var(--muted); line-height: 1.6; }
@media (max-width: 767px) { .account-labels { flex-direction: row; flex-wrap: wrap; align-items: center; margin-left: 56px; } }

/* ---------- offline photos, scan log, gate phones ---------- */
.offline-list { display: grid; gap: 12px; }
.offline-card { display: grid; gap: 12px; }
.offline-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.offline-head h2 { margin: 0; font-size: 18px; }
.offline-head p { margin: 4px 0 0; }
.offline-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0; }
.offline-facts dt { font-size: 12px; color: var(--muted); }
.offline-facts dd { margin: 2px 0 0; font-weight: 700; }
.offline-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.offline-actions button { width: 100%; }
.compact-table td, .compact-table th { font-size: 14px; }
.catalog-form { display: flex; gap: 8px; align-items: center; }

/* ---------- camera, enrollment, scan ---------- */
.camera-stage { background: #1A2133; min-height: 320px; aspect-ratio: 4 / 3; border-radius: var(--r-lg); position: relative; overflow: hidden; display: grid; place-items: center; color: #fff; width: 100%; max-width: 100%; }
.camera-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); min-width: 0; max-width: 100%; }
.camera-stage.back video { transform: none; }
.camera-stage .camera-idle { position: relative; text-align: center; padding: 26px; max-width: 320px; }
.camera-idle > .icon { width: 42px; height: 42px; margin-bottom: 12px; }
.camera-idle h2 { color: #fff; font-size: 20px; }
.camera-idle p { color: #D3D9E4; font-size: 14px; margin-top: 6px; }
.camera-stage.live .camera-idle { display: none; }
.camera-stage.live::after { content: ""; position: absolute; inset: 12% 26%; border: 2px solid rgba(255, 255, 255, .7); border-radius: 48%; pointer-events: none; }
.camera-caption { position: absolute; bottom: 12px; left: 14px; right: 14px; text-align: center; font-size: 12px; color: #E8EDF6; background: rgba(26, 33, 51, .75); padding: 8px; border-radius: var(--r-sm); }
.camera-controls { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.camera-controls button { flex: 1; }
.enroll-actions { margin: 16px 0; }
.enroll-picker { display: grid; gap: 8px; margin: 14px 0; }
.enroll-picker button { justify-content: flex-start; text-align: left; min-height: 60px; }
.recognition-screen-status { font-size: 12px; color: var(--muted); }
@media (max-width: 767px) { .camera-stage { min-height: 0; aspect-ratio: 4 / 5; } .camera-stage .camera-idle { width: 100%; max-width: 100%; padding: 22px 18px; } }

/* ---------- me (Employee sign-in) ---------- */
.me-punches { list-style: none; padding: 0; margin: 0; display: grid; }
.me-punches li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.me-punches li:first-child { border-top: 0; }

/* ---------- filters row (any list) ---------- */
.filter-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.filter-row .grow { flex: 1 1 220px; min-width: 0; }

/* ---------- R1 (28 October 2026): shift form parts, worked examples ---------- */
.form-part { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 12px; }
.form-part legend { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 4px; }
.form-part legend svg { width: 18px; height: 18px; }
.choice-list { display: grid; gap: 8px; }
.choice-row { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 14px; cursor: pointer; }
.choice-row:has(input:checked) { border-color: var(--brand); background: #F7F8FD; box-shadow: inset 0 0 0 1px var(--brand); }
.choice-row input { margin-top: 3px; accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.choice-row strong { display: block; font-size: 15px; }
.choice-row small { display: block; color: var(--muted); font-size: 13px; }
/* Shift choice listed on the page (2 November 2026): Fixed time / Not fixed time, then that group's rows only. */
.choice-row[hidden] { display: none; }
.choice-pick { display: grid; gap: 10px; }
.choice-groups { display: flex; flex-wrap: wrap; gap: 6px; }
.choice-group { position: relative; }
.choice-group input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-group span { display: inline-block; min-height: 40px; line-height: 38px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; font-weight: 600; font-size: 14px; }
.choice-group input:checked + span { border-color: var(--brand); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.choice-group input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.choice-pick .choice-list { max-height: 360px; overflow: auto; }
.person-assign-inline { margin-top: 12px; }
.example { background: var(--surface-2); border-radius: var(--r); padding: 12px 14px; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; color: var(--ink-2); }

/* ---------- R1: Approvals (counts per type, overtime cards, bulk approve) ---------- */
.badge.violet { background: var(--violet-soft); color: var(--violet-ink); }
.approval-counts { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.approval-counts::-webkit-scrollbar { display: none; }
.count-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-weight: 650; font-size: 14px; text-decoration: none; white-space: nowrap; }
.count-chip b { font-family: var(--font-mono); }
.count-chip.on { background: var(--brand); color: #fff; }
.ot-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 14px; }
.ot-tools .field { margin: 0; }
.ot-all { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer; }
.ot-all input, .ot-pick input { width: 20px; height: 20px; accent-color: var(--brand); }
.ot-grid { display: grid; gap: 12px; }
@media (min-width: 1024px) { .ot-grid { grid-template-columns: 1fr 1fr; } }
.ot-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.ot-card.picked { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand), var(--shadow); }
.ot-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ot-pick { display: grid; place-items: center; width: 32px; height: 44px; cursor: pointer; }
.ot-name { min-width: 0; }
.ot-name strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ot-name span { color: var(--muted); font-size: 14px; }
.ot-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ot-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ot-facts > div { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.ot-facts .mono-label { display: block; font-size: 10px; }
.ot-facts b { display: block; font-family: var(--font-mono); font-size: 14px; white-space: nowrap; }
.ot-facts small { display: block; font-size: 11px; color: var(--muted); }
.ot-shift { font-size: 13px; color: var(--muted); }
.ot-card .actions { margin: 0; flex-wrap: wrap; }
.ot-bulk { position: sticky; bottom: calc(var(--tabbar-h) + 28px + var(--safe-b)); z-index: 4; display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 10px 12px 10px 16px; box-shadow: var(--shadow-lg); margin: 12px 0; }
.ot-bulk b { flex: 1; }
.ot-bulk .quiet { color: #fff; border-color: #5A6378; background: transparent; }
.ot-bulk .primary { background: var(--saffron); border-color: var(--saffron); color: var(--ink); }
@media (min-width: 1024px) { .ot-bulk { bottom: 16px; } }

/* ---------- R1: Today (mockup v2) — charts, focus filter, suggestions ---------- */
.today-root { display: grid; gap: 12px; }
.today-grid > .stack { display: grid; gap: 12px; align-content: start; }
@media (min-width: 1024px) {
  .today-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .today-grid > .stack { gap: 16px; }
  .today-grid .kpi-grid { grid-template-columns: 1fr 1fr; margin: 0; }
}
.today-grid .kpi-grid { margin: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.card-head h2 { font-size: 19px; }
.card-head .sub { font-size: 13px; margin-top: 2px; }
.link-btn { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-weight: 650; font-size: 14px; white-space: nowrap; background: none; border: 0; padding: 6px 0; min-height: 36px; text-decoration: none; cursor: pointer; }
.link-btn svg { width: 16px; height: 16px; }
.wide-only { display: none; }
@media (min-width: 768px) { .wide-only { display: inline; } }
/* focus (filter) bar */
.focus-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r); background: var(--brand-soft); animation: nb-rise .18s var(--ease) both; }
.focus-chip { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--brand); color: #fff; font-weight: 650; font-size: 13px; cursor: pointer; }
@keyframes nb-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* marks: dim the others, glide between states */
.mk { cursor: pointer; transition: opacity .2s var(--ease), filter .2s var(--ease); outline: none; }
.mk.dim { opacity: .28; }
.mk:focus-visible { filter: drop-shadow(0 0 0 2px var(--brand)); }
.leg { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.leg b { font-family: var(--font-mono); color: var(--ink); }
.leg .sw { width: 12px; height: 12px; border-radius: 4px; display: inline-block; vertical-align: -1px; margin-right: 6px; }
.bars-wrap { margin-top: 6px; min-height: 120px; }
.bars .bar { transition: y .35s var(--ease), height .35s var(--ease); }
.bars .axis { font-family: var(--font-mono); font-size: 11px; fill: var(--muted); }
.bars .axis.strong { fill: var(--ink); font-weight: 700; }
.bar-day.on > rect:first-child { fill: var(--brand-soft); }
.chart-skeleton { height: 170px; border-radius: var(--r); background: linear-gradient(90deg, var(--surface-2) 0%, #F6F7FB 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: nb-shimmer 1.2s linear infinite; }
@keyframes nb-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.chart-empty { padding: 24px 0; }
.range { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.range button { min-height: 36px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 0 12px; font-size: 13px; font-weight: 650; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); cursor: pointer; transition: background .15s ease, color .15s ease; }
.range button svg { width: 16px; height: 16px; }
.range button[aria-pressed=true] { background: var(--brand); border-color: var(--brand); color: #fff; }
/* suggestions with a gentle moving arrow */
.sugg-list { display: grid; }
.sugg { display: flex; align-items: center; gap: 12px; padding: 12px 0; border: 0; border-top: 1px solid var(--line); background: none; color: inherit; text-decoration: none; text-align: left; width: 100%; font: inherit; cursor: pointer; }
.sugg:first-child { border-top: 0; }
.sugg-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.sugg-text { flex: 1; min-width: 0; }
.sugg-text strong { display: block; font-size: 15px; line-height: 1.3; }
.sugg-text small { color: var(--muted); font-size: 13px; }
.nudge { width: 36px; height: 36px; border-radius: 50%; background: var(--saffron-soft); color: var(--saffron-ink); display: grid; place-items: center; flex: none; animation: nb-nudge 1.4s var(--ease) infinite; }
@keyframes nb-nudge { 0%, 55%, 100% { transform: translateX(0); } 25% { transform: translateX(5px); } }
/* tiles: buttons look like the cards; wide tiles span two columns */
/* people lists (status card and tile sheets) */
.people-mini { list-style: none; margin: 8px 0 0; padding: 0; display: grid; }
.people-mini li a { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; min-height: 56px; }
.people-mini li:first-child a { border-top: 0; }
.people-mini .who { flex: 1; min-width: 0; }
.people-mini .who strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people-mini .who small { color: var(--muted); font-size: 13px; }
.people-mini .time { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); }
.avatar.small { width: 36px; height: 36px; font-size: 13px; }
.today-list { animation: nb-rise .2s var(--ease) both; }
.chart-tip { position: fixed; z-index: 80; pointer-events: none; background: var(--ink); color: #fff; font-size: 13px; padding: 6px 10px; border-radius: 8px; box-shadow: var(--shadow-lg); max-width: 260px; }
@media (prefers-reduced-motion: reduce) {
  .nudge, .focus-bar, .today-list, .chart-skeleton, .t-card, .tile-grid { animation: none; }
  .gseg, .gbar span, .thread i, .stack-bar i, .bars .bar, .mk, .dp-top, .dp-row, .dp-bar i, .tf-bub, .tf-fab, .tf-scrim { transition: none; }
}
.date-bar { flex-wrap: nowrap; }
.date-bar .date-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 767px) { .date-bar .chip { padding: 0 12px; min-width: 48px; justify-content: center; } }

/* ---------- Temporary (cash) workers (PF-30) ---------- */
.temp-pill { background: var(--saffron-soft); color: var(--saffron-ink); }
.temp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.temp-row-main { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 8px; border: 0; border-radius: 12px; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.temp-row-main:hover, .temp-row-main:focus-visible { background: var(--surface-2); }
.temp-row-name { display: grid; gap: 2px; min-width: 0; }
.temp-row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.temp-row-name small, .temp-row-amount small { color: var(--muted); font-weight: 500; }
.temp-row-amount { display: grid; justify-items: end; gap: 2px; font-weight: 700; white-space: nowrap; }
ul.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
ul.plain li.voided { color: var(--ink-2); text-decoration: line-through; }

/* ---------- R1: one-tap day marking on the person page (PagarBook-style day cards) ---------- */
.eh-daily { container-type: inline-size; }
.eh-day-q { display: grid; gap: 14px; }
@container (min-width: 700px) { .eh-day-q { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; } .eh-day-q > .eh-logs { grid-column: 1 / -1; } }
.eh-day-q .eh-day-times { margin: 12px 0; }
.eh-day-sub { margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
.eh-day-sub.status-present { color: var(--green-ink); } .eh-day-sub.status-absent { color: var(--red-ink); } .eh-day-sub.status-not_marked, .eh-day-sub.status-review_required { color: var(--red-ink); }
.eh-day-sub.status-half_day, .eh-day-sub.status-early_exit { color: var(--saffron-ink); } .eh-day-sub.status-weekly_off, .eh-day-sub.status-paid_holiday, .eh-day-sub.status-public_holiday { color: var(--violet-ink); }
.eh-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-content: start; }
.eh-q { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border-radius: 12px; border: 1px solid transparent; background: var(--surface-2); color: var(--ink-2); font: inherit; font-size: 13px; text-align: left; text-decoration: none; cursor: pointer; min-width: 0; transition: background .18s var(--ease), color .18s var(--ease), transform .12s ease; }
.eh-q b { font-family: var(--font-mono); font-size: 13px; padding-right: 8px; border-right: 1.5px solid currentColor; flex: none; }
.eh-q span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.eh-q:hover:not(:disabled) { background: var(--surface-3); }
button.eh-q:active:not(:disabled) { transform: scale(.97); }
.eh-q:disabled { cursor: default; }
.eh-q[aria-disabled=true] { opacity: .55; cursor: default; }
.eh-q.q-present.on { background: var(--green); color: #fff; }
.eh-q.q-half_day.on { background: var(--saffron); color: var(--ink); }
.eh-q.q-absent.on { background: var(--red); color: #fff; }
.eh-q.q-paid_holiday.on, .eh-q.q-wo.on { background: var(--violet); color: #fff; }
.eh-q.q-ot.on { background: var(--brand-soft); color: var(--brand); }
.eh-q.q-ot.on-wait { background: var(--saffron-soft); color: var(--saffron-ink); border-color: var(--saffron); }
.eh-q.q-auto { background: transparent; border-color: var(--line-2); }
.eh-q.q-auto.on-auto { opacity: .6; }
.eh-day.is-saving .eh-quick { opacity: .75; }
@container (max-width: 340px) { .eh-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- R1: Advanced details in Add employee / Edit details, clearer Staff details card ---------- */
.adv-details { border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 0; background: var(--surface); }
.adv-details > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; min-height: 56px; }
.adv-details > summary::-webkit-details-marker { display: none; }
.adv-details > summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .18s var(--ease); flex: none; }
.adv-details[open] > summary::after { transform: rotate(-135deg); }
.adv-details > summary strong { display: block; font-size: 16px; }
.adv-details > summary small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.adv-details[open] > summary { border-bottom: 1px solid var(--line); }
.adv-details .adv-group { padding: 12px 16px 4px; }
.adv-group { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.adv-group legend { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 6px; }
.adv-note { padding: 4px 16px 14px; font-size: 13px; }
.field-help { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.field .field-error:empty { display: none; }
.field .field-error { display: block; color: var(--red-ink); font-size: 12.5px; margin-top: 4px; }
.staff-card .sd-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sd-groups { display: grid; gap: 14px; margin: 10px 0; }
@container (min-width: 520px) { .sd-groups { grid-template-columns: 1fr 1fr; } }
.staff-card { container-type: inline-size; }
.sd-group h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.sd-group dl { margin: 0; display: grid; }
.sd-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.sd-row:first-child { border-top: 0; }
.sd-row dt { color: var(--ink-2); }
.sd-row dd { margin: 0; font-family: var(--font-mono); font-size: 13px; text-align: right; color: var(--ink); }
.sd-row dd.sd-missing { font-family: var(--font-body); color: var(--muted); }
.sd-row dd.sd-text { font-family: var(--font-body); font-size: 14px; font-weight: 600; }

/* ---------- R1: More as a tile grid (owner, 28 October 2026) ---------- */
.more-group { margin: 6px 0 18px; }
.more-group > h2 { font-size: 12px; margin: 0 0 10px 2px; }
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 1024px) { .more-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
.more-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 108px; padding: 14px 8px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; text-align: center; transition: transform .15s var(--ease), box-shadow .15s ease; }
.more-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.more-tile:active { transform: scale(.97); }
.more-icon { width: 48px; height: 48px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.more-icon .icon { width: 24px; height: 24px; }
.more-name { font-weight: 650; font-size: 13.5px; line-height: 1.25; }
@media (min-width: 1024px) { .more-name { font-size: 15px; } .more-tile { min-height: 124px; } }
.more-count { position: absolute; top: 8px; right: 8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--saffron); color: var(--ink); font-size: 12px; font-weight: 800; display: grid; place-items: center; }

/* ---------- R1: Departments (list, department page), profile photos ---------- */
.dept-date { margin: -4px 0 12px; }
.dept-grid { display: grid; gap: 12px; }
@media (min-width: 768px) { .dept-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .dept-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dept-card { position: relative; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 18px; transition: transform .15s var(--ease), box-shadow .15s ease; }
.dept-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.dept-open { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.dept-card .quiet { position: relative; z-index: 2; }
.dept-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dept-top h2 { font-size: 19px; }
.dept-card .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.dept-card .sub b { color: var(--ink); }
.dept-meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 12px 0 8px; }
.dept-meter i { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .35s var(--ease); }
.dept-foot { display: flex; justify-content: space-between; font-size: 14px; }
.dept-head h1 { margin-top: 2px; }
.dept-detail { display: grid; gap: 14px; }
@media (min-width: 1024px) { .dept-detail { grid-template-columns: 1fr 1fr; align-items: start; } }
.stat4 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 600px) { .stat4 { grid-template-columns: repeat(4, 1fr); } }
.stat4 > div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.stat4 .mono-label { display: block; font-size: 10px; }
.stat4 b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 800; line-height: 1.15; }
.stat4 small { color: var(--muted); font-size: 12px; }
.person-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.person-photo.initials { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-family: var(--font-display); font-weight: 800; font-size: 15px; }
.dept-people .badge { white-space: nowrap; }
.profile-avatar.photo-btn { position: relative; border: 0; padding: 0; cursor: pointer; overflow: visible; font: inherit; }
.profile-avatar.photo-btn img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; display: block; }
.photo-badge { position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%; background: var(--saffron); color: var(--ink); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.photo-badge .icon { width: 14px; height: 14px; }
.profile-avatar-wrap { position: relative; display: inline-flex; flex: none; }
button.photo-badge { border: 0; padding: 0; cursor: pointer; }
button.photo-badge::after { content: ''; position: absolute; inset: -9px; }

/* ---------- R1: person page sections that open like a drop-down (owner 28 Oct 2026) ---------- */
details.fold > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; min-height: 44px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h3 { margin: 0; flex: 1; }
details.fold > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .18s var(--ease); flex: none; margin-left: 4px; }
details.fold[open] > summary::after { transform: rotate(-135deg); }
details.fold[open] > summary { margin-bottom: 10px; }

/* ---------- R1: Attendance overview (owner 28 Oct 2026) ---------- */
.att-filters { display: grid; gap: 10px; margin-bottom: 14px; }
.att-selects { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.att-selects .field { margin: 0; min-width: 160px; flex: 1 1 160px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; background: var(--surface); }
.seg button { border: 0; background: none; min-height: 38px; padding: 0 14px; border-radius: 999px; font-weight: 650; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--brand); color: #fff; }
.att-active { font-size: 14px; color: var(--ink-2); }
.att-grid { display: grid; gap: 14px; margin-bottom: 14px; }
@media (min-width: 900px) { .att-grid { grid-template-columns: 1fr 1fr; } }
.att-rows, .att-bad { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.att-rows button, .att-bad button { width: 100%; display: grid; grid-template-columns: minmax(90px, 1.2fr) 2fr auto; align-items: center; gap: 10px; min-height: 40px; padding: 4px 8px; border: 0; border-radius: 10px; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.att-bad button { grid-template-columns: 1fr auto auto; }
.att-rows button:hover, .att-bad button:hover, .att-rows button.on { background: var(--brand-soft); }
.att-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.att-bar i { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .35s var(--ease); }
.att-rows b { font-family: var(--font-mono); font-size: 13px; min-width: 42px; text-align: right; }
.att-chart { margin-bottom: 14px; }
.att-kpis { margin: 0 0 14px; }
@media (min-width: 1024px) { .att-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.att-log { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.people-mini li:first-child .att-log { border-top: 0; }
.att-log .who { flex: 1; min-width: 0; }
.att-log .who strong { display: block; }
.att-log .who small { color: var(--muted); font-size: 13px; }

/* Today department boxes (owner, 28 Oct 2026): larger, clearer names; a box grows on hover with a present / not present card. */
.chart-tip.rich { background: var(--surface, #fff); color: var(--ink); border: 1px solid var(--line, #E0E3EC); padding: 12px 14px; border-radius: 14px; min-width: 210px; animation: tip-in .16s var(--ease); }
.chart-tip.rich .tip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.chart-tip.rich .tip-head strong { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.chart-tip.rich .tip-head small, .chart-tip.rich .tip-note { color: var(--muted); font-size: 12px; }
.chart-tip.rich .tip-body { display: flex; align-items: center; gap: 14px; }
.chart-tip.rich .tip-pie text { font-family: var(--font-mono); font-size: 13px; font-weight: 700; fill: var(--ink); }
.chart-tip.rich dl { margin: 0; display: grid; gap: 6px; }
.chart-tip.rich dl div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.chart-tip.rich dt { font-size: 13px; color: var(--ink-2); }
.chart-tip.rich dt .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }
.chart-tip.rich dd { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 800; }
@keyframes tip-in { from { opacity: 0; transform: translateY(4px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dp-top:hover { transform: none; } .chart-tip.rich { animation: none; } }

/* Today (owner, 28 October 2026): details under the donut, suggestions scroll after 4, no near-white department colours. */
.sugg-list { max-height: calc(4 * 68px); overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y proximity; }
.sugg-list .sugg { scroll-snap-align: start; min-height: 68px; box-sizing: border-box; }

/* Deactivated staff and Delete (owner, 29 October 2026). */
.people-more { display: flex; justify-content: center; margin: 14px 0 4px; }
.panel.deactivated { margin-top: 16px; }
.panel.deactivated .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.deactivated-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.deactivated-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line, #E3E6EE); }
.deactivated-list li > div:first-child { min-width: 0; }
.deactivated-list .remove-actions { min-width: 220px; }
button.danger-text, .danger-text { color: var(--red-ink); }
@media (max-width: 600px) { .deactivated-list li { flex-direction: column; align-items: stretch; } .deactivated-list .remove-actions { min-width: 0; } }

/* Loading motion (owner picks 29 Oct 2026 from the review page: A2 B1 C1 D2 E2 F2 G1). The reduce-motion rule in
   polylon-theme.css stops every animation below, so each piece is written to look right standing still. */
/* A2: the opening screen shows the Hazir-E loader (public/assets/brand/loader.svg from the brand kit: corners breathe, the tick
   draws; it stands still under reduced motion by its own rule) */
/* B1, C1: placeholders shaped like the coming page, list or table */
.nb-wait { display: grid; gap: 12px; }
.panel.nb-wait, section.nb-wait { padding: 20px; }
.nb-wait-shape { display: grid; gap: 14px; }
.nb-sk { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--surface-2) 0%, #F8F9FC 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: nb-shimmer 1.4s linear infinite; }
.nb-sk-thin { height: 10px; }
.nb-sk-circle { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.nb-sk-hero { height: 132px; border-radius: var(--r-card); }
.nb-sk-tile { height: 88px; border-radius: var(--r-lg); }
.nb-sk-chart { height: 170px; border-radius: var(--r); }
.nb-sk-row { display: flex; align-items: center; gap: 12px; }
.nb-sk-lines { flex: 1; min-width: 0; display: grid; gap: 8px; }
.nb-sk-tr { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.nb-sk-tr.head { border-top: 0; padding-top: 0; }
.nb-wait:not(.panel) .nb-sk { background-image: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%); }
.nb-sk-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#main.nb-arrive > * { animation: nb-rise .22s var(--ease) both; }
/* G1: after 8 seconds of waiting */
.slow-note { margin: 4px 0 0; padding: 12px 14px; border-radius: var(--r); background: var(--saffron-soft); color: var(--saffron-ink); font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; animation: nb-rise .3s var(--ease) both; }
.slow-note button { min-height: 40px; }
/* D2: Today numbers count up (JS) and the week's bars grow from the baseline */
.nb-arrive .bars .bar { transform-box: fill-box; transform-origin: bottom; animation: nb-bar .5s var(--ease) both; }
.nb-arrive .bars .bar-day .bar { animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes nb-bar { from { transform: scaleY(0); } to { transform: none; } }
/* E2: spinner in the working button, drawn tick in the saved message */
button.is-busy:disabled { opacity: 1; cursor: progress; }
button.is-busy::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: nb-spin .8s linear infinite; }
@keyframes nb-spin { to { transform: rotate(360deg); } }
.toast.saved { display: flex; align-items: center; gap: 10px; }
.toast.saved[hidden] { display: none; }
/* A saved change plays the kit's success mark once (dark form on the ink toast): corners close, the face pops, the tick draws. */
.toast .nb-ok { width: 34px; height: 34px; flex: none; display: block; }
.toast .nb-ok svg { display: block; width: 100%; height: 100%; }
/* F2: while the server checks a face, four saffron corners close in around the guide */
.scan-square { display: none; }
.scan-stage.checking .scan-square { display: block; position: absolute; inset: 8% 20%; pointer-events: none; z-index: 1; --c: var(--saffron);
  background: linear-gradient(var(--c), var(--c)) top left / 30px 4px, linear-gradient(var(--c), var(--c)) top left / 4px 30px,
    linear-gradient(var(--c), var(--c)) top right / 30px 4px, linear-gradient(var(--c), var(--c)) top right / 4px 30px,
    linear-gradient(var(--c), var(--c)) bottom left / 30px 4px, linear-gradient(var(--c), var(--c)) bottom left / 4px 30px,
    linear-gradient(var(--c), var(--c)) bottom right / 30px 4px, linear-gradient(var(--c), var(--c)) bottom right / 4px 30px;
  background-repeat: no-repeat; animation: nb-corners 1.4s var(--ease) infinite alternate; }
@keyframes nb-corners { from { transform: none; opacity: .75; } to { transform: scale(.94); opacity: 1; } }
.scan-prompt .nb-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--saffron); vertical-align: 1px; animation: nb-blink 1s ease-in-out infinite; }
@keyframes nb-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- Register, day sheet, simpler shifts and Assign (owner, 31 October 2026) ----------
   A light look: white cards, small grey labels and choice buttons, colour only on the chosen one. Same tokens as above. */
.form-part[hidden], .tpl-more[hidden] { display: none; }
/* the (i) beside a title or label; the text opens under it and closes on any other press */
.nb-info { display: inline-block; vertical-align: middle; margin-left: 6px; font-family: var(--font-body); font-weight: 400; text-transform: none; letter-spacing: 0; }
.nb-info > summary { list-style: none; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); color: var(--muted); display: inline-grid; place-items: center; font: italic 700 13px/1 Georgia, serif; background: var(--surface); user-select: none; }
.nb-info > summary::-webkit-details-marker { display: none; }
.nb-info[open] > summary { background: var(--brand); border-color: var(--brand); color: #fff; }
.nb-info-text { position: absolute; z-index: 25; left: 0; right: 0; max-width: 340px; margin-top: 8px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 13px; line-height: 1.5; color: var(--ink-2); white-space: normal; text-align: left; font-family: var(--font-body); }
.nb-info-text[data-shift-example] { font-family: var(--font-mono); font-size: 12px; }
.page-head > div:first-child, .tpl-main, .form-part, .check { position: relative; }
.page-head h1 .nb-info, .tpl-main h3 .nb-info { margin-left: 8px; }
/* the three-dots menu */
.nb-menu { position: relative; flex: none; }
.nb-menu > summary { list-style: none; cursor: pointer; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; line-height: 1; color: var(--muted); border: 1px solid var(--line); background: var(--surface); }
.nb-menu > summary::-webkit-details-marker { display: none; }
.nb-menu[open] > summary { background: var(--surface-2); }
.nb-menu-list { position: absolute; z-index: 25; right: 0; top: 46px; min-width: 170px; padding: 6px; display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.nb-menu-list button { justify-content: flex-start; min-height: 44px; border: 0; background: transparent; font-size: 15px; font-weight: 600; color: var(--ink); border-radius: 10px; }
.nb-menu-list button:hover:not(:disabled) { background: var(--surface-2); }

/* Staff: Register | Directory */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: 999px; margin: 0 0 12px; }
.seg button { min-height: 34px; padding: 0 18px; border: 0; background: transparent; border-radius: 999px; font-size: 14px; font-weight: 650; color: var(--muted); }
.seg button.on, .seg button.on:hover:not(:disabled) { background: var(--surface); color: var(--brand); box-shadow: 0 1px 3px rgba(26, 33, 51, .14); }
.reg-date { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; position: relative; }
.reg-nav { width: 40px; min-height: 40px; padding: 0; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--muted); background: var(--surface); border: 1px solid var(--line); flex: none; }
.reg-date-label { flex: 1; min-height: 40px; padding: 0 12px; border-radius: 12px; font-size: 15px; font-weight: 700; background: var(--surface); border: 1px solid var(--line); }
.reg-date-input { position: absolute; left: 50%; top: 100%; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.reg-today { min-height: 40px; padding: 0 14px; border-radius: 12px; font-size: 14px; font-weight: 650; color: var(--brand); background: var(--brand-soft); border-color: transparent; flex: none; }
.reg-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 12px; }
.reg-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; display: grid; gap: 2px; min-width: 0; }
.reg-box small { color: var(--muted); font-size: 12px; font-weight: 600; }
.reg-box strong { font-family: var(--font-display); font-size: 20px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.reg-list { display: grid; gap: 8px; }
.reg-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; grid-template-areas: "who right right" "pick pick more"; gap: 8px 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.reg-row.is-busy { opacity: .7; }
.reg-who { grid-area: who; justify-self: start; min-height: 0; padding: 0; border: 0; background: transparent; display: grid; gap: 1px; justify-items: start; text-align: left; min-width: 0; border-radius: 8px; }
.reg-who:hover:not(:disabled) { background: transparent; }
.reg-who strong { font-family: var(--font-display); font-size: 16px; line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reg-who small { color: var(--muted); font-size: 12.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reg-right { grid-area: right; justify-self: end; color: var(--ink-2); font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.reg-pick { grid-area: pick; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; min-height: 46px; align-items: stretch; }
.reg-more { grid-area: more; justify-self: end; width: 44px; min-height: 44px; padding: 0; border-radius: 50%; border-color: transparent; background: transparent; color: var(--muted); font-size: 20px; }
.reg-b { min-height: 46px; min-width: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 15px; font-weight: 700; display: inline-grid; place-items: center; }
.reg-b.p.on, .reg-b.p.on:hover:not(:disabled) { background: var(--green); border-color: var(--green); color: #fff; }
.reg-b.hd.on, .reg-b.hd.on:hover:not(:disabled) { background: var(--saffron); border-color: var(--saffron); color: var(--ink); }
.reg-b.ab.on, .reg-b.ab.on:hover:not(:disabled) { background: var(--red); border-color: var(--red); color: #fff; }
/* Staff list rows (14 November 2026): department, machine(s) and a presence chip where P / HD / AB were */
.reg-facts { grid-area: pick; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 32px; min-width: 0; }
.reg-dept, .reg-mach { color: var(--ink-2); font-size: 13px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reg-mach { color: var(--muted); font-weight: 500; }
.reg-chip { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.reg-chip.p { background: var(--green-soft); color: var(--green-ink); }
.reg-chip.hd { background: var(--saffron-soft); color: var(--ink); }
.reg-chip.ab { background: var(--red-soft); color: var(--red-ink); }
.reg-chip.lv { background: var(--surface-2); color: var(--ink-2); }
@media (min-width: 640px) {
  .reg-sum { grid-template-columns: repeat(6, 1fr); }
  .reg-row { grid-template-columns: minmax(0, 1fr) 110px minmax(220px, 300px) 44px; grid-template-areas: "who right pick more"; }
}
/* the day sheet and the forms */
.reg-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.reg-date-line { font-weight: 700; font-size: 16px; margin: 0; }
.reg-grey { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 2px 0 0; }
.reg-s { min-height: 36px; padding: 0 14px; border-radius: 10px; font-size: 13px; font-weight: 650; color: var(--ink-2); background: var(--surface-2); border-color: var(--line); flex: none; }
.reg-note { display: grid; gap: 8px; margin: 12px 0 0; }
.reg-note textarea { width: 100%; }
.reg-note-actions { display: flex; gap: 8px; }
.reg-note-actions button { min-height: 40px; font-size: 14px; }
.reg-inout { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 6px; }
.reg-inout > div { background: var(--surface-2); border-radius: 12px; padding: 8px 12px; display: grid; gap: 1px; }
.reg-inout small { color: var(--muted); font-size: 12px; font-weight: 600; }
.reg-inout strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.reg-status { margin: 6px 0 0; }
.reg-h { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 18px 0 4px; }
.reg-empty { color: var(--muted); font-size: 14px; margin: 8px 0; }
.reg-tl { list-style: none; margin: 0; padding: 0; display: grid; }
.reg-tl li { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.reg-tl li:first-child { border-top: 0; }
.reg-tl-main { min-width: 0; flex: 1; }
.reg-tl-text { display: block; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.reg-tl small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.reg-tl li.struck .reg-tl-text { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.reg-tl-removed { color: var(--red-ink) !important; }
.reg-dots { width: 36px; min-height: 36px; padding: 0; flex: none; border-color: transparent; background: transparent; color: var(--muted); font-size: 20px; border-radius: 50%; }
.reg-void { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.reg-void input { flex: 1 1 180px; min-width: 0; }
.reg-void button { min-height: 40px; font-size: 14px; }
.reg-actions button { flex: 1 1 0; min-height: 44px; padding: 0 8px; background: var(--surface-2); border-color: var(--line); color: var(--ink-2); font-size: 15px; font-weight: 650; }
.reg-c, .asg-chip { min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 650; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); gap: 2px; }
.reg-c.on, .reg-c.on:hover:not(:disabled), .asg-chip.on, .asg-chip.on:hover:not(:disabled) { background: var(--brand); border-color: var(--brand); color: #fff; }
.reg-c.on .plus { display: none; }
.reg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.reg-field { display: grid; gap: 4px; margin: 10px 0 0; min-width: 0; }
.reg-field > span { color: var(--muted); font-size: 12px; font-weight: 600; }
.reg-sec { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin: 10px 0 0; overflow: hidden; }
.reg-sec-head { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 0; border-radius: 0; background: transparent; text-align: left; font-weight: 700; font-size: 15px; }
.reg-sec-head small { color: var(--muted); font-size: 12.5px; font-weight: 500; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reg-chev { color: var(--muted); transition: transform var(--quick) ease; }
.reg-sec.open .reg-chev { transform: rotate(180deg); }
.reg-sec-body { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.reg-line { display: block; color: var(--ink-2); font-size: 13px; font-weight: 650; margin-top: 8px; min-height: 18px; }
.reg-note-field { margin-top: 14px; }
.reg-total-bar { align-items: center; justify-content: space-between; }
.reg-total { display: grid; gap: 0; flex: 1 1 auto; min-width: 0; }
.reg-total small { color: var(--muted); font-size: 12px; }
.reg-total strong { font-family: var(--font-display); font-size: 22px; line-height: 1.2; }
.reg-total-bar .primary { flex: 0 0 120px; }
.reg-choices { display: grid; gap: 8px; }
.reg-pickrow { display: grid; justify-items: start; gap: 2px; width: 100%; min-height: 58px; padding: 10px 14px; text-align: left; border-radius: 14px; background: var(--surface); }
.reg-pickrow strong { font-size: 16px; }
.reg-pickrow small { color: var(--muted); font-size: 13px; }
/* add-chips and the folded options in the shift form */
.tpl-add { padding-bottom: 2px; flex-wrap: wrap; overflow: visible; }
.tpl-add .reg-c { white-space: nowrap; flex: none; }
.tpl-more > summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; padding: 6px 0; }
.tpl-more[open] > summary { margin-bottom: 8px; }
/* shift and holiday rows */
.tpl-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.tpl-main { flex: 1; min-width: 0; }
.tpl-main h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 16px; }
.tpl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.tpl-chip { background: var(--surface-2); border-radius: 999px; padding: 2px 10px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
/* Assign */
.asg { display: flex; flex-direction: column; gap: 12px; }
.asg-field { display: grid; gap: 4px; min-width: 0; }
.asg-field > span { color: var(--muted); font-size: 12px; font-weight: 600; }
.asg-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.asg-search input { padding-left: 16px; border-radius: 12px; box-shadow: none; }
.asg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.asg-chip small { opacity: .75; font-size: 12px; }
.asg-chip.some { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.asg-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; }
.asg-bar button { min-height: 32px; padding: 0 8px; font-size: 13px; }
.asg-list { display: grid; border-top: 1px solid var(--line); }
.asg-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 40%); gap: 12px; align-items: center; min-height: 52px; padding: 8px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.asg-row input { width: 20px; height: 20px; accent-color: var(--brand); }
.asg-who { min-width: 0; display: grid; }
.asg-who strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asg-who small { color: var(--muted); font-size: 12.5px; }
.asg-cur { color: var(--muted); font-size: 12.5px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asg-none { color: var(--muted); padding: 16px 0; }
/* Register sheets: Overtime / Leave / Fine and the Total bar sit at the bottom even when the day is short (phone). */
.sheet-body:has(> .reg-actions:last-child, > .reg-total-bar:last-child, > form > .reg-total-bar:last-child) { display: flex; flex-direction: column; }
.sheet .sheet-body > .actions.reg-actions:last-child, .sheet .sheet-body > .actions.reg-total-bar:last-child { margin-top: auto; }
.sheet-body > form:has(> .reg-total-bar:last-child) { flex: 1; display: flex; flex-direction: column; }
.sheet .sheet-body > form > .actions.reg-total-bar:last-child { margin-top: auto; }

/* Pay sheet and slips (R4, 31 October 2026). */
.callout.warn { background: var(--saffron-soft); border-color: #F2D2A8; color: var(--saffron-ink); }
.pay-totals { margin: 12px 0; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.pay-totals .kpi strong { font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.pay-totals .mono-label { white-space: normal; }
.month-step { display: flex; align-items: center; gap: 6px; }
.month-step input { flex: 1; min-width: 0; }
.pay-sheet td small { display: block; color: var(--muted); }
.pay-sheet td.actions { display: table-cell; white-space: nowrap; text-align: right; }
.pay-sheet td.actions button { display: inline-flex; margin: 0 2px; }
.pay-sheet tr.pay-detail td { background: var(--surface-2, transparent); }
.pay-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pay-days li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; width: 100%; }
.inline-form .field { flex: 1 1 220px; }
.work-form { margin: 4px 0; }
.pay-slip { max-width: 720px; margin: 0 auto; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 14px; }
.pay-slip header h2 { margin: 0; }
.pay-slip header p { margin: 2px 0 0; color: var(--muted); }
.slip-person { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 16px; margin: 0; }
.slip-person dt { font-size: 12px; color: var(--muted); }
.slip-person dd { margin: 0; font-weight: 600; }
.slip-lines { width: 100%; border-collapse: collapse; }
.slip-lines th, .slip-lines td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.slip-lines td { text-align: right; font-variant-numeric: tabular-nums; }
.slip-lines th { background: none; font: inherit; text-transform: none; letter-spacing: normal; color: inherit; position: static; }
.slip-lines tr.total th, .slip-lines tr.total td { font-weight: 700; border-bottom: 0; font-size: 1.05em; }
.slip-days { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
@media print { .pay-slip { border: 0; padding: 0; max-width: none; } .pay-sheet button, .no-print { display: none !important; } }

/* ---------- Dropdowns with search, and date fields (owner, 1 November 2026) ----------
   One list instead of a row of buttons; one tap on a date opens a calendar. On a phone the dropdown opens from the bottom edge. */
.dept-slot { min-width: 0; flex: 1 1 auto; }
.cb { position: relative; min-width: 0; }
.cb-btn { width: 100%; min-height: 44px; padding: 0 14px; justify-content: space-between; gap: 8px; background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 12px; font-size: 15px; font-weight: 600; text-align: left; }
.cb-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-caret { flex: none; color: var(--muted); transition: transform var(--quick) ease; }
.cb.open .cb-caret { transform: rotate(180deg); }
.cb.open .cb-btn { border-color: var(--brand); }
.dept-combo .cb-btn { border-radius: 999px; }
.cb-panel { position: absolute; z-index: 40; left: 0; top: calc(100% + 6px); width: max(100%, 260px); max-width: min(380px, 92vw); display: grid; gap: 6px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.cb-panel[hidden] { display: none; }
.cb-panel { overflow: hidden; grid-template-rows: auto minmax(0, 1fr); }
.cb-panel .cb-list { overflow-y: auto; }
.cb-search { width: 100%; min-height: 42px; padding: 0 12px; border-radius: 10px; }
.cb-bar { display: flex; justify-content: space-between; gap: 6px; }
.cb-bar button { min-height: 32px; padding: 0 8px; font-size: 13px; }
.cb-list { display: grid; gap: 1px; max-height: min(280px, 50vh); overflow-y: auto; overscroll-behavior: contain; }
.cb-opt { width: 100%; min-height: 44px; padding: 0 10px; justify-content: flex-start; gap: 10px; border: 0; border-radius: 10px; background: transparent; font-size: 15px; font-weight: 500; text-align: left; }
.cb-opt:hover:not(:disabled), .cb-opt.active { background: var(--surface-2); }
.cb-opt.on { color: var(--brand); font-weight: 700; }
.cb-tick { width: 18px; flex: none; color: var(--brand); font-weight: 800; text-align: center; }
.cb-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-opt small { flex: none; color: var(--muted); font-size: 12.5px; }
.cb-group { margin: 0; padding: 8px 10px 2px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cb-none { margin: 0; padding: 12px 10px; color: var(--muted); font-size: 14px; }
@media (max-width: 640px) {
  .cb-panel { max-width: none; z-index: 80; }
  .cb-list { max-height: min(44dvh, 320px); }
}
.dt { position: relative; display: flex; align-items: center; min-width: 0; }
.dt-btn { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; justify-content: flex-start; gap: 10px; background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 12px; font-size: 15px; font-weight: 600; }
.dt-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dt-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt.dt-none .dt-text { color: var(--muted); font-weight: 500; }
.dt-x { position: absolute; right: 6px; width: 32px; min-height: 32px; padding: 0; border-radius: 50%; border-color: transparent; background: transparent; color: var(--muted); font-size: 18px; }
.dt-x[hidden] { display: none; }
.dt-input { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.reg-date { display: grid; gap: 8px; }
.reg-date-row { display: flex; align-items: center; gap: 8px; }
.reg-dt { flex: 1; }
.reg-dt .dt-btn { justify-content: center; font-weight: 700; }
.reg-quick, .asg-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.asg-dates .dt-btn { font-size: 14px; padding: 0 10px; gap: 6px; }
.asg-dates .dt-x { right: 4px; }

/* ---------- Add staff in steps, and the person page hub (owner, 31 October 2026) ---------- */
.ob-top { display: flex; align-items: center; gap: 10px; margin: -4px 0 6px; }
.ob-back, .ob-back-space { width: 40px; height: 40px; flex: none; }
.ob-back { padding: 0; border-radius: 50%; font-size: 24px; line-height: 1; color: var(--muted); border: 1px solid var(--line); background: var(--surface); }
.ob-step { color: var(--muted); font-size: 13px; font-weight: 650; }
.ob-bar { height: 4px; border-radius: 4px; background: var(--surface-3); margin: 0 0 14px; overflow: hidden; }
.ob-bar span { display: block; height: 100%; background: var(--saffron); border-radius: 4px; transition: width var(--quick) ease; }
.ob-h { font-family: var(--font-display); font-size: 18px; margin: 4px 0 8px; }
.ob-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ob-type { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 92px; padding: 10px 6px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-2); font-size: 14px; }
.ob-type .icon { width: 26px; height: 26px; color: var(--muted); }
.ob-type.on, .ob-type.on:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.ob-type.on .icon { color: var(--brand); }
.ob-lines { list-style: none; margin: 10px 0 4px; padding: 10px 14px; display: grid; gap: 6px; border-radius: 14px; background: var(--surface-2); }
.ob-lines li { display: flex; gap: 10px; font-size: 14px; }
.ob-lines li span { font-weight: 800; flex: none; width: 16px; }
.ob-lines li.yes span { color: var(--green); }
.ob-lines li.no span { color: var(--red); }
.ob-table-wrap { overflow-x: auto; margin: 8px 0; border: 1px solid var(--line); border-radius: 12px; }
.ob-table { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.ob-table th, .ob-table td { overflow-wrap: anywhere; }
.ob-table thead th { font-size: 10.5px; letter-spacing: 0; }
.ob-table th, .ob-table td { padding: 8px 10px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
.ob-table thead th { border-top: 0; color: var(--ink); background: var(--surface-2); }
.ob-table tbody th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.ob-hint { color: var(--muted); font-size: 12.5px; min-height: 16px; }
.ob-hint:empty { display: none; }
.ob-phone { display: flex; align-items: center; gap: 8px; }
.ob-phone > span { flex: none; padding: 0 12px; min-height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-weight: 650; }
.ob-phone input { flex: 1; min-width: 0; }
.ob-preview { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--saffron-soft); color: var(--saffron-ink); font-weight: 650; font-size: 15px; min-height: 44px; display: flex; align-items: center; }
.ob-muted { color: var(--muted); font-weight: 500; }
.ob-saved { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--green-soft); }
.ob-saved small { display: block; color: var(--green-ink); font-size: 13px; }
.ob-tick { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 800; }
.ob-tick.big { width: 56px; height: 56px; font-size: 28px; margin: 0 auto 10px; }
.ob-done { text-align: center; padding: 18px 0 6px; }
.ob-done h3 { font-family: var(--font-display); font-size: 22px; margin: 0 0 4px; }
.ob-done-actions { display: grid; gap: 8px; }
.ob-done-actions button { width: 100%; }
/* person hub */
/* Person page buttons (owner, 1 November 2026): on top, three to a row, all one size, icon over a short name. */
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 16px; }
.hub-tile { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 72px; padding: 10px 6px; text-align: center; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; box-shadow: var(--shadow); }
.hub-tile .icon { width: 26px; height: 26px; color: var(--brand); }
.hub-tile strong { font-family: var(--font-display); font-size: 14px; }
.hub-hero { margin-bottom: 12px; }
.hub-h { font-size: 18px; margin: 18px 0 8px; }
.hub-section { display: grid; gap: 12px; }
.pay-hub { display: grid; gap: 10px; }
.reg-box.strong { background: var(--brand-soft); border-color: transparent; }
@media (min-width: 640px) { .hub-grid { grid-template-columns: repeat(6, 1fr); } }
.hub-tile { justify-content: stretch; }

/* ---------- Today cards (owner-approved combined screen, 31 October 2026) ----------
   Light theme, five tones only: green (good), saffron (needs attention), red (bad), indigo (neutral), grey (not marked). */
.tone-green { --tone: var(--green); --tone-soft: var(--green-soft); --tone-ink: var(--green-ink); --tone-line: rgba(26, 143, 98, .30); }
.tone-saffron { --tone: var(--saffron); --tone-soft: var(--saffron-soft); --tone-ink: var(--saffron-ink); --tone-line: rgba(232, 134, 42, .38); }
.tone-red { --tone: var(--red); --tone-soft: var(--red-soft); --tone-ink: var(--red-ink); --tone-line: rgba(201, 67, 63, .32); }
.tone-indigo { --tone: #3B4FA8; --tone-soft: var(--brand-soft); --tone-ink: var(--brand); --tone-line: rgba(59, 79, 168, .30); }
.tone-grey { --tone: #9AA2B5; --tone-soft: var(--surface-2); --tone-ink: var(--ink-2); --tone-line: rgba(90, 99, 120, .25); }
.today-root { padding-bottom: 88px; }
@keyframes t-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.t-card, .tile-grid { animation: t-rise .4s var(--ease) both; animation-delay: calc(var(--rise, 0) * 55ms); }
.glance { --rise: 0; } .dept-card { --rise: 1; } .today-tree { --rise: 2; } .tile-grid { --rise: 3; } .today-bars { --rise: 4; }
.t-pending .card-head { margin-bottom: 10px; }
.chart-skeleton.wide { grid-column: 1 / -1; height: 150px; }
/* glance card: half-ring gauge, stacked bar, status pills */
.gauge-wrap { position: relative; width: 250px; max-width: 100%; height: 136px; margin: 12px auto 0; }
.gauge { display: block; overflow: visible; }
.g-track { stroke: var(--surface-3); }
.gseg { stroke: var(--tone); transition: stroke-dasharray .6s var(--ease), stroke-dashoffset .6s var(--ease), opacity .2s var(--ease); }
.gseg.dim { opacity: .3; }
.gcap { fill: var(--tone); transition: opacity .2s var(--ease); }
.gcap.dim { opacity: .3; }
.gauge-mid { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; }
.gauge-mid strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 42px; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.gauge-mid span { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.gbar { display: flex; gap: 3px; height: 14px; margin-top: 16px; border-radius: 7px; overflow: hidden; background: var(--surface-2); }
.gbar span { display: block; height: 100%; background: var(--tone); transition: width .6s var(--ease); }
.gpills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.gpill { min-height: 36px; padding: 0 12px; border: 2px solid transparent; border-radius: 999px; background: var(--tone-soft); color: var(--tone-ink); font-size: 13px; font-weight: 700; gap: 6px; white-space: nowrap; transition: opacity .2s var(--ease), border-color .2s var(--ease); }
.gpill:hover:not(:disabled) { background: var(--tone-soft); border-color: var(--tone-line); }
.gpill i { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); flex: none; }
.gpill b { font-family: var(--font-display); font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.gpill.on, .gpill.on:hover:not(:disabled) { border-color: var(--tone); }
.gpill.dim { opacity: .45; }
/* department card: the whole name, never cut */
.dept-head { display: flex; align-items: flex-start; gap: 10px; }
.dept-head > div { flex: 1; min-width: 0; }
.dept-card h2.dept-name { font-size: 24px; line-height: 1.2; overflow-wrap: anywhere; }
.dept-head p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.dept-head p b { color: var(--ink); }
.dept-chip { flex: none; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 13px; font-weight: 500; gap: 6px; white-space: nowrap; max-width: 55%; }
.dept-chip span { color: var(--muted); }
.dept-chip b { overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.dept-chip i { font-style: normal; font-size: 12px; }
.dept-figs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 16px 0 0; }
.dept-figs > div { display: flex; flex-direction: column-reverse; align-items: center; padding: 6px 2px; border-left: 1px solid var(--line); text-align: center; }
.dept-figs > div:first-child { border-left: 0; }
.dept-figs dd { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.dept-figs .tone-green dd, .dept-figs .tone-saffron dd { color: var(--tone-ink); }
.dept-figs dt { margin-top: 5px; font-size: 12px; line-height: 1.2; color: var(--muted); }
.dept-figs > div.on { border-radius: 12px; box-shadow: 0 0 0 2px var(--brand) inset; border-left-color: transparent; }
/* departments, design G (owner, 3 November 2026): the worst few as cards, every department in a drawer. Drawer rows share
   fixed columns (name · bar · count · %) so the bars and numbers line up from row to row at every width. */
.dp-top-grid { display: grid; gap: 8px; margin-top: 4px; }
.dp-top { position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 2px; min-width: 0; min-height: 0; padding: 12px 12px 12px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); font-weight: 400; text-align: left; overflow: hidden;
  transition: opacity .3s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease); }
.dp-top::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--tone); transition: background .3s var(--ease); }
.dp-top:hover:not(.on) { background: var(--surface); transform: translateY(-2px); box-shadow: var(--shadow); }
.dp-top .dp-name { font-weight: 700; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; min-height: 2.5em; }
.dp-pct { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.05; color: var(--tone-ink); font-variant-numeric: tabular-nums; }
.dp-sub { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dp-top.on, .dp-row.on { border-color: var(--saffron); box-shadow: 0 0 0 2px var(--saffron); }
.dp-top.dim, .dp-row.dim { opacity: .45; }
.dp-top:focus-visible, .dp-row:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.dp-all { margin-top: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.dp-all > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: var(--tap); padding: 0 14px; font-weight: 700; font-size: 15px; color: var(--brand); cursor: pointer; list-style: none; }
.dp-all > summary::-webkit-details-marker { display: none; }
.dp-all > summary svg { transition: transform .25s var(--ease); }
.dp-all[open] > summary svg { transform: rotate(180deg); }
.dp-drawer { padding: 0 10px 10px; }
.dp-drawer input { margin-bottom: 6px; }
.dp-list { max-height: calc(8 * 50px); overflow-y: auto; overscroll-behavior: contain; }
.dp-row { display: grid; grid-template-columns: minmax(0, 1fr) clamp(48px, 26%, 200px) 5.5em 3.25em; align-items: center; column-gap: 10px; width: 100%; min-height: 48px; padding: 0 6px; border: 0; border-bottom: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink); font-weight: 400; text-align: left;
  transition: opacity .3s var(--ease), box-shadow .2s var(--ease); }
.dp-row:last-child { border-bottom: 0; }
.dp-row .dp-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; font-size: 14px; }
.dp-bar { display: block; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.dp-bar i { display: block; height: 100%; border-radius: 4px; background: var(--tone); transition: width .45s var(--ease), background .3s var(--ease); }
.dp-num { font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dp-pc { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--tone-ink); text-align: right; font-variant-numeric: tabular-nums; }
/* phone: the whole name on the first line with the numbers, the bar full width under it (still one start line for every bar) */
@media (max-width: 560px) {
  .dp-row { grid-template-columns: minmax(0, 1fr) 5.5em 3.25em; grid-template-areas: "name num pc" "bar bar bar"; row-gap: 7px; min-height: 56px; padding: 9px 6px; }
  .dp-row .dp-name { grid-area: name; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
  .dp-row .dp-bar { grid-area: bar; height: 6px; } .dp-row .dp-num { grid-area: num; } .dp-row .dp-pc { grid-area: pc; }
  .dp-pct { font-size: 26px; }
}
/* tiles (design C): tinted, 19 bold heading, 40 number, one caption line, progress thread */
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.tile { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; width: 100%; min-width: 0; min-height: 0; box-sizing: border-box; padding: 14px; gap: 0; border: 1px solid var(--tone-line); border-radius: 20px; background: var(--tone-soft); color: var(--ink); font: inherit; font-weight: 400; text-align: left; text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease), opacity .2s var(--ease); }
.tile:hover:not(:disabled) { background: var(--tone-soft); transform: translateY(-2px); box-shadow: var(--shadow); }
div.tile { cursor: default; } div.tile:hover { transform: none; box-shadow: none; }
.tile.wide { grid-column: 1 / -1; }
.tile.dim { opacity: .45; }
.tile-h { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1.2; color: var(--tone-ink); }
.tile-h > span { flex: 1; min-width: 0; }
.tile-go { font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--saffron-ink); white-space: nowrap; }
.tile-num { display: block; margin-top: 12px; font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -.01em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile-num .unit { font-size: inherit; color: var(--ink); }
.tile-cap { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread { display: block; height: 6px; margin-top: 10px; border-radius: 3px; background: rgba(26, 33, 51, .08); overflow: hidden; }
.thread i { display: block; height: 100%; border-radius: 3px; background: var(--tone); transition: width .6s var(--ease); }
.punch-boxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.punch-boxes > span { min-width: 0; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .7); }
.punch-boxes strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.punch-boxes small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.punch-boxes .inside { background: #3B4FA8; color: #fff; }
.punch-boxes .inside small { color: #DDE3FF; }
.ot-row, .fine-row { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; min-width: 0; }
.ot-row .tile-num, .fine-row .tile-num { margin-top: 0; }
.ot-row .tile-cap, .fine-row .tile-cap { margin-top: 0; }
.fine-row .tile-cap { flex: 1; min-width: 0; }
.fine-min { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--ink); white-space: nowrap; }
.fine-cap { margin-top: 4px; text-align: right; }
.stack-bar { display: flex; height: 10px; margin-top: 12px; border-radius: 5px; overflow: hidden; background: rgba(26, 33, 51, .08); }
.stack-bar i { display: block; height: 100%; background: var(--tone); transition: width .6s var(--ease); }
.ot-leg { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 13px; font-weight: 600; }
.ot-leg > span { display: inline-flex; align-items: center; gap: 6px; }
.ot-leg i { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.bar-day.mark > rect:first-child { fill: var(--brand-soft); }
/* floating time filter: round saffron button, a label pill, four bubbles fanning out on a quarter arc */
.tf { position: fixed; right: 16px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 28px); z-index: 40; width: 60px; height: 60px; pointer-events: none; }
@media (min-width: 1024px) { .tf { right: 32px; bottom: 32px; } }
.tf-scrim { position: fixed; inset: 0; z-index: 0; width: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; background: rgba(26, 33, 51, .45); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s; }
.tf-scrim:hover:not(:disabled) { background: rgba(26, 33, 51, .45); }
.tf.open .tf-scrim { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.tf-label { position: absolute; right: 72px; bottom: 10px; z-index: 1; display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border: 1px solid rgba(232, 134, 42, .55); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow); transition: opacity .2s ease; max-width: calc(100vw - 110px); overflow: hidden; text-overflow: ellipsis; }
.tf.open .tf-label { opacity: 0; }
.tf-fab { position: absolute; right: 0; bottom: 0; z-index: 3; width: 60px; height: 60px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: var(--saffron); color: var(--ink); pointer-events: auto; box-shadow: 0 0 0 6px rgba(232, 134, 42, .18), 0 12px 28px rgba(232, 134, 42, .35); }
.tf-fab:hover:not(:disabled) { background: var(--saffron); filter: brightness(1.06); }
.tf-fab:focus-visible, .tf-bub:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.tf-bubbles { position: absolute; right: 30px; bottom: 30px; z-index: 2; width: 0; height: 0; }
.tf-bub { position: absolute; left: -38px; top: -38px; width: 76px; height: 76px; min-height: 0; padding: 6px; border: 1.5px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.15; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translate(0, 0) scale(.3); pointer-events: none;
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1) var(--delay, 0ms), opacity .2s ease var(--delay, 0ms), visibility 0s linear .5s; }
.tf.open .tf-bub { opacity: 1; visibility: visible; transform: translate(var(--dx), var(--dy)) scale(1); pointer-events: auto;
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1) var(--delay, 0ms), opacity .2s ease var(--delay, 0ms), visibility 0s linear 0s; }
.tf-bub:hover:not(:disabled) { background: var(--surface-2); }
.tf-bub.on, .tf-bub.on:hover:not(:disabled) { background: var(--saffron); border-color: var(--saffron); }
/* custom days sheet */
.cs-hint { margin: 0 0 10px; font-size: 14px; }
.cs-month { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cs-month strong { font-family: var(--font-display); font-size: 17px; }
.cs-week, .cs-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.cs-week { margin-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.cs-day { min-height: 44px; padding: 0; border: 0; border-radius: 12px; background: transparent; font-size: 15px; font-weight: 600; color: var(--ink); }
.cs-day:hover:not(:disabled) { background: var(--surface-2); }
.cs-day:disabled { color: var(--line-2); opacity: 1; cursor: default; }
.cs-day.mid { background: var(--saffron-soft); }
.cs-day.end, .cs-day.end:hover:not(:disabled) { background: var(--saffron); color: var(--ink); }
.cs-day.today:not(.end) { box-shadow: inset 0 0 0 2px var(--saffron); }

/* Suggestions behind a bell (owner, 1 November 2026): one line; the list drops over the cards below and scrolls. */
.today-sugg { position: relative; padding-top: 14px; padding-bottom: 14px; }
.today-sugg summary, .today-sugg .sugg-head { display: flex; align-items: center; gap: 12px; list-style: none; cursor: pointer; min-height: 44px; }
.today-sugg summary::-webkit-details-marker { display: none; }
.today-sugg summary > svg:last-child { width: 20px; height: 20px; flex: none; margin-left: auto; color: var(--brand); transition: transform .2s ease; }
.today-sugg[open] summary > svg:last-child { transform: rotate(180deg); }
.today-sugg summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; border-radius: 12px; }
.sugg-bell { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--saffron-soft); color: var(--saffron-ink); display: grid; place-items: center; flex: none; }
.sugg-bell.clear { background: var(--green-soft); color: var(--green-ink); }
.sugg-count { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--saffron); color: var(--ink); font-size: 11px; line-height: 18px; text-align: center; }
.sugg-title { font-weight: 800; font-size: 17px; }
.sugg-drop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 4; padding: 4px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 32px rgba(26, 33, 51, .18); }
/* The month's averages in one long card on the person page (owner, 1 November 2026). */
.reg-avg { display: grid; grid-template-columns: repeat(3, 1fr); margin: 10px 0; padding: 12px 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.reg-avg > div { display: grid; justify-items: center; gap: 2px; text-align: center; }
.reg-avg > div + div { border-left: 1px solid var(--line); }
.reg-avg strong { font-family: var(--font-mono); font-size: 18px; }
.reg-avg small { color: var(--muted); font-size: 12px; }

button.choice-row { text-align: left; background: none; width: 100%; font: inherit; color: inherit; }
.tpl-group { margin: 6px 0 0; font-size: 14px; color: var(--muted); text-transform: none; }

/* Presence check (2 November 2026): the Today "Floor check" card and the round page. Phone first; two columns from 760 px. */
.floor-card { margin-top: 16px; }
.floor-card .panel-head, .presence-page .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.floor-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.floor-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; width: 100%; min-height: 56px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface, #fff); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.floor-row:hover, .floor-row:focus-visible { border-color: var(--brand); }
.floor-dept { flex: 1 1 160px; min-width: 0; }
.floor-dept strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.floor-dept small, .floor-nums small { color: var(--muted); font-size: 13px; }
.floor-nums { display: flex; flex-direction: column; align-items: flex-end; }
.floor-nums b { font-size: 18px; }
.count-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; }
.count-row b { font-size: 18px; margin-right: 4px; }
.presence-cols { display: grid; gap: 16px; }
@media (min-width: 760px) { .presence-cols { grid-template-columns: 1fr 1fr; } }
.people-mini li > span + small { display: block; }
tr.voided td { opacity: .55; }
.presence-line ul li { padding: 6px 0; border-top: 1px solid var(--line); }
.presence-line ul li:first-child { border-top: 0; }
.presence-page .panel h2:not(:first-child) { margin-top: 16px; }

/* Work rules, concept B "Indigo header" (owner's pick, 2 November 2026; spec work-rules-design-spec.md): an indigo band with a
   white title, a white sheet with rounded top corners over it, separate cards with a kind chip, pill buttons, numbers in mono. */
.wr-page { max-width: 760px; --wr-hero: #23306E; --wr-line: var(--line); --wr-shadow: 0 1px 3px rgba(26,33,51,.06); }
.wr-band { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px 28px; margin: 0 0 -20px; border-radius: var(--r-card) var(--r-card) 0 0; background: var(--wr-hero); color: #fff; }
.wr-band h1 { flex: 1; min-width: 0; margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.15; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-back, .wr-act { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; padding: 0; }
.wr-back:hover, .wr-act:hover { background: rgba(255,255,255,.12); }
.wr-back svg, .wr-act svg, .wr-act .icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wr-sheet { position: relative; display: grid; gap: 12px; padding: 16px; border-radius: 24px 24px var(--r-card) var(--r-card); background: var(--surface); }
.wr-lead { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.wr-cards { display: grid; gap: 12px; }
.wr-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border: 1px solid var(--wr-line); border-radius: 16px; background: var(--surface); box-shadow: var(--wr-shadow); color: var(--ink); text-align: left; font: inherit; }
button.wr-card { cursor: pointer; }
button.wr-card:hover { border-color: var(--line-2); }
.wr-home-row { min-height: 76px; }
.wr-home-row strong { flex: 1; font-size: 17px; }
.wr-count { font-family: var(--font-mono); font-weight: 500; font-size: 17px; }
.wr-ic { width: 48px; height: 48px; flex: none; border-radius: 14px; display: grid; place-items: center; }
.wr-ic .icon { width: 24px; height: 24px; stroke-width: 2; }
.wr-ic.small { width: 24px; height: 24px; border-radius: 7px; }
.wr-ic.small .icon { width: 14px; height: 14px; }
.wr-ic.tone-brand { background: var(--brand-soft); color: var(--brand); }
.wr-ic.tone-saffron { background: var(--saffron-soft); color: var(--saffron); }
.wr-ic.tone-green { background: var(--green-soft); color: var(--green); }
.wr-ic.tone-violet { background: var(--violet-soft); color: var(--violet); }
.wr-chev { width: 20px; height: 20px; flex: none; color: var(--line-2); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wr-item { align-items: flex-start; }
.wr-item .wr-chev { align-self: center; }
.wr-item-text { flex: 1; min-width: 0; display: grid; gap: 4px; }
.wr-item-text strong { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-mono { font-family: var(--font-mono); font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-mono.muted { font-size: 12.5px; color: var(--muted); }
.wr-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wr-tag { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.wr-tag.fixed { background: var(--brand-soft); color: var(--brand); }
.wr-tag.flex { background: var(--violet-soft); color: var(--violet); }
.wr-tag.default { background: var(--saffron-soft); color: var(--saffron-ink); }
.wr-empty { display: grid; justify-items: center; gap: 6px; padding: 28px 16px; color: var(--muted); font-size: 14px; }
.wr-empty p { margin: 0; }
.wr-text-btn { border: 0; background: transparent; color: var(--brand); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; padding: 6px 4px; }
.wr-view-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wr-view-head .wr-tags { flex: 1; }
.wr-dl { display: block; margin: 0; padding: 0 16px; }
.wr-dl div { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 48px; border-top: 1px solid var(--wr-line); }
.wr-dl div:first-child { border-top: 0; }
.wr-dl dt { color: var(--muted); font-size: 14px; }
.wr-dl dd { margin: 0; font-weight: 600; font-size: 15px; text-align: right; }
.wr-note { margin: 0; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wr-note .icon { width: 16px; height: 16px; }
.wr-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding-top: 4px; }
.wr-pill { min-height: 52px; padding: 0 24px; border-radius: 26px; border: 0; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.wr-pill.primary { background: var(--brand); color: #fff; }
.wr-pill.secondary { background: var(--surface-2); color: var(--ink); }
.wr-seg { display: flex; gap: 3px; padding: 3px; border-radius: 14px; background: var(--surface-2); }
.wr-seg button, .wr-seg label { flex: 1; display: grid; place-items: center; min-height: 44px; border: 1px solid transparent; border-radius: 11px; background: transparent; font: inherit; font-weight: 600; font-size: 15px; color: var(--muted); cursor: pointer; }
.wr-seg button[aria-pressed=true], .wr-seg label:has(input:checked) { background: var(--surface); color: var(--brand); border-color: var(--line); }
.wr-seg input { position: absolute; opacity: 0; pointer-events: none; }
.wr-seg + .template-form { margin-top: 16px; }
/* Holiday list form: borderless day chips with a filled selection, and the suggested holidays in one bordered card. */
.template-form[data-kind="holiday"] .weekday-picks { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; border: 0; padding: 0; margin: 0; }
.template-form[data-kind="holiday"] .weekday-picks legend { font-weight: 700; font-size: 16px; padding: 0 0 8px; }
.template-form[data-kind="holiday"] .weekday-picks .check { position: relative; display: grid; place-items: center; min-height: 44px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 14px; cursor: pointer; }
.template-form[data-kind="holiday"] .weekday-picks .check input { position: absolute; opacity: 0; pointer-events: none; }
.template-form[data-kind="holiday"] .weekday-picks .check:has(input:checked) { background: var(--brand); color: #fff; font-weight: 600; }
.wr-suggest { border: 1px solid var(--line); border-radius: 16px; padding: 4px 16px 12px; display: grid; gap: 0; margin: 0; }
.wr-suggest legend { font-weight: 700; font-size: 16px; padding: 0 6px; }
.wr-sug-year { display: grid; }
.wr-sug-year > strong { font-family: var(--font-mono); font-weight: 500; font-size: 13px; color: var(--muted); margin-top: 10px; }
.wr-sug-head { margin: 8px 0 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.wr-sug { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 14px; align-items: center; min-height: 60px; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; }
.wr-sug input { width: 22px; height: 22px; accent-color: var(--brand); grid-row: span 2; border-radius: 5px; }
.wr-sug span { font-size: 16px; }
.wr-sug small { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.wr-sug:has(input:disabled) { opacity: .6; cursor: default; }
@media (max-width: 560px) { .wr-band h1 { font-size: 22px; } .wr-actions .wr-pill { flex: 1; } }
/* The shift template standard: starter presets, then the five blocks as cards with a grey sentence. */
.wr-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.wr-chip-btn { min-height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.wr-chip-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.wr-block-form { display: grid; gap: 12px; align-items: stretch; box-shadow: none; }
.wr-block-form h3 { margin: 0; font-size: 16px; font-weight: 700; }
.wr-switch { align-items: flex-start; }
.wr-switch span { display: grid; gap: 2px; }
.wr-switch small { color: var(--muted); font-size: 13px; }
.wr-blocks { display: grid; gap: 0; padding: 4px 16px; }
.wr-block { padding: 12px 0; border-top: 1px solid var(--line); }
.wr-block:first-child { border-top: 0; }
.wr-block strong { font-size: 15px; }
.wr-block p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

.reg-tl li.grey .reg-tl-text { color: var(--muted); }

/* ---- Contractors as people, linked cash labour and machines (owner, 3 November 2026; CM2) ---- */
.staff-switch { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: 999px; margin: 0 0 12px; }
.staff-switch a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 20px; border-radius: 999px; font-size: 14px; font-weight: 650; color: var(--ink-2, var(--ink)); text-decoration: none; }
.staff-switch a.on { background: var(--brand); color: #fff; }
.machine-state.green { background: #E3F4EB; color: #146B49; }
.machine-state.red { background: #FBE4E3; color: #A52C28; }
.machine-card .dept-foot { flex-wrap: wrap; }
.machine-contractors { margin-top: 6px; font-size: 13px; }
.contractor-meta { margin-top: 8px; font-size: 13px; }
.contractor-crew { margin-top: 10px; font-weight: 650; }
.machine-counts { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.machine-counts .count-chip.red { background: #FBE4E3; color: #A52C28; }
.machine-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.machine-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-3); color: inherit; text-decoration: none; min-height: 48px; }
.machine-row:hover { background: var(--surface-2, var(--surface-3)); }
.machine-row-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.machine-row-crew { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.machine-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.machine-chips li { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-3); border-radius: 999px; padding: 4px 6px 4px 12px; }
.machine-chips li a { color: inherit; text-decoration: none; font-weight: 600; }
.machine-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 10px; }
.machine-add .field { flex: 1 1 200px; margin: 0; }
.machine-members, .machine-hits { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.machine-member, .machine-hits li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-3); min-height: 52px; }
.machine-hits li { grid-template-columns: 1fr auto; }
.machine-member-main, .machine-hits li > span { display: grid; min-width: 0; }
.machine-member-main small, .machine-hits small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.machine-find { margin-top: 14px; }
.quick-form { margin-top: 12px; padding: 14px; border: 1px dashed var(--line-2); border-radius: 14px; background: var(--surface); display: grid; gap: 10px; }
.quick-form h4 { margin: 0; font-size: 15px; }
.check-list { display: grid; gap: 6px; max-height: 220px; overflow: auto; }
.person-machines { margin-top: 14px; }
@media (max-width: 480px) {
  .machine-member { grid-template-columns: 1fr auto; }
  .machine-member .badge { grid-column: 1; justify-self: start; }
  .machine-member > button { grid-column: 2; grid-row: 1; }
  .staff-switch { display: flex; }
  .staff-switch a { flex: 1; justify-content: center; padding: 0 10px; }
}
.title-line { display: none; }
@media (max-width: 767px) {
  .title-line { display: inline; font-size: 18px; }
  .title-line strong { color: var(--ink); }
  .dept-top { flex-wrap: wrap; }
  .dept-top .chips-row { flex-wrap: wrap; }
}

/* ---------- Sections (owner, 3 Nov 2026, design B) ----------
   A section's own page lists its pages as big rows (tablet and phone reach the pages from here); every page in a section
   with more than one page has a "‹ Section" link above its title. */
.section-list { display: grid; gap: 12px; }
.section-row {
  display: flex; align-items: center; gap: 16px; min-height: 92px; padding: 16px 18px; border-radius: var(--r-card); background: var(--surface);
  box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: box-shadow var(--quick) ease, transform var(--quick) var(--ease);
}
.section-row:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.section-row:active { transform: scale(.99); }
.section-icon { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--brand); color: #fff; }
.section-icon .icon { width: 26px; height: 26px; }
.section-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.section-text strong { font-family: var(--font-display); font-size: 19px; font-weight: 750; line-height: 1.2; }
.section-text small { font-size: 15px; color: var(--muted); line-height: 1.4; }
.section-row > .icon:last-child { flex: none; color: var(--muted); }
.section-row .count { flex: none; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px; background: var(--saffron); color: var(--ink); font-size: 13px; font-weight: 800; display: grid; place-items: center; }
@media (min-width: 1024px) { .section-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .section-row { min-height: 80px; padding: 14px; gap: 14px; } .section-icon { width: 48px; height: 48px; border-radius: 14px; } .section-text strong { font-size: 17px; } .section-text small { font-size: 14px; } }

/* Default page view (owner, 3 Nov 2026: "the normal view can be improved"): one rhythm for every page. A bold title with
   its one-line summary, the main button on the right, then cards 16 px apart with the same corner and padding. */
@media (min-width: 768px) {
  .page-head { margin: 0 0 22px; align-items: flex-end; }
  .page-head h1 { font-size: 32px; }
}
.content > .panel + .panel, .content > section + section, .content > .panel + section, .content > section + .panel { margin-top: 16px; }

/* Today on a computer (owner, 3 Nov 2026: "no point of this empty space"): the two Today columns and the cards after them
   share one grid, so the Floor check and Machines cards fill the left column under the chart instead of starting below
   the taller right column. On a phone and tablet everything stays one column, in the same order. */
.today-wrap { display: grid; gap: 12px; }
@media (min-width: 1024px) {
  /* The last row is 1fr: whatever the taller right column needs beyond the left cards goes there, not between them. */
  .today-wrap { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: repeat(var(--today-rows, 1), auto) 1fr; gap: 16px; align-items: start; }
  .today-wrap:has(> .today-root > .focus-bar:not([hidden])) { grid-template-rows: auto repeat(var(--today-rows, 1), auto) 1fr; }
  .today-wrap > .today-root, .today-wrap > .today-root > .today-grid { display: contents; }
  .today-wrap .focus-bar { grid-column: 1 / -1; }
  .today-wrap .today-grid > .stack:first-child:not(:last-child) { grid-column: 1; }
  .today-wrap .today-grid > .stack:last-child:not(:first-child) { grid-column: 2; grid-row: span var(--today-span, 2); }
  .today-wrap .today-grid > .stack:only-child { grid-column: 1 / -1; }
  .today-wrap > .today-extra { grid-column: 1; min-width: 0; }
}
.today-extra > * { margin: 0; }

/* Owner fixes, 3 November 2026: the enrolled photo is always shown on the person page; phone numbers are shown with a call icon. */
.enrolled-photo { margin: 8px 0 12px; }
.enrolled-photo img { display: block; width: 168px; max-width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: var(--line, #e5e7eb); }
.enrolled-photo-wait { width: 168px; max-width: 100%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 14px; background: var(--line, #eef0f4); font-size: 13px; }
.call-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--brand, #1d3fa5); font-weight: 600; text-decoration: none; }
.call-link:hover span, .call-link:focus-visible span { text-decoration: underline; }
.call-link .icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.call-text { font-weight: 600; }

/* Today Machines card (owner, 3 November 2026): summary line, stopped machines as cards with a crew bar, the rest in the Today departments' aligned rows. */
.mc-summary { margin: 2px 0 10px; font-size: 15px; color: var(--ink-2, var(--ink)); font-variant-numeric: tabular-nums; }
.mc-summary b { font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.mc-summary .mc-ok { color: var(--green-ink); }
.mc-summary .mc-bad { color: #A52C28; }
.mc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 8px; margin-bottom: 10px; }
.mc-card { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 12px 12px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-decoration: none; overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.mc-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--tone); }
.mc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mc-card:focus-visible, .mc-row:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.mc-name { min-width: 0; overflow-wrap: anywhere; line-height: 1.25; font-size: 15px; }
.mc-sub { color: var(--muted); font-weight: 500; }
.mc-crew { display: flex; align-items: baseline; gap: 6px; }
.mc-crew b { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.05; color: var(--tone-ink); font-variant-numeric: tabular-nums; }
.mc-crew small { color: var(--muted); font-size: 13px; }
.mc-card .dp-bar { height: 8px; }
.mc-miss { color: var(--muted); font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; min-height: 1.35em; }
.mc-row { text-decoration: none; }
.mc-row .dp-name .mc-sub { font-weight: 450; }
@media (max-width: 560px) { .mc-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .mc-card:hover { transform: none; } }

/* Attendance by machine (WS-BM, owner 3 November 2026): rows open the machine; name, %, state chip, then the crew line and a bar. */
.att-mc-summary { margin: 0 0 12px; }
.att-mc-summary .mono-label { margin-right: 6px; }
.att-mc { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.att-mc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "n p c" "s s s" "b b b"; align-items: center; gap: 2px 10px; padding: 8px; border-radius: 10px; color: inherit; text-decoration: none; }
.att-mc-row:hover { background: var(--brand-soft); }
.att-mc-row:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.att-mc-name { grid-area: n; min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.att-mc-code { font-family: var(--font-mono); font-size: 12px; margin-right: 2px; }
.att-mc-pc { grid-area: p; font-family: var(--font-mono); font-size: 13px; text-align: right; }
.att-mc-row > .badge { grid-area: c; }
.att-mc-sub { grid-area: s; font-size: 13px; }
.att-mc-row .att-bar { grid-area: b; margin-top: 4px; }
.att-mc-bad { grid-template-columns: minmax(0, 1fr); grid-template-areas: "n" "t"; gap: 6px; }
.att-mc-tags { grid-area: t; display: flex; flex-wrap: wrap; gap: 6px; }
.badge.grey { background: var(--surface-2); color: var(--muted); }

/* Circle back button + path (owner, 3 November 2026): one back control on every page, replacing "‹ Section" and the
   page-level "← …" links. The circle goes one step back; each step of the path is a link. */
.back-bar { display: flex; align-items: center; gap: 12px; margin: 2px 0 14px; min-width: 0; }
.back-circle { flex: none; width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #D5D9E8; color: var(--brand); box-shadow: 0 1px 2px rgba(26,36,86,.06); transition: background .15s, border-color .15s, transform .15s; }
.back-circle .icon { width: 20px; height: 20px; stroke-width: 2.2; }
.back-circle:hover { background: var(--brand-soft); border-color: #B9C0E0; }
.back-circle:active { transform: scale(.96); }
.back-path { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; list-style: none; margin: 0; padding: 0; min-width: 0; font-size: 14px; color: var(--muted); }
.back-path li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.back-path li + li::before { content: "/"; color: #B5BBD3; }
.back-path a, .back-path button { color: var(--brand); font-weight: 600; font-size: 14px; background: none; border: 0; padding: 4px 2px; min-height: 0; border-radius: 6px; text-decoration: none; }
.back-path a:hover, .back-path button:hover { text-decoration: underline; text-underline-offset: 3px; background: none; }
.back-path [aria-current] { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }
.back-bar + .page-head, .back-bar + * .page-head:first-child { margin-top: 0; }
.hub-title { font-size: 18px; margin: 0 0 12px; }
@media (max-width: 480px) { .back-path [aria-current] { max-width: 22ch; } }

/* Several people onto a machine at once (owner, 3 November 2026): tick boxes, a department picker and one Add button. */
.machine-find h3 { font-size: 17px; margin: 0 0 8px; }
.machine-find-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 560px) { .machine-find-row { grid-template-columns: 1fr; } }
.machine-hits { max-height: 420px; overflow-y: auto; }
.machine-hits li { display: block; padding: 0; }
.machine-hit { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 10px 12px; min-height: 52px; cursor: pointer; border-radius: 12px; }
.machine-hit > span { display: grid; min-width: 0; }
.machine-hit input, .machine-tick-all input { width: 20px; height: 20px; accent-color: var(--brand); }
.machine-hit:has(input:checked) { background: var(--brand-soft); }
.machine-tick-all { display: inline-flex; align-items: center; gap: 10px; margin: 6px 0 2px; font-weight: 600; color: var(--brand); cursor: pointer; }
.machine-add-bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; padding: 10px 0 2px; background: #fff; border-top: 1px solid var(--line); margin-top: 8px; }
.machine-add-bar > span { margin-right: auto; }

/* Cash labour scans in Logs and on the worker page (owner, 3 November 2026): a saffron Punch badge and View photo per scan. */
.badge.saffron { background: var(--saffron-soft); color: var(--saffron-ink); border: 1px solid #F3C99B; }
.lg-photo { margin-top: 6px; display: inline-flex; }
.tw-visit { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tone.small .icon { width: 16px; height: 16px; }

/* Machine running time and efficiency (owner, 3 November 2026). */
.ma-switch { margin: 12px 0 14px; }
.ma-controls { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ma-controls .seg { flex-wrap: wrap; }
.ma-plan-field { min-width: 160px; margin: 0; }
.ma-plan-field select { min-height: 40px; }
.ma-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ma-tile { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 2px; }
.ma-tile span { font-size: 13px; color: var(--muted); font-weight: 600; }
.ma-tile strong { font-size: 28px; line-height: 1.15; color: var(--ink); }
.ma-tile small { font-size: 12px; color: var(--muted); }
.ma-tile.green strong { color: var(--green-ink); } .ma-tile.saffron strong { color: var(--saffron-ink); } .ma-tile.red strong { color: var(--red-ink); }
.ma-one .ma-tiles { margin-top: 10px; }
.ma-bars { display: grid; gap: 4px; }
.ma-bar { display: grid; grid-template-columns: minmax(120px, 1.2fr) minmax(80px, 2fr) 92px; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; color: inherit; text-decoration: none; }
.ma-bar:hover { background: var(--brand-soft); }
.ma-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-note { color: var(--saffron-ink); }
.ma-track { height: 12px; border-radius: 99px; background: #EDEFF5; overflow: hidden; }
.ma-track i { display: block; height: 100%; border-radius: 99px; transition: width .4s cubic-bezier(.22,1,.36,1); }
.ma-val { display: grid; text-align: right; line-height: 1.2; } .ma-val small { color: var(--muted); font-size: 12px; }
.ma-chart { margin: 8px 0 0; } .ma-chart svg { width: 100%; height: 220px; display: block; overflow: visible; }
.ma-grid { stroke: #E6E9F2; stroke-width: 1; } .ma-axis { font-size: 11px; fill: var(--muted); font-family: var(--font-body); }
.ma-run { fill: var(--brand); } .ma-short { fill: #F3C99B; } .ma-plan { fill: none; stroke: var(--saffron); stroke-width: 2; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.ma-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.ma-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ma-key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; } .ma-key.run { background: var(--brand); } .ma-key.short { background: #F3C99B; }
.ma-key.plan { height: 0; border-top: 2px dashed var(--saffron); border-radius: 0; } .ma-key.cell { background: var(--brand); }
.ma-hours { display: grid; gap: 3px; overflow-x: auto; }
.ma-hours-head, .ma-hours-row { display: grid; grid-template-columns: 72px repeat(24, minmax(10px, 1fr)); gap: 2px; align-items: center; min-width: 380px; }
.ma-hours-head span { font-size: 11px; color: var(--muted); }
.ma-hours-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-cell { height: 18px; border-radius: 3px; background: color-mix(in srgb, var(--brand) calc(var(--a) * 100%), #EEF0F6); }
.ma-sub { font-size: 15px; margin: 16px 0 6px; }
.ma-table th small { display: block; font-weight: 400; color: var(--muted); }
.ma-table tbody th { background: transparent; font-size: 14px; text-align: left; }
.ma-foot { font-size: 13px; margin-top: 10px; }
@media (max-width: 560px) { .ma-bar { grid-template-columns: 1fr 74px; } .ma-track { grid-column: 1 / -1; grid-row: 2; } }

/* Visitors and the notification bell (WS-VIS, VIS2, owner 3 November 2026). Visitors are blue; the bell count is red. */
.visitors-card { display: grid; gap: 4px; padding: 14px 16px; color: inherit; text-decoration: none; }
.visitors-card:hover { box-shadow: var(--shadow-lg); }
.visitors-card:focus-visible { outline: 3px solid var(--sky-ink); outline-offset: 2px; }
.vc-h { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
.vc-h .icon { width: 20px; height: 20px; flex: none; color: var(--sky-ink); }
.vc-num { font-family: var(--font-display); font-size: 42px; line-height: 1; font-weight: 800; color: var(--sky-ink); }
.vc-cap { color: var(--muted); font-size: 13px; }
/* One small card, half the width of its column (the other half stays free). */
.today-wrap > .today-extra:has(> .visitors-card) { width: calc(50% - 6px); }
@media (max-width: 359px) { .today-wrap > .today-extra:has(> .visitors-card) { width: 100%; } }
@media (min-width: 1024px) { .today-wrap > .today-extra:has(> .visitors-card) { width: calc(50% - 8px); } }

.vis-pills { margin-bottom: 12px; }
.vis-panel { padding: 4px 16px; }
.vis-list { list-style: none; margin: 0; padding: 0; }
.vis-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; }
.vis-row + .vis-row { border-top: 1px solid var(--line); }
.vis-main { display: grid; gap: 2px; min-width: 0; }
.vis-main strong { overflow-wrap: anywhere; }
.vis-main small { color: var(--muted); font-weight: 500; overflow-wrap: anywhere; }
.vis-call { margin-top: 2px; }
.vis-call .call-link { min-height: 44px; }
.vis-time { display: grid; justify-items: end; gap: 4px; text-align: right; font-size: 13px; color: var(--ink-2); }
@media (max-width: 520px) {
  .vis-row { grid-template-columns: auto minmax(0, 1fr); }
  .vis-time { grid-column: 2; justify-items: start; text-align: left; }
}

.bell-wrap { position: relative; display: inline-flex; }
.bell { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--brand); cursor: pointer; }
.bell:hover, .bell:focus-visible { background: var(--brand-soft); }
.bell .icon { width: 22px; height: 22px; }
.bell-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.bell-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 520px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.bell-list { list-style: none; margin: 0; padding: 0; }
.bell-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 12px 14px; }
.bell-item + .bell-item { border-top: 1px solid var(--line); }
.bell-item.unseen { background: var(--sky-soft); }
.bell-dot { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: transparent; }
.bell-item.unseen .bell-dot { background: var(--red); }
.bell-text { display: grid; gap: 3px; min-width: 0; }
.bell-text span { color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.bell-text small { color: var(--muted); }
.bell-empty, .bell-panel .form-error { margin: 0; padding: 14px; }
@media (max-width: 640px) { .bell-panel { position: fixed; left: 12px; right: 12px; top: calc(var(--safe-t, 0px) + 68px); width: auto; } }

/* WS-SS (4 November 2026): phone sign-in for staff and cash labour. Hindi sits under the English, a little smaller. */
.hi{display:block;font-weight:400;font-size:.86em;color:var(--muted);line-height:1.35}
th .hi,.badge .hi,.auth-alt .hi{display:inline;margin-left:.35em}
.self-choose .choice{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;text-align:left;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.self-choose .choice small{color:var(--muted)}
.self-profile .facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px 18px;margin:0 0 12px}
.self-profile .facts dt{font-size:.85em;color:var(--muted)}
.self-profile .facts dd{margin:2px 0 0;font-weight:600;color:var(--ink)}
.self-login-panel fieldset{border:0;padding:0;margin:0}
.pin-shown{display:flex;flex-direction:column;gap:4px;margin-top:12px;padding:14px 16px;border:1px dashed var(--brand);border-radius:12px;background:var(--brand-soft)}
.pin-code{font-family:var(--font-mono);font-size:2rem;letter-spacing:.12em;color:var(--ink)}
.app-downloads .actions{flex-wrap:wrap}

/* Download like PagarBook (RPT1–RPT4): one row per sheet, dates and the button wrap under the name on a phone. */
.rs-list{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:10px}
.rs-item{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;padding:12px 14px;border:1px solid var(--line,#e3e7ee);border-radius:14px;background:var(--card,#fff)}
.rs-text{display:flex;flex-direction:column;gap:2px;min-width:200px;flex:1 1 260px}
.rs-text small{color:var(--muted,#5b6475)}
.rs-controls{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px}
.rs-field{display:flex;flex-direction:column;gap:2px;font-size:12px;color:var(--muted,#5b6475)}
.rs-field input{min-height:40px}

/* Phone sign-in requests and Broadcast messages (WS-STAFF STAFF1, 6 November 2026). */
.sa-request { margin-bottom: 12px; }
.sa-code { flex: none; min-width: 74px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2, #eef2f6); font-size: 20px; font-weight: 800; letter-spacing: .08em; text-align: center; font-variant-numeric: tabular-nums; }
.sa-approved { margin-top: 12px; }
.sa-approved summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.sa-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sa-head h2 { margin: 0 0 2px; }
.sa-people, .sa-messages { list-style: none; margin: 8px 0 0; padding: 0; }
.sa-person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; }
.sa-person + .sa-person, .sa-message + .sa-message { border-top: 1px solid var(--line); }
.sa-main { display: grid; gap: 2px; min-width: 0; }
.sa-main strong { overflow-wrap: anywhere; }
.sa-main small { color: var(--muted); font-weight: 500; overflow-wrap: anywhere; }
.sa-message { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 12px 0; }
.sa-text { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sa-panel { padding: 4px 16px; }
.sa-compose { margin-bottom: 12px; }
.sa-compose textarea { width: 100%; min-height: 96px; }
.sa-confirm { display: grid; gap: 6px; justify-items: end; }
@media (max-width: 520px) {
  .sa-person { grid-template-columns: auto minmax(0, 1fr); }
  .sa-person > button { grid-column: 1 / -1; min-height: 44px; }
  .sa-message { grid-template-columns: minmax(0, 1fr); }
  .sa-head { flex-direction: column; }
}
/* V2-ADMIN-OUT (owner, 9 Nov 2026): the Admin's "Check out now" on the person page and Today's Still inside list, and its sheet. */
.co-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 0; }
.co-btn { min-height: 40px; display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; line-height: 1.15; }
.co-btn .hi { font-size: .78em; }
.people-mini li.co-row { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.people-mini li.co-row:first-child { border-top: 0; }
.people-mini li.co-row a { flex: 1; min-width: 0; border-top: 0; }
.co-done { display: inline-flex; flex-direction: column; line-height: 1.2; color: var(--ink-2); }
.co-done b .hi, .co-by .hi { display: inline; margin-left: .35em; }
.co-by { color: var(--muted); font-size: 12px; }
.co-sheet fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.co-sheet legend { font-weight: 650; font-size: 14px; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.co-sheet .chip-line, .co-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.co-sheet .chip { flex-direction: column; align-items: flex-start; gap: 0; padding: 6px 14px; white-space: normal; line-height: 1.2; }
.co-sheet .chip.on .hi, .co-sheet .chip[aria-pressed=true] .hi { color: rgba(255, 255, 255, .85); }

/* ---------- Salary overview (owner, 10 November 2026) ---------- */
.so-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; margin: 14px 0; }
@media (max-width: 760px) { .so-top { grid-template-columns: minmax(0, 1fr); } }
.so-hero { background: var(--brand); color: #fff; display: grid; gap: 6px; }
.so-hero .mono-label, .so-hero .muted { color: #C9CFF0; }
.so-hero p { margin: 0; }
.so-big { font-family: var(--font-display); font-size: 34px; font-weight: 800; line-height: 1.1; }
.so-mid { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.so-cash { border: 1.5px dashed var(--line-2); display: grid; gap: 6px; align-content: start; }
.so-cash p { margin: 0; }
.so-meter { display: block; height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.so-meter i { display: block; height: 100%; background: var(--green); }
.so-meter.thin { height: 5px; margin-top: 6px; background: var(--surface-2); }
.so-h { font-size: 16px; margin: 16px 0 8px; }
.so-h small { color: var(--muted); font-weight: 500; }
.so-list { list-style: none; margin: 8px 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.so-list > li { border-bottom: 1px solid var(--line); }
.so-list > li:last-child { border-bottom: 0; }
.so-list > li.muted { padding: 12px 14px; }
.so-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: 0; background: transparent; text-align: left; min-height: var(--tap); }
button.so-row:hover:not(:disabled) { background: var(--surface-2); }
.so-name { flex: 1; min-width: 0; display: grid; gap: 2px; }
.so-name small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-amt { display: grid; gap: 4px; justify-items: end; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.so-amt .badge { font-family: var(--font-body); }
.so-detail { padding: 4px 14px 14px; }
.so-payments { margin: 0; padding-left: 18px; font-size: 13px; color: var(--green-ink); }
.so-pay { border: 2px solid var(--brand); margin: 14px 0; }
.so-pay-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.so-pay-head h2 { font-size: 19px; }
.so-pay-head p { margin: 2px 0 0; }
.so-choice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.so-choice.on { border-color: var(--brand); background: var(--brand-soft); }
.so-choice span { flex: 1; min-width: 0; font-weight: 600; }
.so-choice select { max-width: 100%; }
.so-review { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); max-height: 360px; overflow-y: auto; }
.so-review li { border-bottom: 1px solid var(--line); padding: 8px 12px; }
.so-review li:last-child { border-bottom: 0; }
.so-review .check { display: flex; align-items: center; gap: 10px; }
.so-review .check span { flex: 1; min-width: 0; }
.so-review strong { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.so-cash-switch { margin: 16px 0 6px; }
/* The bulk button sits under the month's total and stays on screen at the bottom (owner, 10 November 2026: "the option to mark the salaries paid in bulk was not visible"). */
.so-paybig { width: 100%; min-height: 52px; margin-top: 8px; font-size: 16px; font-weight: 800; background: var(--saffron); border-color: var(--saffron); color: var(--ink); }
.so-paybig:hover:not(:disabled) { background: #F09A48; }
.so-paycash { width: 100%; min-height: 44px; margin-top: 6px; font-weight: 700; border-color: var(--line-2); }
.so-rowpay { white-space: nowrap; min-height: 40px; }
.so-sticky { position: sticky; bottom: 0; z-index: 3; padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, var(--bg) 35%); }
.so-sticky button { width: 100%; min-height: 50px; font-size: 16px; font-weight: 800; }
@media (max-width: 760px) { .so-sticky { bottom: calc(var(--tabbar-h) + var(--safe-b)); } }

/* ---------- Salary details (owner's plan, 19-20 November 2026): slip, Add to salary, take-backs, settling, pay slip ---------- */
.sd-main { gap: 12px; }
.sd-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sd-head h2 { margin: 0; font-size: 18px; }
.sd-glance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.sd-glance > div { background: var(--surface-2); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 2px; }
.sd-glance small { color: var(--muted); font-size: 12px; }
.sd-glance strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.sd-buttons { gap: 8px; flex-wrap: wrap; }
.sd-buttons button { min-height: 44px; }
.sd-slip { display: grid; gap: 0; }
.sd-sec { margin: 14px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.sd-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.sd-row > span { min-width: 0; overflow-wrap: anywhere; }
.sd-row small { display: block; color: var(--muted); font-size: 12px; }
.sd-row > b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sd-skipped { opacity: .55; }
.sd-minus { color: var(--red-ink); }
.sd-plus { color: var(--green-ink); }
.sd-tot { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: var(--r); font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.sd-tot.g { background: var(--green-soft); color: var(--green-ink); }
.sd-tot.d { background: var(--red-soft); color: var(--red-ink); }
.sd-tot.n { background: var(--brand-soft); color: var(--brand); font-size: 19px; margin-top: 12px; }
.sd-still b { font-size: 1.1em; }
.sd-owes span b { color: var(--red-ink); }
.sd-owed { background: var(--saffron-soft); color: var(--saffron-ink); border-radius: var(--r); padding: 8px 12px; font-size: 14px; margin-top: 12px; }
.sd-owed p { margin: 2px 0; }
.sd-owed small { opacity: .85; }
.sd-panel { border: 1.5px solid var(--brand); }
.sd-panel .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sd-list { list-style: none; margin: 6px 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.sd-list > li { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.sd-list > li:last-child { border-bottom: 0; }
.sd-list small { display: block; color: var(--muted); font-size: 12.5px; }
.sd-list .inline-form { flex-basis: 100%; }
.sd-dead { opacity: .6; }
.sd-h { font-size: 15px; margin: 14px 0 4px; }
.sd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sd-table th, .sd-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.sd-table .r { text-align: right; }
.sd-table small { display: block; color: var(--muted); font-size: 12px; }
.sd-table input { width: 120px; max-width: 100%; text-align: right; }
.slip-how { margin-top: 8px; }
.slip-how summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.sd-slipview { max-width: 760px; margin: 0 auto; }
@media (max-width: 560px) {
  .sd-glance { grid-template-columns: 1fr; }
  .sd-glance > div { display: flex; justify-content: space-between; align-items: baseline; }
  .sd-buttons button { flex: 1 1 100%; }
  .sd-table thead { display: none; }
  .sd-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .sd-table td { border: 0; padding: 2px 0; }
  .sd-table td[data-label="Given"] { grid-column: 1 / -1; }
  .sd-table td[data-label="Still owed"]::before { content: "Still owed "; color: var(--muted); font-size: 12px; }
  .sd-table td[data-label="Take this month"] { grid-column: 1 / -1; text-align: left; }
  .sd-table td[data-label="Take this month"] input { width: 100%; text-align: left; }
}
@media print { .sd-tot, .sd-owed { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .sd-slipview { max-width: none; } .slip-how { display: none; } }
