@font-face{font-family:'Vazirmatn';src:url('/fonts/Vazirmatn.woff2') format('woff2');font-weight:100 900;font-display:swap}
/* ==========================================================================
   مرکز سلامت سوین - Design system
   Brand green sampled from the logo. RTL first. Light + dark. Lite mode.
   ========================================================================== */
@font-face {
  font-family: 'Vazirmatn';
  src: local('Vazirmatn'), local('Vazirmatn Regular'), url('fonts/Vazirmatn-Variable.woff2') format('woff2');
  font-weight: 100 900; font-display: swap;
}

:root {
  --font: 'Vazirmatn', 'Segoe UI', Tahoma, 'Noto Naskh Arabic', 'DejaVu Sans', system-ui, sans-serif;
  --brand: #3f8a43;
  --brand-600: #2f7433;
  --brand-700: #235c28;
  --brand-900: #12341a;
  --brand-50: #eef6ec;
  --brand-100: #dcecd8;
  --gold: #b8913f;
  --bg: #f3f6f1;
  --bg-2: #e9efe6;
  --surface: #ffffff;
  --surface-2: #f8faf6;
  --ink: #15271b;
  --ink-2: #44574a;
  --muted: #667a6c;
  --line: #dfe7da;
  --line-2: #cdd9c7;
  --danger: #b3382f;
  --danger-bg: #fbeceb;
  --warn: #8a5a00;
  --warn-bg: #fdf3dc;
  --ok: #1f6b34;
  --ok-bg: #e4f3e6;
  --info: #1f5f8b;
  --info-bg: #e6f0f8;
  --shadow-1: 0 1px 2px rgba(18, 52, 26, .06), 0 1px 1px rgba(18, 52, 26, .04);
  --shadow-2: 0 6px 18px rgba(18, 52, 26, .08), 0 2px 4px rgba(18, 52, 26, .05);
  --shadow-3: 0 18px 48px rgba(18, 52, 26, .16), 0 4px 10px rgba(18, 52, 26, .06);
  --r-sm: 8px; --r: 14px; --r-lg: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --side-w: 264px;
  --top-h: 64px;
  --logo-ink: var(--brand-700);

  /* calendar bands: bg / edge / ink */
  --b-dawn-bg: #ebe9f6;  --b-dawn-edge: #6d63b5;  --b-dawn-ink: #2c2761;
  --b-morning-bg: #dff1e0; --b-morning-edge: #2f8f3a; --b-morning-ink: #0f3d16;
  --b-noon-bg: #fbefcf;  --b-noon-edge: #c28a00;   --b-noon-ink: #4d3500;
  --b-evening-bg: #fde3d2; --b-evening-edge: #d2622a; --b-evening-ink: #5a2305;
  --b-night-bg: #dfe6f7;  --b-night-edge: #3b55b8;  --b-night-ink: #172a6b;
}

