/* Groomers app — light by default, dark with the system or the toggle. */
:root {
  --bg: #f6f3ee; --surface: #ffffff; --surface2: #f1ece4; --line: #e4dcd0; --line2: #d6ccbd;
  --ink: #1d1915; --ink2: #5a5148; --ink3: #6e655a;
  --accent: #bf3c34; --accent2: #a8342d; --accent-soft: #bf3c3414; --brass: #a8813f;
  --ok: #2e7d4f; --ok-soft: #2e7d4f18; --warn: #b7791f; --warn-soft: #b7791f1c; --bad: #c0392b; --bad-soft: #c0392b16; --info: #2f6db5; --info-soft: #2f6db518;
  --shadow: 0 1px 2px #0000000d, 0 8px 24px #0000000f; --shadow-lg: 0 20px 60px #00000033;
  --r: 14px; --r-sm: 10px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --display: 'Fraunces', Georgia, serif;
  --nav-w: 232px; --top-h: 58px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14110e; --surface: #1d1915; --surface2: #262019; --line: #332b23; --line2: #43392e;
    --ink: #f3ece1; --ink2: #c4b8a7; --ink3: #a09482; --accent: #e0574e; --accent2: #c8423a; --accent-soft: #e0574e1f; --brass: #c9a26a;
    --ok: #5cc28a; --ok-soft: #5cc28a1f; --warn: #e2a64a; --warn-soft: #e2a64a1f; --bad: #ef6b5f; --bad-soft: #ef6b5f1f; --info: #6aa5ea; --info-soft: #6aa5ea1f;
    --shadow: 0 1px 2px #0006, 0 8px 24px #0005; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14110e; --surface: #1d1915; --surface2: #262019; --line: #332b23; --line2: #43392e;
  --ink: #f3ece1; --ink2: #c4b8a7; --ink3: #a09482; --accent: #e0574e; --accent2: #c8423a; --accent-soft: #e0574e1f; --brass: #c9a26a;
  --ok: #5cc28a; --ok-soft: #5cc28a1f; --warn: #e2a64a; --warn-soft: #e2a64a1f; --bad: #ef6b5f; --bad-soft: #ef6b5f1f; --info: #6aa5ea; --info-soft: #6aa5ea1f;
  --shadow: 0 1px 2px #0006, 0 8px 24px #0005; color-scheme: dark;
}

