/* ==========================================================================
   剪單 JinDaan — design system
   Warm paper, ink, terracotta and sage. Built for a tablet on a salon counter.
   ========================================================================== */

:root {
  --ink: #241f1a;
  --ink-2: #4d443a;
  --muted: #8b7f70;
  --muted-2: #a99c8c;
  --line: #e8ddcd;
  --line-strong: #d9c9b4;
  --paper: #f4efe5;
  --paper-2: #ede4d5;
  --card: #fffdf8;
  --card-2: #fbf7ef;
  --accent: #d9492e;
  --accent-deep: #a83420;
  --accent-soft: #f9e3d9;
  --sage: #2f6f5e;
  --sage-soft: #e2ede8;
  --blue: #3b5b8c;
  --blue-soft: #e5ebf4;
  --gold: #a9824b;
  --gold-soft: #f2e7d3;
  --red: #b3352d;
  --red-soft: #f8e2df;
  --shadow-sm: 0 1px 2px rgba(55, 40, 24, 0.05);
  --shadow: 0 8px 24px rgba(55, 40, 24, 0.06), 0 1px 0 rgba(55, 40, 24, 0.03);
  --shadow-lg: 0 22px 60px rgba(45, 32, 20, 0.18);
  --radius: 16px;
  --radius-sm: 11px;
  --sidebar: 244px;
  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang HK", "Noto Sans TC", "Microsoft JhengHei", "WenQuanYi Zen Hei",
    sans-serif;
  --serif: "Songti TC", "Noto Serif TC", "Source Han Serif TC", "PMingLiU",
    "WenQuanYi Zen Hei", serif;
  --num: "SF Mono", "Roboto Mono", "Cascadia Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 700px at 92% -10%, rgba(181, 72, 42, 0.055), transparent 60%),
    radial-gradient(900px 600px at 4% 112%, rgba(47, 111, 94, 0.05), transparent 55%),
    var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.icon svg {
  display: block;
}

/* ---------- shell ---------- */

.shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  background:
    radial-gradient(420px 320px at 20% 0%, rgba(211, 122, 79, 0.16), transparent 70%),
    linear-gradient(180deg, #241f1a, #1b1713 70%);
  color: #f4efe5;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 18px;
  z-index: 40;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 8px 22px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: transparent;
  display: grid;
  place-items: center;
  color: #fff6ec;
  filter: drop-shadow(0 8px 18px rgba(157, 61, 35, 0.3));
  flex: none;
}

.brand-name {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.06em;
  font-weight: 700;
  line-height: 1.1;
}

.brand-sub {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 239, 229, 0.48);
  margin-top: 4px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
}

.nav-label {
  padding: 16px 12px 6px;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(244, 239, 229, 0.34);
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  color: rgba(244, 239, 229, 0.71);
  font-size: 13.5px;
  font-weight: 500;
  border: 0;
  background: none;
  width: 100%;
  text-align: left;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.nav-item .icon {
  opacity: 0.68;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  text-decoration: none;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(211, 122, 79, 0.23), rgba(211, 122, 79, 0.08));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(211, 122, 79, 0.18);
}

.nav-item.active .icon {
  color: #e49a72;
  opacity: 1;
}

.nav-item .nav-count {
  margin-left: auto;
  font-size: 10.5px;
  background: rgba(211, 122, 79, 0.24);
  color: #f3c5aa;
  padding: 1px 7px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 10px 4px;
}

.demo-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: rgba(244, 239, 229, 0.55);
  letter-spacing: 0.04em;
}

.demo-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d37a4f;
  box-shadow: 0 0 0 3px rgba(211, 122, 79, 0.16);
}

.salon-mini {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 11px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.04);
}

.salon-mini .avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
  background: rgba(211, 122, 79, 0.2);
  color: #f1c4a9;
}

.salon-mini strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(244, 239, 229, 0.9);
}

.salon-mini span {
  display: block;
  font-size: 10px;
  color: rgba(244, 239, 229, 0.42);
  margin-top: 1px;
}

.main {
  margin-left: var(--sidebar);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 34px;
  background: rgba(244, 239, 229, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(217, 201, 180, 0.55);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.breadcrumbs strong {
  color: var(--ink);
  font-weight: 600;
}

.breadcrumbs span.sep {
  color: var(--line-strong);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.today-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.7);
  font-size: 11.5px;
  color: var(--ink-2);
  white-space: nowrap;
}

.today-chip .icon {
  color: var(--accent);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.7);
  color: var(--ink-2);
  display: inline-grid;
  place-items: center;
  position: relative;
  transition: background 0.15s ease;
}

.icon-btn:hover {
  background: #fff;
}

.icon-btn .dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid var(--paper);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: none;
  padding: 3px 4px 3px 8px;
  border-radius: 999px;
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.55);
}

.user-chip .avatar {
  width: 32px;
  height: 32px;
  font-size: 11px;
}

.user-chip .who {
  text-align: left;
  line-height: 1.2;
}

