/* Soniyaa Rozario Makeup Team — luxury, minimal, mobile-first */
:root {
  --bg: #f8f4ee;
  --surface: #ffffff;
  --surface-2: #f3ece3;
  --surface-3: #ece3d7;
  --ink: #241a1f;
  --ink-2: #5f5157;
  --ink-3: #8f8186;
  --line: #e7ddd1;
  --line-2: #d9ccbd;
  --gold: #a17c47;
  --gold-2: #c9a56e;
  --gold-soft: #f4ead9;
  --plum: #3d2432;
  --plum-2: #57364a;
  --rose: #b77a7a;
  --focus: #a17c47;

  --ok: #2d7454;      --ok-bg: #e4f1e9;
  --warn: #93640f;    --warn-bg: #fbefd5;
  --info: #3f5677;    --info-bg: #e6ecf4;
  --done: #5a4870;    --done-bg: #ece6f3;
  --bad: #a13a3a;     --bad-bg: #f8e3e1;
  --muted: #6c6468;   --muted-bg: #ece8e6;
  --leave: #7b4b8e;   --leave-bg: #f1e5f5;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(36, 26, 31, .04), 0 6px 24px rgba(36, 26, 31, .06);
  --shadow-lg: 0 20px 60px rgba(36, 26, 31, .22);
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --sidebar: 248px;
  --tabbar: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17121a; --surface: #211a23; --surface-2: #2a222c; --surface-3: #342a36;
    --ink: #f4ece6; --ink-2: #cbbdbf; --ink-3: #998b90; --line: #3a3039; --line-2: #4a3e48;
    --gold: #d4b07a; --gold-2: #e2c493; --gold-soft: #3a2f22; --plum: #e9d9c4; --plum-2: #f4e6d2; --focus: #d4b07a;
    --ok: #7fcfa6; --ok-bg: #1d3329; --warn: #f0c46c; --warn-bg: #3a2e14; --info: #9cb7de; --info-bg: #1f2a3a;
    --done: #c4b0e0; --done-bg: #2d2540; --bad: #f09a92; --bad-bg: #3d2020; --muted: #b6aeb1; --muted-bg: #2e2a2c;
    --leave: #d9a8ec; --leave-bg: #362440;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17121a; --surface: #211a23; --surface-2: #2a222c; --surface-3: #342a36;
  --ink: #f4ece6; --ink-2: #cbbdbf; --ink-3: #998b90; --line: #3a3039; --line-2: #4a3e48;
  --gold: #d4b07a; --gold-2: #e2c493; --gold-soft: #3a2f22; --plum: #e9d9c4; --plum-2: #f4e6d2; --focus: #d4b07a;
  --ok: #7fcfa6; --ok-bg: #1d3329; --warn: #f0c46c; --warn-bg: #3a2e14; --info: #9cb7de; --info-bg: #1f2a3a;
  --done: #c4b0e0; --done-bg: #2d2540; --bad: #f09a92; --bad-bg: #3d2020; --muted: #b6aeb1; --muted-bg: #2e2a2c;
  --leave: #d9a8ec; --leave-bg: #362440;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
svg { width: 18px; height: 18px; flex: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
.display { font-family: var(--font-display); font-weight: 600; letter-spacing: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; }
.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--plum); color: var(--gold-2); font-family: var(--font-display); font-size: 17px; font-weight: 600;
}
:root[data-theme="dark"] .brand-mark { background: #3d2432; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-mark { background: #3d2432; } }
.brand-name { font-family: var(--font-display); font-size: 19px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.topbar .spacer { flex: 1; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; color: var(--ink-2); flex: none;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.icon-btn svg { width: 19px; height: 19px; }
.dot-count {
  position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--bad); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; border: 2px solid var(--bg);
}
.main { padding: 18px 16px calc(var(--tabbar) + 28px + env(safe-area-inset-bottom)); max-width: 1240px; margin: 0 auto; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--line);
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 500;
  color: var(--ink-3); background: none; border: 0; cursor: pointer; padding: 0;
}
.tabbar svg { width: 22px; height: 22px; }
.tabbar .active { color: var(--plum); }
:root[data-theme="dark"] .tabbar .active { color: var(--gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabbar .active { color: var(--gold); } }

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: var(--sidebar) 1fr; }
  .sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 22px 14px; gap: 4px;
    background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto;
  }
  .sidebar .brand { padding: 4px 8px 22px; }
  .nav-group { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); padding: 16px 12px 6px; }
  .nav-link {
    display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: 14px;
  }
  .nav-link svg { width: 18px; height: 18px; flex: none; }
  .nav-link:hover { background: var(--surface-2); color: var(--ink); }
  .nav-link.active { background: var(--gold-soft); color: var(--ink); }
  .nav-link .pill { margin-left: auto; }
  .sidebar-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line); }
  .tabbar, .topbar .brand { display: none; }
  .topbar { padding: 12px 28px; }
  .main { padding: 26px 28px 48px; }
}

