/* ============ Design tokens ============ */
:root {
  --bg: #f3ede7;
  --bg-soft: #faf7f3;
  --surface: #fffdfb;
  --surface-2: #f7f1eb;
  --ink: #2b2226;
  --ink-soft: #6f6268;
  --muted: #9a8d92;
  --line: #e8ddd5;
  --line-strong: #d9c9be;
  --plum: #3d2733;
  --plum-2: #563a4a;
  --rose: #b96d7b;
  --rose-soft: #f2dde0;
  --rose-deep: #9c5563;
  --gold: #c19a6b;
  --gold-soft: #f3e8d9;
  --green: #4f7a5f;
  --green-soft: #e2efe5;
  --amber: #b07d3a;
  --amber-soft: #f8ecd8;
  --red: #b15353;
  --red-soft: #f8e2e2;
  --blue: #4a6d8c;
  --blue-soft: #e3edf5;
  --shadow-sm: 0 1px 2px rgba(61, 39, 51, .05), 0 2px 8px rgba(61, 39, 51, .04);
  --shadow: 0 4px 14px rgba(61, 39, 51, .07), 0 16px 40px rgba(61, 39, 51, .06);
  --shadow-lg: 0 12px 32px rgba(61, 39, 51, .12), 0 32px 80px rgba(61, 39, 51, .14);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --font-sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --sidebar-w: 272px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }
a { color: var(--rose-deep); }
.hidden { display: none !important; }
.muted { color: var(--ink-soft); }
.small { font-size: 12px; }
.eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 4px;
}
::selection { background: var(--rose-soft); }

/* ============ Brand ============ */
.brand-mark {
  width: 76px; height: 76px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--bg-soft);
  background: linear-gradient(135deg, var(--rose), var(--gold));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 12px 30px rgba(185,109,123,.35);
  letter-spacing: .02em;
}
.brand-mark.small { width: 44px; height: 44px; font-size: 15px; flex: 0 0 auto; }

/* ============ Login ============ */
.login-screen {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--bg-soft);
}
.login-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 64px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 15% 10%, rgba(193,154,107,.22), transparent 55%),
    radial-gradient(90% 80% at 90% 30%, rgba(185,109,123,.28), transparent 60%),
    linear-gradient(150deg, #2f1e28 0%, #4a2f3d 52%, #6b4352 100%);
  color: #f6ece6;
}
.login-visual::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 78% 18%, rgba(255,255,255,.12), transparent 58%),
    repeating-linear-gradient(115deg, transparent 0 46px, rgba(255,255,255,.028) 46px 47px);
  pointer-events: none;
}
.login-visual::after {
  content: 'nail bar';
  position: absolute;
  right: -32px; top: 36px;
  font-family: var(--font-serif);
  font-size: 180px;
  line-height: 1;
  color: rgba(255,255,255,.035);
  font-style: italic;
  pointer-events: none;
}
.login-visual-inner { position: relative; z-index: 1; max-width: 520px; }
.login-visual .eyebrow { color: var(--gold); margin-top: 26px; }
.login-visual h1 {
  font-family: var(--font-serif);
  font-size: clamp(48px, 5.4vw, 82px);
  line-height: .96;
  font-weight: 500;
  margin: 10px 0 22px;
}
.login-sub { color: rgba(246,236,230,.7); font-size: 16px; max-width: 380px; line-height: 1.6; }
.login-points { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.login-points span {
  font-size: 12px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(6px);
  color: rgba(246,236,230,.9);
}
.login-panel { display: grid; place-items: center; padding: 40px; }
.login-card {
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 44px 40px;
  box-shadow: var(--shadow-lg);
}
.login-card h2 { font-family: var(--font-serif); font-size: 40px; font-weight: 500; line-height: 1.05; }
.login-card .muted { margin: 8px 0 28px; font-size: 13.5px; }
.form-error {
  background: var(--red-soft); color: var(--red);
  border-radius: var(--r-sm);
  padding: 10px 13px; font-size: 13px; margin: 4px 0 14px;
}
.login-hint {
  margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--line-strong);
  display: flex; flex-direction: column; gap: 3px;
  font-size: 12px; color: var(--muted);
}
.login-hint strong { color: var(--ink-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }

/* ============ Fields / buttons ============ */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea, .input {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: var(--r-sm);
  padding: 11px 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field textarea { resize: vertical; min-height: 78px; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(185,109,123,.12);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row.three { grid-template-columns: 1fr 1fr 1fr; }
.field-hint { font-size: 11.5px; color: var(--muted); margin-top: -2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  transition: transform .12s, box-shadow .15s, background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--plum), var(--plum-2));
  color: #f8f1ec;
  box-shadow: 0 6px 18px rgba(61,39,51,.22);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(61,39,51,.3); }
.btn-rose { background: linear-gradient(135deg, var(--rose), var(--rose-deep)); color: #fff; box-shadow: 0 6px 18px rgba(185,109,123,.3); }
.btn-rose:hover { box-shadow: 0 10px 26px rgba(185,109,123,.4); }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--rose); color: var(--rose-deep); }
.btn-soft { background: var(--surface-2); color: var(--ink-soft); }
.btn-soft:hover { background: var(--rose-soft); color: var(--rose-deep); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 1px solid transparent; background: transparent; color: var(--ink-soft);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }

