/* All tokens (colors, spacing, type) live in shared/tokens.css, loaded
   before this file in every shell. */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* polish-06: hide the page scrollbar everywhere (app-wide -- both surfaces).
   Purely visual; scrolling still works. */
html,
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Kannada",
    "Noto Sans Devanagari", sans-serif;
  line-height: 1.4;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) 96px;
}

/* Diary's fixed bottom nav needs more clearance than the default .wrap
   bottom padding (calibrated for the venue page's shorter contact bar). */
.diary-wrap {
  padding-bottom: 118px;
}

.bilingual {
  display: block;
  font-size: 0.72em;
  color: var(--muted);
  font-weight: 400;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--space-4);
  background: var(--leaf);
  color: var(--card);
}

.topbar .brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.topbar .brand .bilingual {
  color: var(--topbar-accent);
}

/* ── stat strip ───────────────────────────── */
.stat-strip {
  display: flex;
  gap: 10px;
  margin: var(--space-4) 0;
}

.stat-card {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-3);
  text-align: center;
}

.stat-card .num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--leaf);
}

.stat-card .label {
  font-size: 0.8rem;
  color: var(--muted);
}

/* admin-04: optional secondary line under .stat-card .label (e.g. an
   active/invited split) — additive, no other .stat-card consumer uses it. */
.stat-card .sub {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 2px;
}

/* diary-hold-01: the Next-function card now shows just a date ("21 Jul", no
   customer name), so it reads as a big value like the other two cards — all
   three are a uniform two lines (value + label). */