/* ---------- page header ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.page-head .titles { flex: 1 1 260px; min-width: 0; }
.eyebrow { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.page-title { font-family: var(--font-display); font-size: 30px; line-height: 1.1; font-weight: 600; margin-top: 2px; }
.page-sub { color: var(--ink-2); margin-top: 4px; font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 720px) { .page-title { font-size: 36px; } }

/* ---------- cards & grids ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px; }
@media (min-width: 720px) { .card-pad { padding: 20px; } }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 15px; font-weight: 600; flex: 1; }
.card-head .link { font-size: 13px; color: var(--gold); font-weight: 500; }
.grid { display: grid; gap: 14px; }
.grid-2 { display: grid; gap: 14px; }
.grid-3 { display: grid; gap: 14px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .grid-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 600; }
.mt { margin-top: 14px; }
.mt-s { margin-top: 8px; }
.mb { margin-bottom: 14px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.stat { padding: 14px 16px; }
.stat .label { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.stat .value { font-variant-numeric: lining-nums tabular-nums; font-family: var(--font-display); font-size: 30px; font-weight: 600; line-height: 1.15; margin-top: 2px; }
.stat .hint { font-size: 12px; color: var(--ink-3); }
.stat.money .value { font-family: var(--font-ui); font-size: 21px; font-weight: 600; letter-spacing: -.01em; padding: 5px 0 3px; }

/* urgent banner */
.urgent {
  border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); background: var(--bad-bg); color: var(--ink);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px;
}
.urgent-title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--bad); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.urgent-list { margin-top: 10px; display: grid; gap: 8px; }
.urgent-item { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 10px; padding: 10px 12px; border: 1px solid var(--line); }
.urgent-item .grow { flex: 1; min-width: 0; }

/* ---------- list rows ---------- */
.list { display: flex; flex-direction: column; }
.item { display: flex; gap: 12px; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
a.item:hover, button.item:hover { background: var(--surface-2); }
.item .grow { flex: 1; min-width: 0; }
.item-title { font-weight: 600; font-size: 14.5px; }
.item-meta { font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.item-meta span { display: inline-flex; align-items: center; gap: 4px; }
.item-meta svg { width: 13px; height: 13px; opacity: .7; }
.date-chip {
  flex: none; width: 50px; text-align: center; border-radius: 11px; background: var(--surface-2); padding: 6px 0 5px; border: 1px solid var(--line);
}
.date-chip .m { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.date-chip .d { font-family: var(--font-display); font-size: 22px; line-height: 1; font-weight: 600; }
.date-chip .w { font-size: 10px; color: var(--ink-3); }
.empty { padding: 30px 16px; text-align: center; color: var(--ink-3); font-size: 14px; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  white-space: nowrap; background: var(--muted-bg); color: var(--muted); line-height: 1.4;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.b-confirmed, .b-available, .b-paid, .b-approved, .b-sent { background: var(--ok-bg); color: var(--ok); }
.b-tentative, .b-busy, .b-assigned, .b-partially-paid, .b-pending, .b-partially-booked, .b-partially-unavailable, .b-queued_n8n, .b-logged { background: var(--warn-bg); color: var(--warn); }
.b-inquiry, .b-assigned-here, .b-info { background: var(--info-bg); color: var(--info); }
.b-completed { background: var(--done-bg); color: var(--done); }
.b-cancelled, .b-unavailable, .b-rejected, .b-failed, .b-unassigned, .b-urgent { background: var(--bad-bg); color: var(--bad); }
.b-leave { background: var(--leave-bg); color: var(--leave); }
.b-inactive, .b-refunded, .b-skipped { background: var(--muted-bg); color: var(--muted); }
.pill { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--bad); color: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; min-height: 40px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--plum); border-color: var(--plum); color: #fff; }
.btn-primary:hover { background: var(--plum-2); }
:root[data-theme="dark"] .btn-primary { color: #1b1418; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #1b1418; } }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-2); }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn-danger:hover { background: var(--bad-bg); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { min-height: 32px; padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- forms ---------- */
.form-grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } .form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .span-2 { grid-column: span 2; } .span-all { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface);
  font-size: 16px; /* prevents iOS zoom */
}
textarea.input { min-height: 88px; resize: vertical; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); }
.input[readonly] { background: var(--surface-2); }
@media (min-width: 720px) { .input, select.input, textarea.input { font-size: 14.5px; } }
.section-title { font-family: var(--font-display); font-size: 21px; font-weight: 600; margin: 4px 0 2px; }
.form-section { padding-bottom: 6px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--plum); flex: none; }
.error-text { color: var(--bad); font-size: 13px; font-weight: 500; }
.callout { border-radius: 10px; padding: 12px 14px; background: var(--gold-soft); font-size: 13.5px; color: var(--ink); }
.callout.bad { background: var(--bad-bg); color: var(--bad); }
.callout.ok { background: var(--ok-bg); color: var(--ok); }