/* ============ App shell ============ */
.app { display: flex; min-height: 100dvh; background: var(--bg); }
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(193,154,107,.14), transparent 55%),
    linear-gradient(175deg, #2f1e28, #3d2733 60%, #452c39);
  color: #ebe0da;
  display: flex; flex-direction: column;
  padding: 26px 20px 20px;
  position: sticky; top: 0; height: 100dvh;
  z-index: 40;
}
.sidebar-brand { display: flex; gap: 13px; align-items: center; padding: 0 6px 24px; }
.sidebar-brand strong { display: block; font-family: var(--font-serif); font-size: 19px; font-weight: 600; letter-spacing: .01em; color: #f7efe9; }
.sidebar-brand .small { display: block; color: rgba(235,224,218,.5); margin-top: 1px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav::-webkit-scrollbar { width: 0; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  background: transparent; border: none;
  color: rgba(235,224,218,.66);
  padding: 10px 13px; border-radius: 11px;
  font-size: 13.5px; font-weight: 500; text-align: left;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-item svg { width: 19px; height: 19px; flex: 0 0 auto; opacity: .85; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(100deg, rgba(185,109,123,.32), rgba(193,154,107,.14));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.nav-item.active svg { opacity: 1; color: #f0c9c8; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--rose); color: #fff;
  font-size: 10.5px; font-weight: 700; display: grid; place-items: center;
}
.sidebar-foot { padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 14px; }
.sidebar-foot .btn-primary { background: linear-gradient(135deg, var(--rose), var(--rose-deep)); box-shadow: 0 8px 22px rgba(0,0,0,.25); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold), var(--rose));
  color: #2f1e28; font-weight: 800; font-size: 14px; flex: 0 0 auto;
}
.user-chip-info { flex: 1; min-width: 0; }
.user-chip-info strong { display: block; font-size: 12.5px; color: #f4ebe5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-info span { display: block; font-size: 11px; color: rgba(235,224,218,.48); }
.user-chip .icon-btn { color: rgba(235,224,218,.55); }
.user-chip .icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 36px 16px;
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(var(--bg) 70%, rgba(243,237,231,0));
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h2 { font-family: var(--font-serif); font-size: 30px; font-weight: 500; line-height: 1.05; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.today-chip {
  font-size: 12px; font-weight: 600; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--line);
  padding: 9px 14px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.burger { display: none; }
.sidebar-close { display: none; color: rgba(235,224,218,.7); }
.sidebar-close:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(43,28,36,.45); z-index: 35; display: none; }
.sidebar-backdrop.visible { display: block; }
@media (min-width: 861px) { .sidebar-backdrop { display: none !important; } .sidebar-close { display: none !important; } }

.view { padding: 6px 36px 56px; max-width: 1500px; width: 100%; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.view-head h3 { font-family: var(--font-serif); font-size: 22px; font-weight: 600; }
.view-head p { color: var(--ink-soft); font-size: 13px; margin-top: 3px; }
.view-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }

/* ============ Cards ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 15px; font-weight: 700; }
.card-head .muted { font-size: 12px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }

/* ============ Stats ============ */
.stat {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.stat::after {
  content: ''; position: absolute; right: -24px; top: -24px;
  width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle, var(--rose-soft), transparent 70%);
  opacity: .7;
}
.stat-label { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat-label .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rose); }
.stat-value { font-family: var(--font-serif); font-size: 34px; font-weight: 600; line-height: 1; margin-top: 12px; letter-spacing: -.02em; }
.stat-value small { font-size: 17px; color: var(--muted); font-family: var(--font-sans); font-weight: 500; }
.stat-foot { font-size: 12px; color: var(--ink-soft); margin-top: 9px; display: flex; align-items: center; gap: 6px; }
.stat.gold .stat-label .dot { background: var(--gold); }
.stat.gold::after { background: radial-gradient(circle, var(--gold-soft), transparent 70%); }
.stat.green .stat-label .dot { background: var(--green); }
.stat.green::after { background: radial-gradient(circle, var(--green-soft), transparent 70%); }
.stat.blue .stat-label .dot { background: var(--blue); }
.stat.blue::after { background: radial-gradient(circle, var(--blue-soft), transparent 70%); }

/* ============ Tables ============ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted);
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  white-space: nowrap;
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #fcf8f4; }
.td-actions { display: flex; gap: 2px; justify-content: flex-end; }
.td-main { font-weight: 600; }
.td-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.mono { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ============ Badges ============ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.confirmed, .badge.paid, .badge.sent, .badge.active { background: var(--green-soft); color: var(--green); }
.badge.pending, .badge.queued, .badge.manual { background: var(--amber-soft); color: var(--amber); }
.badge.cancelled, .badge.failed, .badge.inactive { background: var(--red-soft); color: var(--red); }
.badge.completed { background: var(--blue-soft); color: var(--blue); }
.badge.neutral { background: var(--surface-2); color: var(--ink-soft); }
.badge.rose { background: var(--rose-soft); color: var(--rose-deep); }

/* ============ Calendar ============ */
.cal-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cal-toolbar .cal-nav { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.cal-toolbar h3 { font-family: var(--font-serif); font-size: 21px; min-width: 190px; text-align: center; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: none; background: transparent; padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.cal-grid { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.cal-weekdays span { padding: 10px 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-day {
  min-height: 108px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; cursor: pointer; transition: background .12s;
  position: relative;
}
.cal-day:nth-child(7n) { border-right: none; }
.cal-day:hover { background: #fcf8f4; }
.cal-day.other { background: #faf6f2; color: var(--muted); }
.cal-day.today { background: linear-gradient(180deg, var(--rose-soft), transparent 60%); }
.cal-day.today .cal-num { background: var(--plum); color: #fff; }
.cal-day.selected { box-shadow: inset 0 0 0 2px var(--rose); }
.cal-num {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; align-self: flex-start;
}
.cal-events { display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cal-event {
  font-size: 10.5px; font-weight: 600; line-height: 1.25;
  padding: 3px 6px; border-radius: 5px;
  background: var(--rose-soft); color: var(--rose-deep);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-left: 2px solid var(--rose);
}
.cal-event.paid { background: var(--green-soft); color: var(--green); border-left-color: var(--green); }
.cal-event.cancelled { background: var(--red-soft); color: var(--red); border-left-color: var(--red); text-decoration: line-through; }
.cal-more { font-size: 10px; color: var(--muted); padding-left: 3px; }

/* Day agenda */
.agenda { display: flex; flex-direction: column; }
.agenda-head { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.agenda-head h3 { font-family: var(--font-serif); font-size: 20px; font-weight: 600; }
.agenda-list { padding: 10px; display: flex; flex-direction: column; gap: 8px; max-height: 540px; overflow-y: auto; }
.agenda-item {
  display: flex; gap: 12px; padding: 12px; border-radius: var(--r);
  background: var(--bg-soft); border: 1px solid var(--line);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.agenda-item:hover { border-color: var(--rose); background: #fff; }
.agenda-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; color: var(--plum); flex: 0 0 48px; }
.agenda-body { flex: 1; min-width: 0; }
.agenda-body strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-body span { font-size: 11.5px; color: var(--muted); display: block; margin-top: 2px; }
.agenda-empty { padding: 30px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.agenda-empty svg { opacity: .4; margin-bottom: 8px; }

/* ============ Modal ============ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(43, 28, 36, .45);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  padding: 24px;
  animation: fadeIn .15s ease;
}
.modal {
  background: var(--surface);
  width: min(640px, 100%);
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  animation: modalIn .22s cubic-bezier(.2,.8,.3,1);
  border: 1px solid var(--line);
}
.modal.wide { width: min(780px, 100%); }
.modal.narrow { width: min(440px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 26px 16px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-family: var(--font-serif); font-size: 26px; font-weight: 600; line-height: 1.1; }
.modal-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.modal-body { padding: 22px 26px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 26px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.modal-foot .left { margin-right: auto; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* ============ Misc components ============ */
.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty svg { opacity: .35; margin-bottom: 12px; }
.empty h4 { font-size: 15px; color: var(--ink-soft); margin-bottom: 4px; }
.empty p { font-size: 13px; }

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 8px 15px; min-width: 230px;
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(185,109,123,.1); }
.search svg { color: var(--muted); flex: 0 0 auto; }
.search input { border: none; outline: none; background: transparent; width: 100%; font-size: 13px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600;
  padding: 5px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-soft);
}
.chip.rose { background: var(--rose-soft); color: var(--rose-deep); }
.chip.gold { background: var(--gold-soft); color: #8f6a3c; }

.service-picker { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.picker-item { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.picker-item:last-child { border-bottom: none; }
.picker-item:hover { background: var(--surface-2); }
.picker-item.checked { background: var(--rose-soft); }
.picker-item input { accent-color: var(--rose); width: 16px; height: 16px; }
.picker-item-main { flex: 1; min-width: 0; }
.picker-item-main strong { display: block; font-size: 13px; font-weight: 600; }
.picker-item-main span { font-size: 11.5px; color: var(--muted); }
.picker-price { font-weight: 700; font-size: 13px; white-space: nowrap; }

.mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mini-cal span { text-align: center; font-size: 10px; font-weight: 700; color: var(--muted); padding: 4px 0; text-transform: uppercase; }

.sum-line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.sum-line:last-child { border-bottom: none; }
.sum-line strong { font-size: 15px; }
.sum-total { font-family: var(--font-serif); font-size: 26px; color: var(--plum); font-weight: 600; }

.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: none; }
.list-dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-soft); flex: 0 0 auto; }
.list-main { flex: 1; min-width: 0; }
.list-main strong { display: block; font-size: 13px; font-weight: 600; }
.list-main span { font-size: 11.5px; color: var(--muted); }
.list-val { font-weight: 700; font-size: 13.5px; white-space: nowrap; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { border: none; background: transparent; padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--plum); border-bottom-color: var(--rose); }

/* ============ Toasts ============ */
.toast-root { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--plum); color: #f7efe9;
  padding: 12px 18px; border-radius: 12px;
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn .25s cubic-bezier(.2,.8,.3,1);
  max-width: 380px;
}
.toast.error { background: #7c3535; }
.toast.success { background: #3c6148; }
.toast svg { flex: 0 0 auto; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* ============ Skeleton / loading ============ */
.spinner { width: 22px; height: 22px; border: 2.5px solid var(--rose-soft); border-top-color: var(--rose); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-view { display: grid; place-items: center; padding: 80px; }

/* ============ Responsive ============ */
@media (max-width: 1180px) {
  .cal-layout { grid-template-columns: 1fr; }
  .agenda-list { max-height: none; }
}
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .login-screen { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100dvh; }
}
@media (max-width: 860px) {
  .sidebar {
    position: fixed; left: 0; top: 0; height: 100dvh;
    transform: translateX(-102%); transition: transform .25s cubic-bezier(.2,.8,.3,1);
    box-shadow: 0 0 60px rgba(0,0,0,.3);
  }
  .sidebar.open { transform: none; }
  .burger { display: inline-grid; }
  .sidebar-close { display: inline-grid; }
  .topbar { padding: 14px 16px 10px; gap: 12px; }
  .view { padding: 6px 16px 52px; }
  .topbar-title h2 { font-size: 24px; }
  .today-chip { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .field-row, .field-row.three { grid-template-columns: 1fr; }
  .cal-day { min-height: 74px; padding: 5px; }
  .cal-event { font-size: 0; padding: 3px; }
  .cal-event::after { content: ""; display: block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .cal-weekdays span { font-size: 9px; padding: 8px 2px; }
  .modal-backdrop { padding: 10px; align-items: flex-end; }
  .modal { width: 100%; max-height: calc(100dvh - 20px); border-radius: 22px 22px 16px 16px; }
  .modal-head, .modal-body, .modal-foot { padding-left: 18px; padding-right: 18px; }
  .toast-root { left: 16px; right: 16px; bottom: 16px; align-items: stretch; }
  .toast { max-width: none; }
  input, select, textarea, .input { font-size: 16px; }
}
@media (max-width: 520px) {
  .stat-value { font-size: 28px; }
  .view-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .search { min-width: 0; width: 100%; }
  .topbar-actions .btn span { display: none; }
  .topbar-actions .btn { padding: 10px 12px; }
  .cal-toolbar { width: 100%; justify-content: space-between; }
  .cal-toolbar h3 { min-width: 0; flex: 1; font-size: 19px; }
  .cal-day { min-height: 62px; }
  .cal-num { width: 22px; height: 22px; font-size: 11px; }
  .login-card { padding: 32px 22px; border-radius: 22px; }
  .login-card h2 { font-size: 34px; }
  .table-wrap table { min-width: 560px; }
  .card-head { padding: 16px 18px; }
  .card-pad { padding: 18px; }
  .btn { min-height: 42px; }
  .icon-btn { width: 40px; height: 40px; }
}