.user-chip .who strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
}

.user-chip .who span {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

.content {
  padding: 30px 34px 64px;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}

.mobile-bar {
  display: none;
}

.mobile-nav {
  display: none;
}

/* ---------- page shell ---------- */

.page {
  animation: pageIn 0.32s ease both;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
}

.page-title {
  font-family: var(--serif);
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.18;
}

.page-sub {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 7px;
  max-width: 620px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition:
    transform 0.12s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(180deg, #de5a3a, #c94328);
  color: #fff8f2;
  box-shadow: 0 5px 14px rgba(201, 67, 40, 0.24);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #e56545, #d14a2e);
  text-decoration: none;
}

.btn-ghost {
  background: rgba(255, 253, 248, 0.65);
  border-color: var(--line);
  color: var(--ink-2);
}

.btn-ghost:hover {
  background: #fffdf8;
  border-color: var(--line-strong);
  text-decoration: none;
}

.btn-soft {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.btn-soft:hover {
  background: #f3d8cb;
  text-decoration: none;
}

.btn-sage {
  background: var(--sage-soft);
  color: var(--sage);
}

.btn-sage:hover {
  background: #d5e6de;
  text-decoration: none;
}

.btn-danger {
  background: var(--red-soft);
  color: var(--red);
}

.btn-danger:hover {
  background: #f3d2ce;
  text-decoration: none;
}

.btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 11.5px;
  border-radius: 8px;
}

.btn-lg {
  height: 46px;
  padding: 0 22px;
  font-size: 14px;
  border-radius: 12px;
}

.btn-icon {
  width: 38px;
  padding: 0;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.link-btn {
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.link-btn:hover {
  text-decoration: underline;
}

/* ---------- cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
}

.card-title {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title .icon {
  color: var(--accent);
}

.card-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.card-link {
  font-size: 11.5px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  padding: 2px;
}

.card-link:hover {
  color: var(--accent);
}

.card-body {
  padding: 18px 20px 20px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- KPI ---------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.kpi {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 18px 15px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.kpi::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -32px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(181, 72, 42, 0.07), transparent 68%);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kpi-label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}

.kpi-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}

.kpi-icon.sage {
  background: var(--sage-soft);
  color: var(--sage);
}

.kpi-icon.gold {
  background: var(--gold-soft);
  color: var(--gold);
}

.kpi-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.kpi-value {
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.16;
  margin-top: 9px;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.kpi-value small {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

.kpi-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  font-size: 10.5px;
  color: var(--muted);
  min-height: 17px;
}

.delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
}

.delta.up {
  color: var(--sage);
  background: var(--sage-soft);
}

.delta.down {
  color: var(--red);
  background: var(--red-soft);
}

.delta.flat {
  color: var(--muted);
  background: var(--paper-2);
}

.kpi-progress {
  height: 4px;
  border-radius: 4px;
  background: var(--paper-2);
  margin-top: 11px;
  overflow: hidden;
}

.kpi-progress span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--sage), #4d9480);
  transition: width 0.5s ease;
}

/* ---------- dashboard ---------- */

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(300px, 1fr);
  gap: 16px;
  align-items: start;
}

.dash-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* horizontal mini timeline */

.mini-timeline {
  padding: 4px 0 2px;
}

.mt-scale {
  display: flex;
  justify-content: space-between;
  padding: 0 0 8px 118px;
  font-size: 9.5px;
  color: var(--muted-2);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.mt-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 7px 0;
}

.mt-label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.mt-label .avatar {
  width: 29px;
  height: 29px;
  font-size: 10px;
}

.mt-label strong {
  font-size: 11.5px;
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mt-label span {
  display: block;
  font-size: 9.5px;
  color: var(--muted);
}

.mt-track {
  position: relative;
  height: 40px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent calc(12.5% - 1px),
      rgba(217, 201, 180, 0.4) calc(12.5% - 1px),
      rgba(217, 201, 180, 0.4) 12.5%
    ),
    rgba(244, 239, 229, 0.55);
  border: 1px solid rgba(232, 221, 205, 0.7);
  overflow: hidden;
}

.mt-block {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 6px;
  border: 0;
  border-left: 3px solid var(--c, var(--accent));
  background: color-mix(in srgb, var(--c, var(--accent)) 12%, #fffdf8);
  color: var(--ink);
  padding: 3px 5px;
  text-align: left;
  overflow: hidden;
  font-size: 9.5px;
  line-height: 1.3;
  min-width: 28px;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.mt-block:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
  z-index: 3;
}

.mt-block b {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mt-block span {
  display: block;
  font-size: 8.5px;
  color: var(--ink-2);
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mt-block.completed {
  opacity: 0.74;
}

.mt-block.no_show {
  border-left-style: dashed;
  opacity: 0.6;
}

.mt-block.cancelled {
  opacity: 0.38;
  text-decoration: line-through;
}

.now-flag {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: var(--accent);
  z-index: 4;
  pointer-events: none;
}

.now-flag::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -2.5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.closed-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}

/* todo list */

.todo-list {
  display: flex;
  flex-direction: column;
}

.todo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(232, 221, 205, 0.7);
  border-top: 0;
  border-left: 0;
  border-right: 0;
  background: none;
  text-align: left;
  width: 100%;
}

.todo-row:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.todo-row:hover .todo-main strong {
  color: var(--accent);
}

.todo-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--ink-2);
  flex: none;
}

.todo-icon.warn {
  background: var(--accent-soft);
  color: var(--accent);
}

.todo-icon.sage {
  background: var(--sage-soft);
  color: var(--sage);
}

.todo-icon.gold {
  background: var(--gold-soft);
  color: var(--gold);
}

.todo-main {
  min-width: 0;
  flex: 1;
}

.todo-main strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  transition: color 0.15s ease;
}

.todo-main span {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 1px;
}

.todo-count {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.todo-count small {
  font-size: 9.5px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 2px;
}

/* rebooking */

.rebook-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rebook-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(232, 221, 205, 0.65);
}

.rebook-item:last-child {
  border-bottom: 0;
  padding-bottom: 3px;
}

.rebook-main {
  flex: 1;
  min-width: 0;
}

.rebook-main strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.rebook-main span {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--sage-soft);
  background: var(--sage-soft);
  color: var(--sage);
  flex: none;
}