[data-theme='dark'] {
  --brand: #63b96b;
  --brand-600: #4fa458;
  --brand-700: #8bd093;
  --brand-900: #d6eeda;
  --brand-50: #1f3526;
  --brand-100: #29432f;
  --gold: #d6b062;
  --bg: #19251c;
  --bg-2: #1d2b21;
  --surface: #223227;
  --surface-2: #283a2e;
  --ink: #eaf2ec;
  --ink-2: #c5d5ca;
  --muted: #a0b3a6;
  --line: #364d3d;
  --line-2: #425f4b;
  --danger: #ff8d82;
  --danger-bg: #3a1815;
  --warn: #f0c36a;
  --warn-bg: #352a10;
  --ok: #86d492;
  --ok-bg: #12301a;
  --info: #8cc3ee;
  --info-bg: #122636;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 8px 22px rgba(0, 0, 0, .35);
  --shadow-3: 0 22px 56px rgba(0, 0, 0, .5);
  --logo-ink: #e9f5ea;

  --b-dawn-bg: #27244a;  --b-dawn-edge: #9a90ee;  --b-dawn-ink: #e3e0ff;
  --b-morning-bg: #17361e; --b-morning-edge: #5fc26b; --b-morning-ink: #d5f3d9;
  --b-noon-bg: #3b2f0c;  --b-noon-edge: #e0ab2b;   --b-noon-ink: #fbe7b0;
  --b-evening-bg: #43200f; --b-evening-edge: #ee8650; --b-evening-ink: #ffe0cf;
  --b-night-bg: #182148;  --b-night-edge: #7f98ee;  --b-night-ink: #dde5ff;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.9; color: var(--ink);
  background: var(--bg); direction: rtl; text-align: right;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .3s, color .3s;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4 { line-height: 1.5; margin: 0; font-weight: 800; letter-spacing: 0; }
p { margin: 0; }
a { color: var(--brand-600); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-feature-settings: 'tnum'; }
.ltr { direction: ltr; unicode-bidi: embed; text-align: left; }
.muted { color: var(--muted); }
.hide { display: none !important; }

/* ------------------------------------------------------------------ */
/* Logo (mask so it takes the theme colour)                            */
/* ------------------------------------------------------------------ */
.logo-mark, .logo-word {
  display: block; background: var(--logo-ink);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-position: center; mask-position: center;
}
.logo-mark { aspect-ratio: 377 / 231; }
.logo-word { aspect-ratio: 607 / 83; }
.logo-on-brand .logo-mark, .logo-on-brand .logo-word { background: #fff; }

/* ------------------------------------------------------------------ */
/* Buttons, inputs                                                     */
/* ------------------------------------------------------------------ */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent; font-weight: 700; font-size: 14.5px;
  background: var(--brand); color: #fff; transition: transform .18s var(--ease), box-shadow .2s, background-color .2s, border-color .2s;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, var(--shadow-1); overflow: hidden; white-space: nowrap; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
[data-theme='dark'] .btn { color: #07210d; }
.btn:hover { background: var(--brand-600); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.sec { background: var(--surface); color: var(--ink); border-color: var(--line-2); box-shadow: none; }
.btn.sec:hover { background: var(--brand-50); border-color: var(--brand); }
.btn.ghost { background: transparent; color: var(--brand-700); box-shadow: none; }
.btn.ghost:hover { background: var(--brand-50); }
.btn.danger { background: var(--danger); color: #fff; }
[data-theme='dark'] .btn.danger { color: #2a0a07; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn.lg { min-height: 52px; padding: 0 28px; font-size: 16px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn .ico { width: 18px; height: 18px; flex: none; }
.seg .ico { width: 18px; height: 18px; flex: none; }
.input .ico, button.input .ico { width: 20px; height: 20px; flex: none; }
.chip .ico { width: 16px; height: 16px; flex: none; }
.ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.38); transform: scale(0); animation: rip .6s var(--ease) forwards; pointer-events: none; }
@keyframes rip { to { transform: scale(4); opacity: 0; } }

.icon-btn {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center;
  transition: transform .18s var(--ease), background-color .2s, border-color .2s; color: var(--ink-2); flex: none; padding: 0;
}
.icon-btn:hover { background: var(--brand-50); border-color: var(--brand); color: var(--brand-700); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 20px; height: 20px; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label, .lbl { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 8px 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface);
  transition: border-color .2s, box-shadow .2s, background-color .2s; text-align: right; direction: rtl; font-size: 15px;
}
textarea.input { min-height: 96px; resize: vertical; line-height: 1.9; }
.input::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.input:hover { border-color: var(--brand); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.input.ltr { text-align: left; direction: ltr; }
.input[aria-invalid='true'] { border-color: var(--danger); }
.hint { font-size: 12.5px; color: var(--muted); }
.err { font-size: 12.5px; color: var(--danger); font-weight: 600; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > .field { flex: 1 1 200px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 2; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background-color .25s; }
.switch i::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform .25s var(--ease); }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(-20px); }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 40px; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }

/* ------------------------------------------------------------------ */
/* Cards, badges, tabs                                                 */
/* ------------------------------------------------------------------ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); padding: 20px; }
.card.flat { box-shadow: none; }
.card h3 { font-size: 16px; margin-bottom: 4px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); line-height: 1.7; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.badge.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; font-weight: 600; transition: all .2s; min-height: 36px; }
.chip:hover { border-color: var(--brand); }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
[data-theme='dark'] .chip.on { color: #07210d; }
.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--bg-2); gap: 2px; border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 0 16px; min-height: 36px; border-radius: 10px; font-weight: 700; font-size: 13.5px; color: var(--ink-2); transition: background-color .2s, color .2s, box-shadow .2s; }
.seg button.on { background: var(--surface); color: var(--brand-700); box-shadow: var(--shadow-1); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: transparent; padding: 12px 16px; font-weight: 700; color: var(--muted); position: relative; white-space: nowrap; min-height: 44px; }
.tabs button.on { color: var(--brand-700); }
.tabs button.on::after { content: ''; position: absolute; inset-inline: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }

/* ------------------------------------------------------------------ */
/* Public site                                                         */
/* ------------------------------------------------------------------ */
.pub { min-height: 100vh; position: relative; overflow-x: hidden; }
.pub-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background:
  radial-gradient(1100px 600px at 85% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 60%),
  radial-gradient(900px 500px at 0% 20%, color-mix(in srgb, var(--gold) 10%, transparent), transparent 60%), var(--bg); }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; animation: drift 22s ease-in-out infinite alternate; will-change: transform; }
.blob.b1 { width: 360px; height: 360px; background: color-mix(in srgb, var(--brand) 40%, transparent); top: 8%; right: -80px; }
.blob.b2 { width: 280px; height: 280px; background: color-mix(in srgb, var(--gold) 30%, transparent); bottom: 6%; left: -60px; animation-duration: 28s; }
@keyframes drift { to { transform: translate3d(-40px, 50px, 0) scale(1.12); } }
.pub-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px clamp(16px, 4vw, 48px); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent); }
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-row .logo-mark { width: 56px; }
.brand-row b { font-size: 16px; display: block; line-height: 1.4; }
.brand-row small { color: var(--muted); font-size: 12px; }
.pub-main { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: clamp(20px, 5vw, 56px) clamp(16px, 4vw, 32px) 80px; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(20px, 5vw, 64px); align-items: center; min-height: min(560px, 70vh); }
.hero h1 { font-size: clamp(28px, 5.4vw, 50px); line-height: 1.45; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--brand); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ''; position: absolute; inset-inline: 0; bottom: 2px; height: 10px; background: color-mix(in srgb, var(--gold) 35%, transparent); z-index: -1; border-radius: 6px; transform-origin: right; animation: underline 1s .6s var(--ease) both; }
@keyframes underline { from { transform: scaleX(0); } }
.hero p.lead { font-size: clamp(15px, 2.2vw, 18px); color: var(--ink-2); margin: 16px 0 28px; max-width: 520px; }
.hero-art { position: relative; aspect-ratio: 1 / 1; max-width: 440px; width: 100%; margin-inline: auto; display: grid; place-items: center; }
.hero-art .disc { position: absolute; inset: 6%; border-radius: 50%; background: linear-gradient(145deg, var(--brand), var(--brand-700)); box-shadow: var(--shadow-3), inset 0 0 0 10px rgba(255,255,255,.08); animation: floaty 7s ease-in-out infinite; }
.hero-art .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--brand) 45%, transparent); animation: spin 60s linear infinite; }
.hero-art .logo-mark { position: relative; width: 58%; background: #fff; filter: drop-shadow(0 6px 12px rgba(0,0,0,.22)); animation: reveal 1.2s .2s var(--ease) both; }
@keyframes floaty { 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes reveal { from { opacity: 0; transform: scale(.86) translateY(10px); } }

.shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: clamp(24px, 6vw, 64px); }
.sc { position: relative; display: flex; gap: 16px; align-items: center; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--ink); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; text-align: right; cursor: pointer; width: 100%; font: inherit; }
.sc::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--brand); transform: scaleY(0); transition: transform .3s var(--ease); transform-origin: top; }
.sc:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); border-color: var(--brand); }
.sc:hover::before { transform: scaleY(1); }
.sc .ic { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-50); color: var(--brand-700); display: grid; place-items: center; flex: none; transition: transform .35s var(--ease), background-color .3s; }
.sc:hover .ic { transform: rotate(-6deg) scale(1.08); background: var(--brand); color: #fff; }
.sc .ic svg { width: 28px; height: 28px; }
.sc b { display: block; font-size: 16px; }
.sc span { font-size: 13px; color: var(--muted); }
.reveal { opacity: 0; transform: translateY(18px); animation: up .7s var(--ease) forwards; }
@keyframes up { to { opacity: 1; transform: none; } }

.pub-sec { margin-top: clamp(32px, 7vw, 72px); }
.pub-sec h2 { font-size: clamp(20px, 3vw, 28px); margin-bottom: 18px; }
.rules-list { display: grid; gap: 12px; counter-reset: r; padding: 0; margin: 0; list-style: none; }
.rules-list li { counter-increment: r; display: flex; gap: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); align-items: flex-start; }
.rules-list li::before { content: counter(r, persian); flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--brand-50); color: var(--brand-700); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; }
.map { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 300px; border: 1px solid var(--line); background: var(--bg-2); }
.map svg { width: 100%; height: 100%; display: block; }
.map-actions { position: absolute; inset-inline: 12px; bottom: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.info-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row svg { width: 22px; height: 22px; color: var(--brand); flex: none; margin-top: 4px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.vid { border-radius: var(--r); overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s; }
.vid:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.vid .thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--brand-700), var(--brand)); display: grid; place-items: center; color: #fff; }
.vid .thumb svg { width: 44px; height: 44px; opacity: .95; transition: transform .3s var(--ease); }
.vid:hover .thumb svg { transform: scale(1.15); }
.vid .meta { padding: 12px 14px; }
.vid .meta b { display: block; font-size: 14.5px; }
.pub-foot { text-align: center; padding: 32px 16px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); margin-top: 60px; position: relative; z-index: 1; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; min-height: 0; }
  .hero p.lead { margin-inline: auto; }
  .hero .btn-row { justify-content: center; }
  .hero-art { order: -1; max-width: 240px; }
  .contact-grid { grid-template-columns: 1fr; }
}
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ */
/* Login                                                               */
/* ------------------------------------------------------------------ */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--bg); }
.login-art { position: relative; background: linear-gradient(160deg, var(--brand-600), var(--brand-900)); color: #fff; display: grid; place-items: center; padding: 40px; overflow: hidden; }
[data-theme='dark'] .login-art { background: linear-gradient(160deg, #2a6535, #14301b); }
.login-art::before, .login-art::after { content: ''; position: absolute; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.14); }
.login-art::before { width: 620px; height: 620px; inset-inline-start: -200px; top: -160px; animation: spin 90s linear infinite; }
.login-art::after { width: 420px; height: 420px; inset-inline-end: -140px; bottom: -120px; animation: spin 70s linear infinite reverse; }
.login-art .inner { position: relative; text-align: center; max-width: 380px; z-index: 1; }
.login-art .logo-mark { width: 220px; margin: 0 auto 24px; animation: reveal 1s var(--ease) both; }
.login-art .logo-word { width: 280px; margin: 0 auto; opacity: .95; }
.login-art p { margin-top: 20px; color: rgba(255,255,255,.82); font-size: 14px; }
.login-form { display: grid; place-items: center; padding: 28px; }
.login-box { width: 100%; max-width: 400px; }
.login-box h2 { font-size: 26px; margin-bottom: 6px; }
.demo-roles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 18px; }
.demo-roles button { text-align: right; padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--surface); font-size: 13px; transition: all .2s; }
.demo-roles button:hover { border-color: var(--brand); background: var(--brand-50); }
.demo-roles b { display: block; font-size: 13.5px; }
@media (max-width: 820px) { .login { grid-template-columns: 1fr; } .login-art { padding: 28px 20px; } .login-art .logo-mark { width: 120px; margin-bottom: 10px; } .login-art .logo-word { width: 200px; } .login-art p { display: none; } }

