:root {
  --text: #0d0d0d;
  --muted: #767676;
  --line: #e5e5e5;
  --bg: #f5f5f5;
  --purple: #6950f3;
  --green: #00a36c;
  --red: #d4163a;
  --blue: #2d76ec;
  --blue-soft: #eaf1fd;
  --grey-soft: #f2f2f2;
  --rail: #0d0d0d;
  --header-h: 64px;
  --rail-w: 72px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: "Inter", "Roobert PRO", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 20px; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: calc(var(--header-h) + 1px); z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px 0 16px; background: #fff; border-bottom: 1px solid var(--line);
}
.brand { font-size: 24px; font-weight: 700; letter-spacing: -0.8px; }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--grey-soft); }
.icon-btn.sm { width: 36px; height: 36px; }
.badge {
  position: absolute; top: 2px; left: 20px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--red); color: #fff; border: 2px solid #fff;
  font-size: 11px; font-weight: 600; line-height: 14px; text-align: center;
}
.dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--purple); }
.avatar {
  width: 44px; height: 44px; margin-left: 8px; border-radius: 50%; background: #d9d2ff; color: var(--purple);
  font-weight: 600; font-size: 17px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line);
}
.loc-switch {
  height: 40px; padding: 0 12px; margin-right: 8px; border: 1px solid var(--line); border-radius: 999px;
  font: inherit; background: #fff;
}