.wa-btn:hover {
  background: #d2e6dd;
  text-decoration: none;
}

/* tomorrow list */

.tomorrow-list {
  display: flex;
  flex-direction: column;
}

.tomorrow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(232, 221, 205, 0.6);
}

.tomorrow-row:last-child {
  border-bottom: 0;
}

.tomorrow-time {
  width: 46px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  flex: none;
}

.tomorrow-main {
  flex: 1;
  min-width: 0;
}

.tomorrow-main strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
}

.tomorrow-main span {
  font-size: 10px;
  color: var(--muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- tables ---------- */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

table.data th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: rgba(251, 247, 239, 0.6);
}

table.data td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(232, 221, 205, 0.65);
  vertical-align: middle;
}

table.data tr:last-child td {
  border-bottom: 0;
}

table.data tbody tr.row-click {
  cursor: pointer;
  transition: background 0.12s ease;
}

table.data tbody tr.row-click:hover {
  background: rgba(247, 228, 218, 0.35);
}

.cell-main {
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}

.cell-sub {
  color: var(--muted);
  font-size: 10.5px;
  margin-top: 1px;
  white-space: nowrap;
}

.cell-person {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 150px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  flex: none;
  letter-spacing: 0.02em;
  overflow: hidden;
}

.avatar.sm {
  width: 27px;
  height: 27px;
  font-size: 9.5px;
}

.avatar.lg {
  width: 54px;
  height: 54px;
  font-size: 17px;
}

.avatar.outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.6;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.badge.no-dot::before {
  display: none;
}

.badge-confirmed {
  color: var(--blue);
  background: var(--blue-soft);
}

.badge-completed {
  color: var(--sage);
  background: var(--sage-soft);
}

.badge-no_show {
  color: var(--red);
  background: var(--red-soft);
}

.badge-cancelled {
  color: var(--muted);
  background: var(--paper-2);
}

.badge-active {
  color: var(--sage);
  background: var(--sage-soft);
}

.badge-used_up,
.badge-expired {
  color: var(--muted);
  background: var(--paper-2);
}

.badge-refunded {
  color: var(--gold);
  background: var(--gold-soft);
}

.badge-paid {
  color: var(--sage);
  background: var(--sage-soft);
}

.badge-requested {
  color: var(--accent);
  background: var(--accent-soft);
}

.badge-waived,
.badge-none {
  color: var(--muted);
  background: var(--paper-2);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--paper);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.tag.vip {
  color: var(--gold);
  border-color: #e8d5b4;
  background: #faf2e3;
}

.tag.new {
  color: var(--sage);
  border-color: #cfe3da;
  background: var(--sage-soft);
}

/* ---------- filters / tabs ---------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.toolbar .spacer {
  flex: 1;
}

.toolbar .select {
  width: auto;
  min-width: 145px;
  flex: none;
}

.tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: var(--paper-2);
  border-radius: 10px;
}

.tab {
  border: 0;
  background: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.tab:hover {
  color: var(--ink);
}

.tab.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--card);
}

.segmented button {
  border: 0;
  background: none;
  padding: 7px 12px;
  font-size: 11.5px;
  color: var(--muted);
  border-right: 1px solid var(--line);
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active {
  background: var(--ink);
  color: #fff;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 320px;
}

.search-box .icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}

.search-box input {
  padding-left: 34px;
}

/* ---------- forms ---------- */