/* ------------------------------------------------------------------ */
/* App shell                                                           */
/* ------------------------------------------------------------------ */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-areas: 'side main'; }
.side { grid-area: side; position: sticky; top: 0; height: 100vh; background: var(--surface); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40; }
.side-head { padding: 18px 18px 12px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.side-head .logo-mark { width: 52px; }
.side-head b { font-size: 15px; display: block; line-height: 1.4; }
.side-head small { color: var(--muted); font-size: 12px; }
.nav { flex: 1; overflow-y: auto; padding: 12px; display: grid; gap: 2px; align-content: start; }
.nav a, .nav button { display: flex; align-items: center; gap: 12px; padding: 0 14px; min-height: 46px; border-radius: 12px; color: var(--ink-2); font-weight: 600; font-size: 14.5px; border: 0; background: transparent; text-align: right; position: relative; transition: background-color .2s, color .2s, transform .2s var(--ease); width: 100%; }
.nav a svg, .nav button svg { width: 21px; height: 21px; flex: none; }
.nav a:hover, .nav button:hover { background: var(--brand-50); color: var(--brand-700); transform: translateX(-3px); }
.nav .on { background: var(--brand-50); color: var(--brand-700); font-weight: 800; }
.nav .on::before { content: ''; position: absolute; inset-inline-start: -12px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.nav .count { margin-inline-start: auto; background: var(--brand); color: #fff; border-radius: 99px; font-size: 11.5px; padding: 0 8px; min-width: 22px; text-align: center; line-height: 22px; }
[data-theme='dark'] .nav .count { color: #07210d; }
.side-foot { padding: 12px; border-top: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.avatar { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--brand-700)); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
[data-theme='dark'] .avatar { color: #07210d; }
.user-chip b { display: block; font-size: 13.5px; line-height: 1.4; }
.user-chip small { color: var(--muted); font-size: 12px; }
.main { grid-area: main; min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 clamp(14px, 3vw, 32px); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top h1 { font-size: 18px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-btn { display: none; }
.content { padding: clamp(14px, 3vw, 32px); width: 100%; max-width: 1480px; margin-inline: auto; flex: 1; }
.page { animation: pageIn .45s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } }
.scrim { position: fixed; inset: 0; background: rgba(8, 20, 12, .5); backdrop-filter: blur(2px); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .3s; }

@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'main'; }
  .side { position: fixed; top: 0; bottom: 0; left: 0; width: min(86vw, 320px); height: 100dvh; transform: translateX(-102%); transition: transform .38s var(--ease); box-shadow: var(--shadow-3); border-inline-end: 0; border-inline-start: 1px solid var(--line); z-index: 60; }
  .side.open { transform: none; }
  .side.open ~ .scrim, .scrim.show { opacity: 1; pointer-events: auto; z-index: 55; }
  .menu-btn { display: grid; order: 99; }
  .nav a:hover, .nav button:hover { transform: none; }
}

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { position: relative; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s; }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.stat::after { content: ''; position: absolute; inset-inline-end: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: var(--brand-50); }
.stat small { color: var(--muted); font-weight: 600; font-size: 13px; position: relative; z-index: 1; }
.stat b { display: block; font-size: 28px; line-height: 1.4; margin-top: 4px; position: relative; z-index: 1; }
.stat span { font-size: 12.5px; color: var(--muted); position: relative; z-index: 1; }
.stat.hl { background: linear-gradient(140deg, var(--brand), var(--brand-700)); color: #fff; border: 0; }
[data-theme='dark'] .stat.hl { color: #07210d; }
.stat.hl::after { background: rgba(255,255,255,.12); }
.stat.hl small, .stat.hl span { color: inherit; opacity: .85; }
.cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }

/* lists */
.list { display: grid; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); min-width: 0; }
.li:last-child { border-bottom: 0; }
.li .grow { flex: 1; min-width: 0; }
.li b { display: block; font-size: 14.5px; line-height: 1.5; }
.li small { color: var(--muted); font-size: 12.5px; }
.li.click { cursor: pointer; border-radius: 10px; padding-inline: 10px; margin-inline: -10px; transition: background-color .2s; }
.li.click:hover { background: var(--brand-50); }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty svg { width: 52px; height: 52px; opacity: .5; margin-bottom: 8px; }

/* tables -> cards on mobile */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: right; font-size: 12.5px; color: var(--muted); font-weight: 700; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background-color .15s; }
.tbl tbody tr:hover { background: var(--brand-50); }
.tbl tr.sel { background: var(--brand-50); }
@media (max-width: 720px) {
  .tbl.stack thead { display: none; }
  .tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
  .tbl.stack tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .tbl.stack td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; }
  .tbl.stack td::before { content: attr(data-l); color: var(--muted); font-size: 12.5px; font-weight: 700; flex: none; }
  .tbl.stack td.nolabel::before { display: none; }
}
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .grow { flex: 1 1 240px; }
.searchbox { position: relative; }
.searchbox svg { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.searchbox .input { padding-inline-start: 44px; }

/* context menu */
.ctx { position: fixed; z-index: 120; min-width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-3); animation: pop .16s var(--ease); }
.ctx button { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: transparent; padding: 0 12px; min-height: 42px; border-radius: 9px; text-align: right; font-weight: 600; font-size: 14px; }
.ctx button:hover { background: var(--brand-50); }
.ctx button.danger { color: var(--danger); }
.ctx button svg { width: 18px; height: 18px; }
.ctx hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }

/* modal / sheet */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(8, 20, 12, .55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(640px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-3); animation: modalIn .38s var(--ease); overflow: hidden; }
.modal.wide { width: min(900px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-h h3 { font-size: 17px; }
.modal-b { padding: 20px 22px; overflow-y: auto; flex: 1; }
.modal-f { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-start; flex-wrap: wrap; background: var(--surface-2); }
@media (max-width: 640px) {
  .modal-back { align-items: end; padding: 0; }
  .modal { width: 100%; border-radius: 22px 22px 0 0; max-height: 94dvh; animation: sheetIn .38s var(--ease); }
  @keyframes sheetIn { from { transform: translateY(100%); } }
  .modal-f .btn { flex: 1; }
}
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; margin-bottom: 10px; align-items: flex-start; }
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 3px; }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.hard { background: var(--danger-bg); color: var(--danger); }
.alert.info { background: var(--info-bg); color: var(--info); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }

/* toasts */
.toasts { position: fixed; z-index: 200; inset-inline: 0; bottom: 18px; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; padding: 12px 18px; border-radius: 14px; background: var(--brand-900); color: #fff; box-shadow: var(--shadow-3); font-size: 14px; font-weight: 600; max-width: 460px; animation: toastIn .4s var(--ease); display: flex; gap: 10px; align-items: center; }
[data-theme='dark'] .toast { background: #e6f0e8; color: #0c1810; }
.toast.bad { background: var(--danger); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.95); } }

/* ------------------------------------------------------------------ */
/* Calendar                                                            */
/* ------------------------------------------------------------------ */
.cal-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.cal-bar .title { font-size: 18px; font-weight: 800; flex: 1 1 200px; min-width: 0; }
.cal-bar .title small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cal-legend { display: flex; gap: 8px 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-bottom: 12px; align-items: center; }
.cal-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-inline-end: 5px; border-inline-start: 4px solid; }
.band-dawn { --bg-: var(--b-dawn-bg); --edge: var(--b-dawn-edge); --ink-: var(--b-dawn-ink); }
.band-morning { --bg-: var(--b-morning-bg); --edge: var(--b-morning-edge); --ink-: var(--b-morning-ink); }
.band-noon { --bg-: var(--b-noon-bg); --edge: var(--b-noon-edge); --ink-: var(--b-noon-ink); }
.band-evening { --bg-: var(--b-evening-bg); --edge: var(--b-evening-edge); --ink-: var(--b-evening-ink); }
.band-night { --bg-: var(--b-night-bg); --edge: var(--b-night-edge); --ink-: var(--b-night-ink); }
.cal-legend i { background: var(--bg-); border-color: var(--edge); }

.cal { --hh: 60px; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-1); }
.cal-scroll { overflow: auto; max-height: calc(100dvh - 300px); min-height: 380px; position: relative; scrollbar-width: thin; }
.cal-head { position: sticky; top: 0; z-index: 8; display: grid; background: var(--surface); border-bottom: 1px solid var(--line-2); }
.cal-head > div { padding: 8px 6px; text-align: center; font-weight: 800; font-size: 13.5px; border-inline-start: 1px solid var(--line); line-height: 1.5; }
.cal-head > div small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.cal-head .today { background: var(--brand-50); color: var(--brand-700); }
.cal-head .hol { background: var(--danger-bg); color: var(--danger); }
.cal-head .hol small { color: inherit; opacity: .85; }
.cal-body { display: grid; position: relative; }
.cal-times { position: relative; background: var(--surface-2); border-inline-end: 1px solid var(--line); }
.cal-times span { position: absolute; inset-inline: 0; text-align: center; font-size: 11.5px; color: var(--muted); transform: translateY(-50%); line-height: 1; }
.cal-col { position: relative; border-inline-start: 1px solid var(--line); cursor: cell; }
.cal-col.hol { background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--danger) 5%, transparent) 10px 20px); }
.cal-col .hl { position: absolute; inset-inline: 0; border-top: 1px solid var(--line); pointer-events: none; }
.cal-col .hl.half { border-top-style: dotted; opacity: .6; }
.cal-col .nowline { position: absolute; inset-inline: 0; height: 2px; background: var(--danger); z-index: 5; pointer-events: none; }
.cal-col .nowline::before { content: ''; position: absolute; inset-inline-start: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.cal-col.drop { background: color-mix(in srgb, var(--brand) 9%, transparent); }
.ghost-slot { position: absolute; inset-inline: 3px; border-radius: 10px; border: 2px dashed var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); pointer-events: none; z-index: 6; }
.ghost-slot.bad { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }

.ev { position: absolute; z-index: 3; padding: 4px 9px; border-radius: 10px; background: var(--bg-); color: var(--ink-); border-inline-start: 5px solid var(--edge); box-shadow: var(--shadow-1); overflow: hidden; cursor: grab; text-align: right; line-height: 1.45;
  transition: transform .2s var(--ease), box-shadow .2s, filter .2s; animation: evIn .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 18ms); touch-action: none; user-select: none; -webkit-user-select: none; }