/* toolbar / filters */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.toolbar .input { min-height: 40px; padding: 8px 12px; width: auto; flex: 1 1 140px; }
.toolbar .search { flex: 3 1 240px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- key-value ---------- */
.kv { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 9px 14px; font-size: 14px; }
.kv dt { color: var(--ink-3); font-size: 13px; }
.kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }

/* ---------- avatar ---------- */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden;
  background: var(--gold-soft); color: var(--gold); font-weight: 700; font-size: 14px; border: 1px solid var(--line);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 76px; height: 76px; font-size: 24px; }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }

/* ---------- assign team ---------- */
.assign-section { margin-bottom: 18px; }
.assign-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.assign-head h3 { font-family: var(--font-display); font-size: 22px; flex: 1; }
.counter { font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); }
.counter.done { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.artist-pick {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  cursor: pointer; transition: border-color .12s, background .12s;
}
.artist-pick + .artist-pick { margin-top: 8px; }
.artist-pick.disabled { cursor: not-allowed; background: var(--surface-2); }
.artist-pick.disabled .grow { opacity: .78; }
.artist-pick.selected { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 1px var(--gold) inset; }
.artist-pick .grow { flex: 1; min-width: 0; }
.artist-pick .reason { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.artist-pick input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--plum); flex: none; }
.rec { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.status-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.sticky-foot {
  position: sticky; bottom: calc(var(--tabbar) + 8px + env(safe-area-inset-bottom)); z-index: 20; margin-top: 16px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
@media (min-width: 960px) { .sticky-foot { bottom: 16px; } }

/* ---------- calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-head .title { font-family: var(--font-display); font-size: 24px; font-weight: 600; flex: 1; min-width: 160px; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.month .dow { padding: 8px 4px; text-align: center; font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--ink-3); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.month .cell { min-height: 74px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; cursor: pointer; min-width: 0; }
.month .cell.out { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.month .cell.out .dnum { color: var(--ink-3); }
.month .cell.today .dnum { background: var(--plum); color: #fff; }
:root[data-theme="dark"] .month .cell.today .dnum { color: #1b1418; }
.month .cell:hover { background: var(--surface-2); }
.dnum { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 600; }
.ev {
  display: block; font-size: 11px; line-height: 1.25; padding: 2px 5px; border-radius: 5px; margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  border-left: 3px solid currentColor; background: var(--surface-2); color: var(--ink-2);
}
.ev.s-confirmed { color: var(--ok); background: var(--ok-bg); }
.ev.s-tentative { color: var(--warn); background: var(--warn-bg); }
.ev.s-inquiry { color: var(--info); background: var(--info-bg); }
.ev.s-completed { color: var(--done); background: var(--done-bg); }
.ev.s-cancelled { color: var(--muted); background: var(--muted-bg); text-decoration: line-through; }
.ev.s-unassigned { color: var(--bad); background: var(--bad-bg); }
.ev-more { font-size: 10.5px; color: var(--ink-3); padding: 1px 4px; }
.dots { display: none; gap: 3px; flex-wrap: wrap; margin-top: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: block; }
@media (max-width: 640px) {
  .month .cell { min-height: 54px; }
  .month .ev, .month .ev-more { display: none; }
  .month .dots { display: flex; }
}
.legend { display: flex; flex-wrap: wrap; gap: 10px 14px; font-size: 12px; color: var(--ink-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 760px) { .week { grid-template-columns: 1fr; } }
.week-day { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-height: 120px; min-width: 0; }
.week-day.today { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.week-day h4 { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.week-day .ev { white-space: normal; padding: 5px 7px; font-size: 12px; }

.day-grid { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.hour { display: flex; border-bottom: 1px solid var(--line); height: 48px; }
.hour .h { width: 58px; flex: none; font-size: 11px; color: var(--ink-3); padding: 3px 8px; border-right: 1px solid var(--line); }
.day-events { position: absolute; top: 0; left: 64px; right: 6px; bottom: 0; }
.day-ev {
  position: absolute; border-radius: 8px; padding: 5px 8px; font-size: 12px; overflow: hidden; border-left: 3px solid currentColor; cursor: pointer;
}

/* availability calendar */
.avail-cell { font-size: 10.5px; font-weight: 600; border-radius: 5px; padding: 2px 4px; margin-top: 3px; display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.k-free { color: var(--ink-3); }
.k-available { background: var(--ok-bg); color: var(--ok); }
.k-assigned, .k-partial { background: var(--warn-bg); color: var(--warn); }
.k-leave { background: var(--leave-bg); color: var(--leave); }
.k-unavailable { background: var(--bad-bg); color: var(--bad); }

.team-grid .item { align-items: flex-start; }

/* ---------- assistant ---------- */
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 300px; max-height: 60vh; overflow-y: auto; padding: 16px; }
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; font-size: 14px; line-height: 1.5; }
.bubble.me { align-self: flex-end; background: var(--plum); color: #fff; border-bottom-right-radius: 5px; }
:root[data-theme="dark"] .bubble.me { color: #1b1418; }
.bubble.bot { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 5px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: var(--surface); padding: 6px 11px; border-radius: 99px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); text-align: left; }
.chip:hover { border-color: var(--gold); color: var(--ink); }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }

/* ---------- modal / toast ---------- */
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(20, 12, 16, .5); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.modal {
  background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0;
  box-shadow: var(--shadow-lg); padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); animation: up .2s ease;
}
@media (min-width: 640px) { .modal-back { align-items: center; } .modal { border-radius: 18px; padding: 22px; } }
.modal h2 { font-family: var(--font-display); font-size: 24px; margin-bottom: 4px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
.toasts { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); top: calc(12px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500; animation: up .2s ease; pointer-events: auto; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }

/* sheet (mobile "More") */
.sheet-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.sheet-links a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 12px; background: var(--surface-2); font-size: 12.5px; font-weight: 600; text-align: center; }
.sheet-links svg { width: 22px; height: 22px; color: var(--gold); }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 60%),
  radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, var(--rose) 18%, transparent), transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 410px; padding: 30px 24px; }