.input,
.select,
.textarea {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 9px;
  padding: 0 11px;
  font-size: 12.5px;
  color: var(--ink);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.textarea {
  height: auto;
  min-height: 84px;
  padding: 10px 11px;
  resize: vertical;
  line-height: 1.55;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted-2);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(181, 72, 42, 0.12);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > label,
.field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}

.field .help {
  font-size: 10.5px;
  color: var(--muted);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.45;
  cursor: pointer;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  margin: 1px 0 0;
  flex: none;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-note {
  border: 1px solid var(--line);
  background: var(--card-2);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- calendar ---------- */

.cal-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 7px;
}

.cal-range {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  min-width: 170px;
}

.cal-week {
  display: grid;
  grid-template-columns: 58px repeat(3, minmax(160px, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--card-2);
}

.cal-week .corner {
  border-right: 1px solid var(--line);
}

.cal-day {
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.cal-day:last-child {
  border-right: 0;
}

.cal-day .dow {
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.cal-day .dom {
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cal-day .count {
  margin-left: auto;
  font-size: 9.5px;
  color: var(--muted);
}

.cal-day.today {
  background: rgba(181, 72, 42, 0.055);
}

.cal-day.today .dom {
  color: var(--accent);
}

.cal-day.today .dow {
  color: var(--accent);
  font-weight: 700;
}

.cal-body-scroll {
  overflow-x: auto;
}

.cal-body {
  display: grid;
  grid-template-columns: 58px repeat(3, minmax(160px, 1fr));
  min-width: 620px;
  position: relative;
}

.cal-time-col {
  border-right: 1px solid var(--line);
  background: var(--card-2);
}

.cal-time {
  height: 40px;
  border-bottom: 1px solid rgba(232, 221, 205, 0.55);
  font-size: 9.5px;
  color: var(--muted);
  text-align: right;
  padding: 2px 8px 0 0;
  font-variant-numeric: tabular-nums;
  position: relative;
  top: -6px;
}

.cal-col {
  position: relative;
  border-right: 1px solid var(--line);
  background-image: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 39px,
    rgba(232, 221, 205, 0.55) 39px,
    rgba(232, 221, 205, 0.55) 40px
  );
}

.cal-col:last-child {
  border-right: 0;
}

.cal-col.off {
  background-color: rgba(244, 239, 229, 0.55);
}

.cal-off-label {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  color: var(--muted-2);
  letter-spacing: 0.1em;
}

.cal-block {
  position: absolute;
  left: 4px;
  right: 4px;
  border-radius: 7px;
  border: 0;
  border-left: 3px solid var(--c, var(--accent));
  background: color-mix(in srgb, var(--c, var(--accent)) 14%, #fffdf8);
  box-shadow: 0 1px 2px rgba(55, 40, 24, 0.05);
  padding: 4px 7px;
  overflow: hidden;
  text-align: left;
  font-size: 9.5px;
  line-height: 1.28;
  color: var(--ink);
  min-height: 22px;
  transition: filter 0.12s ease, transform 0.12s ease;
}

.cal-block:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
  z-index: 4;
}

.cal-block b {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-block span {
  display: block;
  font-size: 8.5px;
  color: var(--ink-2);
  opacity: 0.72;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-block.completed {
  opacity: 0.72;
}

.cal-block.no_show {
  opacity: 0.6;
  border-left-style: dashed;
}

.cal-block.cancelled {
  opacity: 0.35;
  text-decoration: line-through;
}

.cal-now {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--accent);
  z-index: 5;
  pointer-events: none;
}

.cal-now::before {
  content: "";
  position: absolute;
  left: -3px;
  top: -2.5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.cal-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 18px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
  flex-wrap: wrap;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}

/* ---------- list pages ---------- */

.list-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.list-title {
  font-size: 13px;
  font-weight: 700;
}

.list-title span {
  color: var(--muted);
  font-weight: 500;
  margin-left: 6px;
  font-size: 11px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}

/* ---------- customer drawer ---------- */

.profile-hero {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 4px 0 16px;
  border-bottom: 1px solid var(--line);
}

.profile-hero .avatar {
  width: 58px;
  height: 58px;
  font-size: 19px;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.profile-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}

.profile-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 7px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  margin: 16px 0;
}

.stat-strip > div {
  background: var(--card);
  padding: 11px 13px;
}

.stat-strip strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-strip span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 8px;
}

.history-list {
  display: flex;
  flex-direction: column;
}

.history-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(232, 221, 205, 0.6);
  font-size: 11.5px;
}

.history-row:last-child {
  border-bottom: 0;
}

.history-date {
  width: 78px;
  color: var(--muted);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  flex: none;
}

.history-main {
  flex: 1;
  min-width: 0;
}

.history-main strong {
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-main span {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

.history-val {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  white-space: nowrap;
}

/* ---------- packages ---------- */

.pkg-hero {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.pkg-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.pkg-stat span {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

.pkg-stat strong {
  display: block;
  font-size: 23px;
  font-weight: 700;
  margin-top: 5px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.pkg-stat small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.progress {
  height: 5px;
  border-radius: 5px;
  background: var(--paper-2);
  overflow: hidden;
  min-width: 80px;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--sage), #5b9a86);
  border-radius: 5px;
}

.progress.warn span {
  background: linear-gradient(90deg, var(--accent), #d07a55);
}

/* ---------- charts ---------- */

.chart-card {
  padding: 18px 20px 14px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 190px;
  padding-top: 10px;
  border-bottom: 1px solid var(--line);
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 3px;
  min-width: 0;
  position: relative;
}

.bar {
  width: 100%;
  max-width: 22px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #c4603f, #a9482b);
  min-height: 2px;
  transition: opacity 0.15s ease;
  opacity: 0.86;
}

.bar-col:hover .bar {
  opacity: 1;
}

.bar-col.future .bar {
  background: var(--paper-2);
}

.bar-tooltip {
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 9.5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 6;
  transition: opacity 0.12s ease;
}

.bar-col:hover .bar-tooltip {
  opacity: 1;
}

.x-labels {
  display: flex;
  gap: 3px;
  margin-top: 6px;
}

.x-label {
  flex: 1;
  text-align: center;
  font-size: 8.5px;
  color: var(--muted-2);
  min-width: 0;
}

.util-row {
  display: grid;
  grid-template-columns: 110px 1fr 44px;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
}

.util-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 500;
}

.util-bar {
  height: 8px;
  border-radius: 6px;
  background: var(--paper-2);
  overflow: hidden;
}

.util-bar span {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--c, var(--sage));
}

.util-val {
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rank-list {
  display: flex;
  flex-direction: column;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(232, 221, 205, 0.6);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-index {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--paper);
  display: grid;
  place-items: center;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted);
  flex: none;
}

.rank-main {
  flex: 1;
  min-width: 0;
}

.rank-main strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
}

.rank-main span {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

.rank-value {
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.source-bar {
  display: flex;
  height: 8px;
  border-radius: 6px;
  overflow: hidden;
  margin: 12px 0 10px;
  background: var(--paper-2);
}

.source-bar span {
  height: 100%;
}

.source-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
}

.source-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--muted);
}

.source-item b {
  margin-left: auto;
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- settings ---------- */

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.settings-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.settings-section {
  padding: 20px;
}

.settings-section + .settings-section {
  border-top: 1px solid var(--line);
}

.settings-section h3 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 3px;
}

.settings-section > p {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 14px;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.booking-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px dashed var(--line-strong);
  background: var(--card-2);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 11px;
  color: var(--ink-2);
  word-break: break-all;
}

.booking-link-box .icon {
  color: var(--accent);
  flex: none;
}

.staff-setting {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(232, 221, 205, 0.6);
}

.staff-setting:last-child {
  border-bottom: 0;
}

.staff-setting .grow {
  flex: 1;
  min-width: 0;
}

.staff-setting strong {
  display: block;
  font-size: 12px;
}

.staff-setting span {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

.split-pill {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--sage);
  background: var(--sage-soft);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- modal / toast ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(33, 26, 19, 0.46);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.16s ease;
}

.modal {
  width: 100%;
  max-width: 540px;
  max-height: min(88vh, 900px);
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.22s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.modal.wide {
  max-width: 720px;
}

.modal.narrow {
  max-width: 420px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-head-main {
  flex: 1;
  min-width: 0;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.modal-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.modal-close {
  width: 30px;
  height: 30px;
  border: 0;
  background: var(--paper);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: none;
}

.modal-close:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.modal-body {
  padding: 18px 22px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line);
  background: rgba(251, 247, 239, 0.6);
  flex-wrap: wrap;
}

.modal-foot .spread {
  margin-right: auto;
  font-size: 10.5px;
  color: var(--muted);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

#toast-root {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 15px;
  border-radius: 11px;
  background: var(--ink);
  color: #fff8f0;
  font-size: 12px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.25s cubic-bezier(0.2, 0.8, 0.25, 1);
  max-width: 380px;
  pointer-events: auto;
}

.toast.success .icon { color: #8fceb8; }
.toast.error { background: #7d231c; }
.toast.error .icon { color: #ffb9ad; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- empty / loading ---------- */

.empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
}

.empty .icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--paper);
  color: var(--muted-2);
  margin-bottom: 10px;
}

.empty strong {
  display: block;
  color: var(--ink-2);
  font-size: 13px;
  margin-bottom: 3px;
}

.empty span {
  font-size: 11px;
}

.loading {
  min-height: 260px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton {
  background: linear-gradient(90deg, var(--paper) 25%, #f9f5ed 50%, var(--paper) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

/* ---------- login ---------- */

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  background: var(--paper);
}

.login-aside {
  position: relative;
  background:
    radial-gradient(700px 500px at 80% 10%, rgba(211, 122, 79, 0.2), transparent 65%),
    radial-gradient(500px 420px at 10% 100%, rgba(47, 111, 94, 0.16), transparent 60%),
    linear-gradient(155deg, #241f1a, #17130f);
  color: #f4efe5;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.login-aside::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -160px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  border: 1px solid rgba(244, 239, 229, 0.12);
  box-shadow:
    0 0 0 40px rgba(244, 239, 229, 0.03),
    0 0 0 90px rgba(244, 239, 229, 0.02);
  pointer-events: none;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-brand .brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.login-brand .brand-name {
  font-size: 23px;
}

.login-aside h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.14;
  letter-spacing: 0.02em;
  margin: auto 0 18px;
  max-width: 520px;
  font-weight: 700;
}

.login-aside h1 em {
  font-style: normal;
  color: #e39a72;
}

.login-aside .lead {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(244, 239, 229, 0.64);
  max-width: 460px;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin: 34px 0 20px;
}

.login-feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 460px;
}

.login-feature .icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(244, 239, 229, 0.08);
  color: #d99a75;
  flex: none;
}

.login-feature strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
}

.login-feature span {
  font-size: 11px;
  color: rgba(244, 239, 229, 0.52);
  line-height: 1.5;
}

.login-aside .login-foot {
  margin-top: auto;
  font-size: 10.5px;
  color: rgba(244, 239, 229, 0.35);
  letter-spacing: 0.03em;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 40px;
}

.login-card {
  width: 100%;
  max-width: 360px;
}

.login-card h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.login-card .sub {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0 22px;
}

.pin-input {
  font-size: 26px;
  letter-spacing: 0.5em;
  text-align: center;
  height: 58px;
  font-weight: 700;
  font-family: var(--num);
}

.login-hint {
  margin-top: 14px;
  font-size: 10.5px;
  color: var(--muted);
  background: var(--card-2);
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  padding: 9px 11px;
  line-height: 1.6;
}

.login-error {
  color: var(--red);
  font-size: 11.5px;
  margin-top: 8px;
  min-height: 17px;
}

/* ---------- public booking ---------- */

.book-page {
  min-height: 100vh;
  background:
    radial-gradient(900px 600px at 100% 0%, rgba(181, 72, 42, 0.07), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(47, 111, 94, 0.05), transparent 55%),
    var(--paper);
  padding: 0 20px 56px;
}

.book-header {
  max-width: 1120px;
  margin: 0 auto;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.book-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.book-brand .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: transparent;
  color: #f4efe5;
  box-shadow: none;
}

.book-brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.04em;
}

.book-brand span {
  display: block;
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1px;
}

.book-header .book-contact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.book-header .book-contact a {
  color: var(--sage);
  font-weight: 600;
}

.book-wrap {
  max-width: 1120px;
  margin: 10px auto 0;
  display: grid;
  grid-template-columns: 326px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.book-summary {
  position: sticky;
  top: 20px;
  background:
    radial-gradient(300px 200px at 100% 0%, rgba(211, 122, 79, 0.14), transparent 70%),
    linear-gradient(160deg, #241f1a, #1b1713);
  color: #f4efe5;
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.book-summary .eyebrow {
  color: #d99a75;
}

.book-summary .eyebrow::before {
  background: #d99a75;
}

.book-summary h1 {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.book-summary .salon-meta {
  font-size: 11.5px;
  color: rgba(244, 239, 229, 0.58);
  line-height: 1.7;
}

.summary-lines {
  margin-top: 20px;
  border-top: 1px solid rgba(244, 239, 229, 0.12);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.summary-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
}

.summary-line span {
  color: rgba(244, 239, 229, 0.48);
}

.summary-line b {
  font-weight: 600;
  text-align: right;
}

.summary-line.total {
  border-top: 1px solid rgba(244, 239, 229, 0.12);
  padding-top: 11px;
  margin-top: 2px;
  font-size: 12.5px;
}

.summary-line.total b {
  font-size: 18px;
  color: #e8a77f;
}

.book-policy {
  margin-top: 18px;
  font-size: 10px;
  line-height: 1.65;
  color: rgba(244, 239, 229, 0.42);
  border-top: 1px solid rgba(244, 239, 229, 0.12);
  padding-top: 13px;
}

.book-main {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.steps {
  display: flex;
  gap: 0;
  padding: 16px 22px 0;
  border-bottom: 1px solid var(--line);
  background: var(--card-2);
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 14px 0;
  margin-right: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  position: relative;
}

.step .num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  background: var(--card);
}

.step.active {
  color: var(--ink);
  font-weight: 600;
}

.step.active .num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.step.done .num {
  background: var(--sage);
  border-color: var(--sage);
  color: #fff;
}

.book-body {
  padding: 22px;
}

.book-body h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.book-body .hint {
  font-size: 11.5px;
  color: var(--muted);
  margin: 4px 0 18px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-card {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 13px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.12s ease;
}

.service-card:hover {
  border-color: var(--line-strong);
  background: var(--card-2);
  transform: translateY(-1px);
}

.service-card.selected {
  border-color: var(--accent);
  background: linear-gradient(180deg, #fff9f4, #fdf1ea);
  box-shadow: 0 0 0 2px rgba(181, 72, 42, 0.1);
}

.service-card .grow {
  flex: 1;
  min-width: 0;
}

.service-card strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
}

.service-card .meta {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.service-card .price {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.service-card .price small {
  display: block;
  text-align: right;
  font-size: 9px;
  font-weight: 500;
  color: var(--muted);
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 4px;
}

.staff-option {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 11px;
  padding: 10px 12px;
}

.staff-option:hover {
  border-color: var(--line-strong);
}

.staff-option.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(181, 72, 42, 0.1);
}

.staff-option strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.staff-option span {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

.staff-option .any {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
}

.date-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  scrollbar-width: thin;
}

.date-chip {
  flex: none;
  width: 62px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: 8px 4px 7px;
  text-align: center;
  color: var(--ink-2);
}

.date-chip span {
  display: block;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.date-chip strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.date-chip small {
  display: block;
  font-size: 8.5px;
  color: var(--muted-2);
}

.date-chip:hover {
  border-color: var(--line-strong);
}

.date-chip.selected {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.date-chip.selected span,
.date-chip.selected small {
  color: rgba(255, 255, 255, 0.55);
}

.date-chip.off {
  opacity: 0.42;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.slot {
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.slot:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.slot.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.slot:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

.booking-section + .booking-section {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.book-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.book-actions .spacer {
  flex: 1;
}

.deposit-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.deposit-option {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: 9px 11px;
  text-align: left;
}

.deposit-option strong {
  display: block;
  font-size: 11.5px;
}

.deposit-option span {
  display: block;
  font-size: 9.5px;
  color: var(--muted);
  margin-top: 1px;
}

.deposit-option.selected {
  border-color: var(--sage);
  background: var(--sage-soft);
}

.book-confirm {
  text-align: center;
  padding: 18px 8px 6px;
}

.confirm-mark {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
}

.book-confirm h2 {
  font-size: 21px;
}

.book-confirm .code {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px dashed var(--line-strong);
  background: var(--card-2);
  font-family: var(--num);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.confirm-details {
  max-width: 380px;
  margin: 0 auto 16px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.confirm-details .row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 13px;
  border-bottom: 1px solid rgba(232, 221, 205, 0.6);
  font-size: 11.5px;
}

.confirm-details .row:last-child {
  border-bottom: 0;
}

.confirm-details .row span {
  color: var(--muted);
}

.confirm-details .row b {
  text-align: right;
  font-weight: 600;
}

.confirm-note {
  font-size: 10.5px;
  color: var(--muted);
  max-width: 420px;
  margin: 0 auto 16px;
  line-height: 1.65;
}

/* ---------- mobile nav ---------- */

@media (max-width: 1180px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-aside {
    display: none;
  }

  .book-wrap {
    grid-template-columns: 1fr;
  }

  .book-summary {
    position: static;
  }

  .book-summary h1 {
    font-size: 23px;
  }

  .pkg-hero {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 880px) {
  :root {
    --sidebar: 0px;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    width: 264px;
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    transform: none;
  }

  .main {
    margin-left: 0;
  }

  .topbar {
    height: 58px;
    padding: 0 16px;
  }

  .topbar .breadcrumbs {
    display: none;
  }

  .mobile-bar {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mobile-bar .menu-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--card);
    display: grid;
    place-items: center;
  }

  .mobile-bar .brand-name {
    font-size: 16px;
  }

  .content {
    padding: 20px 16px 92px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .today-chip,
  .user-chip .who,
  .user-chip .chev {
    display: none;
  }

  .mobile-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    background: rgba(255, 253, 248, 0.94);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding: 6px 6px max(6px, env(safe-area-inset-bottom));
  }

  .mobile-nav a,
  .mobile-nav button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 7px 2px;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 9px;
    font-weight: 500;
    border-radius: 9px;
    text-decoration: none;
  }

  .mobile-nav .active {
    color: var(--accent);
    background: rgba(247, 228, 218, 0.5);
  }

  .mini-timeline .mt-track {
    height: 36px;
  }

  .mt-scale {
    padding-left: 96px;
  }

  .mt-row {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
  }

  .cal-week,
  .cal-body {
    grid-template-columns: 48px repeat(3, minmax(148px, 1fr));
  }
}

@media (max-width: 640px) {
  .page-title {
    font-size: 25px;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .kpi {
    padding: 13px 14px;
  }

  .kpi-value {
    font-size: 23px;
  }

  .kpi-icon {
    width: 26px;
    height: 26px;
  }

  .kpi-label {
    font-size: 10.5px;
  }

  .card-head {
    padding: 15px 15px 0;
  }

  .card-body {
    padding: 14px 15px 16px;
  }

  .stat-strip {
    grid-template-columns: 1fr 1fr;
  }

  .field-row,
  .field-row-3 {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding-left: 17px;
    padding-right: 17px;
  }

  .service-grid,
  .staff-grid {
    grid-template-columns: 1fr;
  }

  .deposit-options {
    grid-template-columns: 1fr;
  }

  .book-page {
    padding: 0 12px 40px;
  }

  .book-header {
    height: 64px;
  }

  .book-header .book-contact span {
    display: none;
  }

  .book-body {
    padding: 17px;
  }

  .steps {
    padding: 13px 14px 0;
    overflow-x: auto;
  }

  .step {
    padding-right: 12px;
    margin-right: 4px;
    font-size: 10px;
    white-space: nowrap;
  }

  .step .label {
    display: none;
  }

  .book-actions {
    position: sticky;
    bottom: 0;
    background: var(--card);
    margin-left: -17px;
    margin-right: -17px;
    padding: 12px 17px;
    z-index: 5;
  }

  .book-actions .btn-primary {
    flex: 1;
  }

  .date-chip {
    width: 56px;
  }

  .slot-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pkg-hero {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .pkg-stat {
    padding: 13px;
  }

  .pkg-stat strong {
    font-size: 19px;
  }

  .util-row {
    grid-template-columns: 90px 1fr 38px;
  }

  .bar-chart {
    height: 150px;
  }

  .login-panel {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Utility classes */
.muted { color: var(--muted); }
.mono { font-family: var(--num); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.hide { display: none !important; }

/* Day calendar extras: week strip + staff headers */
.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card-2), var(--card));
}

.week-day {
  border: 1px solid transparent;
  background: none;
  border-radius: 10px;
  padding: 7px 4px 6px;
  text-align: center;
  color: var(--ink-2);
  min-width: 0;
  position: relative;
}

.week-day:hover {
  background: var(--card-2);
  border-color: var(--line);
}

.week-day .wd {
  display: block;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.week-day strong {
  display: block;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.week-day small {
  display: block;
  font-size: 8.5px;
  color: var(--muted-2);
  min-height: 11px;
}

.week-day.today .wd {
  color: var(--accent);
  font-weight: 700;
}

.week-day.today::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.week-day.selected {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 4px 12px rgba(36, 31, 26, 0.18);
}

.week-day.selected .wd,
.week-day.selected small {
  color: rgba(255, 255, 255, 0.55);
}

.week-day.selected::after {
  background: #e29a72;
}

.cal-staff-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.cal-staff-head:last-child {
  border-right: 0;
}

.cal-staff-head .avatar {
  width: 29px;
  height: 29px;
  font-size: 10px;
}

.cal-staff-head strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.cal-staff-head span {
  display: block;
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
}

.cal-staff-head .rest {
  margin-left: auto;
  font-size: 9px;
  color: var(--muted);
  background: var(--paper);
  border-radius: 999px;
  padding: 2px 7px;
}

.cal-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cal-date-input {
  width: 140px;
  height: 34px;
  font-size: 11.5px;
}

@media (max-width: 880px) {
  .week-strip {
    padding: 9px 8px;
    gap: 2px;
  }

  .week-day {
    padding: 5px 1px;
  }

  .week-day strong {
    font-size: 15px;
  }

  .week-day small {
    display: none;
  }

  .cal-week,
  .cal-body {
    grid-template-columns: 44px repeat(3, minmax(144px, 1fr));
  }

  .cal-staff-head {
    padding: 8px;
    gap: 6px;
  }

  .cal-staff-head .avatar {
    display: none;
  }
}

.sidebar-scrim {
  display: none;
}

@media (max-width: 880px) {
  .sidebar-scrim.show {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 39;
    background: rgba(30, 23, 17, 0.4);
    backdrop-filter: blur(2px);
  }
}

.pager {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--card-2);
}

.pager .spacer {
  flex: 1;
}

.pager-num {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 52px;
  text-align: center;
}

.mobile-agenda {
  display: none;
}

.agenda-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid rgba(232, 221, 205, 0.65);
  background: none;
  text-align: left;
}

.agenda-row:last-child {
  border-bottom: 0;
}

.agenda-time {
  width: 50px;
  flex: none;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.agenda-time small {
  display: block;
  font-size: 8.5px;
  color: var(--muted-2);
  font-weight: 500;
}

.agenda-dot {
  width: 3px;
  align-self: stretch;
  border-radius: 3px;
  flex: none;
}

.agenda-main {
  flex: 1;
  min-width: 0;
}

.agenda-main strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agenda-main span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 880px) {
  .mini-timeline {
    display: none;
  }

  .mobile-agenda {
    display: block;
  }
}

@media (max-width: 980px) {
  .book-summary {
    padding: 18px;
  }

  .book-summary h1 {
    display: none;
  }

  .book-summary .salon-meta,
  .book-summary .book-policy {
    display: none;
  }

  .book-summary .eyebrow {
    margin-bottom: 10px;
  }

  .book-summary .summary-lines {
    margin-top: 0;
    padding-top: 12px;
  }
}