.stat-card .num.nxt {
  font-size: 1.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── PWA install card ─────────────────────── */
.install-card {
  background: var(--free-bg);
  border: 1px solid var(--free-ink);
  color: var(--ink);
  border-radius: var(--radius);
  padding: var(--space-3) 14px;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.install-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ── alert ────────────────────────────────── */
.alert {
  background: var(--hold-bg);
  border: 1px solid var(--alert-border);
  color: var(--hold-ink);
  border-radius: var(--radius);
  padding: var(--space-3) 14px;
  margin-bottom: var(--space-4);
}

.alert .alert-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.alert .alert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 6px 0;
  border-top: 1px solid rgba(173, 111, 17, 0.15);
}

.alert .alert-row:first-of-type {
  border-top: none;
}

.alert-actions {
  display: flex;
  gap: 6px;
}

.btn-sm {
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

/* Diary-only touch-target bump — .btn-sm is also used by admin's
   "Back to Venues" button, which stays at its original compact size
   (admin is a tool, not covered by this skin pass). */
.diary-wrap .btn-sm {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-sm.confirm {
  background: var(--leaf);
  color: var(--card);
}

.btn-sm.release {
  background: var(--card);
  color: var(--hold-ink);
  border: 1px solid var(--hold-ink);
}

/* ── calendar ─────────────────────────────── */
/* Build A (D1): public-parity header — ‹  July 2026  › with the label
   centered BETWEEN the two nav buttons (venue-shell's calhead rhythm).
   Buttons hold SVG chevrons now, direct children of .cal-header (the old
   .cal-nav wrapper is gone from the Diary markup). Public page unaffected:
   it uses its own .calhead class. */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: var(--space-3) 0 10px;
}

.cal-header h2 {
  font-size: 1.05rem;
  margin: 0;
  text-align: center;
  flex: 1;
}

.cal-header button {
  flex: none;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.cal-legend {
  display: flex;
  /* C-07: four items now (Part booked joined) — a fourth bilingual entry
     overflows 320px without wrapping. */
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.78rem;
  color: var(--muted);
  /* Build A (D1): legend sits ABOVE the month header now (public order). */
  margin: var(--space-5) 0 0;
}

.cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.dot.free {
  background: var(--free-ink);
}

.dot.hold {
  background: var(--hold-ink);
}

.dot.booked {
  background: var(--booked-ink);
}

/* C-07: the Part-booked legend swatch — same 135° split as the cell,
   in the legend dots' ink shades (matching its siblings). */
.dot.split {
  background: linear-gradient(135deg, var(--booked-ink) 0 50%, var(--free-ink) 50% 100%);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-dow {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  padding-bottom: var(--space-1);
}

/* Build A (D1): weekend DOW accent ported from v-venue.css (which
   re-declares it with the same values, so the public page is unchanged). */
.cal-dow.wknd {
  color: var(--gold-ink);
  font-weight: 800;
}

/* Build A (D1): cell skin parity with the public calendar — radius 9px,
   number weight 600, hairline border on plain cells (status cells go
   border-transparent below, same as v-venue.css). */
.cal-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
}

.cal-cell.empty {
  visibility: hidden;
  cursor: default;
}

.cal-cell.free {
  background: var(--free-bg);
  color: var(--free-ink);
  border-color: transparent;
}

.cal-cell.hold {
  background: var(--hold-bg);
  color: var(--hold-ink);
  border-color: transparent;
}

.cal-cell.booked {
  background: var(--booked-bg);
  color: var(--booked-ink);
  border-color: transparent;
}

/* C-07 (part-booked): a day_night date whose two slots DIFFER — Day =
   top-left half, Night = bottom-right, each half its own theme-constant
   status token (§2.3; no new colour, correct in all 10 Diary themes by
   construction). The number keeps the cell's neutral --ink (measured
   ≥11.8:1 on every half). Source order matters: these sit BEFORE
   .cal-cell.past below so a past part-booked day still greys out
   (equal specificity — later rule wins). */
.cal-cell.split-booked-free { background: linear-gradient(135deg, var(--booked-bg) 0 50%, var(--free-bg) 50% 100%); border-color: transparent; }
.cal-cell.split-free-booked { background: linear-gradient(135deg, var(--free-bg) 0 50%, var(--booked-bg) 50% 100%); border-color: transparent; }
.cal-cell.split-hold-free { background: linear-gradient(135deg, var(--hold-bg) 0 50%, var(--free-bg) 50% 100%); border-color: transparent; }
.cal-cell.split-free-hold { background: linear-gradient(135deg, var(--free-bg) 0 50%, var(--hold-bg) 50% 100%); border-color: transparent; }
.cal-cell.split-booked-hold { background: linear-gradient(135deg, var(--booked-bg) 0 50%, var(--hold-bg) 50% 100%); border-color: transparent; }
.cal-cell.split-hold-booked { background: linear-gradient(135deg, var(--hold-bg) 0 50%, var(--booked-bg) 50% 100%); border-color: transparent; }

/* diary-cal-bookings-01: FLAT venue-wide "Part booked" cell — some halls
   booked, some still free on a multi-space venue. Same booked→free diagonal
   as the legend's split dot, but a single class (NOT a day/night split-*
   triangle, which would misdescribe an across-halls aggregate). Sits before
   .cal-cell.past so a past part-booked day still fades (past uses opacity). */
.cal-cell.part { background: linear-gradient(135deg, var(--booked-bg) 0 50%, var(--free-bg) 50% 100%); border-color: transparent; }

.cal-cell.today {
  border-color: var(--marigold);
  font-weight: 700;
}

.cal-cell.past {
  opacity: 0.45;
  cursor: default;
}

/* Build A (D2): in the Diary a past cell opens the read-only peek, so it
   reads as tappable; the public page's past cells stay dead (rule above). */
.diary-wrap .cal-cell.past {
  cursor: pointer;
}

/* Build A (D2): read-only past-date peek rows (inside the reused .sheet). */
.peek-rows {
  margin: var(--space-3) 0 var(--space-2);
}

.peek-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.peek-row:last-child {
  border-bottom: none;
}

.peek-slot {
  font-weight: 700;
  min-width: 64px;
}

/* ── sheet ────────────────────────────────── */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(43, 43, 38, 0.45);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
}

.sheet-backdrop.open {
  display: flex;
}

/* diary-confirm-01: confirmation dialogs sit centered in the screen (easy to
   reach with a thumb), not as a bottom sheet. The sheet becomes a compact
   all-corners-rounded card. Input sheets keep the default bottom-sheet look. */
.sheet-backdrop.centered {
  align-items: center;
  padding: 20px;
}
.sheet-backdrop.centered > .sheet {
  max-width: 400px;
  border-radius: 18px;
  padding-bottom: var(--space-5);
}

.sheet {
  background: var(--paper);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  /* diary-nav-wa-02: clear the Android system bar under edge-to-edge (the
     inset is 0 everywhere viewport-fit=cover isn't set, so this is a no-op
     for admin/venue). */
  padding: var(--space-5) var(--space-5) calc(28px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.sheet h3 {
  margin: 0 0 var(--space-1);
}

.sheet .sheet-sub {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: var(--space-4);
}

/* ss-03a: Day/Night sub-labels above each status-options block in the
   marking sheet, for day_night spaces only (hidden for whole_day —
   diary-app.js toggles display). */
/* Build B (D4): quick-mark sheet groups (customer → when → status →
   spaces). The spaces group reuses .space-pill visuals, wrapping instead
   of scrolling — a picker, not a swipe row. */
.sheet-group {
  margin-bottom: var(--space-2);
}

.sheet-group-label {
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0 0 var(--space-1);
}

.sheet-spaces {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.sheet-spaces .space-pill:disabled {
  opacity: 0.5;
  cursor: default;
}

.pill-hint {
  display: block;
  font-size: 0.66rem;
  font-weight: 400;
  color: var(--muted);
}

/* ss-03a: space selector pills at the top of the calendar screen — only
   rendered when a venue has >1 space (shared/style.css since the Diary
   is its only consumer for now, same home as .status-options above). */
.space-selector {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  margin-bottom: var(--space-3);
  padding-bottom: 2px;
  /* Build A (D3+D5): swipeable, no visible scrollbar (all engines) — the
     right-edge fade below is the overflow affordance instead. */
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Fade the last ~28px so a cut-off chip hints "more to the right". When
     the row doesn't overflow, chips stop short of the edge and nothing is
     faded. */
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}

.space-selector::-webkit-scrollbar {
  display: none;
}

.space-pill {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px var(--space-4);
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

.space-pill.selected {
  background: var(--leaf);
  color: var(--card);
  border-color: var(--leaf);
}

.status-options {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.status-opt {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 10px;
  padding: 10px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}

/* Build B (D4): selected state for the non-status "When" segments —
   mirrors .space-pill.selected (brand, not gold; themes override to
   --d-brand in diary-theme-overrides.css). The status trio below keeps
   its tinted rules. */
.status-opt.seg.selected {
  background: var(--leaf);
  color: var(--card);
  border-color: var(--leaf);
}

/* diary-sheet-01: the "When" trio is Full-day XOR Day/Night — the options
   ruled out by the current pick dim to make the exclusivity obvious (still
   tappable to switch). */
.status-opt.seg.dim {
  opacity: 0.4;
}

.status-opt.selected.free {
  background: var(--free-bg);
  color: var(--free-ink);
  border-color: var(--free-ink);
}

.status-opt.selected.hold {
  background: var(--hold-bg);
  color: var(--hold-ink);
  border-color: var(--hold-ink);
}

.status-opt.selected.booked {
  background: var(--booked-bg);
  color: var(--booked-ink);
  border-color: var(--booked-ink);
}

.field {
  margin-bottom: var(--space-3);
}

.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: var(--space-1);
}

.field input {
  width: 100%;
  padding: 10px var(--space-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  background: var(--card);
}

.phone-picker,
.password-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  overflow: hidden;
}

.phone-picker .phone-code-select {
  border: none;
  background: transparent;
  padding: 10px var(--space-2) 10px var(--space-3);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  border-right: 1px solid var(--border);
  max-width: 42%;
}

.phone-picker input,
.password-input input {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 10px var(--space-3);
  font-size: 0.95rem;
  background: transparent;
}

.phone-picker select:focus,
.phone-picker input:focus,
.password-input input:focus {
  outline: none;
}

.password-input .toggle-visibility {
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--leaf);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0 var(--space-3);
  cursor: pointer;
}

.diary-footer-action {
  margin-top: 28px;
}

.invite-result {
  background: var(--free-bg);
  border: 1px solid var(--free-ink);
  border-radius: var(--radius);
  padding: var(--space-3) 14px;
  margin-top: 14px;
}

.invite-result .invite-url {
  display: block;
  font-family: monospace;
  font-size: 0.8rem;
  word-break: break-all;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-2) 10px;
  margin: var(--space-2) 0;
}

.invite-result .invite-actions {
  display: flex;
  gap: var(--space-2);
}

.sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: var(--space-3);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.btn.primary {
  background: var(--leaf);
  color: var(--card);
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

/* ── enquiries ────────────────────────────── */
.enq-list {
  margin-top: var(--space-6);
}

/* enquiries-redesign: day-grouped feed — subtitle, per-day headers, grouped
   card of rows (channel chip + asked date + status chip + tap time), and the
   Home this-month strip. Token fallbacks keep admin (no [data-diary-theme],
   so no --card-border/--d-brand) rendering sanely. */
.enq-sub {
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 12px;
}

.enq-day-h {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 16px 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.enq-day-h .enq-day-n {
  margin-left: auto;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.enq-group {
  background: var(--card);
  border: 1px solid var(--card-border, var(--border));
  border-radius: 18px;
  overflow: hidden;
}

.enq-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  min-height: 44px;
}

.enq-row + .enq-row {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.enq-ch {
  flex: none;
  min-width: 84px;
  text-align: left;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 9px;
  border-radius: 999px;
  text-transform: uppercase;
}

.enq-ch.wa {
  background: var(--free-bg);
  color: var(--free-ink);
}

.enq-ch.call {
  background: #e7eaf6;
  color: #3a4276;
}

.enq-row-main {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.enq-nodate {
  color: var(--muted);
  font-weight: 500;
}

.enq-status {
  flex: none;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.enq-status.status-free {
  background: var(--free-bg);
  color: var(--free-ink);
}

.enq-status.status-hold {
  background: var(--hold-bg);
  color: var(--hold-ink);
}

.enq-status.status-booked {
  background: var(--booked-bg);
  color: var(--booked-ink);
}

.enq-time {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  margin-left: 8px;
}

.glance-enq-strip {
  display: flex;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--card-border, var(--border));
  border-radius: 18px;
  padding: 12px 6px;
  cursor: pointer;
  font-family: inherit;
}

.glance-enq-strip .ges-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.glance-enq-strip .ges-cell + .ges-cell {
  border-left: 1px solid rgba(0, 0, 0, 0.06);
}

.glance-enq-strip .ges-num {
  font-family: var(--font-display, inherit);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--d-brand, var(--ink));
  line-height: 1.1;
}

.glance-enq-strip .ges-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
}

.chip {
  display: inline-block;
  background: var(--free-bg);
  color: var(--free-ink);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px var(--space-2);
  border-radius: 999px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink);
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 22px 0 10px;
}

/* ── People screen (roles-05 · diary-batch-08 rebuild) — access list +
   add-person form in grey cards; compact role badges + short status
   chips (coloured dot + one word) so rows don't sprawl. Diary-only
   surface, but the structural bits live here alongside the shared
   semantic status inks they reuse; the theme-var bits (avatar brand
   initial, gold Add button, uppercase section header) are scoped in
   diary-theme-overrides.css. ── */
.people-intro {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 var(--space-4);
}

.people-card {
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.people-card .field input,
.people-card .phone-picker {
  background: var(--paper);
}

.person-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 11px 0;
  border-top: 1px solid rgba(20, 27, 51, 0.06);
}

.person-row:first-of-type {
  border-top: none;
}

.person-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.person-info {
  flex: 1;
  min-width: 0;
}

.person-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 0.95rem;
}

.you-tag {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 5px;
}

.person-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  flex-wrap: wrap;
}

/* Compact role badge — 10px-ish, uppercase-tint pills. Colours are the
   fixed role tints (DESIGN_SYSTEM §2.6), deliberately not the status
   inks below. */
.role-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  padding: 3px 8px;
  border-radius: 999px;
}

.role-badge.co {
  background: #e7eaf6;
  color: #3a4276;
}

.role-badge.mgr {
  background: #e4eaec;
  color: #3c5257;
}

.role-badge.staff {
  background: #eceae4;
  color: #5f635c;
}

.person-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
}

.person-stat .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}