.login-mark { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--plum); color: var(--gold-2); display: grid; place-items: center; font-family: var(--font-display); font-size: 30px; }
.login-title { text-align: center; font-family: var(--font-display); font-size: 30px; line-height: 1.1; }
.login-sub { text-align: center; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin-top: 6px; }

/* guide */
.steps { counter-reset: step; display: grid; gap: 14px; }
.step { position: relative; padding: 18px 18px 18px 64px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 18px; top: 18px; width: 32px; height: 32px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font-family: var(--font-display); font-size: 18px; font-weight: 700; display: grid; place-items: center; }
.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p, .step li { color: var(--ink-2); font-size: 14px; }
.step ol, .step ul { padding-left: 18px; margin: 6px 0 0; }
code, .code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; background: var(--surface-2); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); overflow-wrap: anywhere; }
pre.code { display: block; padding: 10px 12px; white-space: pre-wrap; overflow-x: auto; }

.loading { padding: 60px 0; text-align: center; color: var(--ink-3); }
.spinner { width: 26px; height: 26px; border: 2.5px solid var(--line-2); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
.hide-sm { display: none; }
@media (min-width: 720px) { .hide-sm { display: initial; } .show-sm { display: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.dots i.s-confirmed { background: var(--ok); } .dots i.s-tentative { background: var(--warn); } .dots i.s-inquiry { background: var(--info); }
.dots i.s-completed { background: var(--done); } .dots i.s-cancelled { background: var(--muted); } .dots i.s-unassigned { background: var(--bad); }

/* ---------- live updates ---------- */
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); letter-spacing: .04em; }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); display: block; }
.live-dot.on { color: var(--ok); }
.live-dot.on i { background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: livepulse 2s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.live-toast { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-left: 4px solid var(--ok); }
.live-toast.gold { border-left-color: var(--gold); }
.live-toast .lt-title { font-weight: 700; font-size: 14px; }
.live-toast .lt-body { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.live-chip { position: fixed; z-index: 85; left: 50%; transform: translateX(-50%); top: calc(64px + env(safe-area-inset-top)); border: 0; border-radius: 999px; padding: 9px 16px;
  background: var(--plum); color: #fff; font: 600 13px var(--font-ui); box-shadow: var(--shadow-lg); cursor: pointer; }
:root[data-theme="dark"] .live-chip { color: #1b1418; }

/* bookings list: labelled date filters */
.date-field { display: inline-flex; align-items: center; gap: 6px; }
.date-field > span { font-size: 12px; color: var(--muted); white-space: nowrap; }