.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.kind { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink2); font: 600 14px var(--font); cursor: pointer; min-width: 0; }
.kind .ic { width: 26px; height: 26px; }
.kind.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.li-head { padding: 12px 16px 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink3); }
/* language picker (native select, styled like a small button) */
select.langpick { appearance: none; -webkit-appearance: none; font: 600 13px var(--font); color: inherit; background: none; border: 1px solid var(--line2); border-radius: 999px; padding: 6px 12px; cursor: pointer; max-width: 120px; }
select.langpick.navlink { border: 0; border-radius: 10px; padding: 9px 12px; max-width: none; width: 100%; text-align: start; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.card-h > .ic, .banner > .ic { color: var(--ink3); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-family: var(--display); font-weight: 600; font-size: 26px; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 600; }
.muted { color: var(--ink3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.gap-s { gap: 6px; }
.gap-l { gap: 18px; }
.mt { margin-top: 14px; }
.mt-l { margin-top: 26px; }
.center { text-align: center; }
.hide { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- shell */
#root { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.shell { display: grid; grid-template-columns: var(--nav-w) 1fr; flex: 1; min-height: 0; }
.demo-bar ~ .shell { --demo-h: 38px; }
.side { position: sticky; top: 0; height: calc(100dvh - var(--demo-h, 0px)); background: var(--surface); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 12px; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 20px; padding: 6px 8px 14px; text-decoration: none; }
.pole { width: 11px; height: 26px; border-radius: 6px; border: 1.5px solid var(--ink); background: repeating-linear-gradient(-45deg, #c8423a 0 5px, #f4ece0 5px 10px, #2f5d9b 10px 15px, #f4ece0 15px 20px); flex: none; }
.navlink { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--ink2); text-decoration: none; font-weight: 500; position: relative; }
.navlink:hover { background: var(--surface2); color: var(--ink); }
.navlink.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.navlink svg { width: 19px; height: 19px; flex: none; }
.navlink .count { margin-inline-start: auto; background: var(--accent); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.side .sep { height: 1px; background: var(--line); margin: 10px 4px; }
.side .foot { margin-top: auto; padding-top: 10px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: var(--top-h); display: flex; align-items: center; gap: 10px; padding: 0 22px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 20px; }
.page { padding: 22px; max-width: 1240px; width: 100%; margin: 0 auto; }
.page.wide { max-width: none; }
.page.flush { padding: 0; }
.tabbar { display: none; }
.demo-bar { background: #1d1915; color: #f3ece1; font-size: 13px; padding: 8px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; text-align: center; }
.demo-bar a { color: #f0c27a; font-weight: 600; }
.demo-bar .btn { padding: 5px 12px; font-size: 12.5px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { padding: 0 14px; }
  .page { padding: 14px; padding-bottom: 90px; }
  .page.flush { padding-bottom: 70px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; font-size: 12px; color: var(--ink3); text-decoration: none; font-weight: 500; position: relative; }
  .tabbar a.on { color: var(--accent); }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .dot { position: absolute; top: 5px; inset-inline-start: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
  h1 { font-size: 22px; }
}

/* ---------------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 15px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s, transform .12s; min-height: 38px; }
.btn:hover { background: var(--surface2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent2); border-color: var(--accent2); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface2); }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ok { color: var(--ok); }
.btn.wa { background: #127a3f; border-color: #127a3f; color: #fff; }
.btn.wa:hover { background: #1ebe5b; }
.btn.small { padding: 5px 11px; font-size: 13px; min-height: 32px; }
.btn.icon { padding: 0; width: 38px; height: 38px; }
.btn.icon.small { width: 32px; height: 32px; }
.btn.block { width: 100%; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn.small svg { width: 15px; height: 15px; }

label.f { display: block; font-size: 13px; font-weight: 600; color: var(--ink2); margin-bottom: 5px; }
.field { margin-bottom: 14px; }
.field .hint { font-size: 12px; color: var(--ink3); margin-top: 4px; }
.field.err input, .field.err select, .field.err textarea { border-color: var(--bad); }
input.i, select.i, textarea.i { width: 100%; background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r-sm); color: var(--ink); font: inherit; padding: 9px 12px; min-height: 40px; }
textarea.i { resize: vertical; min-height: 80px; }
input.i:focus, select.i:focus, textarea.i:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.i { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink3) 50%), linear-gradient(135deg, var(--ink3) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 30px; }
html[dir="rtl"] select.i { background-position: 17px 55%, 12px 55%; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
@media (max-width: 560px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 6px 0; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line2); border-radius: 999px; transition: .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px #0003; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(18px); }
html[dir="rtl"] .switch input:checked + span::after { transform: translateX(-18px); }
.search { position: relative; }
.search input { padding-inline-start: 36px; }
.search svg { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink3); pointer-events: none; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line2); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--ink2); white-space: nowrap; }
.chip:hover { border-color: var(--ink3); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip .sw { width: 9px; height: 9px; border-radius: 50%; }
.seg { display: inline-flex; background: var(--surface2); border-radius: 999px; padding: 3px; gap: 2px; max-width: 100%; flex-wrap: wrap; }
.seg.wrap { border-radius: 16px; }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px #0002; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface2); color: var(--ink2); white-space: nowrap; }
.tag.accent { background: var(--accent-soft); color: var(--accent); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.info { background: var(--info-soft); color: var(--info); }
.tag.brass { background: #a8813f1f; color: var(--brass); }

/* ---------------------------------------------------------------- cards & lists */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card.pad-s { padding: 12px; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-h h2 { flex: 1; }
.cards { display: grid; gap: 14px; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.cols3 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; align-items: start; }
.cols2 > *, .cols3 > *, .stats > *, .grid2 > *, .grid3 > * { min-width: 0; }
@media (max-width: 1000px) { .cols2, .cols3 { grid-template-columns: 1fr; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.stat .k { font-size: 12.5px; color: var(--ink3); font-weight: 500; }
.stat .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; letter-spacing: -.01em; }
.stat .s { font-size: 12px; color: var(--ink3); }
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; background: none; border-inline: 0; border-top: 0; width: 100%; text-align: start; font: inherit; }
.li:last-child { border-bottom: 0; }
button.li, a.li { cursor: pointer; }
button.li:hover, a.li:hover { background: var(--surface2); }
.li .main-t { font-weight: 600; }
.li .sub-t { font-size: 13px; color: var(--ink3); }
.empty { text-align: center; color: var(--ink3); padding: 34px 16px; }
.empty svg { width: 38px; height: 38px; opacity: .5; margin-bottom: 8px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--surface2); color: var(--ink2); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; overflow: hidden; border: 1px solid var(--line); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.l { width: 64px; height: 64px; font-size: 22px; }
.avatar.s { width: 30px; height: 30px; font-size: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--ink3); }
.kv dd { margin: 0; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.bars .bar { flex: 1; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; opacity: .85; }
.bars .bar:hover { opacity: 1; }
.bars-x { display: flex; gap: 4px; font-size: 11px; color: var(--ink3); margin-top: 5px; }
.bars-x span { flex: 1; text-align: center; overflow: hidden; white-space: nowrap; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: start; font-size: 12px; color: var(--ink3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.t tr:last-child td { border-bottom: 0; }
table.t td.r, table.t th.r { text-align: end; }
.scroll-x { overflow-x: auto; }

/* ---------------------------------------------------------------- overlays */
.overlay { position: fixed; inset: 0; background: #0007; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(16px); opacity: 0; } }
@keyframes slide { from { transform: translateX(var(--slide-x, 30px)); opacity: 0; } }
html[dir="rtl"] { --slide-x: -30px; }
.modal { background: var(--surface); border-radius: 18px; width: 100%; max-width: 560px; max-height: calc(100dvh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: up .18s; }
.modal.wide { max-width: 760px; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.modal-h h2 { flex: 1; font-size: 18px; }
.modal-b { padding: 16px 18px; overflow-y: auto; flex: 1; }
.modal-f { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.drawer-wrap { justify-content: flex-end; padding: 0; }
.drawer { background: var(--surface); width: 100%; max-width: 460px; height: 100%; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slide .18s; }
html[dir="rtl"] .drawer-wrap { justify-content: flex-start; }
@media (max-width: 640px) {
  .overlay { align-items: flex-end; padding: 0; }
  .modal { border-radius: 18px 18px 0 0; max-height: 94dvh; }
  .drawer-wrap { align-items: flex-end; }
  .drawer { max-width: none; height: 94dvh; border-radius: 18px 18px 0 0; animation: up .18s; }
}
.toasts { position: fixed; bottom: 20px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 440px; }
html[dir="rtl"] .toasts { transform: translateX(50%); }
.toast { background: var(--ink); color: var(--surface); padding: 11px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-lg); pointer-events: auto; display: flex; gap: 10px; align-items: center; animation: up .2s; }
.toast.err { background: var(--bad); color: #fff; }
.toast a, .toast button { color: inherit; font-weight: 700; background: none; border: 0; cursor: pointer; text-decoration: underline; padding: 0; }

.menu { position: absolute; z-index: 50; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 200px; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; background: none; border-radius: 8px; text-align: start; cursor: pointer; text-decoration: none; font-size: 14px; }
.menu button:hover, .menu a:hover { background: var(--surface2); }
.menu svg { width: 17px; height: 17px; }
.spinner { width: 22px; height: 22px; border: 2.5px solid var(--line2); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 60px; }

/* ---------------------------------------------------------------- calendar */
.cal { position: relative; overflow: auto; height: 70vh; background: var(--surface); overscroll-behavior: contain; } /* real height set from JS to fill the screen */
.cal-grid { display: grid; position: relative; min-width: 100%; }
.cal-hcell { position: sticky; top: 0; z-index: 6; background: var(--surface); border-bottom: 1px solid var(--line); border-inline-start: 1px solid var(--line); padding: 8px 8px; display: flex; align-items: center; gap: 8px; min-width: 0; height: 52px; }
.cal-hcell.today { color: var(--accent); }
.cal-hcell .big { font-size: 20px; font-weight: 700; }
.cal-corner { position: sticky; top: 0; inset-inline-start: 0; z-index: 8; background: var(--surface); border-bottom: 1px solid var(--line); }
.cal-times { position: sticky; inset-inline-start: 0; z-index: 5; background: var(--surface); }
.cal-time { position: absolute; inset-inline-end: 8px; font-size: 11.5px; color: var(--ink3); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.cal-col { position: relative; border-inline-start: 1px solid var(--line); touch-action: pan-x pan-y; }
.cal-col .off { position: absolute; inset-inline: 0; background: repeating-linear-gradient(-45deg, var(--surface2) 0 6px, transparent 6px 12px); opacity: .9; pointer-events: none; }
.cal-col .hour { position: absolute; inset-inline: 0; border-top: 1px solid var(--line); pointer-events: none; }
.cal-col .half { position: absolute; inset-inline: 0; border-top: 1px dashed color-mix(in srgb, var(--line) 70%, transparent); pointer-events: none; }
.cal-col.drop { background: var(--accent-soft); }
.ev { position: absolute; inset-inline: 3px; border-radius: 8px; padding: 3px 7px; font-size: 12px; line-height: 1.25; overflow: hidden; cursor: pointer; user-select: none; -webkit-user-select: none; border-inline-start: 4px solid var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 16%, var(--surface)); color: var(--ink); box-shadow: 0 1px 2px #0001; z-index: 2; touch-action: pan-x pan-y; }
.ev:hover { box-shadow: 0 2px 8px #0002; z-index: 3; }
.ev .who { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev .what { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev .when { font-size: 11px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.ev .icons { position: absolute; top: 3px; inset-inline-end: 5px; display: flex; gap: 3px; }
.ev .icons svg { width: 13px; height: 13px; }
.ev.st-pending { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--warn) 18%, var(--surface)) 0 6px, var(--surface) 6px 12px); border-inline-start-color: var(--warn); }
.ev.st-confirmed .who::after { content: " ✓"; color: var(--ok); }
.ev.st-arrived { box-shadow: inset 0 0 0 2px var(--info); }
.ev.st-done { opacity: .62; }
.ev.st-no_show { opacity: .55; text-decoration: line-through; border-inline-start-color: var(--bad); background: var(--bad-soft); }
.ev.st-cancelled { opacity: .4; text-decoration: line-through; }
.ev.walkin { border-inline-start-style: dashed; }
.ev.dragging { opacity: .85; box-shadow: var(--shadow-lg); z-index: 20; cursor: grabbing; transition: none; }
.ev.ghost { opacity: .35; }
.ev .rs { position: absolute; bottom: 0; inset-inline: 0; height: 9px; cursor: ns-resize; }
.ev .rs::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 18px; height: 3px; margin-left: -9px; border-radius: 2px; background: var(--ink3); opacity: 0; }
.ev:hover .rs::after { opacity: .6; }
.tof { position: absolute; inset-inline: 3px; border-radius: 8px; background: repeating-linear-gradient(45deg, var(--surface2) 0 7px, color-mix(in srgb, var(--ink3) 18%, var(--surface)) 7px 14px); border: 1px dashed var(--line2); font-size: 12px; color: var(--ink2); padding: 4px 8px; overflow: hidden; z-index: 1; cursor: pointer; }
.now-line { position: absolute; inset-inline: 0; height: 2px; background: var(--accent); z-index: 4; pointer-events: none; }
.now-line::before { content: ""; position: absolute; inset-inline-start: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.slot-hover { position: absolute; inset-inline: 3px; border-radius: 8px; background: var(--accent-soft); border: 1.5px dashed var(--accent); pointer-events: none; font-size: 12px; color: var(--accent); padding: 3px 7px; font-weight: 600; z-index: 1; }
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.month > div { background: var(--surface); min-height: 92px; padding: 6px; font-size: 12px; cursor: pointer; }
.month > div.out { background: var(--surface2); color: var(--ink3); }
.month > div.today .d { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; }
.month .d { font-weight: 700; display: inline-block; }
.month .m-ev { display: flex; gap: 4px; align-items: center; overflow: hidden; white-space: nowrap; margin-top: 2px; }
.month .wh { background: var(--surface2); min-height: 0; font-weight: 600; color: var(--ink3); text-align: center; cursor: default; }

/* ---------------------------------------------------------------- client & photos */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.photo { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface2); cursor: pointer; border: 1px solid var(--line); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .cap { position: absolute; inset-inline: 0; bottom: 0; padding: 14px 6px 4px; background: linear-gradient(transparent, #000a); color: #fff; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo.add { display: grid; place-items: center; border: 1.5px dashed var(--line2); color: var(--ink3); background: none; }
.photo.add svg { width: 26px; height: 26px; }
.lightbox { position: fixed; inset: 0; z-index: 150; background: #000e; display: flex; flex-direction: column; animation: fade .15s; }
.lightbox .img { flex: 1; display: grid; place-items: center; min-height: 0; padding: 10px; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 130px); object-fit: contain; border-radius: 6px; }
.lightbox .bar { display: flex; gap: 8px; padding: 12px 16px; align-items: center; color: #fff; }
.lightbox .bar input { flex: 1; background: #ffffff1a; border: 1px solid #ffffff33; color: #fff; border-radius: 10px; padding: 8px 12px; font: inherit; }
.lightbox .btn { background: #ffffff1a; border-color: #ffffff33; color: #fff; }
.history .li { padding: 10px 0; }
.qr { background: #fff; padding: 10px; border-radius: 12px; display: inline-block; line-height: 0; }
.qr svg { width: 150px; height: 150px; }
.link-box { display: flex; align-items: center; gap: 8px; background: var(--surface2); border-radius: 10px; padding: 8px 8px 8px 12px; font-size: 13.5px; }
.link-box code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.hours-row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.hours-row:last-child { border: 0; }
.range { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; min-width: 0; }
.range input { flex: 1; min-width: 0; max-width: 150px; padding-inline: 8px; }
@media (max-width: 520px) { .hours-row { grid-template-columns: 1fr; gap: 4px; } }
.heat { display: grid; gap: 2px; font-size: 10.5px; }
.heat div { border-radius: 3px; min-height: 18px; display: grid; place-items: center; color: var(--ink3); }
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.auth .card { width: 100%; max-width: 420px; padding: 26px; }
.auth h1 { margin-bottom: 4px; }
.banner { border-radius: var(--r); padding: 12px 14px; display: flex; gap: 10px; align-items: center; font-size: 14px; }
.banner.warn { background: var(--warn-soft); color: var(--ink); }
.banner.info { background: var(--info-soft); }
.banner.ok { background: var(--ok-soft); }
.banner.bad { background: var(--bad-soft); color: var(--ink); }
.banner.bad .ic { color: var(--bad); }
.status-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.punch { display: flex; gap: 5px; flex-wrap: wrap; }
.punch span { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--brass); }
.punch span.on { background: var(--brass); }
.punch span.free { border-style: dashed; }
@media (max-width: 700px) { .hide-m { display: none; } }

/* ================================================================ mobile-first app layer
   Phones are the main device: the app is used standing behind the chair, often installed to the home screen. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
body { overscroll-behavior-y: none; }
button, a, input, select, textarea, label { touch-action: manipulation; }

/* calendar header: date, view switch, week strip, groomers */
.cal-top { background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px 8px; display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 15; }
.cal-title { position: relative; font-weight: 700; font-size: 17px; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; min-width: 0; }
.cal-title .ic { width: 16px; height: 16px; color: var(--ink3); }
.cal-title input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; font-size: 16px; }
.week-strip { display: grid; grid-template-columns: 28px repeat(7, minmax(0, 1fr)) 28px; gap: 2px; align-items: center; }
.ws-arrow { border: 0; background: none; color: var(--ink3); height: 44px; min-width: 36px; display: grid; place-items: center; cursor: pointer; border-radius: 10px; padding: 0; }
.ws-arrow .ic { width: 18px; height: 18px; }
.ws-day { border: 0; background: none; border-radius: 12px; padding: 5px 0; display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; color: var(--ink); min-width: 0; }
.ws-day .w { font-size: 11px; color: var(--ink3); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.ws-day .n { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.ws-day.today .n { color: var(--accent); }
.ws-day.on .n { background: var(--ink); color: var(--surface); }
.ws-day.on.today .n { background: var(--accent); color: #fff; }
.groomer-chips { flex-wrap: wrap; }
.groomer-chips .chip { min-height: 34px; }

/* day grid on phones: columns share the width, compact events */
.cal.phone .cal-hcell { height: 40px; padding: 4px 6px; gap: 5px; font-size: 13px; }
.cal.phone .cal-hcell .tag { display: none; }
.cal.phone.week .cal-hcell { flex-direction: column; justify-content: center; gap: 0; padding: 2px; }
.cal.phone.week .cal-hcell .row { flex-direction: column; gap: 0; }
.cal.phone.week .cal-hcell .big { font-size: 16px; }
.cal.phone .cal-time { inset-inline-end: 5px; font-size: 10.5px; }
.cal.phone .ev { inset-inline: 2px; padding: 2px 5px; font-size: 13px; border-inline-start-width: 3px; border-radius: 6px; }
.cal.phone.week .ev { padding: 1px 3px; font-size: 10.5px; }
.cal.phone.week .ev .what, .cal.phone.week .ev .when, .cal.phone.week .ev .icons { display: none; }
.cal.phone .ev .icons { top: 2px; inset-inline-end: 3px; }
.cal.phone .ev .icons svg { width: 11px; height: 11px; }
.cal.phone .tof { inset-inline: 2px; font-size: 11px; padding: 2px 5px; }
.cal { -webkit-user-select: none; user-select: none; }

/* bottom sheet (quick add) */
.modal.sheet { max-width: 420px; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line2); margin: 10px auto 4px; }
.sheet-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; font: 600 16px var(--font); color: var(--ink); cursor: pointer; text-align: start; }
.sheet-btn:active { background: var(--surface2); }
.sheet-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.sheet-ic .ic { width: 20px; height: 20px; }

/* install */
.install-icon { width: 44px; height: 44px; border-radius: 11px; flex: none; box-shadow: 0 1px 3px #0002; }
.install-steps { margin: 12px 0 0; padding-inline-start: 20px; display: grid; gap: 6px; }
.ios-share { display: inline-block; width: 14px; height: 18px; vertical-align: -3px; border: 2px solid var(--info); border-top: 0; border-radius: 0 0 3px 3px; position: relative; margin: 0 2px; }
.ios-share::before { content: ""; position: absolute; left: 50%; top: -6px; width: 2px; height: 12px; margin-left: -1px; background: var(--info); }
.nudge { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.nudge .install-icon { width: 34px; height: 34px; border-radius: 8px; }

/* tab bar with the raised + in the middle */
.tab-add { display: none; }

@media (max-width: 900px) {
  :root { --tab-h: 60px; }
  body { font-size: 15.5px; }
  /* 16px inputs: iOS zooms the page on focus below that */
  input.i, select.i, textarea.i, .search input { font-size: 16px; min-height: 44px; }
  .btn { min-height: 44px; }
  .btn.small { min-height: 36px; }
  .btn.icon { width: 44px; height: 44px; }
  .btn.icon.small { width: 36px; height: 36px; }
  .chip { min-height: 36px; padding: 6px 13px; }
  .li { min-height: 56px; padding: 12px 14px; }
  .topbar { height: auto; min-height: var(--top-h); padding-top: env(safe-area-inset-top); }
  .demo-bar { padding-top: max(8px, env(safe-area-inset-top)); font-size: 12px; }
  .demo-bar ~ .shell .topbar { padding-top: 0; }
  .shell:first-child .cal-top { padding-top: max(10px, env(safe-area-inset-top)); }
  .page { padding: 14px 14px calc(var(--tab-h) + 28px + env(safe-area-inset-bottom)); }
  .tabbar { grid-template-columns: repeat(2, 1fr) 72px repeat(2, 1fr); height: calc(var(--tab-h) + env(safe-area-inset-bottom)); align-items: start; box-shadow: 0 -4px 16px #0000000d; }
  .tabbar a { padding: 9px 0 6px; font-size: 12px; }
  .tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab-add { display: grid; place-items: center; width: 54px; height: 54px; margin: -16px auto 0; border-radius: 50%; border: 4px solid var(--bg); background: var(--accent); color: #fff; box-shadow: 0 6px 16px #c8423a55; cursor: pointer; padding: 0; }
  .tab-add .ic { width: 26px; height: 26px; }
  .tab-add:active { transform: scale(.94); }
  .toasts { bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat .v { font-size: 21px; }
  .card { padding: 14px; }
  .modal-f { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .modal-f .btn { flex: 1; }
  .modal-f .spacer { display: none; }
  .modal-f label.check { flex-basis: 100%; }
}
@media (max-width: 700px) {
  .cal-top { padding-inline: 10px; }
  .cal-title { font-size: 16px; }
  .seg button { padding: 6px 10px; }
  .month > div { min-height: 64px; padding: 4px; font-size: 10.5px; }
  .month .m-ev .ellipsis { display: none; }
  .month .m-ev { justify-content: center; }
}

/* tables become stacked cards on phones (no sideways scrolling); cells carry data-l labels */
@media (max-width: 700px) {
  table.t.stack thead { display: none; }
  table.t.stack, table.t.stack tbody, table.t.stack tr, table.t.stack td { display: block; width: 100%; }
  table.t.stack tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  table.t.stack tr:last-child { border-bottom: 0; }
  table.t.stack td { border: 0; padding: 2px 0; display: flex; justify-content: space-between; gap: 12px; text-align: end; }
  table.t.stack td::before { content: attr(data-l); color: var(--ink3); font-size: 12.5px; text-align: start; flex: none; }
  table.t.stack td:first-child { font-weight: 600; font-size: 15px; justify-content: flex-start; text-align: start; padding-bottom: 4px; }
  table.t.stack td:first-child::before { display: none; }
  table.t.stack td:empty { display: none; }
  .scroll-x { overflow-x: visible; }
}
@media (max-width: 700px) { .photos { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); } }

/* badge on the Today tab: online requests waiting */
.tab-wrap { position: relative; display: block; min-width: 0; }
.tab-wrap > a { height: 100%; }
.tab-badge { position: absolute; top: 4px; inset-inline-start: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; pointer-events: none; border: 2px solid var(--surface); }

/* calendar banners and empty day */
.cal-banner { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 12px; padding: 9px 12px; font: 500 14px var(--font); text-align: start; text-decoration: none; color: var(--ink); cursor: pointer; }
.cal-banner.warn { background: var(--warn-soft); }
.cal-banner.warn b { color: var(--warn); }
.cal-banner.bad { background: var(--bad-soft); }
.cal-banner.bad b { color: var(--bad); }
.cal-banner.info { background: var(--info-soft); cursor: default; }
.cal-banner .ic { flex: none; }
.cal-empty { position: sticky; top: 45%; z-index: 7; height: 0; text-align: center; pointer-events: none; }
.cal-empty { color: var(--ink3); font-weight: 600; font-size: 14px; }

/* arrows point the reading direction */
html[dir="rtl"] .ic.dir { transform: scaleX(-1); }
/* Today: what the app did for you this month */
.value-card { background: var(--accent-soft); }
.value-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.value-row b { display: block; font-size: 22px; line-height: 1.1; }
.value-row span { font-size: 12px; color: var(--ink2); }
/* Today: setup checklist */
.setup .steps { display: flex; flex-direction: column; gap: 2px; }
.setup .step { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 4px; border-radius: var(--r-sm); text-decoration: none; color: inherit; background: none; border: 0; font: inherit; text-align: start; width: 100%; cursor: pointer; }
.setup .step:hover { background: var(--surface2); }
.setup .tick { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line2); display: grid; place-items: center; }
.setup .tick .ic { width: 14px; height: 14px; }
.setup .step.done .tick { background: var(--ok); border-color: transparent; color: #fff; }
.setup .step.done .lbl { color: var(--ink3); text-decoration: line-through; }
.setup .step .sub { font-size: 12px; color: var(--ink3); }
.setup .prog { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 6px 0 10px; }
.setup .prog i { display: block; height: 100%; background: var(--accent); }
button.chip { font-family: inherit; }
/* Settings: shop photos */
.shop-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.shop-photos .sp { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--surface2); }
.shop-photos .sp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-photos .sp-cover { position: absolute; inset-inline-start: 6px; bottom: 6px; }
.shop-photos .sp-del { position: absolute; inset-inline-end: 6px; top: 6px; }
.shop-photos .sp-add { border: 2px dashed var(--line2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink2); font: inherit; font-size: 13px; cursor: pointer; }
@media (pointer: coarse) { .ev .rs { height: 16px; } }
.order-btns .btn { height: 36px; min-width: 36px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; cursor: pointer; border: 0; padding: 0; }
.swatch.on { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }
.hint.err-msg { color: var(--bad); font-weight: 500; }
/* Show more */
.more-t { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; border: 1px dashed var(--line2); border-radius: 12px; background: none; font: 600 15px var(--font); color: var(--ink2); cursor: pointer; margin: 6px 0; }
.more-t:hover { border-color: var(--ink3); color: var(--ink); }
.more-b { margin-top: 10px; display: flex; flex-direction: column; gap: 12px; }
.menu-wrap .menu { inset-inline-end: 0; top: calc(100% + 6px); }
.menu .menu-i.danger { color: var(--bad); }
.menu .menu-i { min-height: 44px; }
/* phones: bigger targets and text for wet hands and tired eyes */
@media (max-width: 900px) {
  body { font-size: 16px; }
  .btn.small { min-height: 44px; }
  .chip { min-height: 44px; }
  .seg button { min-height: 40px; padding: 8px 14px; }
  label.f { font-size: 14px; }
  .small { font-size: 14px; }
  .check { padding: 10px 0; }
  .check input { width: 22px; height: 22px; }
  .toast a, .toast button { padding: 8px 10px; margin: -8px 0; border-radius: 8px; background: #ffffff22; text-decoration: none; }
  .tabbar a { font-size: 13px; }
  .swatch { width: 40px; height: 40px; }
  .cal.phone .ev { font-size: 13px; }
}
.big-action { min-height: 52px; font-size: 16px; }
.stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.li.req { flex-wrap: wrap; }
.li.req > .grow { flex: 1 1 200px; }
.li.req > .row { margin-inline-start: auto; }
.big-seg button, .seg button { text-transform: capitalize; }

/* ---- appointment editor: client, service, one "when" line; the rest under More ---- */
.editor { display: flex; flex-direction: column; gap: 4px; }
.when-line { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--line2); border-radius: var(--r-sm); background: var(--surface2); font: inherit; color: var(--ink); text-align: start; cursor: pointer; }
.when-line .dot { display: inline-block; vertical-align: middle; }
.when-change { color: var(--accent); font-weight: 600; font-size: 14px; flex: none; }
.when-pick { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--line2); border-radius: var(--r-sm); }
.svc-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.svc { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 56px; min-width: 0; padding: 8px 12px; border: 1px solid var(--line2); border-radius: var(--r-sm); background: var(--surface); font: inherit; color: var(--ink); text-align: start; cursor: pointer; }
.svc.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.svc-n { font-weight: 600; overflow-wrap: break-word; hyphens: auto; min-width: 0; }
.svc-head { margin: 10px 2px 6px; font-weight: 600; }
.ev .ev-flag { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: var(--bad); color: #fff; font: 800 10px/1 var(--font); }
.svc-d { font-size: 13px; color: var(--ink3); }
.book-btn { min-height: 52px; font-size: 16px; }
.book-sum { font-weight: 500; opacity: .85; margin-inline-start: 4px; }
.book-sum::before { content: "· "; }
.grid2.tight { gap: 10px; }

/* ---- nothing inside a popup may push the screen sideways (iPhone date/time fields ignore width:100%) ---- */
.modal, .drawer { max-width: 100vw; }
.modal-b { overflow-x: hidden; min-width: 0; }
.modal-b > *, .grid2 > *, .grid3 > *, .field { min-width: 0; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
input.i[type="date"], input.i[type="time"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: start; }
input.i[type="date"]::-webkit-date-and-time-value, input.i[type="time"]::-webkit-date-and-time-value { text-align: start; }
.modal .chip { white-space: normal; max-width: 100%; }
.modal .menu { min-width: 0; max-width: 100%; }
@media (max-width: 900px) {
  .grid2:not(.tight) { grid-template-columns: minmax(0, 1fr); }
  .svc-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.when-who { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink2); margin-top: 2px; }
@media (max-width: 380px) { .grid2.tight { grid-template-columns: minmax(0, 1fr); } }

/* Text messages (SMS): usage meter in Settings, sent texts in the Text sheet */
.meter { height: 6px; border-radius: 999px; background: var(--surface2); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.meter.hot > span { background: var(--warn); }
.sms-msg { background: var(--surface2); border-radius: 12px; padding: 8px 10px; }
.sms-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.sms-st { white-space: nowrap; font-weight: 600; }
.sms-st.ok { color: var(--ok); }
.sms-st.bad { color: var(--bad); }
.check .ic { width: 16px; height: 16px; vertical-align: -3px; color: var(--ink3); }
/* WhatsApp / Chat / Text / Next visit: size to their words and wrap on phones instead of squeezing */
.appt-actions > .btn.grow { flex: 1 1 auto; min-width: auto; }
/* Client cadence: the rhythm in words is longer than a number */
.stat.cadence .v { font-size: 18px; line-height: 1.25; }

/* Offers: settings rows, checkout chips, birthday banner, packages, referral code, birthday input */
.offer-main { all: unset; cursor: pointer; display: block; flex: 1; min-width: 0; }
.offer-main:disabled { cursor: default; }
.offer-main:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap-chips { flex-wrap: wrap; }
.wrap-chips .chip { white-space: normal; text-align: start; }
.banner.bday { background: linear-gradient(90deg, var(--accent-soft), #a8813f22); border: 1px solid var(--accent); font-size: 15px; }
.bday-i { font-size: 22px; line-height: 1; }
.pkg { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.linkish { all: unset; cursor: pointer; color: var(--accent); text-decoration: underline; display: inline-block; min-height: 24px; line-height: 24px; }
.ref-code { font: 700 16px ui-monospace, monospace; letter-spacing: .08em; background: var(--surface2); padding: 4px 10px; border-radius: 8px; }
.bday-in { display: grid; grid-template-columns: 80px minmax(0, 1fr) 110px; gap: 8px; }
@media (max-width: 380px) { .bday-in { grid-template-columns: 72px minmax(0, 1fr) 90px; } }

/* ---------------------------------------------------------------- grooming */
.size-table { width: 100%; border-collapse: collapse; }
.size-table th { text-align: start; font-weight: 500; padding: 3px 8px 3px 0; white-space: nowrap; }
.size-table td { padding: 3px 4px; }
.size-table .i { min-height: 36px; }
.linkish { border: 0; background: none; padding: 0 2px; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; }
.chip.bad:not(.on) { border-color: var(--bad); color: var(--bad); }
.chip.warn:not(.on) { border-color: var(--warn); color: var(--warn); }
.ev-ready { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 10px; font-weight: 700; }
.route-stop { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.route-stop:first-child { border-top: 0; }
.route-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }

/* client list: flags and tags on their own line so names stay readable on phones */
.client-tags { margin-top: 3px; }
.client-tags:empty { display: none; }
