/* Barbers 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: #8c8276;
  --accent: #c8423a; --accent2: #a8342d; --accent-soft: #c8423a14; --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;
}
html[lang="ar"] { --font: 'IBM Plex Sans Arabic', system-ui, sans-serif; --display: 'IBM Plex Sans Arabic', system-ui, sans-serif; }
@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: #8d8170; --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: #8d8170; --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;
}

* { 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; }
html[lang="ar"] h1 { font-weight: 700; }
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: 11px; 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: #25d366; border-color: #25d366; 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; }
.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(30px); opacity: 0; } }
.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; }
@media (max-width: 900px) { .toasts { bottom: 82px; } }
.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-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.cal-bar .title { font-weight: 650; font-size: 16px; min-width: 0; }
.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-head { position: sticky; top: 0; z-index: 6; background: var(--surface); display: contents; }
.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); }
.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; } }