/* ---------- Navigation rail ---------- */
.rail {
  position: fixed; top: calc(var(--header-h) + 1px); bottom: 0; left: 0; width: var(--rail-w); z-index: 25;
  background: var(--rail); display: flex; flex-direction: column; justify-content: space-between; padding: 8px 0;
}
.rail-item { display: flex; width: var(--rail-w); height: 52px; align-items: center; justify-content: center; color: #fff; }
.rail-icon { width: 44px; height: 44px; border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: background .12s; }
.rail-item:hover .rail-icon { background: #2b2b2b; }
.rail-item.selected .rail-icon { background: var(--purple); }
.rail-item.open:not(.selected) .rail-icon { background: #3a3a3a; }
.tip {
  position: fixed; left: calc(var(--rail-w) + 4px); transform: translateY(-50%); z-index: 40;
  background: var(--text); color: #fff; font-size: 13px; font-weight: 500; padding: 6px 10px; border-radius: 6px;
  pointer-events: none; white-space: nowrap;
}

/* Flyout sub-menu */
.flyout {
  position: fixed; top: calc(var(--header-h) + 1px); bottom: 0; left: var(--rail-w); width: 208px; z-index: 24;
  background: #fff; border-right: 1px solid var(--line);
  box-shadow: 4px 0 16px rgba(0,0,0,.06);
}
.flyout-scroll { height: 100%; overflow-y: auto; padding: 16px 8px; }
.flyout-close {
  position: absolute; top: 12px; right: -14px; width: 28px; height: 28px; border-radius: 50%; z-index: 1;
  background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
}
.flyout-title { font-size: 17px; font-weight: 600; line-height: 24px; padding: 4px 16px 8px; }
.flyout-link { display: block; padding: 12px 16px; border-radius: 8px; font-size: 15px; line-height: 20px; }
.flyout-link:hover { background: var(--grey-soft); }
.flyout-link.active { background: #efecfe; color: var(--purple); font-weight: 500; }
.flyout hr { border: 0; border-top: 1px solid var(--line); margin: 12px 8px 16px; }

/* ---------- Main ---------- */
.main { padding: calc(var(--header-h) + 1px + 32px) 32px 48px calc(var(--rail-w) + 32px); min-height: 100vh; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; min-width: 0; }
.card-lg { border-radius: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.card-head .icon-btn { margin: -6px -10px 0 0; }
.card-title { font-size: 20px; font-weight: 600; line-height: 28px; }
.card-sub { color: var(--muted); }
.big-num { font-size: 28px; font-weight: 600; line-height: 36px; margin: 16px 0 24px; }
.stat-line span { color: var(--muted); }
.stat-line b { font-weight: 600; }

/* Home grid */
.home-grid { max-width: 1024px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; }
.home-grid .card-lg { min-height: 540px; }
.chart { margin-top: 36px; }
.tj-chart { display: block; overflow: visible; }
.tj-chart .ax { font-size: 12px; fill: var(--muted); }
.chart-tip {
  position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1); font-size: 13px; line-height: 18px; pointer-events: none; white-space: nowrap;
}
.legend { display: flex; gap: 24px; margin-top: 16px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }

/* Appointment lists */
.card-list { height: 468px; display: flex; flex-direction: column; padding-right: 8px; }
.appt-list { list-style: none; margin: 8px 0 0; padding: 0 16px 0 0; overflow-y: auto; flex: 1; }
.appt { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.appt:last-child { border-bottom: 0; }
.appt-date { width: 30px; flex: none; text-align: center; padding-top: 12px; }
.appt-date .d { font-size: 17px; font-weight: 600; line-height: 24px; }
.appt-when { font-size: 13px; color: var(--muted); line-height: 16px; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.appt-title { font-size: 17px; font-weight: 600; line-height: 24px; }
.appt-sub { color: var(--muted); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 13px; font-weight: 500; line-height: 16px; }
.st-booked, .st-confirmed { background: var(--blue-soft); color: var(--blue); }
.st-arrived, .st-started { background: #e6f7ef; color: #00804f; }
.st-completed { background: var(--grey-soft); color: var(--text); }
.st-canceled, .st-no_show { background: #fdebee; color: var(--red); }

/* Top tables */
.top-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.top-table th { text-align: left; font-weight: 600; padding: 12px 8px 12px 0; border-bottom: 1px solid var(--line); }
.top-table td { padding: 16px 8px 16px 0; border-bottom: 1px solid var(--line); }
.top-table tr:last-child td { border-bottom: 0; }
.top-table th:not(:first-child), .top-table td:not(:first-child) { white-space: nowrap; }

.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.empty-title { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 4px; }

/* Generic page */
.page { max-width: 1024px; margin: 0 auto; }
.page-title { font-size: 28px; line-height: 36px; font-weight: 600; margin: 0 0 24px; }
.empty-page { padding: 64px 24px; text-align: center; color: var(--muted); }

@media (max-width: 1100px) {
  .home-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .main { padding-left: calc(var(--rail-w) + 16px); padding-right: 16px; }
  .topbar-actions .icon-btn:nth-child(-n+3) { display: none; }
}

/* =================================================================== components */
.strong { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.danger { color: var(--red) !important; }
.link { color: var(--purple); font-weight: 500; cursor: pointer; }
.link-plain { color: inherit; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; }
.grow { flex: 1; min-width: 0; }
.right { text-align: right; }
.center { text-align: center; }
.pad { padding: 16px; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-gap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
h1, h2, h3 { margin: 0; }
h3 { font-size: 17px; line-height: 24px; margin-bottom: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px;
  border-radius: 999px; font-size: 15px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; cursor: pointer; background: none;
}
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; height: 48px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #333; }
.btn-outline { border-color: #d3d3d3; background: #fff; color: var(--text); }
.btn-outline:hover { background: var(--grey-soft); }
.btn-danger { background: var(--red); color: #fff; }
.btn-light { background: #fff; color: var(--text); }
.btn.round { width: 44px; padding: 0; }
.btn.icon-only { width: 40px; padding: 0; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 999px 0 0 999px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 999px 999px 0; }
select.btn.sel { appearance: auto; padding: 0 12px; font: inherit; width: auto; }
.loc-switch { width: auto; }
.date-btn { position: relative; min-width: 150px; }
.date-btn input[type=date] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.date-btn input[type=date]::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.x { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.x:hover { background: var(--grey-soft); }
.x.sm { width: 28px; height: 28px; font-size: 12px; }

.dropdown { position: relative; display: inline-block; }
.dd-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; z-index: 60; background: #fff; border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.16); padding: 8px; border: 1px solid var(--line);
}
.dropdown.open > .dd-menu { display: block; }
.dd-menu.right { left: auto; right: 0; }
.dd-menu.up { top: auto; bottom: calc(100% + 6px); }
.dd-menu a, .dd-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 8px; font-size: 15px; cursor: pointer; text-align: left; white-space: nowrap; }
.dd-menu a:hover, .dd-btn:hover { background: var(--grey-soft); }
.dd-menu.dd-wide { min-width: 260px; }
.dd-head { padding: 8px 12px; font-weight: 600; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.dd-custom { display: flex; flex-direction: column; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); margin-top: 4px; }
.dd-custom label { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13px; }

.page { max-width: 1024px; margin: 0 auto; }
.page.wide { max-width: 1400px; }
.narrow-page { max-width: 760px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-title { font-size: 28px; line-height: 36px; font-weight: 600; margin: 0; }
.page-sub { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--grey-soft); font-size: 13px; font-weight: 600; vertical-align: middle; color: var(--text); }
.sec-title { font-size: 20px; line-height: 28px; font-weight: 600; margin: 32px 0 12px; }

.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid #d3d3d3; border-radius: 999px; background: #fff; min-width: 280px; color: var(--muted); }
.search input { border: 0; outline: 0; font: inherit; flex: 1; min-width: 0; background: none; color: var(--text); padding: 0; height: auto; }
.search.wide { width: 100%; margin-bottom: 12px; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters select { height: 40px; border-radius: 999px; padding: 0 12px; width: auto; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; min-width: 0; margin-bottom: 16px; }
.home-grid .card { margin-bottom: 0; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.card .table, .table-wrap .table { border-radius: 12px; }
.table th { text-align: left; font-weight: 600; font-size: 15px; padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fff; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #fafafa; }
.table .total-row td { font-weight: 600; background: #fafafa; }
.table .chk { width: 40px; }
.empty-cell { text-align: center; color: var(--muted); padding: 48px 16px !important; }
.table-foot { color: var(--muted); font-size: 13px; margin-top: 12px; }
.cell-person { display: flex; align-items: center; gap: 12px; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; line-height: 18px; white-space: nowrap; background: var(--grey-soft); }
.st-booked, .st-confirmed, .st-scheduled, .st-ordered, .st-in_progress, .st-waiting, .st-unpaid, .st-draft { background: var(--blue-soft); color: var(--blue); }
.st-active, .st-valid, .st-arrived, .st-started, .st-sent, .st-received, .st-part_paid { background: #e6f7ef; color: #00804f; }
.st-completed, .st-redeemed, .st-refunded, .st-paused, .st-ended { background: var(--grey-soft); color: var(--text); }
.st-canceled, .st-no_show, .st-voided, .st-voided_sale, .st-expired, .st-failed { background: #fdebee; color: var(--red); }
.st-premium { background: #f1edff; color: var(--purple); }

.empty-state { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 64px 24px; text-align: center; color: var(--muted); }
.empty-icon { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; background: var(--grey-soft); display: flex; align-items: center; justify-content: center; color: var(--text); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; background: var(--text); color: #fff; padding: 12px 20px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.2); transition: opacity .3s; }
.toast.hide { opacity: 0; pointer-events: none; }
.banner { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; }
.banner.ok { background: #e6f7ef; color: #00804f; }
.banner.warn { background: #fff4e0; color: #8a5a00; }

/* inputs */
input, select, textarea {
  font: inherit; color: var(--text); width: 100%; height: 44px; padding: 0 14px; border: 1px solid #d3d3d3; border-radius: 8px; background: #fff; outline: none;
}
textarea { height: auto; padding: 10px 14px; resize: vertical; }
select[multiple] { height: auto; padding: 6px; }
input:focus, select:focus, textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px #6950f322; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; padding: 0; accent-color: var(--purple); flex: none; box-shadow: none; }
input[type=color] { padding: 4px; width: 64px; }
.lbl { display: block; font-weight: 600; margin-bottom: 6px; }
.req { color: var(--red); }
.help { color: var(--muted); font-size: 13px; line-height: 18px; margin-top: 6px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 0; }
.multi { display: grid; grid-template-columns: 1fr; gap: 2px; max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.multi.cols2 { grid-template-columns: 1fr 1fr; max-height: none; }
.input-prefix { display: flex; align-items: center; border: 1px solid #d3d3d3; border-radius: 8px; background: #fff; height: 44px; overflow: hidden; }
.input-prefix span { padding: 0 12px; color: var(--muted); border-right: 1px solid var(--line); height: 100%; display: flex; align-items: center; background: #fafafa; }
.input-prefix input { border: 0; height: 100%; box-shadow: none; }
.input-prefix.big { height: 56px; font-size: 20px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: middle; border: 1px solid #0001; }
.swatch.lg { width: 28px; height: 28px; border-radius: 8px; }
.form-stack { display: flex; flex-direction: column; gap: 10px; }
.form-stack.narrow { max-width: 560px; }
.form-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.form-inline h3 { width: 100%; }
.form-inline input, .form-inline select { width: auto; min-width: 140px; }
.form-inline .input-prefix { width: 200px; }
.qty-in { width: 90px; height: 36px; text-align: right; }
.qty-in.wide { width: 120px; }

.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #e4defd; color: #3d2db3; font-weight: 600; flex: none; width: 40px; height: 40px; font-size: 15px; }
.av.lg { width: 48px; height: 48px; font-size: 17px; }
.av.xl { width: 96px; height: 96px; font-size: 32px; margin-bottom: 8px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tab { padding: 12px 16px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--text); border-bottom-color: var(--text); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { padding: 6px 14px; border-radius: 999px; border: 1px solid #d3d3d3; background: #fff; font-size: 14px; }
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }

.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 24px; font-weight: 600; line-height: 32px; margin-top: 4px; }
.stat-value.sm { font-size: 17px; }
.stat-sub { color: var(--muted); font-size: 13px; }
.stats3, .stats4, .kpis { display: grid; gap: 16px; margin-bottom: 16px; }
.stats3 { grid-template-columns: repeat(3, 1fr); }
.stats4 { grid-template-columns: repeat(4, 1fr); }
.kpis { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.kpis .card, .stats3 .card { margin: 0; padding: 16px 20px; }
.stats4 .stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }

/* full-screen forms */
.fs-body { background: #fff; }
.fs-top { position: sticky; top: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.fs-actions { display: flex; gap: 8px; align-items: center; }
.fs-main { max-width: 860px; margin: 0 auto; padding: 32px 24px 80px; }
.fs-title { font-size: 32px; line-height: 40px; font-weight: 600; margin-bottom: 24px; }
.form-card { border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin-bottom: 20px; }
.form-card-title { font-size: 20px; font-weight: 600; margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.fg { grid-column: span 2; min-width: 0; }
.fg.half { grid-column: span 1; }

/* ========================================================== calendar */
.cal-main { padding: calc(var(--header-h) + 1px) 0 0 var(--rail-w); height: 100vh; display: flex; flex-direction: column; background: #fff; }
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.cal-left, .cal-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cal { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cal-head { scrollbar-gutter: stable; overflow-y: hidden; display: grid; grid-template-columns: 64px repeat(var(--cols), minmax(120px, 1fr)); border-bottom: 1px solid var(--line); overflow: hidden; }
.cal-corner { border-right: 1px solid var(--line); }
.cal-col-head { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-right: 1px solid var(--line); min-width: 0; }
.cal-col-head .nm { font-size: 13px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cal-col-head.day .dw { color: var(--muted); font-size: 13px; }
.cal-col-head.day .dn { font-size: 22px; font-weight: 600; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.cal-col-head.day.today .dn { background: var(--purple); color: #fff; }
.cal-body { scrollbar-gutter: stable; flex: 1; overflow: auto; display: grid; grid-template-columns: 64px repeat(var(--cols), minmax(120px, 1fr)); position: relative; }
.cal-times { position: relative; border-right: 1px solid var(--line); background: #fff; position: sticky; left: 0; z-index: 5; }
.cal-hour-label { display: flex; flex-direction: column; align-items: flex-end; padding: 0 8px; font-size: 12px; line-height: 14px; transform: translateY(-7px); }
.cal-hour-label:first-child { transform: none; }
.cal-hour-label small { color: var(--muted); }
.cal-col { position: relative; border-right: 1px solid var(--line); cursor: pointer;
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px), linear-gradient(to bottom, #f3f3f3 1px, transparent 1px);
  background-size: 100% 80px, 100% 20px; }
.cal-col .off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, #f2f2f2, #f2f2f2 6px, #e9e9e9 6px, #e9e9e9 12px); opacity: .9; pointer-events: none; }
.ev { position: absolute; border-radius: 6px; padding: 3px 6px; font-size: 12px; line-height: 15px; overflow: hidden; cursor: grab; color: #0d0d0d;
  box-shadow: inset 3px 0 0 #0002; border: 1px solid #fff; user-select: none; z-index: 2; }
.ev:hover { filter: brightness(.96); z-index: 3; }
.ev.dragging { opacity: .8; box-shadow: 0 8px 24px #0003; cursor: grabbing; z-index: 10; }
.ev-time { font-weight: 600; white-space: nowrap; }
.ev-client { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-svc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.st-completed { opacity: .75; }
.ev.st-no_show { background: #fdebee !important; }
.ev.st-arrived { box-shadow: inset 3px 0 0 #e8a200; }
.ev.st-started { box-shadow: inset 3px 0 0 #00a36c; }
.ev.blocked { background: repeating-linear-gradient(135deg, #d9dbe0, #d9dbe0 6px, #cfd2d8 6px, #cfd2d8 12px); color: #333; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 4; pointer-events: none; }
.now-tag { position: absolute; right: 2px; transform: translateY(-50%); background: #fff; color: var(--red); border: 1.5px solid var(--red); border-radius: 999px; font-size: 11px; font-weight: 600; padding: 0 5px; z-index: 6; }
.slot-menu { position: fixed; z-index: 80; background: #fff; border-radius: 12px; box-shadow: 0 8px 32px #0003; padding: 8px; min-width: 200px; }
.slot-menu a { display: block; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.slot-menu a:hover { background: var(--grey-soft); }
.slot-time { font-weight: 600; padding: 6px 12px; color: var(--muted); }

/* drawer */
.drawer-back { position: fixed; inset: 0; background: #0006; z-index: 90; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: #fff; z-index: 91; display: flex; flex-direction: column; box-shadow: -8px 0 32px #0002; }
.dr-head { padding: 16px 24px 20px; color: #fff; position: relative; }
.dr-head.plain { color: var(--text); border-bottom: 1px solid var(--line); }
.dr-close { position: absolute; top: 12px; right: 16px; width: 36px; height: 36px; border-radius: 50%; color: inherit; font-size: 16px; }
.dr-close:hover { background: #fff3; }
.dr-head-row { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; gap: 12px; }
.dr-head-row h2 { font-size: 24px; font-weight: 600; }
.status-chip { border: 1px solid #fffa; color: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 500; background: #ffffff1a; }
.dr-body { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.dr-foot { border-top: 1px solid var(--line); padding: 16px 24px; }
.dr-total { display: flex; justify-content: space-between; margin-bottom: 12px; }
.dr-btns { display: flex; gap: 8px; }
.dr-btns .grow { flex: 1; height: 48px; }
.dr-sub { font-size: 17px; font-weight: 600; margin-top: 8px; }
.client-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fafafa; text-align: left; width: 100%; }
.client-card.empty { display: flex; justify-content: space-between; align-items: center; background: #fff; cursor: pointer; }
.client-card.empty:hover { background: #fafafa; }
.cc-top { display: flex; justify-content: space-between; align-items: center; }
.cc-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.round-ic { width: 44px; height: 44px; border-radius: 50%; background: #efecfe; color: var(--purple); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.alert-line { color: #8a5a00; background: #fff4e0; border-radius: 8px; padding: 6px 10px; margin-top: 10px; font-size: 14px; }
.pk-line { color: #00804f; font-size: 14px; margin-top: 8px; }
.box { border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px; }
.box-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); gap: 8px; }
.box-row:last-child { border-bottom: 0; }
.box-row select { height: 36px; width: auto; }
.link-box { display: block; padding: 14px 16px; color: var(--purple); font-weight: 500; }
.svc-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-left: 4px solid; border-radius: 4px; background: #fafafa; }
.svc-edit { border: 1px solid var(--line); border-left: 4px solid; border-radius: 8px; padding: 12px; }
.svc-edit-top { display: flex; align-items: center; gap: 8px; }
.svc-edit-top > div:first-child { flex: 1; }
.price-in { display: flex; align-items: center; border: 1px solid #d3d3d3; border-radius: 8px; height: 36px; overflow: hidden; }
.price-in span { padding: 0 8px; color: var(--muted); font-size: 13px; }
.price-in input { border: 0; height: 34px; width: 90px; padding: 0 8px; box-shadow: none; }
.svc-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.svc-edit-grid label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.svc-edit-grid select { height: 38px; color: var(--text); }
.svc-edit-grid .span2 { grid-column: span 2; }
.svc-empty { border: 1px solid var(--line); border-radius: 12px; padding: 32px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.tag-ic { font-size: 32px; }
.note { background: #fafafa; border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; }
.date-edit { position: relative; cursor: pointer; }
.date-edit input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.inline { display: flex; align-items: center; gap: 8px; width: 100%; }

/* modal */
.modal-back { position: fixed; inset: 0; background: #0006; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-back[hidden] { display: none; }
.modal { background: #fff; border-radius: 16px; width: min(560px, 100%); max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 16px 48px #0003; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px 8px; }
.modal-head h2 { font-size: 24px; font-weight: 600; }
.modal-body { padding: 12px 24px; overflow-y: auto; flex: 1; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px 20px; flex-wrap: wrap; }
.pick-list { display: flex; flex-direction: column; }
.pick-list hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; width: 100%; }
.pick { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 10px; cursor: pointer; }
.pick:hover { background: var(--grey-soft); }
.pick.svc { justify-content: space-between; border-left: 4px solid; border-radius: 4px; margin: 4px 0; background: #fff; }
.pick.svc:hover { background: #fafafa; }
.pick-cat { font-size: 17px; font-weight: 600; margin: 16px 0 6px; }

/* checkout */
.co { display: grid; grid-template-columns: 1fr 420px; gap: 32px; max-width: 1280px; margin: 0 auto; }
.fs-main:has(.co) { max-width: 1320px; }
.co-steps { display: flex; gap: 8px; color: var(--muted); margin-bottom: 8px; }
.co-steps .active { color: var(--text); font-weight: 600; }
.co-title { font-size: 32px; font-weight: 600; margin-bottom: 20px; }
.co-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.co-tabs button { padding: 8px 16px; border-radius: 999px; border: 1px solid #d3d3d3; font-weight: 500; }
.co-tabs button.active { background: var(--text); color: #fff; border-color: var(--text); }
.co-catalog { max-height: calc(100vh - 320px); overflow-y: auto; padding-right: 8px; }
.co-right { border: 1px solid var(--line); border-radius: 16px; padding: 20px; position: sticky; top: 80px; align-self: start; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 100px); overflow-y: auto; }
.co-client { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.co-client.empty { cursor: pointer; }
.benefit-box { background: #e6f7ef; color: #00804f; border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-top: 8px; }
.co-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.co-item:hover { background: #fafafa; }
.benefit-tag { color: #00804f; font-size: 13px; font-weight: 500; }
.strike { text-decoration: line-through; font-size: 13px; }
.co-empty { text-align: center; padding: 32px 0; }
.sum-row { display: flex; justify-content: space-between; padding: 4px 0; gap: 12px; }
.sum-row.total { font-weight: 600; font-size: 17px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.sum-row.due { font-weight: 700; font-size: 20px; padding: 8px 0; }
.sum-row.pay { color: #00804f; }
.link-x { color: var(--red); cursor: pointer; margin-left: 4px; }
.sum-links { font-size: 14px; }
.sum-links a { color: var(--purple); cursor: pointer; }
.two-btns { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.two-btns .btn { height: 48px; }
.gc-grid, .pay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gc-card { height: 110px; border-radius: 16px; background: linear-gradient(135deg, #6950f3, #a08bff); color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 16px; text-align: left; }
.gc-card b { font-size: 20px; }
.pay-btn { height: 96px; border: 1px solid #d3d3d3; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-weight: 500; background: #fff; }
.pay-btn:hover { border-color: var(--text); background: #fafafa; }
.pm-ic { font-size: 24px; }
.pay-amount { margin: 12px 0 20px; max-width: 320px; }

/* receipt */
.receipt { max-width: 560px; margin: 0 auto 16px; }
.rc-head { text-align: center; border-bottom: 1px dashed #ccc; padding-bottom: 16px; }
.rc-biz { font-size: 22px; font-weight: 700; }
.rc-title { font-size: 17px; font-weight: 600; margin-top: 12px; }
.rc-client { padding: 12px 0; border-bottom: 1px dashed #ccc; }
.rc-items { width: 100%; border-collapse: collapse; margin: 8px 0; }
.rc-items td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.rc-items .num { text-align: right; }
.rc-sum { padding-top: 8px; }
.rc-foot { text-align: center; color: var(--muted); margin-top: 16px; }

/* client profile */
.profile { display: grid; grid-template-columns: 320px 1fr; gap: 24px; max-width: 1300px; margin: 0 auto; }
.profile-side { align-self: start; position: sticky; top: 90px; }
.profile-name { font-size: 22px; font-weight: 600; margin-top: 8px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 10px 0; }
.tag { padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; }
.tag.green { background: #e6f7ef; color: #00804f; }
.side-actions { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.alert-box { background: #fff4e0; color: #8a5a00; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; }
.profile-main { min-width: 0; }
.line-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; }
.link-row { display: flex; justify-content: space-between; align-items: center; }
.bulk-bar { display: flex; gap: 8px; align-items: center; background: var(--text); color: #fff; padding: 8px 16px; border-radius: 12px; margin-bottom: 12px; }
.bulk-bar select { height: 32px; width: auto; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 16px; }

.seg-list .seg { display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 10px; }
.rating-big { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.rb-num { font-size: 40px; font-weight: 700; }
.stars { color: #f5a623; letter-spacing: 2px; }
.dist-row { display: grid; grid-template-columns: 40px 1fr 40px; gap: 12px; align-items: center; padding: 4px 0; }
.bar { height: 8px; background: var(--grey-soft); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: #f5a623; }
.review .reply { background: #fafafa; border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
details summary { cursor: pointer; margin-top: 8px; }

/* catalog */
.menu-layout, .reports-layout, .set-layout { display: flex; gap: 32px; align-items: flex-start; max-width: 1300px; margin: 0 auto; }
.cat-nav, .rep-nav, .set-nav { width: 240px; flex: none; position: sticky; top: 90px; display: flex; flex-direction: column; gap: 2px; }
.cat-nav-title { font-weight: 600; font-size: 17px; margin-bottom: 8px; }
.rep-nav-title { font-size: 28px; font-weight: 600; margin-bottom: 16px; }
.cat-item { display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 8px; }
.cat-item span { color: var(--muted); }
.cat-item:hover { background: #ececec; }
.cat-item.active { background: #fff; font-weight: 600; box-shadow: 0 1px 2px #0001; border: 1px solid var(--line); }
.cat-add { padding: 10px 14px; }
.svc-group { margin-bottom: 8px; }
.svc-row { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-left: 6px solid; border-radius: 10px; padding: 14px 18px; margin-bottom: 8px; }
.svc-row:hover { box-shadow: 0 2px 8px #0000000f; }
.ben { background: #fafafa; margin-bottom: 12px; padding: 16px; }

/* team */
.shift-table td { vertical-align: middle; }
.shift-cell { width: 100%; min-width: 110px; padding: 10px 8px; border-radius: 8px; background: #e7f3ff; color: #1f5fbf; font-size: 13px; font-weight: 500; }
.shift-cell.off { background: repeating-linear-gradient(135deg, #f5f5f5, #f5f5f5 5px, #ececec 5px, #ececec 10px); color: var(--muted); }
.shift-cell.ovr { outline: 2px solid var(--purple); }
.shift-row { display: grid; grid-template-columns: 150px 1fr 16px 1fr; gap: 8px; align-items: center; }
.clock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.clock { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 0; }

/* marketing */
.auto { padding: 18px 20px; }
.toggle { width: 48px; height: 28px; border-radius: 999px; background: #d3d3d3; position: relative; transition: background .15s; }
.toggle i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px #0003; }
.toggle.on { background: var(--purple); }
.toggle.on i { left: 23px; }
.msg-preview { background: #fafafa; border-radius: 12px; padding: 16px; margin: 12px 0; white-space: pre-wrap; }

/* online */
.link-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.lt { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.link-card { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.qr { width: 72px; height: 72px; }
.steps ol { margin: 0; padding-left: 20px; line-height: 28px; }

/* reports & settings */
.rep-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
.rep-item { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 18px 20px; }
.rep-item:hover { border-color: #bbb; }
.star-btn { font-size: 20px; color: #d3d3d3; }
.star-btn.on { color: #f5a623; }
.set-list { display: flex; flex-direction: column; gap: 10px; }
.set-item { display: flex; align-items: center; gap: 16px; margin: 0; padding: 18px 20px; }
.set-item:hover { border-color: #bbb; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.hub-card { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.hub-card:hover { border-color: #bbb; }
.top-search { display: flex; align-items: center; }
.top-search input { width: 0; padding: 0; border: 0; height: 36px; transition: width .2s; }
.top-search.open input { width: 200px; padding: 0 12px; border: 1px solid #d3d3d3; }

/* public pages */
.pub { background: #f7f7f8; }
.pub-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.pub-main { max-width: 860px; margin: 0 auto; padding: 24px 16px 64px; }
.pub-foot { text-align: center; color: var(--muted); padding: 24px; font-size: 13px; }
.book-head { margin-bottom: 16px; }
.book-head h1 { font-size: 32px; }
.book-step { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 16px; }
.book-step h2 { font-size: 20px; margin-bottom: 12px; }
.book-svc input { width: 18px; }
.book-svc:has(input:checked) { background: #f1edff; }
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; }
.date-chip { min-width: 64px; padding: 8px; border-radius: 12px; border: 1px solid #d3d3d3; display: flex; flex-direction: column; align-items: center; background: #fff; }
.date-chip.active { background: var(--purple); color: #fff; border-color: var(--purple); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slot { height: 44px; border-radius: 10px; border: 1px solid #d3d3d3; background: #fff; font-weight: 500; }
.slot.active, .slot:hover { border-color: var(--purple); color: var(--purple); }
.summary { font-weight: 600; background: #f1edff; color: var(--purple); padding: 10px 14px; border-radius: 10px; }
.narrow-card { max-width: 560px; margin: 24px auto; }
.stars-in { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.stars-in input { display: none; }
.stars-in label { font-size: 36px; color: #d3d3d3; cursor: pointer; }
.stars-in input:checked ~ label, .stars-in label:hover, .stars-in label:hover ~ label { color: #f5a623; }
.hero { background: var(--brand, #6950f3); background-size: cover; background-position: center; color: #fff; border-radius: 20px; padding: 64px 32px; text-align: center; }
.hero h1 { font-size: 40px; line-height: 48px; margin-bottom: 12px; }
.hero p { margin-bottom: 20px; opacity: .9; }
.site-sec { margin-top: 40px; }
.site-sec h2 { font-size: 24px; margin-bottom: 16px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.shop-item { margin: 0; display: flex; flex-direction: column; gap: 4px; }

@media (max-width: 1100px) {
  .co, .profile { grid-template-columns: 1fr; }
  .profile-side, .co-right { position: static; }
  .cat-nav, .rep-nav, .set-nav { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .form-grid, .two, .stats3 { grid-template-columns: 1fr; }
  .fg.half { grid-column: span 2; }
  .search { min-width: 0; width: 100%; }
  .cal-main { padding-left: var(--rail-w); }
}
@media print {
  .topbar, .rail, .flyout, .page-actions, .toolbar, .fs-top, .toast, form.card, #refund, .tabs { display: none !important; }
  .main { padding: 0 !important; }
  body { background: #fff; }
  .card, .table-wrap { border: 0; }
}
.co-client.empty { flex-direction: row; justify-content: flex-start; text-align: left; background: #fff; }
.tag-ic { line-height: 1.2; margin-bottom: 6px; }
.book-svc { border-left-color: var(--purple) !important; }
.book-svc > span:nth-of-type(1) { flex: 1; }
.book-head h1 { line-height: 40px; margin-bottom: 4px; }
.book-head p { margin-bottom: 4px; }

/* =================================================================== v2 shell */
:root { --subnav-w: 224px; }
.subnav { position: fixed; top: calc(var(--header-h) + 1px); bottom: 0; left: var(--rail-w); width: var(--subnav-w); z-index: 20;
  background: #fff; border-right: 1px solid var(--line); transition: transform .18s; }
.subnav-scroll { height: 100%; overflow-y: auto; padding: 20px 12px; }
.subnav-title { font-size: 17px; font-weight: 600; line-height: 24px; padding: 4px 12px 8px; margin-top: 8px; }
.subnav-title:first-child { margin-top: 0; }
.subnav-link { display: block; padding: 10px 12px; border-radius: 8px; font-size: 15px; line-height: 20px; color: var(--text); }
.subnav-link:hover { background: var(--grey-soft); }
.subnav-link.active { background: #efecfe; color: var(--purple); font-weight: 500; }
.subnav-toggle { position: absolute; top: 14px; right: -14px; width: 28px; height: 28px; border-radius: 50%; background: #fff;
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; z-index: 2; box-shadow: 0 1px 3px #0001; }
body.with-subnav .main { padding-left: calc(var(--rail-w) + var(--subnav-w) + 40px); }
.subnav-collapsed .subnav { transform: translateX(calc(-1 * var(--subnav-w) + 0px)); }
.subnav-collapsed .subnav .subnav-toggle { right: -30px; transform: rotate(180deg); }
.subnav-collapsed body.with-subnav .main { padding-left: calc(var(--rail-w) + 40px); }
.rail-item { text-decoration: none; }

.side-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: #fff; z-index: 150;
  display: flex; flex-direction: column; box-shadow: -8px 0 32px #0002; animation: sdIn .18s ease-out; }
.side-drawer.search { left: 0; right: auto; width: min(560px, 100vw); box-shadow: 8px 0 32px #0002; animation: sdInL .18s ease-out; }
.side-drawer.notifications { width: min(560px, 100vw); flex-direction: row; }
#sh-back { z-index: 140; }
@keyframes sdIn { from { transform: translateX(40px); opacity: .4; } }
@keyframes sdInL { from { transform: translateX(-40px); opacity: .4; } }
.sd-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 24px 8px; }
.sd-head h2 { font-size: 24px; font-weight: 600; }
.sd-body { flex: 1; overflow-y: auto; padding: 12px 24px 24px; }
.no-scroll { overflow: hidden; }
.sd-search { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.sd-search input { border: 0; box-shadow: none; font-size: 17px; padding: 0; }
.sr-title { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 16px 0 6px; }
.sr-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 10px; }
.sr-item:hover { background: var(--grey-soft); }
.empty-mini { text-align: center; padding: 48px 16px; }
.segmented { display: flex; background: var(--grey-soft); border-radius: 10px; padding: 3px; margin-bottom: 20px; }
.seg { flex: 1; padding: 8px; border-radius: 8px; font-weight: 500; color: var(--muted); }
.seg.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px #0002; }
.ins-title { font-size: 20px; margin-bottom: 2px; }
.ins-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-top: 12px; }
.ins-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.ins-big { font-size: 24px; font-weight: 700; margin: 4px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ins-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.chg { font-size: 12px; font-weight: 500; }
.chg.up { color: #00804f; } .chg.down { color: var(--red); } .chg.flat { color: var(--muted); }
.mini-bars { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin-top: 12px; }
.mb { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.mb i { display: block; width: 100%; background: var(--purple); border-radius: 4px 4px 0 0; }
.mini-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.loading-pad { padding: 32px 0; color: var(--muted); }
.news-item { border-bottom: 1px solid var(--line); padding: 16px 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.nt-tabs { width: 104px; border-right: 1px solid var(--line); padding: 16px 8px; display: flex; flex-direction: column; gap: 4px; flex: none; }
.nt-tab { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 8px; font-size: 12px; color: var(--muted); }
.nt-tab span { font-size: 20px; }
.nt-tab.on { background: #efecfe; color: var(--purple); font-weight: 600; }
.nt-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.nt-card { position: relative; display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.nt-card:hover { background: #fafafa; }
.nt-dot { position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--purple); }
.nt-dot.static { position: static; flex: none; }
.side-drawer.wallet { background: #f7f7f8; }
.wl-head { background: linear-gradient(110deg, #6950f3 0%, #a063f5 50%, #f06bd8 100%); color: #fff; padding: 20px 24px 64px; }
.wl-head p { color: #fff; }
.wl-bal { font-size: 40px; font-weight: 700; margin: 4px 0 16px; }
.wl-bal small { font-size: 22px; }
.x.light { color: #fff; }
.btn-ghost-light { border: 1px solid #fffa; color: #fff; background: #ffffff1a; }
.side-drawer.wallet .sd-body { margin-top: -44px; }
.wl-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.wl-ic { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--grey-soft); flex: none; }
.wl-ic.in { background: #e6f7ef; color: #00804f; } .wl-ic.out { background: #efecfe; color: var(--purple); }
.pos { color: #00804f; }
.wl-day { margin: 20px 0 8px; }
.user-menu { width: 300px; }
.um-head { display: flex; gap: 12px; align-items: center; padding: 8px 12px 12px; }
.um-banner { display: flex !important; justify-content: space-between; background: #fff4e0; border-radius: 10px; margin: 4px 0 8px; }
.dd-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.dd-sub { font-size: 12px; color: var(--muted); padding: 4px 12px; text-transform: uppercase; }
.check-mark { color: var(--purple); margin-left: auto; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-title.sm { font-size: 22px; line-height: 28px; }

/* Client Connect */
.connect-main { padding-bottom: 0; }
.connect { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - var(--header-h) - 60px); background: #fff;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-width: 1400px; margin: 0 auto; }
.cn-list { border-right: 1px solid var(--line); overflow-y: auto; }
.cn-head { padding: 16px; }
.tabs.slim { margin: 0 16px 8px; }
.cn-item { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.cn-item.active, .cn-item:hover { background: #f5f3ff; }
.cn-thread { display: flex; flex-direction: column; min-width: 0; }
.cn-thread-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.cn-msgs { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; background: #fafafa; }
.bubble { max-width: 70%; padding: 10px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); align-self: flex-start; }
.bubble.business { align-self: flex-end; background: var(--purple); color: #fff; border-color: var(--purple); }
.bubble.business .muted { color: #e8e3ff; }
.cn-compose { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: flex-end; }
.cn-empty { margin: auto; text-align: center; max-width: 420px; padding: 24px; }

/* login */
.login-body { background: #fff; }
.login-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.login-card { max-width: 420px; margin: auto; width: 100%; padding: 32px; }
.login-card h1 { font-size: 28px; margin: 24px 0 4px; }
.login-art { background: linear-gradient(135deg, #6950f3, #f06bd8); color: #fff; display: flex; align-items: flex-end; padding: 48px; }
.login-art h2 { font-size: 32px; line-height: 40px; }
@media (max-width: 900px) { .login-wrap { grid-template-columns: 1fr; } .login-art { display: none; } .connect { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { body.with-subnav .main { padding-left: calc(var(--rail-w) + 24px); } .subnav { display: none; } }

/* ---------- v2 components ---------- */
.switch { position: relative; display: inline-flex; width: 40px; height: 24px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #d3d3d3; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #0003; transition: left .15s; }
.switch input:checked + i { background: var(--purple); }
.switch input:checked + i::after { left: 19px; }
.switch input:disabled + i { opacity: .5; }
.sw-row { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; padding: 16px 0; }
.sw-row + .sw-row { border-top: 1px solid var(--line); }
.sw-row .sw-text b { display: block; font-weight: 600; }
.sw-row .sw-text p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.sw-row.left { justify-content: flex-start; }
.char-count { display: block; text-align: right; color: var(--muted); font-size: 13px; margin-top: 4px; }

/* full-screen form with left section nav */
.fs-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 48px; max-width: 1120px; margin: 0 auto; padding: 32px 24px 96px; }
.fs-nav { position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.fs-nav .fs-nav-title { font-size: 13px; color: var(--muted); font-weight: 600; margin: 16px 12px 6px; }
.fs-nav .fs-nav-title:first-child { margin-top: 0; }
.fs-nav a { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 8px; font-weight: 500; color: var(--text); }
.fs-nav a:hover { background: var(--grey-soft); }
.fs-nav a.active { background: #eaf1fd; color: var(--blue); }
.fs-nav a .cnt { color: var(--muted); font-weight: 400; }
.fs-content > section { max-width: 720px; }
.fs-content h2.sec-h { font-size: 24px; line-height: 32px; font-weight: 600; }
.fs-content p.sec-p { color: var(--muted); margin: 4px 0 24px; }
.fs-content h3.sub-h { font-size: 18px; font-weight: 600; margin: 32px 0 4px; }
.fs-top .fs-title-center { position: absolute; left: 50%; transform: translateX(-50%); font-weight: 600; font-size: 17px; }
.fs-top { position: sticky; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches label { position: relative; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; }
.swatches input { position: absolute; opacity: 0; }
.swatches span { position: absolute; inset: 0; border-radius: 50%; }
.swatches input:checked + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--purple); }
.list-card { border: 1px solid var(--line); border-radius: 12px; }
.list-card .li { display: flex; align-items: center; gap: 12px; padding: 16px; }
.list-card .li + .li { border-top: 1px solid var(--line); }
.list-card .li .grow { flex: 1; min-width: 0; }
.add-link { display: inline-flex; align-items: center; gap: 8px; color: var(--purple); font-weight: 600; cursor: pointer; padding: 8px 0; }
.empty-box { border: 1px dashed #d3d3d3; border-radius: 12px; padding: 24px; text-align: center; color: var(--muted); }
.tsvc-group { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.tsvc-group > .check { padding: 14px 16px; font-weight: 600; border-bottom: 1px solid var(--line); }
.tsvc-group .check.svc { padding: 12px 16px 12px 44px; }
.tsvc-group .check.svc .grow { flex: 1; }
.promo-card { border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: linear-gradient(135deg, #f4f1ff, #fff); }
.promo-card ul { margin: 12px 0 16px 20px; list-style: disc; color: var(--text); }
.tag-soft { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #efeafe; color: #5a3fd6; font-size: 12px; font-weight: 600; }

/* filter drawer */
.fdrawer { position: fixed; inset: 0; z-index: 110; }
.fdrawer[hidden] { display: none; }
.fdrawer-back { position: absolute; inset: 0; background: #0006; }
.fdrawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: #fff; display: flex; flex-direction: column; box-shadow: -8px 0 32px #0002; }
.fdrawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; }
.fdrawer-head h2 { font-size: 24px; font-weight: 600; }
.fdrawer-body { flex: 1; overflow: auto; padding: 0 24px 24px; }
.fdrawer-foot { display: flex; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--line); }
.fdrawer-foot .btn { flex: 1; }
.facc { border-bottom: 1px solid var(--line); }
.facc > summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; }
.facc > summary::after { content: "⌄"; color: var(--muted); }
.facc[open] > summary::after { content: "⌃"; }
.facc .check { padding: 8px 0; }

/* bulk bar */
.bulk-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--text); color: #fff; border-radius: 12px; margin-bottom: 12px; }
.bulk-bar[hidden] { display: none; }
.bulk-bar .btn-outline { background: transparent; color: #fff; border-color: #fff6; }
th.cbcol, td.cbcol { width: 44px; }
.rating-mini { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; color: var(--text); }
.rating-mini .st { color: #f5a623; }
.member-cell .sub { color: var(--muted); font-size: 14px; }

/* permission roles */
.role-list { border: 1px solid var(--line); border-radius: 12px; }
.role-row { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.role-row + .role-row { border-top: 1px solid var(--line); }
.role-row .grow { flex: 1; min-width: 0; }
.role-row .grow b { font-weight: 600; }
.role-row .grow p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.av-stack { display: flex; }
.av-stack .av { width: 32px; height: 32px; font-size: 12px; border: 2px solid #fff; margin-left: -8px; }
.av-stack .av:first-child { margin-left: 0; }
.av-more { background: var(--grey-soft) !important; color: var(--text) !important; }
.perm-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 40px; max-width: 1120px; margin: 0 auto; padding: 32px 24px 96px; }
.perm-area-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.perm-group { margin-top: 20px; }
.perm-group h4 { font-weight: 600; margin-bottom: 4px; }
.perm-item { display: flex; gap: 12px; padding: 8px 0; cursor: pointer; }
.perm-item input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--text); flex: none; }
.perm-item small { display: block; color: var(--muted); font-size: 13px; }
.perm-area.disabled .perm-group { opacity: .45; pointer-events: none; }
.steps-dots { display: flex; gap: 6px; justify-content: center; }
.steps-dots i { width: 32px; height: 4px; border-radius: 4px; background: var(--line); }
.steps-dots i.on { background: var(--text); }
.default-badge { font-size: 12px; font-weight: 600; color: var(--blue); background: #eaf1fd; border-radius: 999px; padding: 2px 8px; margin-left: 8px; }
@media (max-width: 800px) { .fs-wrap, .perm-wrap { grid-template-columns: 1fr; gap: 16px; } .fs-nav { position: static; flex-direction: row; overflow-x: auto; } .fs-nav .fs-nav-title { display: none; } .fs-nav a { white-space: nowrap; } }
.fs2-top { gap: 16px; }
.fs2-title { font-weight: 600; font-size: 17px; flex: 1; }
.fs2-left:empty { display: none; }
.drag-h { cursor: grab; color: var(--muted); font-size: 18px; }
.li.dragging { opacity: .5; background: var(--grey-soft); }
.badge-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; border-radius: 999px; background: var(--purple); color: #fff; font-size: 12px; padding: 0 6px; }
.input-copy { display: flex; gap: 8px; }
.input-copy input { flex: 1; }
.link-plain { color: inherit; }
.link-plain:hover { text-decoration: underline; }
.mb16 { margin-bottom: 16px; }
.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }
td.right, th.right { text-align: right; }
.row-3 { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 8px; }
.input-suffix { display: flex; align-items: center; border: 1px solid #d3d3d3; border-radius: 8px; overflow: hidden; background: #fff; }
.input-suffix input { border: 0 !important; flex: 1; min-width: 0; }
.input-suffix span { padding: 0 12px; color: var(--muted); }
select.sel-sm { width: auto; min-width: 220px; }
details.adv > summary { cursor: pointer; padding: 12px 0; list-style: none; }
details.adv > summary::after { content: " ⌄"; color: var(--muted); }
.fs-content section[hidden] { display: none; }
.input-suffix { height: 44px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 500; margin-bottom: 12px; }
.back-link:hover { color: var(--text); }
.row-end { display: flex; justify-content: flex-end; gap: 8px; }
.role-list + .role-list { margin-top: 0; }
.sw-inline { display: inline-flex; gap: 10px; align-items: center; }
.notice { background: #eaf1fd; color: #1d4fa8; border-radius: 12px; padding: 12px 16px; }
.perm-wrap .fs-nav a { cursor: pointer; }
.cell-input { width: 90px; height: 36px; padding: 0 8px; border: 1px solid #d3d3d3; border-radius: 8px; }
.table.compact td, .table.compact th { padding: 10px 8px; }
.nav-cap { font-size: 13px; color: var(--muted); font-weight: 600; margin: 8px 12px 6px; }
.perm-wrap .search { width: 100%; }

/* ================= Calendar v2 ================= */
.cal-toolbar { padding: 12px 16px; border-bottom: 0; }
.tb-ic { width: 40px; height: 40px; padding: 0; border-radius: 999px; position: relative; justify-content: center; }
.tb-ic.on { background: #f0edff; border-color: #c9bffb; color: #3d2db3; }
.tb-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 999px; background: var(--purple); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.date-nav .date-btn { min-width: 150px; justify-content: center; font-weight: 500; }
.view-btn { min-width: 92px; }
.dd-menu a.sel { font-weight: 600; background: var(--grey-soft); }
.dd-menu a .ic, .dd-menu a > svg { flex: none; color: var(--text); }
.cal-head { grid-template-columns: 64px repeat(var(--cols), minmax(110px, 1fr)); border-bottom: 1px solid var(--line); box-shadow: 0 2px 4px #0000000a; position: relative; z-index: 6; background: #fff; }
.cal-body { grid-template-columns: 64px repeat(var(--cols), minmax(110px, 1fr)); }
.cal-col-head { padding: 10px 4px 8px; gap: 6px; border-right: 1px solid var(--line); }
.cal-col-head .nm { font-size: 12px; font-weight: 600; }
a.cal-col-head.day { color: inherit; text-decoration: none; }
a.cal-col-head.day:hover .dn { background: var(--grey-soft); }
.cal-col-head.day.today .dn { background: var(--purple); color: #fff; }
.col-av { width: 48px; height: 48px; border-radius: 50%; padding: 2px; border: 2px solid var(--ring); display: flex; background: #fff; }
.col-av > span { flex: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; color: #3d2db3; }
.col-av.res { align-items: center; justify-content: center; color: #6950f3; background: #f4f1ff; }
.closed-chip { font-size: 11px; background: #fdebee; color: var(--red); border-radius: 999px; padding: 0 8px; font-weight: 600; }
.cal-times { position: sticky; left: 0; z-index: 5; background: #fff; border-right: 1px solid var(--line); }
.cal-hour-label { position: absolute; right: 0; left: 0; display: flex; flex-direction: column; align-items: flex-end; padding: 0 8px; font-size: 12px; line-height: 14px; transform: translateY(2px); }
.cal-hour-label:first-child { transform: translateY(2px); }
.cal-hour-label b { font-weight: 600; }
.cal-col { border-right: 1px solid var(--line); cursor: default;
  background-image: linear-gradient(to bottom, #e5e5e5 1px, transparent 1px), linear-gradient(to bottom, #f3f3f3 1px, transparent 1px);
  background-size: 100% var(--hour), 100% calc(var(--hour) / 4); }
.cal-col .off { background: repeating-linear-gradient(135deg, #f4f4f4 0 6px, #ebebeb 6px 7px); opacity: 1; }
.cal-col .off.closed { display: flex; align-items: flex-start; justify-content: center; padding-top: 40px; }
.cal-col .off.closed span { position: sticky; top: 8px; background: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12px; color: var(--muted); font-weight: 600; }
.slot-hover { position: absolute; left: 1px; right: 1px; background: #f0edff; border: 1px solid #c9bffb; border-radius: 4px; font-size: 11px; font-weight: 600; color: #3d2db3; padding: 0 6px; pointer-events: none; z-index: 1; display: flex; align-items: center; overflow: hidden; }
.ev { border-radius: 4px; padding: 3px 5px; font-size: 12px; line-height: 15px; background: var(--bg, #a5dff8); color: #0d0d0d; cursor: pointer; border: 1px solid #ffffffb3; box-shadow: none; z-index: 2; }
.ev:hover { filter: brightness(.97); z-index: 4; box-shadow: 0 2px 8px #0002; }
.ev-top { display: flex; justify-content: space-between; gap: 4px; align-items: center; }
.ev-time { font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-ics { display: inline-flex; gap: 2px; flex: none; }
.ev-ics .ic { stroke-width: 2; }
.ev-ics .ic.red { color: #d4163a; fill: #d4163a; }
.ev-client { font-weight: 700; }
.ev-svc { font-size: 12px; }
.ev .muted2 { color: #3b3b3b; }
.ev-cs { display: inline-block; font-size: 10px; font-weight: 700; background: #fff9; border-radius: 999px; padding: 0 6px; margin-top: 2px; }
.ev.done { --bg: #dee3e7; }
.ev.st-no_show { background: repeating-linear-gradient(135deg, #fbe3e8 0 6px, #f8d5dc 6px 12px); }
.ev.st-canceled { opacity: .55; }
.ev.st-canceled .ev-client, .ev.st-canceled .ev-svc { text-decoration: line-through; }
.ev.blocked { --bg: #a4adba; background: #a4adba; color: #0d0d0d; }
.ev-extra { position: absolute; left: 0; right: 0; top: 100%; background: repeating-linear-gradient(135deg, #ffffffaa 0 4px, transparent 4px 8px), var(--bg); opacity: .6; border-radius: 0 0 4px 4px; pointer-events: none; }
.ev-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.ev:hover .ev-resize::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 16px; height: 2px; margin-left: -8px; border-top: 2px solid #0006; border-bottom: 0; }
.ev.dragging { opacity: .85; box-shadow: 0 10px 28px #0003; z-index: 20; cursor: grabbing; }
.ev.flash { animation: evflash 1.4s ease 1; }
@keyframes evflash { 0%, 100% { box-shadow: 0 0 0 0 #6950f300; } 30% { box-shadow: 0 0 0 4px #6950f3aa; } }
.drag-tip { position: absolute; left: 50%; top: -24px; transform: translateX(-50%); background: #0d0d0d; color: #fff; font-size: 11px; font-weight: 600; border-radius: 6px; padding: 2px 6px; white-space: nowrap; pointer-events: none; }
.now-tag { left: 4px; right: auto; }
.slot-menu { min-width: 240px; padding: 6px; }
.slot-menu a { display: flex; gap: 10px; align-items: center; }
.slot-time { font-weight: 600; padding: 8px 12px 4px; color: var(--muted); font-size: 13px; }
.cal-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 80px 16px; text-align: center; color: var(--muted); }
.cal-empty h3 { color: var(--text); font-size: 18px; font-weight: 600; }

/* month view */
.cal-month .cal-head { grid-template-columns: repeat(7, 1fr); }
.m-dow { padding: 10px; font-size: 13px; font-weight: 600; color: var(--muted); border-right: 1px solid var(--line); }
.cal-month .cal-body { display: block; }
.m-grid { display: grid; grid-template-columns: repeat(7, 1fr); min-height: 100%; }
.m-cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; cursor: pointer; }
.m-cell:hover { background: #fafafa; }
.m-cell.other { background: #fafafa; color: var(--muted); }
.m-cell.closed { background: repeating-linear-gradient(135deg, #f7f7f7 0 6px, #efefef 6px 7px); }
.m-num { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.m-num span { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.m-num small { color: var(--muted); font-weight: 500; font-size: 11px; }
.m-cell.today .m-num span { background: var(--purple); color: #fff; }
.m-chip { display: block; background: var(--bg); border-radius: 4px; padding: 2px 6px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #0d0d0d; }
.m-more { font-size: 12px; font-weight: 600; color: var(--purple); padding: 0 6px; }

/* popovers */
.popover { position: fixed; z-index: 95; background: #fff; border-radius: 12px; box-shadow: 0 12px 40px #0000002e; border: 1px solid var(--line); }
.popover[hidden] { display: none; }
.date-pop { padding: 20px 20px 16px; width: 560px; max-width: calc(100vw - 24px); }
.dp-months { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.dp-title { text-align: center; font-weight: 600; margin-bottom: 12px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dp-dow { font-size: 13px; color: var(--muted); padding: 6px 0; }
.dp-d { width: 34px; height: 34px; margin: 0 auto; display: flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer; font-size: 14px; }
.dp-d:hover { background: var(--grey-soft); }
.dp-d.today { font-weight: 700; color: var(--purple); }
.dp-d.sel { background: var(--purple); color: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #c9bffb; }
.dp-nav { position: absolute; top: 16px; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.dp-nav:hover { background: var(--grey-soft); }
.dp-nav.prev { left: 24px; } .dp-nav.next { right: 24px; }
.dp-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid #d3d3d3; background: #fff; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.chip:hover { background: var(--grey-soft); }
.team-pop { width: 300px; max-height: min(640px, calc(100vh - 140px)); display: flex; flex-direction: column; padding: 12px; }
.tp-search { margin-bottom: 8px; width: 100%; }
.tp-list { overflow-y: auto; flex: 1; }
.tp-list hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.tp-opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.tp-opt:hover { background: var(--grey-soft); }
.tp-opt.on { background: #f0edff; font-weight: 600; }
.tp-check { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.tp-check:hover { background: var(--grey-soft); }
.tp-check input { width: 18px; height: 18px; accent-color: var(--purple); }
.res-ic { width: 28px; height: 28px; border-radius: 50%; background: #f4f1ff; color: var(--purple); display: flex; align-items: center; justify-content: center; }
.range { width: 100%; accent-color: var(--purple); }
.svc-filter { max-height: 260px; overflow: auto; margin-bottom: 12px; }

/* pick mode */
.pick-bar { position: fixed; top: 0; left: 0; right: 0; height: 64px; z-index: 60; background: var(--purple); color: #fff; display: flex; align-items: center; justify-content: center; }
.pick-bar p { font-weight: 600; font-size: 17px; }
.pick-actions { position: absolute; right: 16px; display: flex; gap: 8px; }
body.picking .rail { visibility: hidden; }
body.picking .ev { opacity: .45; pointer-events: none; }
body.picking .cal-col { cursor: pointer; }
.av-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.av-slots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.modal.wide { width: min(720px, 100%); }

/* appointment drawer */
.apd-back { position: fixed; inset: 0; background: #0000004d; z-index: 90; }
.apd-back[hidden], .apd[hidden], .apd-mini[hidden] { display: none; }
.apd { position: fixed; top: 0; right: 0; bottom: 0; width: min(800px, calc(100vw - 72px)); background: #fff; z-index: 91; box-shadow: -12px 0 40px #0000002e; }
.apd.narrow { width: min(480px, 100vw); }
.apd-float { position: absolute; left: -60px; top: 12px; display: flex; flex-direction: column; gap: 10px; }
.float-btn { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px #0002; }
.float-btn:hover { background: #f5f5f5; }
.apd-inner { display: flex; height: 100%; }
.apd-left { width: 236px; flex: none; border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.apd-left.narrow { width: 160px; }
.apd-right { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.apd-right.single { width: 100%; }
.cp-add { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 12px; text-align: center; width: 100%; }
.cp-add:hover { background: #fafafa; }
.cp-add-ic { width: 56px; height: 56px; border-radius: 50%; background: #f0edff; color: var(--purple); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.cp-add small { color: var(--muted); font-size: 13px; line-height: 17px; }
.cp-search { padding: 20px 16px 12px; border-bottom: 1px solid var(--line); }
.cp-title { font-weight: 600; font-size: 17px; margin-bottom: 12px; }
.cp-search .search { width: 100%; }
.cp-list { flex: 1; overflow-y: auto; padding: 8px; }
.cp-list hr { border: 0; border-top: 1px solid var(--line); margin: 6px 8px; }
.cp-item { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; cursor: pointer; font-size: 14px; min-width: 0; }
.cp-item:hover, .cp-item.on { background: var(--grey-soft); }
.cp-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cp-av { width: 44px; height: 44px; flex: none; border-radius: 50%; background: #efeafe; color: #5a3fd6; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; }
.cp-av.plain { background: #f0edff; }
.cp-head { padding: 20px 16px 8px; }
.add-row { display: flex; align-items: center; gap: 10px; padding: 10px 8px; color: var(--purple); font-weight: 600; width: 100%; border-radius: 10px; }
.add-row:hover { background: #f4f1ff; }
.cp-card { padding: 28px 16px 20px; text-align: center; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cp-big { width: 72px; height: 72px; border-radius: 50%; background: #efeafe; color: #5a3fd6; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 600; margin-bottom: 12px; }
.cp-name { font-weight: 700; font-size: 16px; }
.cp-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 8px; }
.cp-btns { display: flex; gap: 8px; margin-top: 16px; }
.cp-info { padding: 12px 16px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cp-row { display: flex; gap: 10px; padding: 8px 0; font-size: 14px; align-items: flex-start; color: var(--text); }
.cp-row .ic { flex: none; margin-top: 1px; }
.cp-row p { color: var(--muted); font-size: 13px; }
.cp-row.link-row { color: var(--muted); cursor: pointer; }
.cp-row.link-row:hover { color: var(--text); }
.cp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.cp-stats div { display: flex; flex-direction: column; }
.cp-stats small { color: var(--muted); font-size: 12px; }
.pad { padding: 8px; }
.ap-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.ap-head.colored { background: var(--hbg); color: #fff; border-bottom: 0; }
.ap-head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ap-date { position: relative; font-size: 24px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.ap-date input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ap-status { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid currentColor; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; color: inherit; background: transparent; }
.ap-head:not(.colored) .ap-status { border-color: #d3d3d3; }
.ap-sub { font-size: 14px; margin-top: 4px; opacity: .92; }
.status-menu { min-width: 220px; color: var(--text); }
.status-menu .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ap-body { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.ap-sec { font-size: 17px; font-weight: 700; margin-top: 8px; }
.svc-card { position: relative; background: #fff; border-radius: 8px; padding: 12px 14px 12px 16px; border: 1px solid transparent; }
.svc-card::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--bar); }
.svc-card:hover { background: #f7f7f7; }
.svc-card-top { display: flex; justify-content: space-between; gap: 8px; }
.svc-card-acts { position: absolute; top: 8px; right: 10px; display: none; gap: 2px; background: #f7f7f7; }
.svc-card:not(.locked):hover .svc-card-acts { display: flex; }
.svc-card:not(.locked):hover .svc-card-top p:last-child { visibility: hidden; }
.warn-chip { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; background: #fff4d6; color: #7a4f00; border: 1px solid #f5d98f; border-radius: 999px; font-size: 12px; font-weight: 500; padding: 1px 8px; }
.warn-text { display: flex; gap: 6px; align-items: center; color: #7a4f00; font-size: 13px; margin-top: 6px; }
.pill-btn { border-radius: 999px; height: 36px; }
.rec { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; }
.rec .ic { color: #6950f3; flex: none; }
.ap-meta { margin-top: 8px; }
.ap-foot { border-top: 1px solid var(--line); padding: 14px 24px 20px; }
.ap-total { display: flex; justify-content: space-between; font-size: 14px; }
.pay-line { display: block; font-weight: 700; margin: 2px 0 12px; color: var(--text); }
.ap-btns { display: flex; gap: 8px; align-items: center; }
.ap-btns .grow { flex: 1; height: 48px; border-radius: 999px; }
.ap-btns .round { width: 48px; height: 48px; border-radius: 50%; padding: 0; justify-content: center; }
.ap-more { min-width: 260px; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--muted); align-self: flex-start; }
.back-btn:hover { color: var(--text); }
.sp-title { font-size: 26px; font-weight: 700; }
.sp-cat { font-size: 17px; font-weight: 700; margin: 16px 0 8px; display: flex; align-items: center; gap: 8px; }
.sp-row { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px 12px 18px; border-radius: 8px; cursor: pointer; }
.sp-row::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--bar); }
.sp-row:hover { background: #f7f7f7; }
.sp-row .grow { display: flex; flex-direction: column; align-items: flex-start; }
.sp-row small { font-size: 13px; }
.edit-line .form-grid { gap: 16px 16px; }
.timeline { display: flex; flex-direction: column; }
.tl-row { display: flex; gap: 12px; padding: 8px 0; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--purple); margin-top: 6px; flex: none; }
.tl-dot.blue { background: var(--blue); }
.bt-types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bt-type { position: relative; cursor: pointer; }
.bt-type input { position: absolute; opacity: 0; }
.bt-type span { display: flex; flex-direction: column; border: 1px solid #d3d3d3; border-radius: 10px; padding: 10px 12px; }
.bt-type em { font-style: normal; font-size: 20px; }
.bt-type small { color: var(--muted); font-size: 12px; }
.bt-type input:checked + span { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple); background: #f8f6ff; }
.wl-tools { display: flex; gap: 8px; }
.wl-seg { display: flex; gap: 6px; background: var(--grey-soft); padding: 4px; border-radius: 999px; flex: none; }
.seg-btn { flex: 1; height: 36px; border-radius: 999px; font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg-btn.on { background: #fff; box-shadow: 0 1px 3px #0002; font-weight: 600; }
.wl-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row-2 { display: flex; gap: 8px; }
.row-2 input { flex: 1; }
.apd-mini { position: fixed; right: 24px; bottom: 24px; z-index: 92; display: flex; align-items: center; gap: 8px; background: var(--text); color: #fff; border-radius: 999px; height: 48px; padding: 0 20px; box-shadow: 0 8px 24px #0004; font-weight: 600; }
.icon-btn.sm { width: 32px; height: 32px; }
.mt8 { margin-top: 8px; }
.toast.hide { opacity: 0; transition: opacity .4s; }
@media (max-width: 900px) {
  .apd-float { left: auto; right: 12px; top: auto; bottom: 96px; flex-direction: row; }
  .apd-inner { flex-direction: column; }
  .apd-left, .apd-left.narrow { width: 100%; max-height: 40%; border-right: 0; border-bottom: 1px solid var(--line); }
  .date-pop { width: calc(100vw - 24px); } .dp-months { grid-template-columns: 1fr; }
}
.cp-row.link-row { justify-content: flex-start; text-align: left; }
.apd.no-focus [data-act=focus], .apd.no-focus [data-act=minimize] { display: none; }

/* ================= Checkout v2 ================= */
.co-body { background: #fff; }
.co-x { position: fixed; top: 12px; left: 12px; z-index: 20; }
.co2 { display: grid; grid-template-columns: minmax(360px, 1fr) minmax(340px, 480px); height: 100vh; }
.co2-left { overflow-y: auto; padding: 24px 32px 40px 80px; border-right: 1px solid var(--line); }
.co2-right { display: flex; flex-direction: column; min-height: 0; }
.co-crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.co-crumbs span { cursor: pointer; }
.co-crumbs span.on { color: var(--text); font-weight: 500; }
.co-h1 { font-size: 28px; font-weight: 700; margin: 8px 0 20px; }
.co-search { width: 100%; margin-bottom: 20px; background: #f5f5f5; }
.co-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.co-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; text-align: left; font-weight: 500; min-height: 76px; }
.co-tile:hover { background: #fafafa; border-color: #d3d3d3; }
.co-qs-head { margin: 28px 0 12px; }
.co-qs-head h3 { font-weight: 600; }
.co-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.co-qtile { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-height: 88px; text-align: left; }
.co-qtile:hover { border-color: #d3d3d3; box-shadow: 0 2px 8px #0000000d; }
.co-qimg { width: 72px; flex: none; display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--line); color: #333; }
.co-qtxt { display: flex; flex-direction: column; justify-content: center; padding: 10px 12px; gap: 2px; }
.co-qtxt small { color: var(--muted); }
.co-back { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.co-back h2 { font-size: 20px; font-weight: 700; }
.co-list { display: flex; flex-direction: column; gap: 10px; }
.co-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 20px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; overflow: hidden; }
.co-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--bar); }
.co-row:hover { background: #fafafa; }
.co-row .grow p { font-weight: 500; }
.co-row .dotsep { color: var(--muted); margin: 0 2px; }
.co-gc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.co-gcard { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 16px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #6950f3, #e36bd1); text-align: left; min-height: 110px; }
.co-gcard b { font-size: 20px; }
.co-gcard.custom { background: #fff; color: var(--text); border: 1px dashed #c9c9c9; }
.co-tipgrid, .co-paygrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.co-tipt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 88px; border: 1px solid var(--line); border-radius: 10px; }
.co-tipt:hover { background: #fafafa; }
.co-tipt.on { border: 2px solid var(--purple); }
.co-tipt b { font-size: 16px; }
.co-tipt small { color: var(--muted); }
.co-ptile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 88px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.co-ptile:hover { background: #fafafa; border-color: #d3d3d3; }
.pm-ic.green { color: #00a36c; } .pm-ic.purple { color: var(--purple); }
.co-done { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 16px; color: #00a36c; text-align: center; }
.co-done p { color: var(--text); }
.inline-sel { width: auto; height: 32px; display: inline-block; padding: 0 28px 0 8px; }
.co2-right #co-client { padding: 24px 24px 12px; }
.co-cc { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; width: 100%; text-align: left; }
.co-cc.empty:hover { background: #fafafa; }
.cp-add-ic.sm { width: 48px; height: 48px; margin: 0; }
.co-alert { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 13px; color: #7a4f00; background: #fff4d6; border-radius: 8px; padding: 6px 10px; }
.co-benefits { margin-top: 8px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; background: #f4f1ff; border-radius: 8px; padding: 8px 10px; }
.co-benefits p { display: flex; gap: 6px; align-items: center; }
.co2-items { flex: 1; overflow-y: auto; padding: 8px 24px; }
.co-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; height: 100%; min-height: 200px; padding: 0 24px; }
.co-cart-ic { color: var(--purple); margin-bottom: 4px; }
.co-item2 { position: relative; display: flex; gap: 12px; padding: 12px 0 12px 16px; cursor: pointer; border-radius: 6px; }
.co-item2::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--bar); }
.co-item2:hover { background: #fafafa; }
.co-item2 .right { text-align: right; padding-right: 4px; }
.co-ben { display: flex; gap: 4px; align-items: center; font-size: 12px; color: #5a3fd6; margin-top: 2px; }
.co-addcart { margin-top: 8px; border-radius: 999px; }
.co-note { display: flex; gap: 6px; align-items: flex-start; color: var(--muted); font-size: 13px; margin-top: 12px; }
.co2-foot { border-top: 1px solid var(--line); padding: 14px 24px 20px; position: relative; }
.co-collapse { position: absolute; left: 50%; top: -14px; margin-left: -14px; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.co-sum { display: flex; justify-content: space-between; font-size: 13px; padding: 1px 0; }
.co-sum.strong { font-weight: 700; }
.co-sum.big { font-size: 15px; font-weight: 700; margin: 8px 0 12px; }
.co-sum.big a { display: inline-flex; align-items: center; gap: 2px; cursor: pointer; }
.co2-foot hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.btn-grey { background: #f2f2f2; color: var(--text); border-color: #e0e0e0; }
.qty { display: flex; gap: 6px; }
.qty input { flex: 1; min-width: 0; }
.qr-box { display: flex; justify-content: center; padding: 16px; }
.qs-list { max-height: 50vh; overflow: auto; }
.qs-item { padding: 10px 4px; border-bottom: 1px solid var(--line); }
.modal.sm { width: min(420px, 100%); }
.modal-foot .grow { flex: 1; }
.strike { text-decoration: line-through; }
@media (max-width: 900px) { .co2 { grid-template-columns: 1fr; height: auto; } .co2-left { padding: 64px 16px 24px; border-right: 0; } .co2-right { min-height: 60vh; } }
.co-cc.empty { display: flex !important; flex-direction: row; text-align: left; } .co-cc.empty .grow { text-align: left; }

/* ================= Clients v2 ================= */
.banner { display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 12px 16px; }
.banner.info { background: #eaf1fd; color: #0d3a8a; }
.banner.info p { color: #0d3a8a; }
.chip.on, .chip.on-chip { background: var(--text); color: #fff; border-color: var(--text); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 16px 4px; }
.btn.disabled { opacity: .45; pointer-events: none; }
.pill-tabs.fs-nav { position: static; flex-direction: row; gap: 8px; margin-top: 8px; }
.pill-tabs.fs-nav a { border: 1px solid #d3d3d3; border-radius: 999px; padding: 8px 16px; }
.pill-tabs.fs-nav a.active { background: var(--text); color: #fff; border-color: var(--text); }
.cf .fs-content > section { max-width: none; }
.tag-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag-opt input { display: none; }
.tag-opt span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid #d3d3d3; cursor: pointer; font-size: 14px; }
.tag-opt input:checked + span { background: var(--tc, #e4defd); border-color: #6950f3; font-weight: 600; }
.tag-new { width: 140px !important; height: 34px !important; border-radius: 999px !important; }
.merge-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.merge-row:has(input:checked) { border-color: var(--purple); background: #f8f6ff; }
.steps-list { display: flex; flex-direction: column; gap: 20px; padding-left: 20px; }
.upload-box { border: 2px dashed #d3d3d3; border-radius: 12px; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.cp-body { background: #f5f5f5; }
.cprof { display: grid; grid-template-columns: 300px 200px 1fr; height: 100vh; }
.cprof-card { background: #fff; padding: 32px 20px 20px 72px; display: flex; flex-direction: column; align-items: center; text-align: center; overflow-y: auto; border-right: 1px solid var(--line); }
.cp-big.xl { width: 96px; height: 96px; font-size: 32px; }
.cprof-name { font-size: 18px; font-weight: 700; margin-top: 4px; }
.cprof-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.chip-y, .chip-b, .chip-r, .chip-t, .chip-add { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; border-radius: 999px; padding: 3px 10px; }
.chip-y { background: #fff4d6; color: #7a4f00; border: 1px solid #f5d98f; }
.chip-b { background: #eaf1fd; color: #1d4fa8; }
.chip-r { background: #fdebee; color: var(--red); }
.chip-t { background: var(--tc); }
.chip-t button { font-size: 10px; opacity: .6; }
.chip-add { border: 1px solid #d3d3d3; cursor: pointer; background: #fff; }
.cprof-btns { display: flex; gap: 8px; margin: 20px 0; }
.cprof-info { width: 100%; text-align: left; border-top: 1px solid var(--line); padding-top: 12px; }
.cprof-nav { background: #fff; padding: 24px 12px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); overflow-y: auto; }
.cprof-nav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--text); }
.cprof-nav a:hover { background: var(--grey-soft); }
.cprof-nav a.active { background: #f0edff; font-weight: 600; }
.cprof-nav a.sub { padding-left: 24px; }
.cprof-group > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.cprof-group > summary:hover { background: var(--grey-soft); }
.count.sm { min-width: 22px; height: 20px; font-size: 12px; padding: 0 6px; }
.cprof-main { overflow-y: auto; padding: 28px 32px 60px; display: flex; flex-direction: column; gap: 12px; }
.cprof-main > * { max-width: 760px; width: 100%; }
.cprof-h { font-size: 26px; font-weight: 700; }
.cprof-sub { font-size: 17px; font-weight: 700; margin-top: 12px; }
.pc-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.pc-card > summary { list-style: none; cursor: pointer; }
.cp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.muted-2 { color: #3b3b3b; font-size: 14px; display: flex; justify-content: space-between; }
.tip-i { color: var(--muted); cursor: help; }
.big-num { font-size: 28px; font-weight: 700; margin-top: 6px; }
.mid-num { font-size: 22px; font-weight: 700; margin-top: 4px; }
.appt-card .appt-line, .appt-line { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0 0; }
.empty-mini { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 24px; }
.chips-row { display: flex; gap: 8px; flex-wrap: wrap; }
.empty-box { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.det h4 { font-weight: 700; margin: 16px 0 8px; }
.det h4:first-child { margin-top: 0; }
.det-row { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 6px 0; font-size: 14px; }
.note-text { margin-top: 8px; white-space: pre-wrap; }
.note-text ul, .note-text ol { padding-left: 20px; }
.rte-bar { display: flex; gap: 4px; flex-wrap: wrap; border: 1px solid #d3d3d3; border-bottom: 0; border-radius: 8px 8px 0 0; padding: 6px; background: #fafafa; }
.rte-bar button { min-width: 32px; height: 30px; border-radius: 6px; padding: 0 8px; }
.rte-bar button:hover { background: #eee; }
.rte { min-height: 140px; border: 1px solid #d3d3d3; border-radius: 0 0 8px 8px; padding: 12px; outline: none; }
.rte:empty::before { content: attr(data-ph); color: var(--muted); }
.seg-radio { display: flex; gap: 6px; background: var(--grey-soft); padding: 4px; border-radius: 999px; }
.seg-radio label { flex: 1; }
.seg-radio input { display: none; }
.seg-radio span { display: block; text-align: center; padding: 8px 6px; border-radius: 999px; font-size: 13px; cursor: pointer; }
.seg-radio input:checked + span { background: #fff; font-weight: 600; box-shadow: 0 1px 3px #0002; }
.loyal-card { display: flex; justify-content: space-between; align-items: center; }
.green { color: #00a36c; }
.row-gap { display: flex; gap: 12px; align-items: center; }
@media (max-width: 1000px) { .cprof { grid-template-columns: 1fr; height: auto; } .cprof-card { padding: 64px 16px 16px; } .cprof-nav { flex-direction: row; overflow-x: auto; } .cprof-group { display: none; } }
/* catalog v2 */
.form-card2 { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin-bottom: 20px; }
.scroll-secs > section { scroll-margin-top: 88px; }
.opt-row { border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 10px; }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.addon-list { max-height: 320px; overflow: auto; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.img-tile { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.img-tile img { width: 100%; height: 120px; object-fit: cover; }
.img-tile span { padding: 6px 8px; font-size: 13px; }
.img-add { border: 2px dashed #d3d3d3; border-radius: 10px; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: var(--muted); text-align: center; padding: 8px; }
.cat-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin: 6px 8px 0 0; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-item { align-items: flex-start; }
.svc-row { cursor: pointer; }
.svc-group-head { margin-top: 8px; }
.swatch.lg { width: 28px; height: 28px; border-radius: 50%; }
@media (max-width: 700px) { .opt-grid { grid-template-columns: 1fr; } }
.cat-item span.grow { color: var(--text); }
.opt-grid .fg, .opt-row > .fg { grid-column: auto; margin-bottom: 8px; }
.prod-thumb { width: 40px; height: 40px; border-radius: 8px; background: var(--grey-soft); display: flex; align-items: center; justify-content: center; flex: none; } .warn-t { color: #b77400; font-weight: 600; }
/* list stat row */
.stat-row { display:flex; gap:12px; flex-wrap:wrap; }
.stat-card { border:1px solid var(--border, #e5e5e5); border-radius:12px; padding:12px 16px; min-width:150px; background:var(--surface,#fff); }
.stat-card p { margin:0; }
/* marketing v2 */
.bal-amt { font-size: 28px; font-weight: 700; margin: 4px 0; }
.hscroll-tabs { position: sticky; top: 64px; z-index: 5; background: var(--bg, #fff); display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; margin-bottom: 8px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.hscroll-tabs a { white-space: nowrap; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); font-weight: 500; color: var(--text); }
.hscroll-tabs a.active { background: var(--text); color: #fff; border-color: var(--text); }
.auto-sec { padding-top: 24px; scroll-margin-top: 130px; }
.auto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.auto-card { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 18px; color: var(--text); background: #fff; min-height: 190px; transition: box-shadow .15s; }
.auto-card:hover { box-shadow: 0 4px 16px #0000001a; }
.auto-ic { width: 44px; height: 44px; border-radius: 50%; background: #efeafe; color: #5a3fd6; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; }
.auto-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.auto-new { border-style: dashed; align-items: center; justify-content: center; text-align: center; }
.opt-card { position: relative; cursor: pointer; }
.opt-card input { position: absolute; opacity: 0; }
.opt-card > span { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; height: 100%; }
.opt-card small { color: var(--muted); font-size: 13px; }
.opt-card input:checked + span { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple); background: #f6f4ff; }
.ed-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 32px; max-width: 1240px; margin: 0 auto; padding: 32px 24px 80px; }
.ed-preview { position: sticky; top: 96px; align-self: start; background: var(--grey-soft, #f5f5f5); border-radius: 16px; padding: 20px; }
.phone { background: #fff; border-radius: 28px; border: 8px solid #1d1d1d; min-height: 520px; padding: 18px 14px; display: flex; flex-direction: column; gap: 10px; }
.phone .sms { align-self: flex-start; background: #ececec; border-radius: 16px 16px 16px 4px; padding: 10px 14px; font-size: 14px; max-width: 90%; white-space: pre-wrap; }
.mail { background: #fff; border-radius: 12px; padding: 24px; min-height: 480px; font-size: 14px; }
.mail .mail-brand { font-weight: 700; font-size: 18px; letter-spacing: .5px; text-align: center; margin-bottom: 16px; }
.mail h3 { font-size: 20px; margin: 0 0 12px; }
.mail .mail-btn { display: inline-block; background: var(--text); color: #fff; border-radius: 999px; padding: 10px 22px; margin-top: 16px; font-weight: 600; }
.mail .mail-offer { border: 1px dashed var(--purple); border-radius: 10px; padding: 12px; margin-top: 16px; text-align: center; }
.mail p { white-space: pre-wrap; }
.ph-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ph-chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.ph-chips button:hover { background: var(--grey-soft); }
.steps-bar { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin-bottom: 24px; }
.steps-bar i { display: block; height: 100%; background: var(--purple); transition: width .2s; }
.wz { max-width: 720px; margin: 0 auto; padding: 32px 24px 100px; }
.wz-step[hidden] { display: none; }
.type-card { display: flex; gap: 16px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 20px; cursor: pointer; margin-bottom: 12px; }
.type-card:hover { background: var(--grey-soft); }
.type-card input { margin-top: 4px; }
.type-card:has(input:checked) { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple); }
.review-list { border: 1px solid var(--line); border-radius: 12px; }
.review-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px; }
.review-list > div + div { border-top: 1px solid var(--line); }
.review-list span:first-child { color: var(--muted); }
.day-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.day-chips label input { display: none; }
.day-chips label span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.day-chips label input:checked + span { background: var(--text); color: #fff; border-color: var(--text); }
.code-box { font-family: ui-monospace, monospace; letter-spacing: 1px; text-transform: uppercase; }
.aud-list label { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; }
.aud-list label:has(input:checked) { border-color: var(--purple); background: #f6f4ff; }
.aud-list .n { margin-left: auto; font-weight: 600; white-space: nowrap; }
@media (max-width: 1000px) { .ed-wrap { grid-template-columns: 1fr; } .ed-preview { position: static; } }
.sec-h { font-size: 20px; line-height: 28px; font-weight: 600; margin: 0 0 4px; }
.mb8 { margin-bottom: 8px; }
.danger-t { color: #d4163a; }
.seg-tabs { display: inline-flex; background: #e9e9e9; border-radius: 999px; padding: 3px; }
.seg-tabs button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; font-weight: 500; cursor: pointer; font: inherit; }
.seg-tabs button.on { background: #fff; box-shadow: 0 1px 3px #0002; }
/* settings v2 */
.set-main { max-width: 860px; }
.set-card { border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin-bottom: 20px; background: #fff; }
.set-sum { margin: 16px 0 0; display: grid; gap: 12px; }
.set-sum > div { display: grid; grid-template-columns: 260px 1fr; gap: 16px; }
.set-sum dt { color: var(--muted); }
.set-sum dd { margin: 0; font-weight: 500; white-space: pre-wrap; }
.set-nav .cat-nav-title { font-size: 13px; color: var(--muted); font-weight: 600; margin: 14px 12px 6px; }
.crumbs { margin-bottom: 6px; }
@media (max-width: 700px) { .set-sum > div { grid-template-columns: 1fr; gap: 2px; } }
.rep-item { display: flex; align-items: center; gap: 16px; }
.rep-ic { width: 40px; height: 40px; flex: none; }
.rep-folders-t { font-size: 13px; color: var(--muted); font-weight: 600; margin: 18px 12px 6px; }