.person-stat.writing {
  color: var(--free-ink);
}
.person-stat.writing .dot {
  background: var(--free-ink);
}
.person-stat.waiting {
  color: var(--hold-ink);
}
.person-stat.waiting .dot {
  background: var(--hold-ink);
}
.person-stat.removed {
  color: var(--booked-ink);
}
.person-stat.removed .dot {
  background: var(--booked-ink);
}

.empty-note {
  color: var(--muted);
  font-size: 0.85rem;
  padding: var(--space-3) 0;
}

.loading,
.error-note {
  padding: 40px var(--space-4);
  text-align: center;
  color: var(--muted);
}

/* ── bottom nav (Diary app shell + Admin) ───
   Full-width bar, pinned to the viewport edge, with a centered inner
   row — admin-R1 fix for the "half-bar" bug: max-width/margin used to
   live directly on this fixed element, capping the whole bar (not just
   its content) at 640px on any wider screen. Shared with the Diary
   (unscoped) — admin.css overrides .nav-inner's max-width alone, so
   the Diary's row width is untouched. */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 40;
}

.nav-inner {
  display: flex;
  max-width: 640px;
  margin: 0 auto;
  padding: 6px var(--space-1);
}

.nav-tab {
  flex: 1;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: var(--space-1) 2px;
  cursor: pointer;
  font-family: inherit;
}