@keyframes evIn { from { opacity: 0; transform: scale(.92); } }
.ev:hover { box-shadow: var(--shadow-2); z-index: 7; transform: translateY(-1px); filter: saturate(1.1); }
.ev.drag { opacity: .55; cursor: grabbing; z-index: 20; }
.ev.cancelled { opacity: .55; text-decoration: line-through; }
.ev .n { display: block; font-weight: 800; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .s { display: flex; align-items: center; gap: 6px; font-size: 12.5px; white-space: nowrap; overflow: hidden; }
.ev .t { display: block; font-size: 12px; opacity: .92; white-space: nowrap; font-weight: 600; }
.ev .rm { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; font-size: 11px; font-weight: 800; background: var(--ink-); color: var(--bg-); flex: none; }
.ev .rm.r2 { background: transparent; color: var(--ink-); border: 1.5px solid var(--ink-); border-radius: 50%; padding: 0; width: 20px; }
.ev.tiny { padding: 1px 8px; display: flex; align-items: center; gap: 6px; }
.ev.tiny .n { display: inline; font-size: 12px; flex: 0 1 auto; }
.ev.tiny .s, .ev.tiny .t { display: inline; font-size: 11.5px; }
.ev.small .t { display: none; }
.ev.small .s .time { display: inline; }
.ev .time { display: none; }
.ev.small .s .time { display: inline; opacity: .9; }
.ev .rsz { position: absolute; inset-inline: 0; bottom: 0; height: 8px; cursor: ns-resize; }
.ev .rsz::after { content: ''; position: absolute; inset-inline: 38%; bottom: 2px; height: 3px; border-radius: 3px; background: var(--ink-); opacity: .35; }
.ev.sel { outline: 3px solid var(--brand); outline-offset: 1px; }

.mini-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.mm-h { text-align: center; font-size: 12.5px; font-weight: 800; color: var(--muted); padding: 6px 0; }
.mm-d { position: relative; min-height: 86px; padding: 6px 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-align: right; cursor: pointer; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; display: flex; flex-direction: column; gap: 4px; }
.mm-d:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--shadow-2); }
.mm-d.out { opacity: .38; }
.mm-d.today { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); }
.mm-d.hol { background: var(--danger-bg); }
.mm-d b { font-size: 15px; }
.mm-d .ht { font-size: 11px; color: var(--danger); line-height: 1.3; }
.mm-d .dots { display: flex; gap: 3px; flex-wrap: wrap; margin-top: auto; }
.mm-d .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--edge); }
.mm-d .cnt { font-size: 11.5px; color: var(--ink-2); font-weight: 700; }
@media (max-width: 720px) { .mm-d { min-height: 62px; padding: 4px 5px; } .mm-d .ht { display: none; } .mm-d b { font-size: 13px; } }

.daytabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 10px; scrollbar-width: none; scroll-snap-type: x proximity; }
.daytabs::-webkit-scrollbar { display: none; }
.daytabs button { flex: none; scroll-snap-align: center; min-width: 58px; padding: 6px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: center; line-height: 1.4; transition: all .2s; }
.daytabs button small { display: block; font-size: 11.5px; color: var(--muted); }
.daytabs button b { font-size: 16px; }
.daytabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.daytabs button.on small { color: rgba(255,255,255,.85); }
[data-theme='dark'] .daytabs button.on, [data-theme='dark'] .daytabs button.on small { color: #07210d; }
.daytabs button.hol b { color: var(--danger); }
.daytabs button.on.hol b { color: inherit; }

/* service picker rows */
.svc-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; }
.svc-row .nm b { display: block; font-size: 14px; }
.svc-row .nm small { color: var(--muted); font-size: 12px; }
.svc-row .tt { display: flex; gap: 8px; } .svc-row .tt input { width: 118px; min-width: 0; }
@media (max-width: 640px) { .svc-row { grid-template-columns: auto minmax(0, 1fr) auto; } .svc-row .tt { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; order: 5; } .svc-row .tt input { width: auto; } .svc-row [data-trk] { order: 6; } }
.dur-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.dur-quick button { min-height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-size: 12.5px; font-weight: 700; }
.dur-quick button:hover { border-color: var(--brand); background: var(--brand-50); }

.suggest { position: absolute; z-index: 40; inset-inline: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-3); max-height: 280px; overflow-y: auto; animation: pop .15s var(--ease); }
.suggest button { display: flex; width: 100%; gap: 10px; padding: 10px 14px; border: 0; background: transparent; text-align: right; align-items: center; border-bottom: 1px solid var(--line); min-height: 52px; }
.suggest button:last-child { border-bottom: 0; }
.suggest button:hover, .suggest button.act { background: var(--brand-50); }
.suggest b { display: block; font-size: 14px; line-height: 1.4; }
.suggest small { color: var(--muted); font-size: 12px; }
.pos-rel { position: relative; }

