/* Inter 4.1, SIL Open Font License; served locally. See ../fonts/LICENSE-Inter.txt. */
@font-face {
  font-family: "InterVariable";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "InterVariable";
  src: url("../fonts/InterVariable-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

/* ------------------------------------------------------------------ */
/* tokens                                                              */
/* ------------------------------------------------------------------ */
:root {
  --bg: #f7f8f6;
  --bg-2: #eef1ee;
  --surface: #ffffff;
  --surface-2: #f4f6f3;
  --ink: #15211d;
  --ink-2: #2e3c37;
  --muted: #55645d;
  --faint: #64736b;
  --line: #dfe5df;
  --line-2: #bdc9bf;
  --jade: #0f5d4e;
  --jade-2: #0b4a3e;
  --jade-3: #093a31;
  --jade-soft: #e7f0eb;
  --gold: #b58a3a;
  --gold-2: #85611f;
  --gold-soft: #f7efdd;
  --red: #b1433a;
  --red-soft: #fbecea;
  --blue: #376d9e;
  --blue-soft: #eaf1f8;
  --amber: #8a570f;
  --amber-soft: #fbf0da;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(21, 33, 29, 0.05);
  --shadow: 0 1px 2px rgba(21, 33, 29, 0.05), 0 14px 34px -22px rgba(21, 33, 29, 0.35);
  --font: "InterVariable", "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "Noto Sans", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: normal;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
::selection { background: rgba(15, 93, 78, 0.16); }

h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
code {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}

.icon { width: 18px; height: 18px; flex: none; }
.strong { font-weight: 640; }
.gold { color: var(--gold-2) !important; }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ------------------------------------------------------------------ */
/* buttons                                                             */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.16s, border-color 0.16s, color 0.16s, transform 0.16s;
  white-space: nowrap;
}
.btn .icon { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; pointer-events: none; }
.btn--primary { background: var(--jade); color: #f7f5ec; box-shadow: 0 6px 14px -8px rgba(15, 93, 78, 0.7); }
.btn--primary:hover { background: var(--jade-2); }
.btn--gold { background: var(--jade); color: #fff; box-shadow: 0 6px 14px -8px rgba(15, 93, 78, 0.7); }
.btn--gold:hover { background: var(--jade-2); }
.btn--gold-ghost { background: #fffdf8; border-color: #ddc99f; color: var(--gold-2); }
.btn--gold-ghost:hover { background: var(--gold-soft); border-color: #c9ad74; }
.btn--ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink-2); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--faint); }
.btn--danger { background: var(--red); color: #fff; }
.btn--danger:hover { background: #9a382f; }
.btn--danger-ghost { background: transparent; border-color: transparent; color: var(--red); }
.btn--danger-ghost:hover { background: var(--red-soft); }
.btn--sm { height: 38px; padding: 0 11px; font-size: 14px; border-radius: 9px; }
.btn--xs { height: 34px; padding: 0 9px; font-size: 13px; border-radius: 7px; }
.btn--block { width: 100%; height: 44px; }
.btn-spinner {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
.btn--ghost .btn-spinner { border-color: rgba(15, 93, 78, 0.25); border-top-color: var(--jade); }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; background: transparent;
  border-radius: 9px; color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn--danger:hover { background: var(--red-soft); color: var(--red); }

/* ------------------------------------------------------------------ */
/* boot                                                                */
/* ------------------------------------------------------------------ */
.boot-screen {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  background: radial-gradient(120% 90% at 20% 0%, #12594b 0%, #0b3a30 55%, #072620 100%);
  color: #f2eee3;
}
.boot-seal {
  width: 66px; height: 66px; border-radius: 15px;
  border: 1.5px solid rgba(201, 164, 92, 0.65);
  display: flex; align-items: center; justify-content: center;
  font-family: "Songti SC", "SimSun", Georgia, serif;
  font-size: 34px; color: #e9d9b4;
  animation: sealPulse 1.8s ease-in-out infinite;
}
.boot-seal img { width: 42px; height: 42px; object-fit: contain; }
.boot-title { font-size: 14px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(242, 238, 227, 0.8); }
.boot-line { width: 120px; height: 2px; background: rgba(255, 255, 255, 0.14); border-radius: 2px; overflow: hidden; }
.boot-line span { display: block; width: 40%; height: 100%; background: #c9a45c; animation: bootSlide 1.2s ease-in-out infinite; }
@keyframes bootSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }
@keyframes sealPulse { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-3px); opacity: 0.85; } }

/* ------------------------------------------------------------------ */
/* login                                                               */
/* ------------------------------------------------------------------ */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.06fr 0.94fr; }
.login__aside {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 44px 54px 34px;
  color: #f2eee3;
  background:
    radial-gradient(85% 60% at 8% 0%, rgba(31, 124, 104, 0.55) 0%, transparent 60%),
    radial-gradient(70% 60% at 100% 100%, rgba(201, 164, 92, 0.16) 0%, transparent 55%),
    linear-gradient(155deg, #0d443a 0%, #0a352d 48%, #07241f 100%);
}
.login__watermark {
  position: absolute; right: -30px; bottom: -70px;
  font-family: "Songti SC", "SimSun", Georgia, serif;
  font-size: 230px; line-height: 1;
  color: rgba(233, 217, 180, 0.035);
  letter-spacing: 0.06em; pointer-events: none; user-select: none;
}
.login__brand { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.login__logo { width: clamp(150px, 13.5vw, 196px); height: auto; display: block; flex: none; }
.seal {
  width: 42px; height: 42px; border-radius: 10px;
  border: 1.5px solid rgba(201, 164, 92, 0.55);
  background: rgba(201, 164, 92, 0.08);
  color: #e9d9b4;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Songti SC", "SimSun", Georgia, serif;
  font-size: 23px; flex: none;
  overflow: hidden;
}
.seal img { width: 32px; height: 32px; object-fit: contain; }
.seal--lg { width: 48px; height: 48px; font-size: 26px; border-radius: 12px; }
.login__brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.login__brand-text strong { font-size: 16px; Letter-spacing: 0.06em; font-weight: 600; }
.login__brand-text span { font-size: 12.5px; color: rgba(233, 217, 180, 0.7); letter-spacing: 0.08em; }

.login__pitch { margin: auto 0; padding: 40px 0 30px; position: relative; z-index: 1; max-width: 560px; }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold-2);
  margin-bottom: 12px;
}
.eyebrow--light { color: rgba(201, 164, 92, 0.9); }
.login__pitch h1 {
  font-size: clamp(30px, 3.1vw, 44px);
  line-height: 1.14; letter-spacing: -0.025em;
  font-weight: 600; margin-bottom: 18px;
}
.login__lead { font-size: 14.5px; line-height: 1.65; color: rgba(242, 238, 227, 0.85); max-width: 480px; }
.login__features { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.login__features li { display: flex; gap: 12px; align-items: flex-start; }
.feature-ic {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  border: 1px solid rgba(201, 164, 92, 0.28);
  background: rgba(201, 164, 92, 0.08);
  color: #d9bd85;
  display: flex; align-items: center; justify-content: center;
}
.feature-ic .icon { width: 15px; height: 15px; }
.login__features strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.login__features span { font-size: 13px; color: rgba(242, 238, 227, 0.82); }
.login__stats {
  display: flex; gap: 46px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 22px; position: relative; z-index: 1;
}
.login__stats div { display: flex; flex-direction: column; gap: 2px; }
.login__stats strong { font-size: 22px; font-weight: 600; color: #efe6d2; letter-spacing: -0.02em; }
.login__stats span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(242, 238, 227, 0.75); }
.login__aside-foot { margin-top: 22px; font-size: 12px; letter-spacing: 0.08em; color: rgba(242, 238, 227, 0.72); }

.login__panel {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 44px 40px 64px;
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(201, 164, 92, 0.1), transparent 60%),
    #f6f3ec;
}
.login-card {
  width: 100%; max-width: 432px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px 32px 26px;
  box-shadow: 0 1px 2px rgba(21, 33, 29, 0.04), 0 30px 60px -40px rgba(21, 33, 29, 0.4);
}
.login-card__head { margin-bottom: 22px; }
.login-card__head h2 { font-size: 24px; letter-spacing: -0.02em; font-weight: 650; margin-bottom: 6px; }
.login-card__head p { font-size: 14px; color: var(--muted); }
.login-card .field { margin-bottom: 13px; }
.login-card .field label { font-size: 13px; }
.login-card .field input { height: 44px; }
.login-card .btn--block { margin-top: 6px; }
.login-error:empty { display: none; }
.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0 14px;
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint);
}
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.demo-grid .demo-chip:last-child:nth-child(odd) { grid-column: 1 / -1; }
.demo-chip {
  display: flex; align-items: center; gap: 9px;
  min-width: 0; overflow: hidden;
  text-align: left; padding: 9px 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 11px; transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.demo-chip:hover { border-color: rgba(15, 93, 78, 0.45); background: #fbfaf6; transform: translateY(-1px); }
.demo-chip.is-picked { border-color: var(--jade); background: var(--jade-soft); }
.demo-chip__icon {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: var(--jade-soft); color: var(--jade);
  display: flex; align-items: center; justify-content: center;
}
.demo-chip__icon .icon { width: 14px; height: 14px; }
.demo-chip__text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.demo-chip__text strong { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-chip__text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-chip__arrow { width: 13px; height: 13px; color: var(--faint); margin-left: auto; }
.login-note { margin-top: 14px; text-align: center; font-size: 12.5px; color: var(--muted); }
.login-legal {
  position: absolute; bottom: 18px; left: 0; right: 0;
  text-align: center; font-size: 12px; letter-spacing: 0.04em; color: var(--faint);
  padding: 0 20px;
}

/* ------------------------------------------------------------------ */
/* shell                                                               */
/* ------------------------------------------------------------------ */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 256px; z-index: 40;
  display: flex; flex-direction: column;
  padding: 22px 14px 14px;
  color: #e9e5d8;
  background:
    radial-gradient(90% 40% at 0% 0%, rgba(31, 124, 104, 0.32), transparent 60%),
    linear-gradient(180deg, #0c3b33 0%, #0a332c 55%, #082822 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.sidebar__brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 15px; letter-spacing: 0.05em; font-weight: 600; color: #f3efe2; }
.brand-text span { font-size: 12px; letter-spacing: 0.12em; color: rgba(233, 217, 180, 0.82); }
.sidebar__nav { flex: 1; overflow-y: auto; padding-bottom: 8px; }
.sidebar__nav::-webkit-scrollbar { width: 4px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 4px; }
.nav-section {
  margin: 16px 11px 6px;
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(233, 229, 216, 0.75);
}
.nav-section:first-child { margin-top: 4px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  height: 39px; padding: 0 11px; border-radius: 9px;
  color: rgba(233, 229, 216, 0.88);
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}
.nav-item .icon { width: 17px; height: 17px; opacity: 0.75; }
.nav-item:hover { background: rgba(255, 255, 255, 0.055); color: #fff; }
.nav-item.is-active { background: rgba(255, 255, 255, 0.08); color: #fff; font-weight: 600; }
.nav-item.is-active .icon { opacity: 1; color: #d8bb82; }
.nav-item.is-active::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px;
  width: 3px; border-radius: 0 3px 3px 0; background: #c9a45c;
}
.sidebar__foot { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 12px; }
.clinic-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 0 9px 10px;
  font-size: 12.5px; letter-spacing: 0.04em;
  color: rgba(233, 229, 216, 0.82);
}
.clinic-chip .icon { width: 13px; height: 13px; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 8px 8px 6px; border-radius: 10px; }
.user-card__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.user-card__text strong { font-size: 13px; font-weight: 600; color: #f1ede1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card__text span { font-size: 12px; color: rgba(233, 229, 216, 0.78); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card__logout {
  margin-left: auto; width: 28px; height: 28px; flex: none;
  border: none; background: transparent; color: rgba(233, 229, 216, 0.78);
  border-radius: 7px; display: flex; align-items: center; justify-content: center;
}
.user-card__logout:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.user-card__logout .icon { width: 15px; height: 15px; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 650; letter-spacing: 0.03em;
  color: #f8f4e8;
  background: linear-gradient(145deg, #1a7a66, #0e5345);
  border: 1px solid rgba(201, 164, 92, 0.35);
}
.sidebar .avatar { background: linear-gradient(145deg, #b08a43, #8c6928); border-color: rgba(255, 255, 255, 0.16); color: #fff; }
.avatar--sm { width: 28px; height: 28px; font-size: 12px; }

.main { margin-left: 256px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px 30px 15px;
  background: rgba(247, 248, 246, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar__titles { min-width: 0; }
.topbar__crumb {
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 3px;
}
.topbar h1 { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__sub { font-size: 13px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__right { display: flex; align-items: center; gap: 10px; flex: none; }
.date-chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 9px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 13px; color: var(--muted);
}
.date-chip .icon { width: 14px; height: 14px; }
.burger { display: none; }
.view { flex: 1; padding: 22px 30px 46px; max-width: 1500px; width: 100%; margin: 0 auto; }
.page { display: flex; flex-direction: column; gap: 0; }
.page > .card { margin-bottom: 18px; }

/* ------------------------------------------------------------------ */
/* cards, grids, kpi                                                   */
/* ------------------------------------------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card--table { padding: 0; }
.card__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 18px 22px 14px;
}
.card__head h2 { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.card__head p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card__foot-note {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 22px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); background: var(--surface-2);
}
.card__foot-note .icon { width: 14px; height: 14px; }
.card-empty { padding: 0 18px 18px; }
.link { font-size: 13px; font-weight: 600; color: var(--jade); white-space: nowrap; }
.link:hover { text-decoration: underline; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; align-items: start; }
.grid-2--wide { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: stretch; }
.report-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 18px; }
.kpi {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 15px;
  min-height: 142px;
  box-shadow: var(--shadow-sm);
}
.kpi--accent {
  background: linear-gradient(155deg, #fffdf8 30%, #faf1dd 100%);
  border-color: #ecdfc2;
}
.kpi__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi__label { font-size: 12px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.kpi__icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--jade); display: flex; align-items: center; justify-content: center;
}
.kpi__icon .icon { width: 14px; height: 14px; }
.kpi--accent .kpi__icon { background: #fdf6e7; border-color: #ecdfc2; color: var(--gold-2); }
.kpi__value { font-size: 27px; font-weight: 650; letter-spacing: -0.035em; line-height: 1.1; margin: 11px 0 5px; }
.kpi__meta { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.kpi__spark { width: 100%; height: 30px; margin-top: auto; padding-top: 5px; opacity: 0.8; }
.spark { width: 100%; height: 100%; }

/* ------------------------------------------------------------------ */
/* chart                                                               */
/* ------------------------------------------------------------------ */
.card--chart .card__head { align-items: center; }
.card--chart { display: flex; flex-direction: column; }
.card--chart .chart-wrap { flex: 1; display: flex; align-items: center; padding: 2px 10px 0; width: 100%; }
.chart { width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: #ece7da; stroke-width: 1; }
.chart-axis { fill: var(--faint); font-size: 12.5px; font-family: var(--font); }
.chart-axis--x { font-size: 13px; fill: var(--muted); }
.chart-bar-main { fill: #0f5d4e; }
.chart-bar-accent { fill: #c9a45c; }
.chart-bar-bg { fill: #e8e3d6; }
.chart-bar:hover .chart-bar-main { fill: #0b4a3e; }
.chart-bar:hover .chart-bar-accent { fill: #b58a3a; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.legend-dot--jade { background: #0f5d4e; }
.legend-dot--gold { background: #c9a45c; }
.chart-foot {
  display: flex; gap: 46px;
  margin-top: 4px; padding: 14px 22px 16px;
  border-top: 1px solid var(--line);
}
.chart-foot div { display: flex; flex-direction: column; gap: 1px; }
.chart-foot span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); }
.chart-foot strong { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }

/* ------------------------------------------------------------------ */
/* rank list / agenda                                                  */
/* ------------------------------------------------------------------ */
.rank-list { padding: 2px 20px 14px; display: flex; flex-direction: column; }
.rank {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 10px 2px;
  border-bottom: 1px solid #f1ede3;
}
.rank:last-child { border-bottom: none; }
.rank:not(.rank--static):hover { background: #fbf9f4; border-radius: 8px; }
.rank__num { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; padding-top: 2px; width: 16px; flex: none; }
.rank__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.rank__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rank__row strong { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank__value { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.rank__bar { display: block; height: 4px; background: #f1ece0; border-radius: 4px; overflow: hidden; }
.rank__bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #14705d, #0f5d4e); }
.rank__sub { font-size: 12px; color: var(--muted); }
.rank__arrow { width: 14px; height: 14px; color: var(--faint); margin-top: 4px; }

.agenda { padding: 0 14px 12px; }
.agenda__item {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 8px; border-radius: 10px;
  border-bottom: 1px solid #f1ede3;
  cursor: pointer;
}
.agenda__item:last-child { border-bottom: none; }
.agenda__item:hover { background: #fbf9f4; }
.date-badge {
  width: 42px; height: 46px; flex: none;
  border-radius: 9px; border: 1px solid #e8dfc9;
  background: #fbf7ec;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.05;
}
.date-badge strong { font-size: 16px; font-weight: 650; color: var(--ink); }
.date-badge span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.agenda__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.agenda__body strong { font-size: 14px; font-weight: 600; }
.agenda__body span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda__right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.agenda__when { font-size: 12px; color: var(--faint); }

/* ------------------------------------------------------------------ */
/* toolbar / segmented / search                                        */
/* ------------------------------------------------------------------ */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 15px; flex-wrap: wrap; }
.toolbar--wrap { flex-wrap: wrap; }
.toolbar__right { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.toolbar__left { display: flex; align-items: center; gap: 9px; }
.toolbar-caption { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.toolbar-caption .icon { width: 14px; height: 14px; color: var(--gold-2); }
.segmented {
  display: inline-flex; align-items: center; gap: 2px;
  background: #ece7db; padding: 3px; border-radius: 11px;
  flex-wrap: wrap;
}
.seg {
  border: none; background: transparent;
  height: 30px; padding: 0 11px; border-radius: 8px;
  font-size: 13px; font-weight: 550; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.seg span { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.seg:hover { color: var(--ink); }
.seg.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(21, 33, 29, 0.1); font-weight: 600; }
.seg.is-active span { color: var(--jade); }
.search {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 11px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px;
  color: var(--faint);
}
.search:focus-within { border-color: rgba(15, 93, 78, 0.5); box-shadow: 0 0 0 3px rgba(15, 93, 78, 0.08); }
.search .icon { width: 15px; height: 15px; }
.search input { border: none; outline: none; background: transparent; width: 200px; font-size: 14px; color: var(--ink); }
.search input::placeholder { color: var(--faint); }
.select {
  height: 36px; padding: 0 30px 0 11px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236d7b75' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--line-2); border-radius: 9px;
  font-size: 14px; appearance: none; outline: none;
}
.select:focus { border-color: rgba(15, 93, 78, 0.5); }
.date-range { display: inline-flex; align-items: center; gap: 6px; }
.date-range input {
  height: 34px; padding: 0 8px; border: 1px solid var(--line-2);
  border-radius: 8px; background: var(--surface); font-size: 13px; color: var(--ink-2);
}
.date-range span { color: var(--faint); font-size: 13px; }

/* ------------------------------------------------------------------ */
/* summary + tiles                                                     */
/* ------------------------------------------------------------------ */
.summary-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 13px 4px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.summary-strip > div { padding: 0 20px; border-left: 1px solid #f0ece1; display: flex; flex-direction: column; gap: 1px; }
.summary-strip > div:first-child { border-left: none; }
.summary-strip span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--faint); }
.summary-strip strong { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.summary-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.summary-tiles--5 { grid-template-columns: repeat(5, 1fr); }
.summary-tiles--compact { gap: 10px; }
.tile {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 15px 17px;
  display: flex; flex-direction: column; gap: 2px;
  box-shadow: var(--shadow-sm);
}
.tile--gold { background: linear-gradient(155deg, #fffdf8 30%, #faf1dd 100%); border-color: #ecdfc2; }
.tile__label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--faint); }
.tile__value { font-size: 23px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tile--gold .tile__value { color: var(--gold-2); }
.tile__meta { font-size: 12.5px; color: var(--muted); }
.summary-tiles--compact .tile { padding: 12px 14px; }
.summary-tiles--compact .tile__value { font-size: 19px; }

.page-note {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 2px 0 18px; padding: 10px 13px;
  border: 1px dashed var(--line-2); border-radius: 10px;
  background: rgba(255, 255, 255, 0.45);
  font-size: 12.5px; color: var(--muted); line-height: 1.55;
}
.page-note .icon { width: 14px; height: 14px; color: var(--gold-2); flex: none; margin-top: 1px; }
.period-caption { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); margin: -4px 0 14px; }
.period-caption .icon { width: 14px; height: 14px; }

/* ------------------------------------------------------------------ */
/* tables                                                              */
/* ------------------------------------------------------------------ */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  padding: 10px 15px;
  font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--faint); text-align: left; white-space: nowrap;
  background: #fbf9f4;
  border-bottom: 1px solid var(--line);
}
.table td { padding: 12px 15px; border-bottom: 1px solid #f1ede3; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table--compact th { padding: 8px 12px; }
.table--compact td { padding: 9px 12px; font-size: 14px; }
.rate-input { width: 96px; }
.rates-card { border: 0; box-shadow: none; }
.rates-card .table-wrap { max-height: 56vh; overflow-y: auto; }
.rates-summary { margin-bottom: 16px; }
.rates-summary__person { display: flex; align-items: center; gap: 10px; padding: 0 22px 20px; }
.rates-summary__person div { display: flex; flex-direction: column; gap: 2px; }
.rates-summary__person strong { font-size: 14px; }
.rates-summary__person span { color: var(--muted); font-size: 12.5px; }
.rates-group { margin-bottom: 14px; }
.table--clickable tbody tr { cursor: pointer; }
.table tbody tr:hover { background: #fbf9f4; }
.table .cell-main { font-weight: 550; color: var(--ink); }
.table .cell-main--row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.table .cell-sub { font-size: 12px; color: var(--muted); margin-top: 1px; line-height: 1.4; }
.table .strong { font-weight: 650; }
.row-arrow { width: 34px; color: var(--faint); text-align: right; padding-right: 14px !important; }
.row-arrow .icon { width: 14px; height: 14px; margin-left: auto; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions > * + * { margin-left: 3px; }
.table tr.is-archived { opacity: 0.55; }
.person { display: flex; align-items: center; gap: 9px; }
.tag {
  display: inline-block; padding: 2px 8px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 6px; font-size: 12px; color: var(--muted); white-space: nowrap;
}
.agency-tag {
  display: inline-block; padding: 2px 8px;
  background: var(--gold-soft); border: 1px solid #ecdfc2;
  border-radius: 6px; font-size: 12px; color: var(--gold-2); white-space: nowrap;
}
.inline-empty { padding: 20px; text-align: center; font-size: 13px; color: var(--muted); }
.section-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 20px; padding: 0 7px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; font-size: 12px; color: var(--muted);
}

/* ------------------------------------------------------------------ */
/* pills                                                               */
/* ------------------------------------------------------------------ */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.01em;
  white-space: nowrap;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid transparent;
}
.pill__dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
.pill--new { background: var(--blue-soft); color: var(--blue); }
.pill--confirmed { background: var(--jade-soft); color: var(--jade); }
.pill--progress { background: var(--amber-soft); color: var(--amber); }
.pill--completed { background: #eef2ec; color: #4b6a58; }
.pill--cancelled { background: var(--red-soft); color: var(--red); }
.pill--paid { background: var(--jade-soft); color: var(--jade); }
.pill--partial { background: var(--amber-soft); color: var(--amber); }
.pill--unpaid { background: #f1efe8; color: #7c8781; }
.pill--muted { background: #f1efe8; color: #8a948e; }

/* ------------------------------------------------------------------ */
/* forms                                                               */
/* ------------------------------------------------------------------ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field__optional { margin-left: 4px; font-size: 12px; font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 9px;
  font-size: 14px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(15, 93, 78, 0.55);
  box-shadow: 0 0 0 3px rgba(15, 93, 78, 0.09);
}
.field input:disabled, .field select:disabled { background: var(--surface-2); color: var(--muted); }
.field__hint { font-size: 12px; color: var(--muted); line-height: 1.45; }
.service-price--edit { display: flex; flex-direction: column; gap: 3px; min-width: 120px; }
.service-price__label { font-size: 11px; color: var(--muted); white-space: normal; }
.service-final-price { width: 112px; min-height: 38px; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); font-size: 14px; color: var(--ink); }
.service-final-price:disabled { background: var(--surface-2); color: var(--muted); }
.span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; }
.form-error {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 9px 11px; border-radius: 9px;
  background: var(--red-soft); color: var(--red);
  font-size: 13px; line-height: 1.45;
}
.form-error .icon { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.form-error--wide { margin-bottom: 16px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.check-row input { width: 16px; height: 16px; accent-color: var(--jade); }
.readonly-field {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; background: var(--surface-2);
  border: 1px dashed var(--line-2); border-radius: 9px;
}
.readonly-field .icon { width: 17px; height: 17px; color: var(--jade); flex: none; }
.readonly-field div { display: flex; flex-direction: column; min-width: 0; }
.readonly-field strong { font-size: 14px; font-weight: 600; }
.readonly-field span { font-size: 12px; color: var(--muted); }
.form-total {
  display: flex; justify-content: flex-end; gap: 34px;
  margin-top: 14px; padding: 12px 16px;
  background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 11px;
}
.form-total div { display: flex; flex-direction: column; gap: 1px; }
.form-total span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.form-total strong { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.form-total .gold { color: var(--gold-2); }

/* ------------------------------------------------------------------ */
/* modal                                                               */
/* ------------------------------------------------------------------ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(9, 28, 24, 0.48);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.16s ease-out;
}
.modal-backdrop.is-closing { opacity: 0; transition: opacity 0.14s; }
.modal {
  width: min(720px, 100%);
  max-height: 90vh;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 40px 90px -30px rgba(9, 28, 24, 0.55);
  animation: modalIn 0.18s ease-out;
  overflow: hidden;
}
.modal--wide { width: min(960px, 100%); }
.modal--sm { width: min(560px, 100%); }
.modal__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--line);
}
.modal__heading { min-width: 0; }
.modal__title { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; }
.modal__sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.modal__close { flex: none; margin: -4px -6px 0 0; }
.modal__body { padding: 18px 24px 22px; overflow-y: auto; }
.modal__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: #fdfcf8;
  flex-wrap: wrap;
}
.foot-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.foot-total { display: flex; align-items: center; gap: 26px; margin: 0 auto; padding: 0 10px; }
.foot-total div { display: flex; flex-direction: column; gap: 0; }
.foot-total span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.foot-total strong { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(0.995); } }

/* ------------------------------------------------------------------ */
/* toast                                                               */
/* ------------------------------------------------------------------ */
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 2200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 9px;
  min-width: 220px; max-width: 380px;
  padding: 11px 14px;
  background: #102620; color: #f1ede1;
  border-radius: 11px;
  font-size: 13px; line-height: 1.4;
  box-shadow: 0 16px 40px -16px rgba(9, 28, 24, 0.6);
  animation: toastIn 0.2s ease-out;
}
.toast .icon { width: 15px; height: 15px; flex: none; color: #8fd3b6; }
.toast--err { background: #4d1e19; }
.toast--err .icon { color: #f0a79e; }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: 0.2s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------------------------------------------------ */
/* detail modal content                                                */
/* ------------------------------------------------------------------ */
.summary-tiles .tile { box-shadow: none; }
.visit-detail .summary-tiles, .modal .summary-tiles { gap: 11px; }
.visit-detail .tile, .modal .tile { padding: 12px 14px; background: var(--surface-2); }
.modal .tile--gold { background: #fcf6e8; }
.modal .tile__value { font-size: 19px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr); gap: 20px; }
.detail-main { min-width: 0; }
.detail-section { margin-bottom: 18px; }
.detail-section:last-child { margin-bottom: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.section-head h3 { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); }
.detail-side { display: flex; flex-direction: column; gap: 9px; }
.side-block {
  display: flex; flex-direction: column; gap: 2px;
  padding: 11px 13px;
  background: var(--surface-2);
  border: 1px solid #f0ece1;
  border-radius: 10px;
  min-width: 0;
}
.side-block strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.side-block > span:not(.side-label) { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.side-label { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
.side-pills { display: flex; gap: 5px; flex-wrap: wrap; margin: 2px 0; }
.side-note { font-size: 13px; color: var(--ink-2); line-height: 1.5; white-space: pre-line; }
.confirm-text { font-size: 14px; line-height: 1.6; color: var(--ink-2); }

/* ------------------------------------------------------------------ */
/* service picker                                                      */
/* ------------------------------------------------------------------ */
.visit-form { display: flex; flex-direction: column; }
.new-client {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 13px;
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
  border-radius: 11px;
}
.new-client[hidden] { display: none; }
.appointment-fields {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px; grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0; border: 0;
}
.appointment-fields[hidden] { display: none; }
.appointment-fields [data-new-client][hidden] { display: none; }
.appointment-service { display: grid; grid-template-columns: minmax(0, 3fr) minmax(150px, 1fr); gap: 18px; }
.smart-schedule-layout { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:18px; align-items:start; }
.smart-schedule-main { min-width:0; }
.schedule-find { padding:18px; display:grid; gap:15px; }
.schedule-find h3 { margin:0; }
.schedule-find .form-grid .field label { white-space:nowrap; font-size:12px; }
.time-select { display:flex; align-items:center; border:1px solid var(--line); border-radius:9px; background:var(--surface); min-width:0; }
.time-select:focus-within { border-color:var(--jade); box-shadow:0 0 0 2px rgba(15,93,78,.1); }
.time-select select { width:50%; min-width:0; padding:10px 5px; border:0; border-radius:9px; background:transparent; box-shadow:none; font-variant-numeric:tabular-nums; }
.time-select select:focus { box-shadow:none; outline:none; }
.time-select span { color:var(--muted); }
.time-select:has(select:disabled) { opacity:.55; background:var(--bg); }
.schedule-week .time-select { min-width:130px; }
.schedule-break-row { display:flex; align-items:center; gap:5px; margin-bottom:5px; }
.schedule-break-row input { min-width:95px; }
.schedule-add-shift { display:flex; gap:8px; align-items:center; margin:10px 0 20px; }
.schedule-add-shift select { width:auto; }
.schedule-timeline-scroll { max-height:calc(100vh - 300px); min-height:320px; overflow:auto; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.schedule-timeline { display:grid; grid-template-columns:56px repeat(var(--schedule-columns),minmax(165px,1fr)); grid-template-rows:64px var(--schedule-height); min-width:calc(56px + var(--schedule-columns) * 165px); }
.timeline-corner,.timeline-header { position:sticky; top:0; z-index:7; padding:9px 7px; background:var(--surface); border-right:1px solid var(--line); border-bottom:1px solid var(--line); }
.timeline-corner { left:0; z-index:9; font-size:11px; color:var(--muted); }
.timeline-header { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:2px; }
.timeline-header strong { font-size:13px; }
.timeline-header .btn { padding:2px 4px; min-height:24px; }
.timeline-hours { position:sticky; left:0; z-index:6; background:var(--surface); }
.timeline-hours span { position:absolute; left:7px; right:0; font-size:11px; color:var(--muted); font-variant-numeric:tabular-nums; }
.timeline-lane { position:relative; overflow:hidden; border-right:1px solid var(--line); background:#eef0ed; }
.timeline-shift { position:absolute; inset-inline:0; background:repeating-linear-gradient(to bottom,rgba(15,93,78,.035) 0,rgba(15,93,78,.035) 14px,var(--line) 14px,var(--line) 15px),var(--surface); }
.timeline-shift.is-unconfigured { background:repeating-linear-gradient(to bottom,rgba(182,140,54,.04) 0,rgba(182,140,54,.04) 14px,var(--line) 14px,var(--line) 15px),var(--surface); }
.timeline-slot { position:absolute; left:0; width:100%; border:0; padding:0; background:transparent; z-index:1; }
.timeline-slot:hover,.timeline-slot:focus-visible { background:rgba(182,140,54,.18); outline:1px solid var(--gold); outline-offset:-1px; }
.timeline-unavailable,.timeline-buffer { position:absolute; inset-inline:0; z-index:3; background:repeating-linear-gradient(135deg,#e8ebe7 0,#e8ebe7 4px,#f1f3ef 4px,#f1f3ef 8px); color:var(--muted); overflow:hidden; font-size:11px; padding:2px 5px; }
.schedule-status-color { --appt-bg:#e7f2eb; --appt-border:#b6d3c2; --appt-accent:#0f5d4e; --appt-ink:#184f43; }
.schedule-status-color[data-status=in_progress],.schedule-status-color.appointment-state--in_progress { --appt-bg:#fff0c7; --appt-border:#e3c67b; --appt-accent:#a77518; --appt-ink:#785417; }
.schedule-status-color[data-status=completed],.schedule-status-color.appointment-state--completed { --appt-bg:#e6edf7; --appt-border:#bacce2; --appt-accent:#54769f; --appt-ink:#334e71; }
.schedule-status-color[data-status=no_show],.schedule-status-color.appointment-state--no_show { --appt-bg:#fae9e2; --appt-border:#dfb5a4; --appt-accent:#ae5038; --appt-ink:#8e402c; }
.schedule-status-color[data-status=cancelled],.schedule-status-color.appointment-state--cancelled { --appt-bg:#eef0f2; --appt-border:#d0d6db; --appt-accent:#78838e; --appt-ink:#596570; }
.pill.pill--appointment { background:var(--appt-bg); color:var(--appt-ink); border:1px solid var(--appt-border); }
.schedule-status-legend { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 12px; }
.schedule-status-key { display:inline-flex; align-items:center; gap:5px; padding:4px 7px; border-radius:6px; border:1px solid var(--appt-border); background:var(--appt-bg); color:var(--appt-ink); font-size:11px; white-space:nowrap; }
.schedule-status-key b { color:var(--appt-accent); min-width:10px; text-align:center; }
.schedule-closed { margin-top:12px; }
.schedule-closed summary { cursor:pointer; padding:8px 0; font-size:13px; }
.schedule-closed-item { display:flex; align-items:center; gap:10px; margin:6px 0; padding:7px; border:1px solid var(--appt-border); background:var(--appt-bg); border-radius:8px; color:var(--appt-ink); text-align:left; }
.timeline-appointment { position:absolute; left:4px; right:4px; z-index:4; padding:4px 7px; background:var(--appt-bg); border:1px solid var(--appt-border); border-left:3px solid var(--appt-accent); border-radius:6px; color:var(--appt-ink); text-align:left; overflow:hidden; display:flex; flex-direction:column; gap:1px; line-height:1.2; }
.timeline-appointment strong,.timeline-appointment span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:100%; }
.timeline-appointment strong { font-size:12px; font-weight:600; }
.timeline-appointment span { font-size:11px; }
.timeline-appointment .timeline-appointment__meta { display:flex; align-items:center; justify-content:space-between; gap:4px; }
.timeline-appointment .timeline-appointment__time { width:auto; }
.timeline-appointment__status { color:var(--appt-accent); font-size:12px; padding:0 2px; }
.timeline-appointment.is-compact { flex-direction:row; align-items:center; gap:5px; padding:0 5px; }
.timeline-appointment.is-compact .timeline-appointment__time { flex:0 0 auto; width:auto; font-size:10px; }
.timeline-appointment.is-compact .timeline-appointment__meta { flex:0 0 auto; width:auto; }
.availability-summary { margin-bottom:10px; font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; }
.availability-list { display:grid; gap:8px; max-height:430px; overflow:auto; }
.availability-person { border:1px solid var(--line); border-radius:9px; padding:10px; background:var(--surface); }
.availability-person.is-available { border-color:#b7d0bf; background:#f0f7f1; }
.availability-person__head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:4px; }
.availability-person__head strong { font-size:13px; }
.availability-next { display:flex; gap:5px; flex-wrap:wrap; margin-top:7px; }
.schedule-section-title { margin:22px 0 9px; font-size:15px; }
.schedule-week { min-width:660px; }
.schedule-week input[type=time] { min-width:105px; width:100%; padding:6px; }
.schedule-week .check-row { margin:0; white-space:nowrap; }
.schedule-services { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px 18px; max-height:300px; overflow:auto; margin:12px 0; }
.schedule-services .check-row { align-items:flex-start; margin:0; font-size:13px; }
.staff-setup { border:0; padding:0; margin:0; min-width:0; }
.staff-setup[hidden],.staff-procedure[hidden],.staff-procedure-rate[hidden] { display:none; }
.staff-rate-tools { display:flex; gap:12px; align-items:flex-end; margin:14px 0; }
.staff-rate-tools .field { max-width:245px; flex:1; }
.staff-procedure-list { max-height:320px; overflow:auto; border:1px solid var(--line); border-radius:12px; padding:5px; margin:10px 0 20px; }
.staff-procedure { display:grid; grid-template-columns:minmax(0,1fr) 160px; align-items:center; gap:14px; min-height:49px; padding:8px 10px; border-bottom:1px solid var(--line); border-radius:7px; }
.staff-procedure:last-child { border-bottom:0; }
.staff-procedure.is-selected { background:#edf5ef; }
.staff-procedure .check-row { margin:0; font-size:13px; align-items:center; }
.staff-procedure-rate label { display:block; color:var(--muted); font-size:11px; margin-bottom:3px; }
.staff-procedure-rate input { padding:7px 9px; }
.staff-buffer { max-width:320px; }
@media(max-width:650px) { .staff-procedure { grid-template-columns:minmax(0,1fr) 115px; gap:8px; } .staff-rate-tools { align-items:stretch; flex-direction:column; } }
.schedule-room-list,.schedule-block-list { display:grid; gap:8px; }
.schedule-room-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); }
.schedule-legend { margin:12px 0; }
@media(max-width:1150px) { .smart-schedule-layout { grid-template-columns:minmax(0,1fr); } .schedule-find { grid-row:1; } .schedule-find .availability-list { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .schedule-services,.schedule-find .availability-list { grid-template-columns:1fr; } }
.picker-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 20px 0 9px; }
.picker-head h3 { font-size: 14px; font-weight: 650; }
.picker-head p { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.picker-rate { font-size: 12px; color: var(--jade); background: var(--jade-soft); border-radius: 999px; padding: 4px 9px; white-space: nowrap; }
.service-list {
  border: 1px solid var(--line);
  border-radius: 11px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--surface);
}
.service-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 56px 74px 48px;
  align-items: center; gap: 10px;
  padding: 9px 13px;
  border-bottom: 1px solid #f3efe5;
  cursor: pointer;
  position: relative;
  transition: background 0.12s;
}
.service-option:last-child { border-bottom: none; }
.service-option:hover { background: #fdfbf6; }
.service-option.is-checked { background: #f6faf7; }
.service-option input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.service-check {
  width: 19px; height: 19px; border-radius: 5px;
  border: 1.5px solid var(--line-2);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: #fff; transition: background 0.12s, border-color 0.12s;
}
.service-check .icon { width: 12px; height: 12px; opacity: 0; }
.service-option input:checked + .service-check { background: var(--jade); border-color: var(--jade); }
.service-option input:checked + .service-check .icon { opacity: 1; }
.service-option input:focus-visible + .service-check { box-shadow: 0 0 0 3px rgba(15, 93, 78, 0.18); }
.service-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.service-main strong { font-size: 14px; font-weight: 600; }
.service-main small { font-size: 12px; color: var(--muted); }
.service-rate { font-size: 12px; color: var(--muted); text-align: right; }
.service-price { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.service-qty {
  width: 48px; height: 28px; border: 1px solid var(--line-2);
  border-radius: 7px; background: #fff; font-size: 12.5px; padding: 0 4px;
  text-align: center;
}
.service-option:not(.is-checked) .service-qty { opacity: 0.45; }
.service-option:has(.service-final-price) { grid-template-columns: 20px minmax(0, 1fr) 56px 124px 48px; }
@media (max-width: 760px) {
  .service-option:has(.service-final-price) { grid-template-columns: 20px minmax(0, 1fr) 112px 48px; }
  .service-price--edit { min-width: 0; }
  .service-final-price { max-width: 100%; }
}

.payment-summary {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 12px 14px;
  background: var(--surface-2); border: 1px solid #f0ece1; border-radius: 11px;
}
.payment-summary div { display: flex; flex-direction: column; gap: 1px; }
.payment-summary span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.payment-summary strong { font-size: 16px; font-weight: 650; }
.payment-summary .accent strong { color: var(--gold-2); }

/* ------------------------------------------------------------------ */
/* settings                                                            */
/* ------------------------------------------------------------------ */
.settings-page .card { margin-bottom: 0; }
.settings-page .card > .form-grid { padding: 4px 22px 20px; }
.settings-page .grid-2--wide { align-items: start; }
.settings-side { display: flex; flex-direction: column; gap: 18px; }
.settings-list { padding: 4px 22px 18px; display: flex; flex-direction: column; }
.settings-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f3efe5; }
.settings-row:last-child { border-bottom: 0; }
.settings-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.settings-row strong { font-size: 13px; font-weight: 650; }
.settings-row span { font-size: 12px; color: var(--muted); }
.settings-readonly {
  min-height: 36px; display: flex; align-items: center; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2);
  font-size: 13px; color: var(--ink-2);
}
.lang-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px 22px 14px; }
.lang-choice__btn {
  border: 1px solid var(--line-2); border-radius: 10px; background: #fff;
  padding: 12px; text-align: left; display: flex; flex-direction: column; gap: 2px;
}
.lang-choice__btn strong { font-size: 15px; }
.lang-choice__btn span { font-size: 12px; color: var(--muted); }
.lang-choice__btn.is-active { border-color: var(--jade); background: var(--jade-soft); }
.rule-list { list-style: none; margin: 0; padding: 2px 22px 18px; display: flex; flex-direction: column; gap: 13px; }
.rule-list li { display: flex; gap: 11px; align-items: flex-start; }
.rule-list li > span {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--jade-soft); color: var(--jade);
  font-size: 12px; font-weight: 650;
  display: flex; align-items: center; justify-content: center;
}
.rule-list strong { display: block; font-size: 13px; font-weight: 650; margin-bottom: 1px; }
.rule-list p { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ------------------------------------------------------------------ */
/* empty / skeleton                                                    */
/* ------------------------------------------------------------------ */
.empty { padding: 26px 20px; text-align: center; }
.empty__icon {
  width: 42px; height: 42px; margin: 0 auto 10px;
  border-radius: 12px; border: 1px dashed var(--line-2);
  background: var(--surface-2); color: var(--faint);
  display: flex; align-items: center; justify-content: center;
}
.empty__icon .icon { width: 19px; height: 19px; }
.empty h3 { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.empty p { font-size: 12.5px; color: var(--muted); max-width: 320px; margin: 0 auto 12px; line-height: 1.5; }
.page-actions-center { display: flex; justify-content: center; margin-top: 10px; }
.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(100deg, #eee9dd 20%, #f7f3ea 38%, #eee9dd 56%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
.skeleton-kpi { height: 142px; }
.skeleton-card { height: 330px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ */
/* misc                                                                */
/* ------------------------------------------------------------------ */
.sidebar-overlay { display: none; }
:focus-visible { outline: 2px solid rgba(15, 93, 78, 0.45); outline-offset: 2px; }
.no-scroll { overflow: hidden; }

/* ------------------------------------------------------------------ */
/* multi-clinic / staff                                                */
/* ------------------------------------------------------------------ */
.clinic-switch {
  width: calc(100% - 16px); height: 34px; margin: 0 8px 14px;
  padding: 0 28px 0 10px;
  background: rgba(255, 255, 255, 0.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23c9a45c' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid rgba(201, 164, 92, 0.3); border-radius: 8px;
  color: #f2eee3; font-size: 13px; appearance: none; outline: none;
}
.clinic-switch option { color: var(--ink); }
.clinic-select-top {
  height: 34px; max-width: 200px; padding: 0 28px 0 10px;
  border: 1px solid var(--line-2); border-radius: 9px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236d7b75' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center;
  font-size: 13px; color: var(--ink-2); appearance: none; outline: none;
}
.select-sm {
  height: 30px; padding: 0 26px 0 9px; margin-left: 10px;
  border: 1px solid var(--line-2); border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%236d7b75' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
  font-size: 12.5px; color: var(--ink-2); appearance: none; outline: none;
}
.clinic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.clinic-card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 20px 22px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 14px;
}
.clinic-card.is-active { border-color: rgba(15, 93, 78, 0.45); box-shadow: 0 0 0 2px rgba(15, 93, 78, 0.07); }
.clinic-card__head { display: flex; align-items: center; gap: 12px; }
.clinic-card__head > div:nth-child(2) { flex: 1; min-width: 0; }
.clinic-card__head h2 { font-size: 18px; letter-spacing: -0.02em; }
.clinic-card__head p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.clinic-card__seal {
  width: 44px; height: 44px; border-radius: 11px; flex: none;
  border: 1px solid #e3d2ac; background: #fbf5e7; color: var(--gold-2);
  display: flex; align-items: center; justify-content: center;
  font-family: "Songti SC", "SimSun", Georgia, serif; font-size: 24px;
  overflow: hidden;
}
.clinic-card__seal img { width: 34px; height: 34px; object-fit: contain; }
.clinic-card__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.clinic-card__stats div { background: var(--surface-2); border-radius: 9px; padding: 8px 10px; display: flex; flex-direction: column; }
.clinic-card__stats strong { font-size: 17px; font-weight: 650; }
.clinic-card__stats span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.clinic-card__info { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.clinic-card__info span { display: flex; align-items: center; gap: 6px; }
.clinic-card__info .icon { width: 13px; height: 13px; color: var(--faint); }
.clinic-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #f1ede3; padding-top: 12px; }
.clinic-card__actions { display: flex; align-items: center; gap: 6px; }
.lang-btn {
  width: auto; min-width: 40px; padding: 0 10px; flex: none;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.7);
  font-size: 12.5px; font-weight: 700; color: var(--jade); letter-spacing: 0.02em;
}
.login-lang {
  position: absolute; top: 18px; right: 22px; z-index: 2;
  height: 30px; padding: 0 11px; border-radius: 8px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.82);
  font-size: 12.5px; font-weight: 700; color: var(--jade);
}
.login-lang:hover { background: #fff; }
.service-option[hidden] { display: none; }

/* staff day */
.staff-hero {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.5fr);
  gap: 20px; align-items: center;
  padding: 24px 26px; margin-bottom: 16px;
  color: #f2eee3; border-radius: 20px;
  background:
    radial-gradient(80% 90% at 0% 0%, rgba(31, 124, 104, 0.5), transparent 60%),
    linear-gradient(140deg, #0c3b33 0%, #0a352d 60%, #082822 100%);
  box-shadow: var(--shadow);
}
.staff-hero__intro h2 { font-size: 25px; letter-spacing: -0.02em; font-weight: 600; margin: 4px 0 5px; }
.staff-hero__intro p { font-size: 13px; color: rgba(242, 238, 227, 0.82); }
.staff-hero .eyebrow { color: rgba(201, 164, 92, 0.9); margin-bottom: 6px; }
.next-session {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 18px; border-radius: 16px;
  background: #fffdf8; color: var(--ink);
  cursor: pointer;
  box-shadow: 0 18px 35px -25px rgba(0, 0, 0, 0.6);
}
.next-session.is-current { background: #fbf3df; }
.next-session__time { display: flex; flex-direction: column; align-items: flex-start; min-width: 76px; }
.next-session__time strong { font-size: 30px; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.next-session__time span { font-size: 13px; color: var(--muted); margin-top: 3px; }
.next-session__body { flex: 1; min-width: 0; }
.next-session__body .eyebrow { color: var(--gold-2); font-size: 12px; }
.next-session__body h3 { font-size: 20px; margin: 2px 0; letter-spacing: -0.02em; }
.next-session__body p { font-size: 13px; color: var(--ink-2); }
.next-session__body p.muted { color: var(--muted); font-size: 12.5px; }
.next-session__actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.next-session--empty { grid-column: 2; background: rgba(255, 255, 255, 0.1); border: 1px dashed rgba(255, 255, 255, 0.2); color: #f2eee3; }
.next-session--empty .icon { width: 30px; height: 30px; color: #c9a45c; }
.next-session--empty h3 { font-size: 18px; }
.next-session--empty p { font-size: 13px; color: rgba(242, 238, 227, 0.82); }
.staff-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.staff-stat {
  background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px;
  display: flex; flex-direction: column; gap: 1px; box-shadow: var(--shadow-sm);
}
.staff-stat span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--faint); }
.staff-stat strong { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.staff-stat small { font-size: 12px; color: var(--muted); }
.staff-grid { align-items: start; }
.staff-side { display: flex; flex-direction: column; gap: 16px; }
.session-list { padding: 0 14px 10px; }
.session-row {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 8px; border-bottom: 1px solid #f1ede3;
  cursor: pointer; border-radius: 8px;
}
.session-row:last-child { border-bottom: none; }
.session-row:hover { background: #fbf9f4; }
.session-time { width: 56px; flex: none; display: flex; flex-direction: column; }
.session-time strong { font-size: 14.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.session-time span { font-size: 12px; color: var(--muted); }
.session-body { flex: 1; min-width: 0; }
.session-title { font-size: 14px; font-weight: 600; }
.session-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.session-note { font-size: 12px; color: var(--gold-2); margin-top: 2px; font-style: italic; }
.session-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.session-list--compact .session-row { padding: 8px; }
.reminder-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; margin-bottom: 14px;
  background: var(--gold-soft); border: 1px solid #e7d6b2; border-radius: 12px;
  color: var(--ink-2);
}
.reminder-banner .icon { color: var(--gold-2); }
.reminder-banner div { flex: 1; display: flex; flex-direction: column; }
.reminder-banner strong { font-size: 14px; }
.reminder-banner span { font-size: 12.5px; color: var(--muted); }
.notification-box {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 18px 16px; color: var(--muted);
}
.notification-box .icon { color: var(--gold-2); flex: none; }
.notification-box div { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.notification-box strong { font-size: 13px; color: var(--ink); }
.notification-box span { font-size: 12px; line-height: 1.45; }

/* schedule */
.schedule-date { display: flex; flex-direction: column; margin-left: 6px; line-height: 1.3; }
.schedule-date strong { font-size: 14px; }
.schedule-date span { font-size: 12px; color: var(--muted); text-transform: capitalize; }
.schedule-page input[type="date"] {
  height: 34px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px;
  background: #fff; font-size: 13px;
}
.schedule-board {
  display: grid; grid-template-columns: repeat(var(--staff-count, 3), minmax(210px, 1fr));
  gap: 13px; overflow-x: auto; padding-bottom: 8px;
}
.sched-col { background: #fff; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; min-width: 210px; }
.sched-col__head { display: flex; align-items: center; gap: 9px; padding: 12px 13px; border-bottom: 1px solid var(--line); }
.sched-color { width: 8px; height: 30px; border-radius: 4px; flex: none; }
.sched-col__head div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.sched-col__head strong { font-size: 13px; font-weight: 650; }
.sched-col__head small { font-size: 12px; color: var(--muted); }
.sched-col__count {
  min-width: 20px; height: 20px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line); font-size: 12px; display: inline-flex; align-items: center; justify-content: center;
}
.sched-col__body { padding: 9px; display: flex; flex-direction: column; gap: 7px; flex: 1; min-height: 160px; }
.sched-card {
  border: 1px solid var(--line); border-left: 3px solid var(--jade);
  border-radius: 9px; padding: 8px 10px; background: #fdfcf8; cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}
.sched-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.sched-card[data-status="in_progress"] { border-left-color: var(--amber); background: #fdf8ed; }
.sched-card[data-status="completed"] { border-left-color: #4b7a5e; background: #f4f8f4; }
.sched-card[data-status="no_show"] { border-left-color: var(--red); background: #fdf4f2; }
.sched-card[data-status="cancelled"] { opacity: 0.55; border-left-color: var(--faint); }
.sched-card__time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sched-card__client { font-size: 13px; font-weight: 650; margin-top: 1px; }
.sched-card__service { font-size: 12px; color: var(--muted); line-height: 1.35; }
.sched-card__foot { margin-top: 5px; }
.sched-card__foot .pill { font-size: 12px; padding: 2px 6px; }
.sched-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; min-height: 80px; color: var(--faint); font-size: 12px;
}
.sched-empty .icon { width: 16px; height: 16px; }

/* staff week */
.week-board { display: grid; grid-template-columns: repeat(7, minmax(158px, 1fr)); gap: 11px; overflow-x: auto; padding-bottom: 8px; }
.week-day { background: #fff; border: 1px solid var(--line); border-radius: 13px; min-width: 158px; overflow: hidden; }
.week-day.is-today { border-color: rgba(15, 93, 78, 0.5); box-shadow: 0 0 0 2px rgba(15, 93, 78, 0.08); }
.week-day__head { padding: 10px 11px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; background: #fbf9f4; }
.week-day__weekday { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); width: 100%; }
.week-day__head strong { font-size: 13px; }
.week-day__head .pill { font-size: 12px; padding: 1px 5px; }
.week-day__count { margin-left: auto; font-size: 12px; color: var(--muted); }
.week-day__body { padding: 7px; display: flex; flex-direction: column; gap: 6px; min-height: 90px; }
.week-day__empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 16px 0; color: var(--faint); font-size: 12px; }
.week-day__empty .icon { width: 14px; height: 14px; }
.week-appt { border-radius: 8px; background: var(--surface-2); border: 1px solid #efeadd; padding: 7px 8px; cursor: pointer; display: grid; grid-template-columns: 44px 1fr; gap: 6px; }
.week-appt:hover { border-color: var(--line-2); }
.week-appt__time { font-size: 12px; font-weight: 650; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.week-appt__time span { font-size: 12px; color: var(--muted); font-weight: 400; }
.week-appt__body { min-width: 0; display: flex; flex-direction: column; }
.week-appt__body strong { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week-appt__body span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week-appt__body small { font-size: 12px; color: var(--faint); }
.week-appt__status { grid-column: 1 / -1; }
.week-appt__status .pill { font-size: 12px; padding: 1px 5px; }

/* reminders */
.reminder-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 22px; margin-bottom: 16px;
  border: 1px solid #ecdfc2; border-radius: 18px;
  background: linear-gradient(155deg, #fffdf8 30%, #faf1dd 100%);
}
.reminder-hero.is-on { border-color: #cfe2d8; background: linear-gradient(155deg, #fbfdfb 30%, #eaf3ee 100%); }
.reminder-hero__icon {
  width: 48px; height: 48px; border-radius: 14px; flex: none;
  background: #fff; border: 1px solid #ecdfc2; color: var(--gold-2);
  display: flex; align-items: center; justify-content: center;
}
.reminder-hero.is-on .reminder-hero__icon { border-color: #cfe2d8; color: var(--jade); }
.reminder-hero__body { flex: 1; }
.reminder-hero__body h2 { font-size: 19px; letter-spacing: -0.02em; }
.reminder-hero__body p { font-size: 13px; color: var(--muted); max-width: 600px; margin-top: 3px; }
.reminder-hero__action { flex: none; }
.reminder-list { padding: 0 14px 10px; }
.reminder-item { display: flex; align-items: center; gap: 12px; padding: 11px 8px; border-bottom: 1px solid #f1ede3; cursor: pointer; }
.reminder-item:last-child { border-bottom: none; }
.reminder-item:hover { background: #fbf9f4; border-radius: 8px; }
.reminder-item__date { width: 54px; flex: none; display: flex; flex-direction: column; }
.reminder-item__date strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.reminder-item__date span { font-size: 12px; color: var(--muted); }
.reminder-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.reminder-item__body strong { font-size: 13px; }
.reminder-item__body span { font-size: 12px; color: var(--muted); }
.reminder-item__side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.countdown { font-size: 12px; color: var(--gold-2); }
.settings-form { padding: 0 20px 18px; display: flex; align-items: flex-end; gap: 10px; }
.settings-form .field { flex: 1; }
.settings-form .field label { font-size: 12px; }

/* appointment */
.appt-hero {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 18px; margin-bottom: 16px;
  background: var(--surface-2); border: 1px solid #efeadd; border-radius: 14px;
}
.appt-time { display: flex; flex-direction: column; align-items: flex-start; min-width: 72px; }
.appt-time strong { font-size: 27px; font-weight: 650; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.appt-time span { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.appt-hero-main { flex: 1; }
.appt-hero-main h3 { font-size: 18px; letter-spacing: -0.02em; }
.appt-hero-main p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.appt-hero-status { margin-left: auto; }
.client-brief { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.client-brief > div { background: var(--surface-2); border: 1px solid #f0ece1; border-radius: 9px; padding: 9px 11px; display: flex; flex-direction: column; gap: 1px; }

@media (max-width: 1100px) {
  .staff-hero { grid-template-columns: 1fr; }
  .next-session--empty { grid-column: 1; }
}
@media (max-width: 860px) {
  .staff-stats { grid-template-columns: 1fr 1fr; }
  .week-board { grid-template-columns: 1fr; }
  .week-day__body { min-height: 0; }
  .schedule-board { grid-template-columns: repeat(var(--staff-count, 2), minmax(220px, 1fr)); }
  .client-brief { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .staff-hero { padding: 18px; }
  .next-session { flex-direction: column; align-items: flex-start; gap: 10px; }
  .next-session__actions { flex-direction: row; width: 100%; }
  .staff-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .staff-stat { padding: 10px 12px; }
  .reminder-hero { flex-direction: column; align-items: flex-start; }
  .reminder-hero__action { width: 100%; }
  .appt-hero { flex-wrap: wrap; }
  .appt-hero-status { margin-left: 0; }
  .settings-form { flex-direction: column; align-items: stretch; }
  .schedule-board { grid-template-columns: 1fr; }
  .sched-col { min-width: 0; }
}

/* ------------------------------------------------------------------ */
/* responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 1240px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-tiles--5 { grid-template-columns: repeat(3, 1fr); }
  .view { padding: 20px 24px 40px; }
  .topbar { padding: 14px 24px; }
}

@media (max-width: 1120px) {
  .sidebar { width: 78px; padding: 20px 10px 12px; }
  .sidebar__brand { justify-content: center; padding: 0 0 20px; }
  .brand-text, .nav-item span, .nav-section, .clinic-chip, .user-card__text { display: none; }
  .nav-item { justify-content: center; padding: 0; height: 42px; }
  .nav-item.is-active::before { left: -10px; }
  .sidebar__nav { padding-top: 4px; }
  .user-card { justify-content: center; padding: 8px 0 2px; }
  .user-card__logout { margin-left: 0; position: absolute; right: 6px; bottom: 8px; }
  .sidebar__foot { position: relative; }
  .main { margin-left: 78px; }
  .grid-2--wide { grid-template-columns: 1fr; }
  .summary-tiles--5 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .sidebar {
    width: 264px; padding: 20px 14px 12px;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 30px 0 60px -30px rgba(0, 0, 0, 0.4);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .sidebar__brand { justify-content: flex-start; padding: 2px 8px 22px; }
  body.nav-open .brand-text, body.nav-open .nav-item span,
  body.nav-open .nav-section, body.nav-open .clinic-chip,
  body.nav-open .user-card__text { display: flex; }
  body.nav-open .nav-section { display: block; }
  body.nav-open .clinic-chip { display: flex; }
  body.nav-open .nav-item { justify-content: flex-start; padding: 0 11px; }
  body.nav-open .user-card { justify-content: flex-start; padding: 8px 8px 6px; }
  body.nav-open .user-card__logout { position: static; margin-left: auto; }
  body.nav-open .sidebar-overlay {
    display: block; position: fixed; inset: 0; z-index: 35;
    background: rgba(9, 28, 24, 0.42);
    animation: fadeIn 0.18s;
  }
  .main { margin-left: 0; }
  .burger { display: inline-flex; margin-left: -4px; }
  .topbar { padding: 12px 18px; }
  .view { padding: 18px 18px 36px; }
  .grid-2 { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); gap: 10px 0; }
  .summary-strip > div:nth-child(3) { border-left: none; }
  .summary-tiles { grid-template-columns: repeat(2, 1fr); }
  .table { font-size: 14px; }
  .table th, .table td { padding: 10px 11px; }
  .search input { width: 150px; }
  .topbar__sub { display: none; }
  .date-chip { display: none; }
  .clinic-select-top { display: none; }
  .clinic-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { flex-direction: row; flex-wrap: wrap; }
  .detail-side .side-block { flex: 1 1 160px; }
}

@media (max-width: 620px) {
  .kpi-grid, .summary-tiles, .summary-tiles--5 { grid-template-columns: 1fr 1fr; }
  .kpi { min-height: 128px; padding: 14px 15px; }
  .kpi__value { font-size: 22px; }
  .kpi__meta { padding-right: 0; }
  .kpi__spark { display: none; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-strip > div { padding: 0 14px; }
  .summary-strip strong { font-size: 16px; }
  .topbar h1 { font-size: 17px; }
  .topbar__right .btn span { display: none; }
  .topbar__right .btn { width: 38px; padding: 0; }
  .toolbar { align-items: flex-start; }
  .toolbar__right { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .segmented { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .seg { padding: 0 9px; }
  .card__head { padding: 15px 16px 12px; }
  .chart-foot { gap: 24px; padding: 12px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .new-client { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal, .modal--wide, .modal--sm { width: 100%; max-height: 94vh; border-radius: 18px 18px 0 0; }
  .modal__head { padding: 16px 18px 12px; }
  .modal__body { padding: 14px 18px 18px; }
  .modal__foot { padding: 12px 18px; }
  .visit-detail .summary-tiles { grid-template-columns: 1fr; }
  .summary-tiles { grid-template-columns: 1fr 1fr; }
  .service-option { grid-template-columns: 20px minmax(0, 1fr) 70px 46px; }
  .service-rate { display: none; }
  .payment-summary { grid-template-columns: 1fr; gap: 8px; }
  .login { grid-template-columns: 1fr; overflow-x: hidden; }
  .login__aside { padding: 26px 24px 24px; min-height: 0; }
  .login__pitch { margin: 26px 0 8px; padding: 0; }
  .login__pitch h1 { font-size: 24px; margin-bottom: 10px; overflow-wrap: anywhere; }
  .login__lead, .login__features, .login__stats { display: none; }
  .login__aside-foot { display: none; }
  .login__watermark { font-size: 150px; bottom: -34px; }
  .login__panel { padding: 24px 16px 44px; flex-direction: column; justify-content: flex-start; }
  .login-card { padding: 24px 20px 20px; border-radius: 18px; max-width: none; }
  .demo-grid { grid-template-columns: 1fr; }
  .login-legal { position: static; margin: 16px 0 0; text-align: center; }
  .detail-side { flex-direction: column; }
  .foot-right { width: 100%; margin-left: 0; }
  .foot-right .btn { flex: 1; }
  .card--chart .card__head { flex-direction: column; align-items: flex-start; gap: 7px; }
  .foot-total { order: -1; width: 100%; margin: 0 0 6px; padding: 0; justify-content: flex-start; gap: 28px; }
}

@media (max-width: 420px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { min-height: 118px; padding: 12px 13px; }
  .kpi__value { font-size: 19px; }
  .kpi__label { font-size: 12px; }
  .kpi__meta { font-size: 12px; }
  .summary-tiles, .summary-tiles--5, .summary-strip { grid-template-columns: 1fr; }
  .summary-strip > div { border-left: none; border-top: 1px solid #f0ece1; padding: 8px 16px; }
  .summary-strip > div:first-child { border-top: none; }
  .view { padding: 14px 12px 30px; }
}

/* incoming agency request alert */
.request-alert {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%);
  z-index: 220; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 14px; max-width: min(680px, calc(100% - 24px));
  background: #fffaf0; border: 1px solid #d9b56a; border-radius: 13px;
  box-shadow: 0 18px 45px -18px rgba(9, 28, 24, 0.5);
  animation: requestFlash 1.1s ease-in-out infinite;
}
.request-alert__pulse { width: 9px; height: 9px; border-radius: 50%; background: #c58a2a; box-shadow: 0 0 0 0 rgba(197, 138, 42, 0.5); animation: requestPulse 1.1s infinite; flex: none; }
.request-alert__text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.request-alert__text strong { font-size: 13px; }
.request-alert__text span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.request-alert__close { border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 4px; }
.route-block .btn { width: 100%; margin-top: 5px; }
.route-block select { margin-top: 4px; }
.request-mini { color: var(--gold-2); font-weight: 650; }
@keyframes requestFlash {
  0%, 100% { border-color: #d9b56a; box-shadow: 0 18px 45px -18px rgba(9,28,24,.5), 0 0 0 0 rgba(217,181,106,.35); }
  50% { border-color: #0f5d4e; box-shadow: 0 18px 45px -18px rgba(9,28,24,.5), 0 0 0 5px rgba(15,93,78,.12); }
}
@keyframes requestPulse {
  0% { box-shadow: 0 0 0 0 rgba(197,138,42,.55); }
  70% { box-shadow: 0 0 0 8px rgba(197,138,42,0); }
  100% { box-shadow: 0 0 0 0 rgba(197,138,42,0); }
}

/* Readability and consistent action hierarchy. */
.kpi__label, .tile__label, .table th, .nav-section, .side-label, .section-head h3,
.topbar__crumb, .staff-stat span, .summary-strip span, .chart-foot span,
.form-total span, .foot-total span, .payment-summary span, .week-day__weekday {
  text-transform: none;
  letter-spacing: 0;
}
.topbar h1 { font-size: 24px; }
.card__head h2 { font-size: 17px; line-height: 1.4; }
.kpi__label, .tile__label, .staff-stat span { font-size: 13px; font-weight: 550; }
.kpi__value { font-size: 30px; margin-top: 10px; }
.table, .table--compact td { font-size: 14px; }
.table th { font-size: 12px; background: var(--surface-2); color: var(--muted); }
.table td { border-bottom-color: var(--line); }
.table .cell-sub { font-size: 12.5px; }
.field input, .field select, .field textarea { font-size: 15px; min-height: 42px; }
.field label { font-size: 13px; }
.field__hint { font-size: 12px; }
.nav-item { min-height: 42px; font-size: 14px; }
.nav-section { font-size: 12px; margin-top: 18px; }
.brand-text span { letter-spacing: 0.02em; }
.icon-btn { min-width: 38px; min-height: 38px; }
.btn[data-status="no_show"] { background: var(--surface); border-color: var(--line-2); color: var(--ink-2); box-shadow: none; }
.btn[data-status="no_show"]:hover { background: var(--surface-2); }
.user-card__logout { min-width: 34px; min-height: 34px; }
.btn:focus-visible, .icon-btn:focus-visible, .nav-item:focus-visible, .link:focus-visible,
.work-row:focus-visible, .agenda__item:focus-visible {
  outline: 3px solid var(--jade);
  outline-offset: 3px;
}
.sidebar :focus-visible { outline-color: #e9cc8e; }
.pill--unpaid, .pill--muted { color: var(--muted); }
.sched-card[data-status="cancelled"] { opacity: 1; background: var(--surface-2); }
.sched-card__service, .week-appt__body span { overflow-wrap: anywhere; }
.week-appt { grid-template-columns: 54px minmax(0, 1fr); }
.week-board { grid-template-columns: repeat(7, minmax(190px, 1fr)); }
.service-option { min-height: 68px; }
.service-main small { line-height: 1.5; }
.request-alert { top: auto; bottom: 24px; left: auto; right: 24px; transform: none; max-width: min(560px, calc(100% - 32px)); animation: none; }
.request-alert__close { min-width: 34px; min-height: 34px; }
html[lang="zh-CN"] body { line-height: 1.65; }
html[lang="zh-CN"] .table, html[lang="zh-CN"] .table--compact td { font-size: 15px; }
html[lang="zh-CN"] .nav-item { font-size: 15px; }

/* Administrators start with requests and today's appointments. */
.workday { margin-bottom: 26px; }
.workday__heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.workday__heading h2 { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.workday__heading p { font-size: 13px; color: var(--muted); margin-top: 3px; }
.workday__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.work-card { min-width: 0; }
.work-card--incoming { border-top: 3px solid var(--gold); }
.work-card .card__head { padding-bottom: 12px; }
.work-card__title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.work-card__title .icon { color: var(--jade); }
.work-count { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 7px;
  background: var(--jade-soft); color: var(--jade-2); font-size: 13px; font-weight: 650; border-radius: 8px; }
.work-card--incoming .work-count { background: var(--gold-soft); color: var(--gold-2); }
.work-list { padding: 0 12px 12px; }
.work-row { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; text-align: left;
  padding: 13px 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; border-radius: 8px; }
.work-row:last-child { border-bottom-color: transparent; }
.work-row:hover { background: var(--surface-2); }
.work-row__body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.work-row__body strong { font-size: 15px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.work-row__body span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.work-row__body .work-row__contact { color: var(--ink-2); }
.work-row__arrow { color: var(--jade); width: 17px; height: 17px; }
.work-row__time { display: flex; flex-direction: column; gap: 3px; flex: none; min-width: 52px; font-variant-numeric: tabular-nums; }
.work-row__time strong { font-size: 16px; font-weight: 650; }
.work-row__time span { font-size: 12px; color: var(--muted); }
.work-row .pill { white-space: normal; text-align: center; flex: none; max-width: 112px; }
.work-empty { padding: 18px 22px 28px; display: flex; align-items: flex-start; gap: 12px; }
.work-empty > .icon { color: var(--jade); margin-top: 3px; }
.work-empty strong { display: block; font-size: 15px; font-weight: 600; }
.work-empty p { color: var(--muted); font-size: 13px; margin-top: 5px; }
.work-card__more { display: block; padding: 12px 22px; border-top: 1px solid var(--line); color: var(--jade); font-weight: 600; font-size: 13px; }
.dashboard-section-title { font-size: 18px; font-weight: 650; margin-bottom: 14px; }

@media (max-width: 1120px) {
  .workday__grid { grid-template-columns: 1fr 1fr; }
  .topbar h1 { font-size: 22px; }
}
@media (max-width: 860px) {
  .week-board { grid-template-columns: 1fr; }
  .workday__grid { grid-template-columns: 1fr; }
  .workday__heading { align-items: flex-start; }
  .work-row { padding: 14px 8px; }
  .card__head { flex-wrap: wrap; }
  .notification-box { flex-wrap: wrap; }
  .next-session__actions { flex-wrap: wrap; }
}
@media (max-width: 620px) {
  .topbar { gap: 10px; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .topbar__right { gap: 6px; }
  .topbar h1 { font-size: 21px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi__value { font-size: 24px; overflow-wrap: anywhere; }
  .kpi__label { font-size: 12px; }
  .kpi__meta { font-size: 12px; }
  .kpi__top { align-items: flex-start; }
  .workday__heading h2 { font-size: 21px; }
  .workday__heading .btn { padding: 0 10px; }
  .work-row .pill { max-width: 94px; font-size: 12px; }
  [data-work-appointment].work-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: start; row-gap: 8px; }
  [data-work-appointment] .work-row__time { grid-row: 1 / 3; }
  [data-work-appointment] .pill { grid-column: 2; max-width: none; width: fit-content; white-space: nowrap; }
  .service-option { grid-template-columns: 22px minmax(0, 1fr) 76px 48px; column-gap: 8px; }
  .service-price { white-space: normal; }
  .service-main strong { font-size: 14px; }
  .service-main small { font-size: 12px; }
  .modal__foot { flex-wrap: wrap; }
  .modal__foot .foot-right { flex-wrap: wrap; }
  .modal__foot .btn { min-height: 42px; }
  .detail-side .side-block { flex: 0 0 auto; min-height: 0; }
  .session-row { gap: 10px; flex-wrap: wrap; }
  .session-body { min-width: 150px; }
  .session-side { flex-direction: row; flex-wrap: wrap; margin-left: auto; align-items: center; }
  .login__panel { background: var(--bg); }
  .request-alert { bottom: 12px; right: 12px; max-width: calc(100% - 24px); gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Access applications reuse the CRM palette and form components. */
.registration-page { max-width: 1180px; margin: 24px auto 56px; padding: 0 24px; }
.registration-header, .registration-brand { display: flex; align-items: center; gap: 14px; }
.registration-header { justify-content: space-between; margin-bottom: 30px; }
.registration-brand { color: var(--ink); text-decoration: none; }
.registration-brand img { width: 48px; height: 48px; }
.registration-brand strong, .registration-brand small { display: block; }
.registration-brand small { color: var(--muted); margin-top: 3px; }
.registration-intro { margin-bottom: 22px; }
.registration-intro, .registration-form-wrap { max-width: 760px; margin-left: auto; margin-right: auto; }
.registration-intro h1 { margin-bottom: 8px; }
.registration-intro p { color: var(--muted); }
.registration-columns { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; gap: 20px; }
.registration-card { padding: 22px; margin-bottom: 20px; }
.registration-card .card__head { padding: 0 0 18px; }
.registration-card > .field { margin-bottom: 14px; }
.registration-messages { display: grid; gap: 12px; margin-bottom: 20px; max-height: 350px; overflow-y: auto; }
.registration-message { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow-wrap: anywhere; }
.registration-message--reviewer { border-left: 3px solid #b58a3a; }
.registration-message p, .registration-pre { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 5px; }
.registration-link { display: flex; gap: 10px; }
.registration-link input { min-width: 0; flex: 1; }
.registration-review { display: grid; gap: 24px; }
.registration-login-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 800px) { .registration-columns { grid-template-columns: 1fr; } .registration-page { padding: 0 16px; } .registration-header { flex-wrap: wrap; } }

/* Product identity stays primary; the developer credit is a quiet footer. */
.brand-credit { padding: 16px 24px 22px; text-align: center; color: var(--muted); font-size: 12px; }
.brand-credit__content { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.brand-credit img { display: block; width: 80px; height: 20px; object-fit: contain; }
.login__panel .login-legal { position: static; margin: 24px 0 0; }
.login__panel { flex-direction: column; }
.login__panel .brand-credit { padding-bottom: 0; }

/* Keep entered names and notes intact when the interface language changes. */
span[data-user-text][translate="no"] { font: inherit; color: inherit; }
.list-pager { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:14px 18px; color:var(--muted); font-size:13px; }
.list-pager > div { display:flex; gap:8px; }
.staff-form-sections { position:sticky; top:-22px; z-index:2; display:flex; gap:8px; flex-wrap:wrap; padding:12px 0; margin:-12px 0 12px; background:var(--surface); border-bottom:1px solid var(--line); }
.staff-procedure-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.staff-procedure-toolbar .check-row { margin:0; font-size:13px; }
[data-staff-anchor], [data-page-prev], [data-page-next] { scroll-margin-top:70px; }
#sf-name, #sf-procedures-title, #sf-week-title { scroll-margin-top:80px; }
.staff-procedure input[aria-invalid="true"] { border-color:var(--danger); outline:2px solid var(--danger); }
.staff-table th:last-child, .staff-table .row-actions { position:sticky; right:0; background:var(--surface); box-shadow:-8px 0 12px -10px #425c52; z-index:2; }
.staff-table th:last-child { background:var(--surface-2); z-index:3; }
.staff-table th:first-child, .staff-table td:first-child { position:sticky; left:0; background:var(--surface); z-index:1; }
.staff-table td:first-child, .staff-table th:first-child { min-width:185px; }
.staff-table .row-actions > * { vertical-align:middle; }
.staff-table th:first-child { background:var(--surface-2); z-index:3; }
.dashboard-card-actions { display:flex; align-items:center; gap:8px; }
.dashboard-panels { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.dashboard-panels > .card { min-width:0; }
.dashboard-recent { padding:0 14px 10px; }
.dashboard-record { display:flex; width:100%; text-align:left; align-items:center; justify-content:space-between; gap:12px; padding:12px 4px; background:transparent; border:0; border-bottom:1px solid var(--line); }
.dashboard-record:last-child { border-bottom:0; }
.dashboard-record:hover { background:var(--surface-2); }
.dashboard-record__body, .dashboard-record__amount { display:flex; flex-direction:column; gap:3px; min-width:0; }
.dashboard-record__body strong { font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dashboard-record__body > span, .dashboard-record__amount > span { font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dashboard-record__amount { text-align:right; flex:none; }
.dashboard-record__amount strong { font-size:14px; }
.dashboard-record:focus-visible { outline:3px solid var(--jade); outline-offset:-3px; }

/* A desktop overview uses bounded previews; every full list remains one click away. */
@media (min-width:1100px) and (min-height:650px) {
  body.dashboard-mode .main { height:100dvh; min-height:0; }
  body.dashboard-mode .topbar { flex-shrink:0; padding:12px 20px; }
  body.dashboard-mode .view { display:flex; flex:1; min-height:0; padding:12px 20px 8px; }
  body.dashboard-mode .route-content { display:flex; width:100%; min-height:0; }
  .dashboard-page { display:grid; grid-template-rows:118px minmax(0,1fr); gap:12px; width:100%; min-height:0; }
  .dashboard-page .kpi-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:0; }
  .dashboard-page .kpi { min-height:0; padding:10px 13px; }
  .dashboard-page .kpi__top { gap:6px; }
  .dashboard-page .kpi__label { font-size:13px; }
  .dashboard-page .kpi__icon { width:24px; height:24px; flex:none; }
  .dashboard-page .kpi__value { font-size:26px; margin:5px 0 4px; }
  .dashboard-page .kpi__meta { font-size:12px; line-height:1.35; }
  .dashboard-page .kpi__spark { display:none; }
  .dashboard-panels { grid-template-rows:repeat(2,minmax(0,1fr)); gap:12px; min-height:0; }
  .dashboard-panels--operator { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .dashboard-panels > .card { min-height:0; display:flex; flex-direction:column; }
  .dashboard-page .card__head { flex-shrink:0; padding:11px 14px 8px; gap:8px; flex-wrap:nowrap; }
  .dashboard-page .card__head h2 { font-size:15px; line-height:1.35; }
  .dashboard-page .card__head p { font-size:12px; }
  .dashboard-page .work-card__title { gap:6px; }
  .dashboard-page .work-card__title > .icon { width:16px; height:16px; flex:none; }
  .dashboard-page .work-count { min-width:24px; height:24px; font-size:12px; }
  .dashboard-page .icon-btn { min-width:28px; min-height:28px; width:28px; height:28px; }
  .dashboard-page .work-list { padding:0 8px 6px; }
  .dashboard-page .work-row { gap:8px; padding:7px 6px; }
  .dashboard-page .work-row__body { gap:1px; }
  .dashboard-page .work-row__body strong { font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .dashboard-page .work-row__body > span { font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .dashboard-page .work-row__time { min-width:42px; }
  .dashboard-page .work-row__time strong { font-size:14px; }
  .dashboard-page .work-row .pill { max-width:80px; font-size:11px; padding:3px 6px; }
  .dashboard-page .empty { flex:1; min-height:0; padding:12px; }
  .dashboard-page .empty__icon { width:36px; height:36px; margin-bottom:10px; }
  .dashboard-page .empty h3 { font-size:14px; }
  .dashboard-page .empty p { font-size:12px; max-width:310px; margin-bottom:0; }
  .dashboard-page .work-empty { padding:16px 14px; }
  .dashboard-page .work-empty strong { font-size:14px; }
  .dashboard-page .work-empty p { font-size:12px; }
  .dashboard-page .card--chart .card__head { flex-wrap:wrap; gap:5px; }
  .dashboard-page .legend { gap:10px; }
  .dashboard-page .legend span { font-size:11px; }
  .dashboard-page .chart-wrap { min-height:0; padding:0 8px; }
  .dashboard-page .chart { height:100%; max-height:155px; }
  .dashboard-page .chart-foot { gap:12px; justify-content:space-between; padding:7px 14px; margin:0; flex-shrink:0; }
  .dashboard-page .chart-foot span { font-size:11px; }
  .dashboard-page .chart-foot strong { font-size:14px; }
  .dashboard-page .rank-list { padding:0 12px 6px; }
  .dashboard-page .rank { padding:8px 0; gap:8px; }
  .dashboard-page .rank__body { gap:3px; }
  .dashboard-page .rank__row strong, .dashboard-page .rank__value { font-size:13px; }
  .dashboard-page .rank__sub { font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .dashboard-page .agenda { padding:0 10px 6px; }
  .dashboard-page .agenda__item { padding:8px 3px; gap:8px; }
  .dashboard-page .date-badge { width:36px; height:40px; flex:none; }
  .dashboard-page .date-badge strong { font-size:17px; }
  .dashboard-page .agenda__body strong { font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .dashboard-page .agenda__body > span { font-size:12px; }
  .dashboard-page .agenda__right .pill { font-size:11px; padding:3px 6px; }
  .dashboard-page .agenda__when { font-size:11px; }
  .dashboard-page .dashboard-record { padding:9px 2px; }
  .dashboard-page .dashboard-recent { padding:0 12px 6px; }
  body.dashboard-mode .brand-credit { flex-shrink:0; padding:5px 20px 8px; }
  body.dashboard-mode .staff-page { flex:1; min-height:0; gap:10px; }
  body.dashboard-mode .staff-hero { flex-shrink:0; padding:14px 18px; gap:14px; margin:0; }
  body.dashboard-mode .staff-hero__intro h2 { font-size:22px; }
  body.dashboard-mode .next-session { padding:12px 14px; gap:12px; }
  body.dashboard-mode .next-session__time strong { font-size:25px; }
  body.dashboard-mode .staff-stats { flex-shrink:0; margin:0; }
  body.dashboard-mode .staff-stat { padding:8px 13px; }
  body.dashboard-mode .staff-stat strong { font-size:22px; }
  body.dashboard-mode .staff-grid { flex:1; min-height:0; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch; margin:0; gap:12px; }
  body.dashboard-mode .staff-side { display:contents; }
  body.dashboard-mode .staff-grid .card { margin:0; min-height:0; display:flex; flex-direction:column; }
  body.dashboard-mode .staff-grid .card__head { padding:12px 14px 8px; gap:8px; }
  body.dashboard-mode .staff-grid .card__head h2 { font-size:16px; }
  body.dashboard-mode .staff-grid .card__head p { font-size:12px; }
  body.dashboard-mode .staff-grid .empty { min-height:0; padding:12px; }
  body.dashboard-mode .staff-grid .empty__icon { width:36px; height:36px; margin-bottom:10px; }
  body.dashboard-mode .staff-grid .empty h3 { font-size:14px; }
  body.dashboard-mode .staff-grid .empty p { font-size:12px; margin-bottom:0; }
  body.dashboard-mode .staff-grid .session-list { padding:0 10px 8px; }
  body.dashboard-mode .staff-grid .session-row { padding:8px 2px; gap:8px; }
  body.dashboard-mode .staff-grid .session-time { width:42px; }
  body.dashboard-mode .staff-grid .session-title, body.dashboard-mode .staff-grid .session-note { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  body.dashboard-mode .staff-grid .session-sub { font-size:12px; line-height:1.4; }
  body.dashboard-mode .staff-grid .session-side .pill { font-size:11px; padding:3px 6px; }
  body.dashboard-mode .staff-grid .notification-box { padding:5px 14px 12px; flex-wrap:wrap; }
  body.dashboard-mode .staff-grid .notification-box > div { flex-basis:calc(100% - 40px); }
  body.dashboard-mode .staff-grid .notification-box > a { margin-left:30px; }
  body.dashboard-mode .reminder-banner { flex-shrink:0; margin:0; padding:6px 12px; }
}
@media (min-width:1100px) and (max-height:850px) {
  body.dashboard-mode .sidebar__brand { padding-bottom:12px; }
  body.dashboard-mode .nav-section { margin:10px 11px 4px; }
  body.dashboard-mode .nav-item { height:32px; min-height:32px; }
}
@media (min-width:1100px) and (max-height:750px) {
  body.dashboard-mode .nav-section { display:none; }
  body.dashboard-mode .sidebar__nav { padding-top:8px; }
}
@media (min-width:1100px) and (min-height:650px) and (max-height:699px) {
  /* A short browser window shows one preview; the count and full-list link stay visible. */
  .dashboard-page .work-row:nth-child(n+2), .dashboard-page .rank:nth-child(n+2),
  .dashboard-page .agenda__item:nth-child(n+2), .dashboard-page .dashboard-record:nth-child(n+2),
  body.dashboard-mode .staff-grid .session-row:nth-child(n+2) { display:none; }
  .dashboard-page .empty__icon, body.dashboard-mode .staff-grid .empty__icon { display:none; }
}
@media (max-width:1099px), (max-height:649px) {
  .dashboard-panels { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:740px) {
  .dashboard-panels { grid-template-columns:1fr; }
}

/* The sign-in screen adapts to the usable window, including Windows display scaling. */
.login { min-height:100dvh; grid-template-columns:minmax(0,1.06fr) minmax(0,.94fr); }
.login__aside { padding:clamp(24px,4vh,40px) clamp(26px,3.5vw,54px); }
.login__logo { width:clamp(104px,10vw,160px); }
.login__brand { gap:18px; }
.login__pitch { padding:24px 0; margin:auto 0; }
.login__pitch h1 { font-size:clamp(28px,2.6vw,40px); line-height:1.16; margin-bottom:14px; }
.login__lead { font-size:14px; line-height:1.55; }
.login__features { gap:10px; margin-top:20px; }
.login__features li { align-items:center; }
.login__features strong { margin:0; }
.login__features .feature-ic { width:26px; height:26px; }
.login__aside-foot { margin-top:10px; font-size:12px; line-height:1.5; letter-spacing:0; }
.login__panel { padding:22px 28px; flex-direction:column; }
.login__tools { display:flex; justify-content:flex-end; width:100%; max-width:440px; margin-bottom:10px; }
.login__tools .login-lang { position:static; height:32px; }
.login-card { max-width:440px; padding:24px; }
.login-card__head { margin-bottom:16px; }
.login-card__head .eyebrow { margin-bottom:8px; }
.login-card__head h2 { line-height:1.3; margin-bottom:4px; }
.login-card__head > p:not(.eyebrow) { line-height:1.45; }
.login-card .field { margin-bottom:12px; }
.login-card .field label { line-height:1.4; }
.login-card .field input { height:42px; }
.login-card .login-divider { margin:16px 0 10px; line-height:1.4; }
.login-card .registration-login-links { gap:8px; }
.login-card .registration-login-links .btn { padding:0 9px; font-size:13px; }
.login-demo-toggle { width:100%; margin-top:14px; color:var(--muted); }
.login-demo-toggle .icon:last-child { margin-left:auto; }
.login__panel .login-legal { max-width:440px; margin:12px 0 0; padding:0; font-size:12px; line-height:1.4; letter-spacing:0; }
.login__panel .brand-credit { padding:8px 0 0; }
.schedule-complex { margin-top:12px; padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.schedule-complex summary { cursor:pointer; color:var(--jade); font-size:13px; font-weight:600; }
.schedule-complex .field__hint { margin:10px 0; max-width:660px; }
.schedule-complex .schedule-add-shift { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin:0; }
.schedule-complex .select-sm { min-width:150px; }
@media (min-width:861px) and (max-height:680px) {
  .login__aside { padding-top:22px; padding-bottom:22px; }
  .login__logo { width:96px; }
  .login__pitch { padding:16px 0; }
  .login__pitch h1 { font-size:30px; }
  .login__panel { padding:12px 24px; }
  .login-card { padding:20px; }
  .login-card__head .eyebrow { display:none; }
  .login__panel .login-legal { display:none; }
}
@media (min-width:861px) and (max-height:600px) {
  .login__features { display:none; }
  .login__panel { padding:10px 22px; }
  .login-card { padding:18px; }
  .login-card__head { margin-bottom:12px; }
  .login-card__head > p:not(.eyebrow) { display:none; }
  .login-card .field { margin-bottom:10px; }
  .login-card .login-divider { display:none; }
  .login-card .registration-login-links { margin-top:14px; }
  .login-demo-toggle { margin-top:10px; }
}
@media (max-width:860px) {
  .login { grid-template-columns:1fr; }
  .login__aside { padding:12px 20px; }
  .login__brand { justify-content:center; gap:14px; }
  .login__logo { width:58px; }
  .login__pitch, .login__aside-foot { display:none; }
  .login__panel { padding:12px 20px 18px; }
  .login__tools, .login-card, .login__panel .login-legal { max-width:440px; }
  .login-card__head .eyebrow, .login__panel .login-legal { display:none; }
}

/* Phone layouts keep records and actions readable without shrinking the desktop UI. */
.sidebar__close, .mobile-schedule-switch, .mobile-schedule-list, .mobile-timeline-hint, .mobile-finder-toggle, .staff-mobile-nav, .staff-mobile-refresh { display:none; }
.session-open { border:0; background:transparent; text-align:left; padding:0; color:inherit; cursor:pointer; font:inherit; font-weight:650; }
.week-appt { text-align:left; width:100%; color:inherit; font:inherit; }
.schedule-find-body { display:contents; }
.schedule-break-field { min-width:0; }
.schedule-break-field > span { display:none; }
.timeline-shift { background:repeating-linear-gradient(to bottom,rgba(15,93,78,.035) 0,rgba(15,93,78,.035) var(--schedule-line,14px),var(--line) var(--schedule-line,14px),var(--line) var(--schedule-step,15px)),var(--surface); }
.timeline-shift.is-unconfigured { background:repeating-linear-gradient(to bottom,rgba(182,140,54,.04) 0,rgba(182,140,54,.04) var(--schedule-line,14px),var(--line) var(--schedule-line,14px),var(--line) var(--schedule-step,15px)),var(--surface); }
@media (max-width:860px) {
  .staff-mobile-refresh { display:flex; justify-content:flex-end; margin-bottom:10px; }
  .staff-mobile-nav { position:fixed; z-index:25; bottom:0; left:0; right:0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); padding:6px max(4px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left)); background:#fffefa; border-top:1px solid var(--line); box-shadow:0 -4px 20px #123e3210; }
  .staff-mobile-nav a { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; min-height:52px; padding:4px; border-radius:10px; font-size:12px; text-align:center; color:var(--muted); text-decoration:none; line-height:1.3; }
  .staff-mobile-nav a.is-active { background:var(--jade-soft); color:var(--jade); font-weight:700; }
  .staff-mobile-nav .icon { width:21px; height:21px; }
  .shell:has(.staff-mobile-nav) .main { padding-bottom:calc(72px + env(safe-area-inset-bottom)); }
  .session-open { min-height:44px; font-size:16px; line-height:1.4; overflow-wrap:anywhere; }
  .staff-hero { padding:18px 16px; gap:14px; }
  .staff-hero__intro h2 { font-size:23px; }
  .next-session { display:grid; grid-template-columns:66px minmax(0,1fr); padding:14px; gap:12px; }
  .next-session__time { min-width:0; }
  .next-session__time strong { font-size:25px; }
  .next-session__body h3 { font-size:19px; overflow-wrap:anywhere; }
  .next-session__body p { font-size:14px; overflow-wrap:anywhere; }
  .next-session__actions { grid-column:1/-1; flex-direction:row; }
  .next-session__actions .btn { flex:1; min-height:48px; font-size:16px; }
  .session-row { display:grid; grid-template-columns:52px minmax(0,1fr); padding:12px 4px; gap:8px; }
  .session-time { width:auto; }
  .session-time strong { font-size:17px; }
  .session-sub { font-size:14px; line-height:1.6; }
  .session-side { grid-column:2; flex-direction:row; align-items:center; justify-content:space-between; width:100%; gap:8px; }
  .session-side .btn { min-width:96px; font-size:15px; }
  .session-row[data-status="completed"], .week-appt[data-status="completed"] { background:#edf2f8; }
  .session-row[data-status="cancelled"], .session-row[data-status="no_show"], .week-appt[data-status="cancelled"], .week-appt[data-status="no_show"] { background:#f8f0ed; }
  .week-appt { padding:14px; grid-template-columns:52px minmax(0,1fr); min-height:80px; }
  .week-appt__time, .week-appt__body strong { font-size:16px; }
  .week-appt__body span, .week-appt__body small { font-size:14px; white-space:normal; line-height:1.5; }
  .reminder-hero { flex-wrap:wrap; padding:16px; }
  .reminder-hero__body { min-width:180px; }
  .reminder-item { flex-wrap:wrap; }
  .reminder-item__side { flex-direction:row; width:100%; justify-content:flex-end; gap:8px; }
  .main, .view, .route-content, .page { min-width:0; max-width:100%; }
  .topbar { padding:10px max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left)); gap:8px; }
  .topbar__left { flex:1; min-width:0; gap:8px; }
  .topbar__right { gap:6px; }
  .topbar__crumb { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:11px; }
  .topbar h1 { font-size:20px; }
  .topbar__right [data-new-visit] { width:44px; padding:0; }
  .topbar__right [data-new-visit] > span { display:none; }
  .view { padding:16px max(12px,env(safe-area-inset-right)) 24px max(12px,env(safe-area-inset-left)); }
  .btn, .icon-btn, .nav-item, .seg, .login-lang { min-height:44px; }
  .icon-btn { min-width:44px; }
  .btn--xs, .btn--sm { font-size:14px; }
  .field input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .field select, .field textarea,
  .modal input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .modal select,
  .search input, .select, .select-sm, .input-sm { font-size:16px; min-height:44px; max-width:100%; }
  .field textarea { min-height:90px; }
  .field label { line-height:1.45; }
  .field, fieldset, .form-grid > *, .toolbar__left, .toolbar__right { min-width:0; }
  .sidebar { width:min(300px,calc(100vw - 44px)); height:var(--crm-viewport-height,100dvh); padding-top:max(12px,env(safe-area-inset-top)); padding-bottom:max(12px,env(safe-area-inset-bottom)); }
  .sidebar__close { display:flex; position:absolute; top:10px; right:8px; z-index:3; color:#f2eee3; }
  body.nav-open { overflow:hidden; }
  body.nav-open .sidebar__brand { padding:4px 42px 16px 8px; }
  .sidebar__nav { overscroll-behavior:contain; }
  .sidebar .nav-item { height:auto; min-height:44px; }
  .sidebar-overlay { touch-action:none; }
  .modal-backdrop { inset:auto 0; top:var(--crm-viewport-top,0px); height:var(--crm-viewport-height,100dvh); padding:0; align-items:stretch; }
  .modal, .modal--wide, .modal--sm { width:100%; height:100%; max-height:100%; border-radius:0; }
  .modal__head { flex-shrink:0; padding:max(12px,env(safe-area-inset-top)) 14px 10px; gap:8px; }
  .modal__title { font-size:18px; }
  .modal__sub { overflow-wrap:anywhere; }
  .modal__body { flex:1; min-height:0; padding:14px; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
  .modal__foot { flex-shrink:0; display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:10px 14px max(10px,env(safe-area-inset-bottom)); }
  .modal__foot .foot-right { display:flex; width:auto; flex:1; flex-wrap:wrap; gap:8px; margin:0; }
  .modal__foot .foot-right .btn { flex:1 1 125px; }
  .modal__foot > .foot-total { flex-basis:100%; }
  .modal__body input, .modal__body select, .modal__body textarea { scroll-margin-block:16px; }
  .staff-form-sections { top:-14px; margin-top:-14px; padding:10px 0; gap:5px; }
  .staff-form-sections .btn { flex:1; min-width:0; padding:0 6px; font-size:12px; }
  .staff-rate-tools { align-items:stretch; flex-direction:column; }
  .staff-rate-tools .field { max-width:none; }
  .staff-procedure-toolbar { flex-wrap:wrap; }
  .staff-procedure-list { max-height:40dvh; overscroll-behavior:contain; }
  .schedule-services { grid-template-columns:1fr; }
  .schedule-room-row { flex-wrap:wrap; }
  .schedule-room-row > span { min-width:0; flex:1 1 170px; overflow-wrap:anywhere; }
  .schedule-find .availability-list { grid-template-columns:1fr; max-height:340px; }
  .smart-schedule-layout { display:flex; flex-direction:column; }
  .smart-schedule-main, .schedule-find { width:100%; }
  .schedule-find { order:-1; padding:12px; gap:0; }
  .schedule-find > h3 { display:none; }
  .mobile-finder-toggle { display:flex; align-items:center; gap:10px; width:100%; min-height:44px; padding:0; border:0; background:transparent; color:var(--jade); font-weight:650; text-align:left; }
  .mobile-finder-toggle .icon:last-child { margin-left:auto; transform:rotate(90deg); }
  .schedule-find[data-finder-open="true"] .mobile-finder-toggle .icon:last-child { transform:rotate(-90deg); }
  .schedule-find-body { display:none; }
  .schedule-find[data-finder-open="true"] .schedule-find-body { display:grid; gap:12px; padding-top:12px; }
  .schedule-find .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .mobile-schedule-switch { display:flex; width:100%; margin-bottom:12px; }
  .mobile-schedule-switch .seg { flex:1; justify-content:center; }
  [data-mobile-view="list"] .mobile-schedule-list { display:grid; gap:10px; margin-bottom:12px; }
  [data-mobile-view="list"] .schedule-timeline-scroll, [data-mobile-view="list"] .schedule-legend { display:none; }
  [data-mobile-view="board"] .mobile-timeline-hint { display:block; margin:0 0 12px; }
  .schedule-timeline-scroll { max-height:65dvh; min-height:260px; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; touch-action:pan-x pan-y; }
  .schedule-timeline { grid-template-columns:48px repeat(var(--schedule-columns),minmax(210px,1fr)); min-width:calc(48px + var(--schedule-columns) * 210px); grid-template-rows:84px var(--schedule-height); }
  .timeline-header .btn { min-height:44px; }
  .timeline-appointment strong { font-size:14px; }
  .timeline-appointment span, .timeline-appointment.is-compact .timeline-appointment__time { font-size:12px; }
  .mobile-day-session { display:flex; align-items:flex-start; gap:12px; width:100%; min-width:0; text-align:left; border:1px solid var(--appt-border); border-left:4px solid var(--appt-accent); border-radius:12px; padding:14px 12px; background:var(--appt-bg); }
  .mobile-day-time { display:flex; flex-direction:column; gap:4px; flex:none; width:48px; font-variant-numeric:tabular-nums; }
  .mobile-day-time strong { font-size:16px; }
  .mobile-day-time > span { font-size:12px; color:var(--muted); }
  .mobile-day-body { display:flex; flex-direction:column; gap:5px; flex:1; min-width:0; overflow-wrap:anywhere; }
  .mobile-day-body strong { font-size:15px; }
  .mobile-day-body > span { font-size:13px; }
  .mobile-day-body .schedule-status-key { align-self:flex-start; }
  .schedule-status-key { font-size:12px; }
  .schedule-closed-item { width:100%; min-height:44px; flex-wrap:wrap; }
  .toolbar { flex-wrap:wrap; gap:12px; }
  .toolbar__left, .toolbar__right { flex-wrap:wrap; max-width:100%; gap:8px; }
  .search { min-width:0; max-width:100%; }
  .segmented { max-width:100%; min-width:0; -webkit-overflow-scrolling:touch; }
  .availability-person__head { flex-wrap:wrap; }
  .appointment-service { grid-template-columns:1fr; }
  .registration-page { padding:0 14px; margin-top:16px; }
  .registration-header { gap:12px; margin-bottom:20px; }
  .registration-brand { min-width:0; }
  .registration-brand img { width:40px; height:40px; }
  .registration-card { padding:16px; }
  .registration-intro h1 { font-size:25px; line-height:1.25; }
  .registration-link { flex-wrap:wrap; }
  .registration-link input { flex-basis:100%; }
  .registration-message { overflow-wrap:anywhere; }
  .week-board { grid-template-columns:1fr; }
  .next-session__actions { flex-wrap:wrap; }
  .reminder-hero { min-width:0; }
  .brand-credit { padding-bottom:max(16px,env(safe-area-inset-bottom)); }
}
@media (max-width:620px) {
  .date-range { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; min-width:0; width:100%; }
  .date-range > span { display:none; }
  .date-range input { min-width:0; width:100%; }
  .date-range .btn { grid-column:1/-1; }
  .login__aside { padding:10px 16px; }
  .login__brand { justify-content:flex-start; }
  .login__panel { padding:10px 14px max(20px,env(safe-area-inset-bottom)); }
  .login-card { padding:20px 16px; }
  .login-card__head h2 { font-size:23px; }
  .login-card .registration-login-links { grid-template-columns:1fr; }
  .demo-grid { grid-template-columns:1fr; }
  .form-grid { grid-template-columns:1fr; }
  .summary-tiles, .summary-tiles--5, .summary-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .summary-strip > div { padding:8px 10px; }
  .tile { padding:12px; min-width:0; }
  .tile__value { font-size:22px; overflow-wrap:anywhere; }
  .summary-tiles--compact .tile__value { font-size:19px; }
  .page-note { align-items:flex-start; font-size:12px; }
  .page-note .icon { margin-top:3px; }
  .toolbar__right { width:100%; }
  .toolbar__right > .search { flex:1 1 100%; }
  .toolbar__right > select { flex:1; }
  .toolbar-caption { flex-wrap:wrap; }
  .card__head { padding:14px 14px 10px; flex-wrap:wrap; gap:8px; }
  .card__head h2 { font-size:17px; }
  .work-row { padding:12px 5px; }
  .work-empty { padding:14px; }
  .card--chart .chart-wrap { padding:0 6px; }
  .chart-foot { gap:14px; padding:12px 14px; flex-wrap:wrap; }
  .chart-foot span { font-size:12px; }
  .chart-foot strong { font-size:15px; }
  .rank-list { padding:0 14px 12px; }
  .rank__row { flex-wrap:wrap; gap:3px; }
  .rank__row strong { white-space:normal; }
  .agenda__item { gap:8px; }
  .agenda__right { max-width:110px; }
  .agenda__body strong { overflow-wrap:anywhere; }
  .agenda__body > span { white-space:normal; }
  .dashboard-record__body > span { white-space:normal; }
  .dashboard-record__commission-label { display:none; }
  .mobile-table-wrap { overflow:visible; }
  .rates-card .mobile-table-wrap { max-height:none; overflow:visible; }
  .mobile-record-table { display:block; width:100%; min-width:0; max-width:100%; border:0; }
  .mobile-record-table > thead, .mobile-week-table > thead { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  .mobile-record-table > tbody { display:grid; gap:10px; padding:10px; }
  .mobile-record-table > tbody > tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; position:relative; padding:14px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
  .mobile-record-table > tbody > tr > td { display:block; min-width:0!important; width:auto; position:static!important; padding:0!important; border:0!important; background:transparent!important; box-shadow:none!important; text-align:left!important; white-space:normal!important; overflow-wrap:anywhere; font-size:14px; }
  .mobile-record-table td[data-label]:not([data-label=""])::before { content:attr(data-label); display:block; margin-bottom:4px; color:var(--muted); font-size:12px; font-weight:500; line-height:1.35; }
  .mobile-record-table td.mobile-cell-main { grid-column:1/-1; order:-1; padding-right:16px!important; }
  .mobile-record-table td.mobile-cell-wide { grid-column:1/-1; }
  .mobile-record-table td.mobile-cell-main .cell-main { font-size:16px; }
  .mobile-record-table td.row-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:2px; }
  .mobile-record-table .row-actions > * { margin:0; }
  .mobile-record-table td.row-arrow { position:absolute!important; right:12px; top:14px; }
  .mobile-record-table .person { align-items:flex-start; }
  .mobile-record-table .person > div { min-width:0; }
  .mobile-record-table .tag, .mobile-record-table .pill { max-width:100%; white-space:normal; line-height:1.4; }
  .mobile-record-table .pill__dot { flex:none; }
  .mobile-record-table .inline-empty { padding:10px; }
  .mobile-week-wrap { overflow:visible; }
  .mobile-week-table { display:block; width:100%; min-width:0; }
  .mobile-week-table > tbody { display:grid; gap:10px; }
  .mobile-week-table > tbody > tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; position:relative; border:1px solid var(--line); border-radius:12px; padding:12px; }
  .mobile-week-table td { display:block; min-width:0; padding:0!important; border:0!important; }
  .mobile-week-table td:first-child { grid-column:1/-1; padding-right:40px!important; }
  .mobile-week-table td:first-child .check-row { min-height:44px; }
  .mobile-week-table td:nth-child(4) { grid-column:1/-1; }
  .mobile-week-table td:last-child { position:absolute; top:10px; right:8px; }
  .mobile-week-table td:nth-child(2)::before, .mobile-week-table td:nth-child(3)::before { content:attr(data-label); display:block; margin-bottom:5px; font-size:12px; color:var(--muted); }
  .mobile-week-table .time-select { width:100%; min-width:0; }
  .mobile-week-table .time-select select { padding-left:4px; padding-right:2px; }
  .schedule-break-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)) 44px; align-items:end; gap:6px; }
  .schedule-break-field > span { display:block; font-size:11px; line-height:1.3; margin-bottom:4px; color:var(--muted); }
  .schedule-break-row input { min-width:0; }
  .schedule-complex { padding:10px; }
  .schedule-complex summary { min-height:44px; }
  .schedule-complex .schedule-add-shift > * { width:100%; }
  .staff-procedure { grid-template-columns:minmax(0,1fr) 105px; gap:8px; padding:10px 6px; }
  .staff-procedure .check-row { min-height:44px; }
  .staff-procedure-rate label { font-size:11px; }
  .staff-procedure-rate input { min-width:0; }
  .service-option, .service-option:has(.service-final-price) { grid-template-columns:24px minmax(0,1fr) 64px; gap:8px; padding:12px 8px; }
  .service-check { grid-column:1; grid-row:1; width:22px; height:22px; }
  .service-main { grid-column:2/4; grid-row:1; }
  .service-main strong { font-size:14px; }
  .service-rate { display:none; }
  .service-price { grid-column:2; grid-row:2; text-align:left; }
  .service-qty { grid-column:3; grid-row:2; width:64px; height:44px; font-size:16px; }
  .service-final-price { font-size:16px; min-height:44px; width:100%; }
  .payment-summary { grid-template-columns:1fr; }
  .payment-summary strong { overflow-wrap:anywhere; }
  .session-row { align-items:flex-start; }
  .session-side { max-width:100%; }
  .session-body { min-width:0; flex:1 1 150px; }
  .session-note { overflow-wrap:anywhere; }
  .list-pager { padding:12px 4px; }
  .list-pager > div { width:100%; }
  .list-pager .btn { flex:1; }
  .toasts { right:12px; bottom:max(12px,env(safe-area-inset-bottom)); max-width:calc(100vw - 24px); }
}

/* Shared notification inbox; financial values and user-entered text remain readable. */
.notification-bell { position:relative; flex:none; width:40px; height:40px; border:1px solid var(--line-2); background:var(--surface); }
.notification-bell [data-notice-count] { position:absolute; top:-6px; right:-6px; min-width:18px; height:18px; padding:0 4px; border-radius:20px; background:var(--gold-2); color:#fff; font-size:10px; font-weight:700; line-height:18px; }
.notification-bell [data-notice-count]:empty { display:none; }
.notice-settings { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px 14px; padding:16px; margin-bottom:18px; background:var(--surface-2); border:1px solid var(--line); border-radius:14px; }
.notice-settings h3, .notice-settings p { grid-column:1/-1; }
.notice-settings .check-row { min-height:44px; }
.notice-settings .field__hint { margin:0; }
.notice-list-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.notice-items { display:flex; flex-direction:column; gap:10px; margin-bottom:12px; }
[data-notice-more][hidden] { display:none; }
.notice-item { display:flex; flex-direction:column; gap:7px; width:100%; padding:16px; border:1px solid var(--line); border-left:4px solid var(--line); border-radius:12px; text-align:left; background:var(--surface); color:var(--ink); cursor:pointer; font:inherit; line-height:1.5; overflow-wrap:anywhere; }
.notice-item.is-unread { border-left-color:var(--gold); background:#fbf8ee; }
.notice-item__head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 12px; }
.notice-item__head strong { font-size:15px; }
.notice-item time, .notice-item small { color:var(--muted); font-size:12px; }
.notice-empty { padding:30px 12px; text-align:center; color:var(--muted); }
.notice-empty .icon { width:28px; height:28px; margin-bottom:10px; }
.notice-banner { position:fixed; z-index:45; bottom:20px; right:20px; width:min(550px,calc(100vw - 40px)); display:flex; align-items:center; gap:10px; padding:14px; border:1px solid #d7be83; border-radius:14px; background:#fffdf3; box-shadow:var(--shadow); }
.notice-banner > div { min-width:0; flex:1; display:flex; flex-direction:column; gap:4px; }
.notice-banner strong { font-size:14px; }
.notice-banner span { font-size:12px; color:var(--muted); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
body.nav-open .notice-banner { display:none; }
@media(max-width:860px) {
  .notification-bell { min-width:44px; width:44px; height:44px; }
  .notice-banner { bottom:max(12px,env(safe-area-inset-bottom)); right:12px; width:calc(100vw - 24px); padding:12px; }
  body:has(.staff-mobile-nav) .notice-banner { bottom:calc(76px + env(safe-area-inset-bottom)); }
  .notice-banner .icon-btn { flex:none; }
  .notice-item { padding:14px 12px; font-size:15px; }
  .notice-item__head strong { font-size:16px; }
  .notice-settings { grid-template-columns:1fr; padding:12px; }
  .notice-settings h3, .notice-settings p { grid-column:auto; }
  .notice-settings button { justify-self:start; }
  .reminder-hero__action { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
}