.nav-tab.active {
  color: var(--leaf);
  font-weight: 700;
}

.nav-icon {
  width: 22px;
  height: 22px;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
}

.nav-label {
  font-size: 0.64rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.15;
}

.nav-label .bilingual {
  display: block;
  font-size: 0.82em;
  font-weight: 400;
  color: inherit;
  opacity: 0.75;
}

/* ── Home glance strip ────────────────────── */
.glance-today {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-4);
  text-align: center;
  margin-bottom: 14px;
}

.glance-today-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: var(--space-1);
}

.glance-today-status {
  font-size: 1.3rem;
  font-weight: 700;
}

.glance-today.status-free .glance-today-status {
  color: var(--free-ink);
}

.glance-today.status-hold .glance-today-status {
  color: var(--hold-ink);
}

.glance-today.status-booked .glance-today-status {
  color: var(--booked-ink);
}

.glance-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.glance-tile {
  flex: 1;
  min-height: 44px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-3);
  text-align: center;
  cursor: pointer;
  font-family: inherit;
}

.glance-tile .num {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--leaf);
}

.glance-tile .label {
  font-size: 0.75rem;
  color: var(--muted);
}

.upcoming-row {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px var(--space-3);
  margin-bottom: var(--space-2);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  text-align: left;
}

.status-tag-inline {
  flex: 0 0 auto;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px var(--space-2);
  border-radius: 999px;
  text-transform: uppercase;
}

.status-tag-inline.hold {
  background: var(--hold-bg);
  color: var(--hold-ink);
}

.status-tag-inline.booked {
  background: var(--booked-bg);
  color: var(--booked-ink);
}

/* ── icon button + kebab menu (admin-R2b) ─── */
.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}

.icon-btn:hover,
.icon-btn[aria-expanded="true"] {
  background: var(--border);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn.whatsapp {
  color: var(--free-ink);
}

.kebab-popup {
  position: fixed;
  z-index: 60;
  min-width: 180px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: flex;
  flex-direction: column;
}

.kebab-item {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: var(--text-base);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.kebab-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.kebab-item:hover {
  background: var(--paper);
}

.kebab-item.danger {
  color: var(--hold-ink);
}