/* patient file */
.pf-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.pf-head .avatar { width: 64px; height: 64px; font-size: 24px; border-radius: 18px; }
.dz { display: block; border: 2px dashed var(--line-2); border-radius: var(--r); padding: 28px 16px; text-align: center; color: var(--muted); transition: all .25s var(--ease); background: var(--surface-2); cursor: pointer; }
.dz.over, .dz:hover { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); transform: scale(1.01); }
.dz svg { width: 36px; height: 36px; margin: 0 auto 6px; display: block; }
.dz small { display: block; margin-top: 4px; }
.mu-sec { font-size: 13px; font-weight: 800; color: var(--ink-2); margin: 18px 0 6px; }
.mu-list .li { padding: 12px 10px; }
.mu-list .li + .li { border-top: 1px solid var(--line); }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.file { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); transition: transform .25s var(--ease), box-shadow .25s; }
.file:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.file .pv { height: 96px; display: grid; place-items: center; background: var(--bg-2); color: var(--brand-700); font-weight: 800; font-size: 13px; }
.file .pv.img { background: linear-gradient(135deg, var(--brand-100), var(--bg-2)); }
.file .fm { padding: 8px 10px; font-size: 12.5px; line-height: 1.5; }
.file .fm b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* chart */
.chart { width: 100%; height: 260px; }
.bars { display: flex; align-items: flex-end; gap: clamp(4px, 1.2vw, 12px); height: 220px; padding-top: 18px; border-bottom: 1px solid var(--line-2); }
.bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; min-width: 0; }
.bar i { display: block; width: 100%; max-width: 44px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, var(--brand), var(--brand-600)); transform-origin: bottom; animation: grow .8s var(--ease) both; animation-delay: calc(var(--i) * 40ms); min-height: 3px; }
.bar.cur i { background: linear-gradient(180deg, var(--gold), #9c7a2f); }
.bar em { position: absolute; top: -2px; font-style: normal; font-size: 11px; color: var(--ink-2); white-space: nowrap; transform: translateY(-100%); font-weight: 700; }
@keyframes grow { from { transform: scaleY(0); } }
.bar-labels { display: flex; gap: clamp(4px, 1.2vw, 12px); margin-top: 6px; }
.bar-labels span { flex: 1; text-align: center; font-size: 11.5px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* form builder / filler */
.q { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface); margin-bottom: 12px; position: relative; transition: box-shadow .2s, border-color .2s; }
.q:hover { box-shadow: var(--shadow-1); border-color: var(--line-2); }
.q .qn { position: absolute; inset-inline-start: -10px; top: -10px; width: 28px; height: 28px; border-radius: 9px; background: var(--brand); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; box-shadow: var(--shadow-1); }
[data-theme='dark'] .q .qn { color: #07210d; }
.opt-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.sheet { max-width: 720px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-2); overflow: hidden; }
.sheet-head { background: linear-gradient(140deg, var(--brand), var(--brand-700)); padding: 22px; text-align: center; color: #fff; position: relative; }
[data-theme='dark'] .sheet-head { background: linear-gradient(140deg, #2f7239, #1a3f24); }
.sheet-head .logo-mark { width: 92px; margin: 0 auto 8px; background: #fff; }
.sheet-head h2 { font-size: 19px; }
.sheet-head p { opacity: .88; font-size: 13px; }
.sheet-body { padding: 22px; font-family: 'B Nazanin', 'Vazirmatn', var(--font); font-size: 17px; }
.fq { margin-bottom: 22px; }
.fq > b { display: block; font-size: 17px; margin-bottom: 10px; line-height: 1.8; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 16px; border: 2px solid var(--line-2); border-radius: 14px; margin-bottom: 8px; cursor: pointer; transition: all .2s; background: var(--surface); }
.choice:hover { border-color: var(--brand); }
.choice input { width: 24px; height: 24px; accent-color: var(--brand); flex: none; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-50); font-weight: 700; }
.stars { display: flex; gap: 6px; direction: ltr; justify-content: center; }
.stars button { background: transparent; border: 0; font-size: 40px; line-height: 1; color: var(--line-2); padding: 2px; transition: transform .2s var(--ease), color .2s; min-width: 48px; min-height: 48px; }
.stars button.on { color: var(--gold); transform: scale(1.1); }

/* videos & notifications */
.chat { display: grid; gap: 8px; max-height: 360px; overflow-y: auto; padding: 4px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--bg-2); line-height: 1.8; font-size: 14px; animation: pop .25s var(--ease); }
.msg.me { align-self: flex-end; justify-self: end; background: var(--brand); color: #fff; border-radius: 16px 16px 4px 16px; }
[data-theme='dark'] .msg.me { color: #07210d; }
.msg small { display: block; font-size: 11px; opacity: .75; margin-top: 2px; }

/* music + theme controls */
.fab-music { position: fixed; z-index: 90; inset-inline-start: 16px; bottom: 16px; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); }
.fab-music .eq { display: flex; gap: 2px; align-items: flex-end; height: 16px; }
.fab-music .eq i { width: 3px; background: var(--brand); border-radius: 2px; height: 4px; }
.fab-music.play .eq i { animation: eq .9s ease-in-out infinite; }
.fab-music.play .eq i:nth-child(2) { animation-delay: .2s; } .fab-music.play .eq i:nth-child(3) { animation-delay: .4s; } .fab-music.play .eq i:nth-child(4) { animation-delay: .1s; }
@keyframes eq { 50% { height: 16px; } }
.fab-music span { font-size: 12.5px; font-weight: 700; max-width: 120px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fab-music .icon-btn { width: 38px; height: 38px; border-radius: 99px; }
@media (max-width: 560px) { .fab-music span { display: none; } .fab-music { padding-inline-start: 10px; } }
.theme-btn svg { position: absolute; transition: transform .5s var(--ease), opacity .3s; }
.theme-btn { position: relative; }
.theme-btn .sun { opacity: 0; transform: rotate(-90deg) scale(.4); }
[data-theme='dark'] .theme-btn .sun { opacity: 1; transform: none; }
[data-theme='dark'] .theme-btn .moon { opacity: 0; transform: rotate(90deg) scale(.4); }

.skel { background: linear-gradient(90deg, var(--bg-2) 25%, var(--surface-2) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: sh 1.4s infinite; border-radius: 10px; }
@keyframes sh { to { background-position: -200% 0; } }

/* edit mode (admin visual editing) */
body.editing [data-edit] { outline: 2px dashed var(--gold); outline-offset: 4px; border-radius: 6px; cursor: text; position: relative; }
body.editing [data-edit]:hover { background: color-mix(in srgb, var(--gold) 14%, transparent); }
body.editing [data-edit]:focus { outline-style: solid; background: color-mix(in srgb, var(--gold) 18%, transparent); }
body.editing [data-block] { outline: 2px dashed color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 6px; position: relative; }
.edit-bar { position: fixed; z-index: 110; inset-inline: 0; top: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: var(--gold); color: #1c1503; font-weight: 700; box-shadow: var(--shadow-2); animation: down .35s var(--ease); }
@keyframes down { from { transform: translateY(-100%); } }
.block-ctl { position: absolute; inset-inline-end: 8px; top: -18px; display: none; gap: 4px; z-index: 5; }
body.editing .block-ctl { display: flex; }
.block-ctl button { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 800; }

/* ------------------------------------------------------------------ */
/* Motion preferences + lite mode (old / low-end phones)                */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
.lite .blob, .lite .hero-art .ring, .lite .login-art::before, .lite .login-art::after { display: none; }
.lite *, .lite *::before, .lite *::after { animation-duration: .2s !important; animation-iteration-count: 1 !important; }
.lite .pub-top, .lite .top, .lite .modal-back, .lite .scrim { backdrop-filter: none; -webkit-backdrop-filter: none; }
.lite .hero-art .disc { animation: none; }
.lite .ev { animation: none; }
.lite .shadowy, .lite .card, .lite .stat { box-shadow: none; }

/* fallback for browsers without color-mix (very old phones) */
@supports not (color: color-mix(in srgb, red, blue)) {
  .input:focus { box-shadow: 0 0 0 4px rgba(63, 138, 67, .18); }
  .blob.b1 { background: rgba(63, 138, 67, .35); } .blob.b2 { background: rgba(184, 145, 63, .3); }
  .pub-bg { background: var(--bg); }
  .pub-top, .top { background: var(--bg); }
  .cal-col.hol { background: rgba(179, 56, 47, .05); }
  .ghost-slot { background: rgba(63, 138, 67, .1); }
}

@media print {
  .side, .top, .fab-music, .edit-bar, .btn, .icon-btn, .toasts { display: none !important; }
  .app { display: block; } body { background: #fff; color: #000; }
}


/* per-appointment colour: each booking gets its own hue, items of one visit share it */
:root { --apl-bg: 90%; --apl-edge: 40%; --apl-ink: 17%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --apl-bg: 23%; --apl-edge: 64%; --apl-ink: 92%; } }
:root[data-theme="dark"] { --apl-bg: 23%; --apl-edge: 64%; --apl-ink: 92%; }
.apc { --bg-: hsl(var(--h) 50% var(--apl-bg)); --edge: hsl(var(--h) 48% var(--apl-edge)); --ink-: hsl(var(--h) 55% var(--apl-ink)); }

/* layout fixes found in review */
.fab-music { inset-inline-start: auto; left: max(16px, env(safe-area-inset-left, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr !important; } }
.bar-labels span { overflow: visible; text-overflow: clip; white-space: nowrap; }
.bar-labels { direction: rtl; }

/* ---------- landing hub: logo + name + four animated entry cards on one screen ---------- */
.pub-main { padding-top: clamp(4px, 1.5vh, 16px); }
.hub { min-height: calc(100svh - 150px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(6px, 1.4vh, 12px); text-align: center; padding-bottom: 28px; }
.hub h1 { font-size: clamp(28px, 6vw, 46px); line-height: 1.3; margin-top: clamp(6px, 1.4vh, 14px); }
.hub-en { color: var(--muted); letter-spacing: .22em; font-size: 12.5px; text-transform: uppercase; direction: ltr; font-weight: 600; }
.hub-orb { --orb: clamp(92px, 17vh, 148px); position: relative; width: var(--orb); height: var(--orb); display: grid; place-items: center; }
.hub-orb .disc { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, var(--brand), var(--brand-700)); box-shadow: var(--shadow-3), inset 0 0 0 6px rgba(255,255,255,.1); animation: breathe 5s ease-in-out infinite; }
.hub-orb .logo-mark { position: relative; width: 64%; background: #fff; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); animation: reveal 1.1s .25s var(--ease) both; }
.hub-orb .ring { position: absolute; inset: -9px; border-radius: 50%; background: conic-gradient(from 0deg, var(--brand), transparent 38%, var(--gold, #c9a24b) 56%, transparent 74%, var(--brand)); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); animation: spin 9s linear infinite; }
.hub-orb .ring.r2 { inset: -19px; opacity: .45; animation-duration: 16s; animation-direction: reverse; }
@keyframes breathe { 50% { transform: scale(1.035); box-shadow: 0 18px 50px color-mix(in srgb, var(--brand) 45%, transparent), inset 0 0 0 6px rgba(255,255,255,.14); } }
.hub-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; width: 100%; max-width: 920px; margin-top: clamp(10px, 3.2vh, 30px); }
.hc { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 10px 18px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); cursor: pointer; color: var(--ink); font: inherit; transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s; }
.hc.reveal { opacity: 1; transform: none; animation: hcIn .85s cubic-bezier(.2, .9, .3, 1.15) both; }
@keyframes hcIn { from { opacity: 0; transform: translateY(34px) rotate(var(--rot)) scale(.86); } }
.hc::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.5) 50%, transparent 62%); transform: translateX(-130%); animation: shine 7s calc(2.2s + var(--i) * 1.3s) infinite; pointer-events: none; }
@keyframes shine { 0%, 70% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
.hc .ic { width: 56px; height: 56px; border-radius: 19px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); transition: transform .45s var(--ease), background .3s, color .3s; animation: bob 4.2s ease-in-out infinite; animation-delay: calc(var(--i) * -.9s); }
.hc .ic svg { width: 28px; height: 28px; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.hc b { font-size: 15px; margin-top: 6px; }
.hc small { font-size: 12px; color: var(--muted); line-height: 1.6; }
.hc:hover, .hc:focus-visible { transform: translateY(-7px); border-color: var(--brand); box-shadow: 0 18px 38px color-mix(in srgb, var(--brand) 22%, transparent); }
.hc:hover .ic { transform: rotate(-8deg) scale(1.12); background: var(--brand); color: #fff; animation-play-state: paused; }
.hc:active { transform: translateY(-2px) scale(.98); }
.hc.primary { background: linear-gradient(150deg, var(--brand), var(--brand-700)); border-color: transparent; color: #fff; }
.hc.primary small { color: rgba(255,255,255,.82); }
.hc.primary .ic { background: rgba(255,255,255,.18); color: #fff; }
.hc.primary:hover .ic { background: #fff; color: var(--brand-700); }
@media (max-width: 700px) {
  .hub { min-height: calc(100svh - 120px); }
  .hub-orb { --orb: clamp(84px, 14vh, 118px); }
  .hub-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hc { padding: 16px 8px 14px; border-radius: 20px; }
  .hc .ic { width: 48px; height: 48px; border-radius: 16px; }
  .hc b { font-size: 13.5px; }
  .hc small { font-size: 11.5px; }
}
.lite .hc::after, .lite .hub-orb .ring, .lite .hc .ic, .lite .hub-orb .disc { animation: none; }
@media (prefers-reduced-motion: reduce) { .hc::after, .hub-orb .ring, .hc .ic, .hub-orb .disc { animation: none; } }

/* =====================  landing v2: one screen, no scroll, richer motion  ===================== */
body.landing { overflow: hidden; }
.hub-page { height: 100vh; height: 100svh; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.hub-page .pub-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hub-page .pub-top { position: relative; flex: none; }
.hub-page .pub-main { flex: 1; min-height: 0; width: 100%; max-width: none; display: flex; padding: 0 16px 14px; }
.hub-page .hub { flex: 1; min-height: 0; height: auto; padding: 0; justify-content: center; align-items: center; transition: opacity .28s ease, transform .28s ease, filter .28s ease; }
.hub.leaving { opacity: 0; transform: scale(1.04); filter: blur(6px); }
.sub-page .leaf { display: none; }
.sub-main { padding-top: 14px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-700); font-weight: 700; margin-bottom: 6px; padding: 8px 4px; }
.back-link svg { width: 20px; height: 20px; }
.sub-page .pub-sec { padding-top: 8px; animation: pageIn .5s var(--ease) both; }

/* aurora + drifting leaves */
.pub-bg .blob.b3 { width: 46vmax; height: 46vmax; inset-inline-start: 30%; bottom: -28vmax; background: radial-gradient(circle, color-mix(in srgb, var(--gold, #c9a24b) 28%, transparent), transparent 65%); animation: drift 22s ease-in-out infinite alternate-reverse; }
.leaf { position: absolute; bottom: -40px; inset-inline-start: calc(var(--x) * 1%); width: var(--s); height: var(--s); fill: var(--brand); color: var(--brand-700); opacity: 0; animation: leafUp var(--d) linear infinite; animation-delay: var(--dl); will-change: transform, opacity; }
@keyframes leafUp { 0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 0; } 12% { opacity: .38; } 50% { transform: translate3d(34px, -55vh, 0) rotate(160deg); opacity: .3; } 100% { transform: translate3d(-26px, -112vh, 0) rotate(330deg); opacity: 0; } }

/* orb: sonar waves, orbiting dots, spring-in, pointer parallax */
.hub-orb { --orb: clamp(96px, 19vh, 160px); transform: translate3d(calc(var(--px, 0) * -14px), calc(var(--py, 0) * -10px), 0); transition: transform .25s ease-out; }
.hub-orb .wave { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; animation: wave 4.2s ease-out infinite; }
.hub-orb .wave.w2 { animation-delay: 2.1s; }
@keyframes wave { 0% { transform: scale(1); opacity: .45; } 100% { transform: scale(2.1); opacity: 0; } }
.hub-orb .orbit { position: absolute; inset: -30px; border-radius: 50%; animation: spin 11s linear infinite; }
.hub-orb .orbit.o2 { inset: -44px; animation-duration: 17s; animation-direction: reverse; }
.hub-orb .orbit b { position: absolute; top: 0; inset-inline-start: 50%; width: 9px; height: 9px; margin: -4px; border-radius: 50%; background: var(--gold, #c9a24b); box-shadow: 0 0 14px 2px color-mix(in srgb, var(--gold, #c9a24b) 70%, transparent); }
.hub-orb .orbit.o2 b { width: 6px; height: 6px; background: var(--brand); box-shadow: 0 0 12px 2px color-mix(in srgb, var(--brand) 70%, transparent); }
.hub-orb.reveal { animation: orbIn 1.1s cubic-bezier(.2, .9, .25, 1.2) both; }
@keyframes orbIn { from { opacity: 0; transform: scale(.4) rotate(-90deg); filter: blur(10px); } }

/* title: word by word, with a slow light sweep */
.hub-title { font-size: clamp(30px, 6.4vw, 52px); line-height: 1.25; margin-top: clamp(14px, 3vh, 30px); background: linear-gradient(100deg, var(--ink) 35%, var(--brand) 50%, var(--ink) 65%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: sweep 7s 2.2s ease-in-out infinite; }
.hub-title .w { display: inline-block; opacity: 0; animation: wordIn .8s calc(.35s + var(--w) * .16s) cubic-bezier(.2, .9, .3, 1) forwards; }
@keyframes wordIn { from { opacity: 0; transform: translateY(24px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes sweep { 0%, 55% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.hub-en { animation: enIn 1.4s .7s ease both; }
@keyframes enIn { from { opacity: 0; letter-spacing: .7em; } }
.hub-title[contenteditable] { -webkit-text-fill-color: var(--ink); background: none; animation: none; }

/* cards: 3D tilt on desktop, glare, sheen, ripple */
.hc { transform: perspective(800px) translateY(var(--ty, 0px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; transition: transform .45s var(--ease), box-shadow .4s var(--ease), border-color .3s; }
.hc.reveal { transform: perspective(800px) translateY(var(--ty, 0px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.hc:hover, .hc:focus-visible { --ty: -8px; transform: perspective(800px) translateY(var(--ty)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .12s linear, box-shadow .4s var(--ease), border-color .3s; }
.hc:active { --ty: -2px; }
.hc::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%); }
.hc:hover::before { opacity: 1; }
.hc.primary::before { background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.28), transparent 70%); }
.hc.primary::after { inset: -60%; background: conic-gradient(from 0deg, transparent 0 62%, rgba(255,255,255,.32) 82%, transparent 100%); transform: none; animation: spin 7s linear infinite; }
.hc .rip { position: absolute; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: color-mix(in srgb, var(--brand) 40%, transparent); animation: rip2 .7s ease-out forwards; pointer-events: none; z-index: 0; }
.hc.primary .rip { background: rgba(255,255,255,.5); }
@keyframes rip2 { to { transform: scale(26); opacity: 0; } }
.hub-cards { margin-top: clamp(14px, 4.2vh, 40px); }

@media (max-width: 700px) {
  .hub-page .pub-main { padding: 0 14px 14px; }
  .hub-orb { --orb: clamp(88px, 15vh, 124px); }
  .hub-orb .orbit { inset: -22px; } .hub-orb .orbit.o2 { inset: -34px; }
}
@media (max-height: 520px) {
  .hub-orb { --orb: 64px; } .hub-orb .orbit { display: none; } .hub-en, .hc small { display: none; }
  .hub-title { font-size: 26px; margin-top: 8px; } .hub-cards { margin-top: 10px; } .hc { padding: 12px 8px; } .hc .ic { width: 40px; height: 40px; }
}
.lite .leaf, .lite .hub-orb .wave, .lite .hub-orb .orbit, .lite .hc.primary::after, .lite .hub-title { animation: none; }
.lite .hub-title { background: none; -webkit-text-fill-color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .leaf, .hub-orb .wave, .hub-orb .orbit, .hc.primary::after, .hub-title { animation: none; } .hub-title { background: none; -webkit-text-fill-color: var(--ink); } .hub-title .w { animation: none; opacity: 1; } }

/* ---------- panel: music control sits in the top bar (never over the logout button) ---------- */
.fab-music.inline { position: static; inset: auto; padding: 0; gap: 0; border: 0; box-shadow: none; background: transparent; }
.fab-music.inline span, .fab-music.inline .eq { display: none; }
.fab-music.inline .icon-btn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); }
.fab-music.inline.play .icon-btn { color: var(--brand-700); border-color: var(--brand); }

/* ---------- calendar: phone agenda list ---------- */
.ag-sum { color: var(--muted); font-size: 13px; margin: 2px 2px 8px; }
.ag { display: grid; gap: 10px; }
.ag-i { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border-radius: 16px; background: var(--bg-); color: var(--ink-); border: 0; border-inline-start: 6px solid var(--edge); box-shadow: var(--shadow-1); text-align: right; font: inherit; cursor: pointer; min-height: 68px; animation: pageIn .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.ag-i:active { transform: scale(.985); }
.ag-i > svg { width: 18px; height: 18px; opacity: .55; flex: none; }
.ag-t { display: grid; gap: 2px; min-width: 64px; text-align: center; flex: none; }
.ag-t b { font-size: 18px; letter-spacing: .01em; }
.ag-t small { font-size: 12px; opacity: .75; }
.ag-b { display: grid; gap: 4px; flex: 1; min-width: 0; }
.ag-b .n { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-b .s { display: flex; align-items: center; gap: 6px; font-size: 13px; opacity: .9; }
.ag-i.cancelled { opacity: .55; text-decoration: line-through; }
@media (max-width: 720px) {
  .cal-legend { display: none; }
  .cal-bar { gap: 8px; }
  .cal-bar .btn[data-new] { width: 100%; margin-inline-start: 0 !important; justify-content: center; }
  .cal-bar .seg { max-width: 100%; overflow-x: auto; }
}

/* orb must stay visible after spring-in */
.hub-orb.reveal { opacity: 1; transform: translate3d(calc(var(--px, 0) * -14px), calc(var(--py, 0) * -10px), 0); }

.ev { touch-action: auto; cursor: pointer; } .ev .rsz { display: none; }
.btn.icon-only{width:52px;min-width:52px;padding:0;border-radius:50%;justify-content:center}.btn.icon-only svg{margin:0}

.more-btn{background:none;border:0;color:var(--brand);font:inherit;font-size:13px;font-weight:700;padding:2px 0;text-align:start;cursor:pointer}
.svc-row [data-q]{min-height:32px}
.svc-row{padding:8px 10px;gap:6px 8px}
.svc-row .input{min-height:40px;height:40px;padding:0 8px;font-size:15px}
.svc-row .nm small .en{display:none}
@media (max-width:640px){.svc-row .nm small{font-size:11px}.svc-row .tt{gap:6px}.svc-row .more-btn{font-size:12px}}

.mu-list{display:flex;flex-direction:column;gap:8px}
.mu-item{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2);transition:border-color .2s,background .2s}
.mu-item.on{border-color:var(--brand);background:var(--brand-50)}
.mu-pick{display:flex;align-items:center;gap:12px;flex:1;min-width:0;cursor:pointer}
.mu-pick input{accent-color:var(--brand);width:20px;height:20px;flex:none;margin:0}
.mu-txt{display:flex;flex-direction:column;min-width:0;gap:2px}
.mu-txt b{font-size:14.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mu-txt small{color:var(--muted);font-size:12.5px}
.mu-badge{flex:none;font-size:12px;font-weight:700;color:var(--muted);padding:0 10px}
.mu-item .icon-btn{flex:none;width:40px;height:40px}
.mu-sp{flex:none;width:40px;height:40px}
.mu-txt{align-items:flex-start;text-align:start}

.seg{display:inline-flex;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface)}
.seg-b{border:0;background:transparent;padding:10px 26px;font:inherit;cursor:pointer;color:var(--ink-2,inherit);min-height:44px}
.seg-b+.seg-b{border-inline-start:1px solid var(--line)}
.seg-b.on{background:var(--brand,#0f766e);color:#fff;font-weight:700}

.pre,.consent-text{white-space:pre-wrap}
.consent-text{background:var(--bg-2);border:1px solid var(--line);border-radius:14px;padding:14px 16px;line-height:2;margin-bottom:12px;max-height:38vh;overflow:auto}
.sig{border:2px dashed var(--line-2);border-radius:14px;background:#fff;overflow:hidden}
.sig canvas{display:block;width:100%;touch-action:none;cursor:crosshair}
.sig-bar{display:flex;justify-content:space-between;align-items:center;padding:6px 10px;border-top:1px solid var(--line);background:var(--surface);font-size:13px}
.sig-img{max-width:320px;width:100%;border:1px solid var(--line);border-radius:10px;background:#fff;margin-top:8px}
.sec-title{font-weight:800;font-size:1.25em;color:var(--brand-700,var(--brand));margin:6px 0 16px;padding:12px 16px;border-inline-start:6px solid var(--brand);background:linear-gradient(90deg,transparent,var(--brand-50));border-radius:12px;line-height:1.9}
.q-title{border-inline-start:5px solid var(--brand)}
.dtrow{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.dtgap{width:14px}
.dsel{width:auto;min-width:84px;min-height:52px;font-size:inherit}
.fsz{position:absolute;inset-inline-start:12px;top:12px;display:flex;gap:6px}
.fsz button{border:1px solid var(--line);background:var(--surface);border-radius:10px;min-width:44px;min-height:40px;font:inherit;font-weight:700;cursor:pointer}
.sheet-head{position:relative}

.evb{position:absolute;inset-inline:2px;border-radius:10px;padding:4px 8px;font-size:12.5px;overflow:hidden;cursor:pointer;z-index:1;display:flex;flex-direction:column;gap:2px}
.evb.busy{background:repeating-linear-gradient(135deg,rgba(120,120,120,.18) 0 8px,rgba(120,120,120,.08) 8px 16px);border:1px dashed #8a8a8a;color:var(--ink)}
.evb.ses{background:rgba(63,100,200,.14);border:1px solid rgba(63,100,200,.55);color:var(--ink)}
.evb .n{font-weight:700}.evb .t{opacity:.75}
.ev{z-index:2}
.ag-i.evb-l{position:static;border-inline-start:5px solid #8a8a8a}.ag-i.evb-l.ses{border-inline-start-color:#3f64c8}

.chips{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.chip{border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:8px 16px;font:inherit;cursor:pointer;min-height:40px}
.chip.on{background:var(--brand);color:#fff;border-color:var(--brand)}
.art-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.art-card{display:flex;flex-direction:column;gap:8px;text-decoration:none;color:var(--ink)}
.art-view{max-width:760px;margin:0 auto;line-height:2.1;font-size:17px}
.art-view h1{font-size:26px;margin:10px 0 4px;line-height:1.6}.art-h{margin:18px 0 6px;color:var(--brand-700,var(--brand))}

.dwrap{display:flex;gap:8px}.dwrap .input{flex:1;min-width:0;min-height:52px;font-size:16px}
.fsec{margin:0 0 18px;padding:14px 18px;border-radius:16px;background:linear-gradient(120deg,var(--brand-50),var(--surface));border-inline-start:6px solid var(--brand);font-weight:800;font-size:1.15em;line-height:1.9}
.ffs{display:flex;gap:6px;justify-content:flex-end;padding:8px 14px 0}
.fq textarea.input{font-size:inherit}

.nt-row{width:100%;justify-content:space-between;gap:14px;margin-bottom:10px;padding:10px 0;border-bottom:1px solid var(--line)}
.nt-row>span:first-child{flex:1;text-align:start;line-height:1.9}
.q .btn-row{flex-wrap:wrap;gap:8px}
.q .btn-row .btn.ghost.sm{flex:1 1 100%;justify-content:center;order:-1}

.art-link{border:1px solid var(--line);gap:6px}.art-link svg{width:16px;height:16px}
@media(max-width:420px){.art-link span{display:none}.art-link{padding:0 10px}}

/* ---- notification centre, push banner, feedback ---- */
.bell-btn{position:relative}
.bell-n{position:absolute;top:-4px;inset-inline-end:-4px;min-width:19px;height:19px;padding:0 5px;border-radius:99px;background:#d64545;color:#fff;font-size:11px;font-weight:700;line-height:19px;font-style:normal;text-align:center;box-shadow:0 0 0 2px var(--bg)}
.bell-n[hidden]{display:none}
.bell-pop{position:fixed;z-index:80;top:68px;inset-inline-end:14px;width:min(400px,calc(100vw - 20px));max-height:min(72vh,560px);display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 18px 50px rgba(0,0,0,.22);overflow:hidden;animation:pop-in .18s var(--ease)}
.bell-h{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--line)}
.bell-l{overflow:auto;flex:1;min-height:90px}
.bell-it{display:flex;gap:12px;align-items:flex-start;width:100%;padding:12px 16px;border:0;border-bottom:1px solid var(--line);background:transparent;font:inherit;color:inherit;text-align:start;cursor:pointer}
.bell-it:hover{background:var(--brand-50)}
.bell-it.un{background:color-mix(in srgb,var(--brand-50) 70%,transparent)}
.bell-it .bi{flex:none;width:38px;height:38px;border-radius:12px;background:var(--brand-50);color:var(--brand);display:flex;align-items:center;justify-content:center}
.bell-it.un .bi{background:var(--brand);color:#fff}
.bell-it .bi svg{width:19px;height:19px}
.bell-it .bt{display:flex;flex-direction:column;gap:2px;min-width:0}
.bell-it .bt small{color:var(--ink-2);line-height:1.7}
.bell-it .bt em{font-style:normal;font-size:11.5px;color:var(--muted)}
.bell-f{padding:10px 16px;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px}
.bell-f .ok,.bell-f .warn{display:flex;gap:6px;align-items:center}.bell-f .ok{color:var(--brand)}.bell-f .warn{color:#b26a00}
.bell-f svg{width:16px;height:16px}
@keyframes pop-in{from{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:none}}
.push-banner{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:0 0 16px;padding:12px 16px;border-radius:16px;border:1px solid color-mix(in srgb,var(--gold,#c9a24b) 55%,var(--line));background:linear-gradient(120deg,color-mix(in srgb,var(--gold,#c9a24b) 14%,var(--surface)),var(--surface))}
.push-banner>svg{width:26px;height:26px;color:var(--gold,#b8860b);flex:none}
.push-banner .pb-t{flex:1;min-width:200px;line-height:1.9;font-size:14px}
.push-banner .pb-b{display:flex;gap:8px}
.tsel{display:inline-flex;align-items:center;gap:6px}.tsel .input{width:auto;min-width:76px}
.nt-cols{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
@media(max-width:860px){.nt-cols{grid-template-columns:1fr!important}}
.stars-ro{display:inline-flex;direction:ltr;gap:1px;font-size:17px;line-height:1}.stars-ro .st{color:var(--line-2)}.stars-ro .st.on{color:var(--gold,#c9a24b)}
.fb-bar{display:flex;align-items:center;gap:8px;margin:6px 0;font-size:12.5px}.fb-bar i{flex:1;height:8px;border-radius:99px;background:var(--line);overflow:hidden}.fb-bar b{display:block;height:100%;background:var(--brand);border-radius:99px}
.fb-card{margin-bottom:12px}.fb-card.un{border-inline-start:5px solid var(--brand)}

/* multi-file review dialog */
.up-row{display:flex;gap:12px;align-items:flex-start;padding:12px 0;border-bottom:1px solid var(--line)}
.up-row:last-child{border-bottom:0}
.up-pv{flex:none;width:76px;height:76px;border-radius:12px;overflow:hidden;background:var(--bg-2);display:grid;place-items:center;color:var(--brand-700);font-weight:800;font-size:13px}
.up-pv img{width:100%;height:100%;object-fit:cover}
.up-m{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.up-m b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.up-m textarea{font-size:14px;min-height:52px}
.up-st{font-size:12.5px;min-height:16px}.up-st.ok{color:var(--brand)}.up-st.bad{color:#c0392b}
.fnote{margin-top:4px;font-size:12px;line-height:1.7;color:var(--ink-2);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap}


/* ---------- seasonal themes (set by staff in Settings -> appearance; html[data-season]) ---------- */
[data-season='spring'] { --brand:#3f9a52; --brand-600:#2f8442; --brand-700:#226a33; --brand-900:#123a1c; --brand-50:#eef8ee; --brand-100:#d9efd9; --gold:#d27a92; --bg:#f2f9f1; --bg-2:#e6f2e4; --surface-2:#f7fbf6; --line:#d9e8d6; --line-2:#c6dcc2; }
[data-season='summer'] { --brand:#1f8a9a; --brand-600:#177686; --brand-700:#10606d; --brand-900:#0a3a43; --brand-50:#e9f6f8; --brand-100:#cfeaee; --gold:#e0a02b; --bg:#eff8f9; --bg-2:#e1f0f2; --surface-2:#f6fbfc; --line:#d3e6ea; --line-2:#bcd8de; }
[data-season='autumn'] { --brand:#b4582a; --brand-600:#9a4720; --brand-700:#7a3716; --brand-900:#4a200c; --brand-50:#fbf0e8; --brand-100:#f4dcc8; --gold:#c68a2e; --bg:#faf5ee; --bg-2:#f2e9dc; --surface-2:#fdf9f4; --line:#ecdfce; --line-2:#dfcdb5; }
[data-season='winter'] { --brand:#3f6fa8; --brand-600:#325d92; --brand-700:#264a77; --brand-900:#142a47; --brand-50:#edf3fa; --brand-100:#d6e3f2; --gold:#8aa1c0; --bg:#f0f4f9; --bg-2:#e3eaf3; --surface-2:#f7f9fc; --line:#d8e1ed; --line-2:#c4d1e2; }
[data-theme='dark'][data-season='spring'] { --brand:#6cc67e; --brand-600:#58b06a; --brand-700:#98dba5; --brand-900:#def3e2; --brand-50:#1f3a27; --brand-100:#294a33; --gold:#e69bb0; --bg:#1a271d; --bg-2:#1e2d21; --surface:#243529; --surface-2:#2a3d30; --line:#37503e; --line-2:#436147; }
[data-theme='dark'][data-season='summer'] { --brand:#4fc0d0; --brand-600:#37a8b8; --brand-700:#85d8e3; --brand-900:#d8f2f6; --brand-50:#1b3a41; --brand-100:#244a53; --gold:#efbf5a; --bg:#172428; --bg-2:#1b2b30; --surface:#203238; --surface-2:#263c43; --line:#34505a; --line-2:#3f6068; }
[data-theme='dark'][data-season='autumn'] { --brand:#e08a58; --brand-600:#cf7744; --brand-700:#f0ad86; --brand-900:#fbe6d8; --brand-50:#3a2a20; --brand-100:#4b3527; --gold:#e3b055; --bg:#241d17; --bg-2:#2a221b; --surface:#32281f; --surface-2:#3a2f25; --line:#524233; --line-2:#63503e; }
[data-theme='dark'][data-season='winter'] { --brand:#7aa6dc; --brand-600:#6591c9; --brand-700:#a6c4ea; --brand-900:#e0ebf8; --brand-50:#202f43; --brand-100:#2a3d56; --gold:#a9bdd8; --bg:#18202b; --bg-2:#1c2632; --surface:#222d3b; --surface-2:#293646; --line:#394a5f; --line-2:#455a73; }
[data-theme='dark'][data-season] .login-art { background: linear-gradient(160deg, var(--brand-600), var(--bg)); }
[data-theme='dark'][data-season] .sheet-head { background: linear-gradient(140deg, var(--brand-600), var(--bg-2)); }
[data-season] body { background-image: radial-gradient(900px 420px at 85% -10%, color-mix(in srgb, var(--brand) 9%, transparent), transparent); background-attachment: fixed; }
.season-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 8px; }
.season-pick button { border: 2px solid var(--line-2); border-radius: 14px; background: var(--surface); padding: 12px 8px; cursor: pointer; font: inherit; color: var(--ink); display: grid; gap: 6px; justify-items: center; }
.season-pick button.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.season-pick i { width: 34px; height: 34px; border-radius: 50%; display: block; }

/* ---------- photo album ---------- */
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.gal-item { position: relative; display: block; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); cursor: pointer; text-align: right; font: inherit; color: var(--ink); box-shadow: var(--shadow-1); }
.gal-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg-2); }
.gal-item .gal-cap { display: block; padding: 10px 12px; font-size: 13.5px; line-height: 1.8; min-height: 24px; }
.gal-item .badge { position: absolute; top: 8px; inset-inline-start: 8px; }
.gal-item.hid img { opacity: .55; }

/* crop editor + file preview */
.cr-bar{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-bottom:10px}
.cr-stage{display:flex;justify-content:center;background:var(--surface-2,rgba(128,128,128,.12));border-radius:12px;padding:8px}
.cr-wrap{position:relative;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;max-width:100%}
.cr-wrap canvas{display:block}
.cr-box{position:absolute;border:2px solid #fff;box-shadow:0 0 0 9999px rgba(0,0,0,.55);cursor:move;touch-action:none;outline:none}
.cr-box:focus-visible{border-color:var(--brand,#2bb3a3)}
.cr-box::before,.cr-box::after{content:"";position:absolute;pointer-events:none;border:0 solid rgba(255,255,255,.45)}
.cr-box::before{left:33.3%;right:33.3%;top:0;bottom:0;border-left-width:1px;border-right-width:1px}
.cr-box::after{top:33.3%;bottom:33.3%;left:0;right:0;border-top-width:1px;border-bottom-width:1px}
.cr-h{position:absolute;width:28px;height:28px;background:#fff;border-radius:50%;border:2px solid var(--brand,#2bb3a3);touch-action:none}
.cr-nw{left:-14px;top:-14px;cursor:nwse-resize}.cr-ne{right:-14px;top:-14px;cursor:nesw-resize}
.cr-sw{left:-14px;bottom:-14px;cursor:nesw-resize}.cr-se{right:-14px;bottom:-14px;cursor:nwse-resize}
.pv-tbl td{padding:6px 10px;border:1px solid var(--line,rgba(128,128,128,.25));font-size:13px;white-space:nowrap;max-width:260px;overflow:hidden;text-overflow:ellipsis}
.tbl-wrap{max-height:62vh;overflow:auto;border-radius:10px}

/* appointment finished */
.ev.done,.ag-i.done{filter:saturate(.7)}
.ck{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;margin-inline-end:8px;border-radius:50%;border:2.5px solid #5d7062;background:#fff;color:#8a9a8e;font-size:18px;font-weight:900;line-height:1;vertical-align:middle;cursor:pointer;flex:none;opacity:.9}
.ck:hover{border-color:#1f9d55;color:#1f9d55}
.ck.on{background:#1f9d55;border-color:#14733d;color:#fff;box-shadow:0 0 0 4px rgba(31,157,85,.28);opacity:1}
.req-m{color:var(--danger,#d64545);font-weight:700}

/* ---------- animated seasonal effects ---------- */
#season-fx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
#season-fx i { position: absolute; top: -40px; inset-inline-start: calc(var(--x) * 1%); width: var(--s); height: var(--s); opacity: .0; animation: sfx-fall var(--d) linear var(--dl) infinite; will-change: transform; }
[data-season='autumn'] #season-fx i { border-radius: 2px 70% 2px 70%; background: #c0642a; }
[data-season='autumn'] #season-fx i[style*='--c:1'] { background: #d99a2b; }
[data-season='autumn'] #season-fx i[style*='--c:2'] { background: #9a4720; }
[data-season='winter'] #season-fx i { border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.9); width: calc(var(--s) * .45); height: calc(var(--s) * .45); animation-name: sfx-snow; }
[data-season='spring'] #season-fx i { border-radius: 70% 0 70% 0; background: #f4a8bd; }
[data-season='spring'] #season-fx i[style*='--c:1'] { background: #fbd3de; }
[data-season='spring'] #season-fx i[style*='--c:2'] { background: #f7c6d4; }
[data-season='summer'] #season-fx .sun { position: absolute; top: -90px; inset-inline-end: -90px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255,214,90,.55) 0%, rgba(255,214,90,.22) 40%, transparent 70%); animation: sfx-pulse 6s ease-in-out infinite; }
@keyframes sfx-fall { 0% { transform: translate3d(0,-5vh,0) rotate(var(--r)); opacity: 0; } 8% { opacity: .75; } 50% { transform: translate3d(40px,52vh,0) rotate(calc(var(--r) + 180deg)); } 92% { opacity: .7; } 100% { transform: translate3d(-30px,108vh,0) rotate(calc(var(--r) + 360deg)); opacity: 0; } }
@keyframes sfx-snow { 0% { transform: translate3d(0,-5vh,0); opacity: 0; } 8% { opacity: .9; } 50% { transform: translate3d(-24px,52vh,0); } 92% { opacity: .8; } 100% { transform: translate3d(18px,108vh,0); opacity: 0; } }
@keyframes sfx-pulse { 0%,100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.12); opacity: 1; } }
.lite #season-fx i, .lite #season-fx .sun { animation: none; display: none; }
@media (prefers-reduced-motion: reduce) { #season-fx i { display: none; } #season-fx .sun { animation: none; } }
@media print { #season-fx { display: none; } }

/* buttons used as list rows must follow the theme (were rendered white with invisible text in dark mode) */
button.li, button.li.click { background: transparent; color: var(--ink); border: 0; border-bottom: 1px solid var(--line); font: inherit; width: 100%; text-align: start; }
button.li.click:hover { background: var(--brand-50); }
button.li b { color: var(--ink); }
.modal select, .modal input, .modal textarea { color: var(--ink); }

.ev,.ag-i{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
