/* =====================================================================
   Laser Salon — design system (mobile-first)
   ===================================================================== */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../vendor/inter/inter-cyrillic-400.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../vendor/inter/inter-cyrillic-ext-400.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../vendor/inter/inter-latin-ext-400.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../vendor/inter/inter-latin-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../vendor/inter/inter-cyrillic-500.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../vendor/inter/inter-latin-500.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../vendor/inter/inter-cyrillic-600.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../vendor/inter/inter-latin-600.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../vendor/inter/inter-cyrillic-700.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../vendor/inter/inter-latin-700.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --accent: #E8857A;
  --accent-600: color-mix(in srgb, var(--accent) 82%, #000);
  --accent-50: color-mix(in srgb, var(--accent) 9%, #fff);
  --accent-100: color-mix(in srgb, var(--accent) 18%, #fff);

  --bg: #F7F7F8;
  --surface: #FFFFFF;
  --surface-2: #FAFAFB;
  --border: #ECECEF;
  --border-strong: #DCDCE1;
  --text: #1F2328;
  --text-2: #5B616B;
  --text-3: #8C929C;

  --success: #16A34A; --success-bg: #EAF7EF;
  --warning: #D97706; --warning-bg: #FDF4E4;
  --danger: #DC2626;  --danger-bg: #FDECEC;
  --info: #2563EB;    --info-bg: #EAF1FE;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .03);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);

  /* Chart series (validated: categorical slots 1–3, light) */
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a;
  --sidebar-w: 248px;
  --topbar-h: 60px;
  --bottombar-h: 64px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #111317;
  --surface: #181B20;
  --surface-2: #1D2026;
  --border: #272B32;
  --border-strong: #343943;
  --text: #ECEDEF;
  --text-2: #A9AEB7;
  --text-3: #7A808A;
  --accent-50: color-mix(in srgb, var(--accent) 14%, #181B20);
  --accent-100: color-mix(in srgb, var(--accent) 24%, #181B20);
  --success-bg: #12271B; --warning-bg: #2B2112; --danger-bg: #2D1616; --info-bg: #142036;
  --shadow: 0 1px 3px rgba(0,0,0,.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
img { max-width: 100%; }
.icon { width: 18px; height: 18px; stroke-width: 1.8; flex-shrink: 0; vertical-align: middle; }
svg.lucide { width: 18px; height: 18px; stroke-width: 1.8; flex-shrink: 0; }
.muted { color: var(--text-2); } .small { font-size: .85rem; } .xsmall { font-size: .78rem; }
.text-right { text-align: right; } .text-center { text-align: center; } .nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px }
.mb-0 { margin-bottom: 0 } .mb-1 { margin-bottom: 8px } .mb-2 { margin-bottom: 16px } .mb-3 { margin-bottom: 24px }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-warning { color: var(--warning); }

/* ---------- Layout ---------- */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--surface);
  border-right: 1px solid var(--border); display: none; flex-direction: column; z-index: 40;
}
.sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px; font-weight: 700; font-size: 1.05rem; }
.sidebar__brand img { height: 32px; width: auto; border-radius: 6px; }
.brand-dot { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-600)); display: grid; place-items: center; color: #fff; }
.sidebar__nav { flex: 1; overflow-y: auto; padding: 4px 12px 20px; }
.nav-group { margin-top: 14px; }
.nav-group__title { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 0 10px 6px; font-weight: 600; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500; font-size: .92rem;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link.is-active { background: var(--accent-50); color: var(--accent-600); }
.sidebar__footer { padding: 12px; border-top: 1px solid var(--border); }

.main { min-width: 0; padding-bottom: calc(var(--bottombar-h) + 16px + env(safe-area-inset-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 12px;
  padding: 0 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar__title { font-weight: 600; font-size: 1.05rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__actions { display: flex; align-items: center; gap: 8px; }
.content { padding: 16px; max-width: 1400px; margin: 0 auto; }

.bottombar {
  position: fixed; inset: auto 0 0 0; height: calc(var(--bottombar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(5, 1fr); z-index: 40;
}
.bottombar a, .bottombar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3); font-size: .7rem; font-weight: 500; background: none; border: 0; font-family: inherit; cursor: pointer;
}
.bottombar a:hover { text-decoration: none; }
.bottombar .is-active { color: var(--accent-600); }
.bottombar .icon, .bottombar svg.lucide { width: 22px; height: 22px; }

.more-sheet { position: fixed; inset: 0; z-index: 60; display: none; }
.more-sheet.is-open { display: block; }
.more-sheet__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.more-sheet__panel {
  position: absolute; inset: auto 0 0 0; background: var(--surface); border-radius: 18px 18px 0 0; padding: 12px 12px calc(20px + env(safe-area-inset-bottom));
  max-height: 80vh; overflow-y: auto; animation: slideUp .2s ease;
}
.more-sheet__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.more-sheet__grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: var(--radius); color: var(--text); font-size: .8rem; text-align: center; }
.more-sheet__grid a:hover { background: var(--surface-2); text-decoration: none; }
.sheet-handle { width: 40px; height: 4px; border-radius: 4px; background: var(--border-strong); margin: 0 auto 12px; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }

@media (min-width: 1024px) {
  .sidebar { display: flex; }
  .main { margin-left: var(--sidebar-w); padding-bottom: 32px; }
  .bottombar, .only-mobile { display: none !important; }
  .content { padding: 24px 28px; }
  .topbar { padding: 0 28px; }
  .topbar__title { visibility: hidden; }
}
@media (max-width: 1023.98px) { .only-desktop { display: none !important; } }

/* ---------- Page header ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head__sub { color: var(--text-2); font-size: .9rem; margin-top: 2px; }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .grid-2 > .card + .card, .grid-3 > .card + .card, .grid-4 > .card + .card, .layout-side > .card + .card { margin-top: 0; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 0; flex-wrap: wrap; }
.card__head .seg { flex-wrap: nowrap; }
.card__head h2, .card__head h3 { margin: 0; font-size: 1rem; }
.card__body { padding: 16px 18px 18px; }
.card__foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 639.98px) {
  .grid-4 .stat { padding: 12px 14px; }
  .grid-4 .stat__value { font-size: 1.15rem; }
  .grid-4 .stat__icon { display: none; }
  .grid-4 .stat__meta { font-size: .72rem; }
}
@media (min-width: 640px) { .grid-4 { gap: 16px; } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.layout-side { display: grid; gap: 16px; }
.layout-side > *, .grid > *, .grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
@media (min-width: 1100px) { .layout-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }

.stat { padding: 16px 18px; }
.stat__label { color: var(--text-2); font-size: .82rem; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat__value { font-size: 1.5rem; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }
.stat__meta { font-size: .8rem; color: var(--text-3); margin-top: 2px; }
.stat__icon { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-50); color: var(--accent-600); display: grid; place-items: center; float: right; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: 500 .92rem/1 var(--font); cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; white-space: nowrap;
  text-decoration: none !important; -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-2); }
.btn:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--accent-100); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-600); border-color: var(--accent-600); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .85rem; }
.btn-icon { width: 44px; padding: 0; }
.btn-sm.btn-icon { width: 36px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn.is-loading::after { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-group { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg a, .seg button { padding: 7px 12px; border-radius: 6px; color: var(--text-2); font-size: .85rem; font-weight: 500; border: 0; background: none; cursor: pointer; font-family: inherit; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg .is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.fab {
  position: fixed; right: 16px; bottom: calc(var(--bottombar-h) + 16px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: #fff; border: 0; box-shadow: var(--shadow-lg); display: grid; place-items: center; z-index: 35; cursor: pointer;
}
.fab svg.lucide { width: 24px; height: 24px; }
.fab-menu { position: fixed; right: 16px; bottom: calc(var(--bottombar-h) + 82px + env(safe-area-inset-bottom)); display: none; flex-direction: column; gap: 8px; align-items: flex-end; z-index: 35; }
.fab-menu.is-open { display: flex; }
.fab-menu a { background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: 999px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px; font-weight: 500; }
@media (min-width: 1024px) { .fab, .fab-menu { display: none !important; } }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 14px 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 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: .84rem; font-weight: 500; color: var(--text-2); }
.field .hint { font-size: .78rem; color: var(--text-3); }
.req::after { content: ' *'; color: var(--danger); }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: 400 .95rem/1.3 var(--font); transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238C929C' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.select[multiple] { background-image: none; padding-right: 12px; min-height: 120px; }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-100); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .8rem; }
.input-sm { min-height: 36px; padding: 6px 10px; font-size: .88rem; }
input[type="color"].input { padding: 4px; width: 64px; }
.input-group { display: flex; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn, .input-group .addon { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-left: -1px; }
.addon { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); font-size: .9rem; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .92rem; min-height: 28px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.check-grid { display: grid; gap: 8px 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .check-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .check-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { appearance: none; width: 40px; height: 22px; border-radius: 22px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .2s; margin: 0; flex-shrink: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: var(--shadow-sm); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.form-section { margin-top: 22px; }
.form-section__title { font-size: .95rem; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
@media (max-width: 719.98px) { .form-actions .btn { flex: 1; } }
fieldset { border: 0; padding: 0; margin: 0; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 14px; }
.filters .field { flex: 1 1 160px; }
.filters .field.grow { flex: 3 1 240px; }
.search-input { position: relative; }
.search-input .input { padding-left: 38px; }
.search-input svg.lucide, .search-input .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); }

/* ---------- Tables (become cards on mobile) ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-weight: 500; color: var(--text-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th a { color: inherit; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table tfoot td { font-weight: 600; border-top: 1px solid var(--border-strong); border-bottom: 0; }
.row-link { color: var(--text); font-weight: 500; }
@media (max-width: 767.98px) {
  .table.responsive thead { display: none; }
  .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td, .table.responsive tfoot { display: block; width: 100%; }
  .table.responsive tr { padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .table.responsive tbody tr:hover td { background: none; }
  .table.responsive td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table.responsive td::before { content: attr(data-label); color: var(--text-3); font-size: .8rem; text-align: left; flex-shrink: 0; }
  .table.responsive td.primary { font-weight: 600; font-size: 1rem; text-align: left; justify-content: flex-start; padding-bottom: 6px; }
  .table.responsive td.primary::before, .table.responsive td.actions::before, .table.responsive td[data-label=""]::before { display: none; }
  .table.responsive td.actions { justify-content: flex-end; padding-top: 8px; }
  .table.responsive tfoot tr { border-bottom: 0; }
}

.pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pagination__info { color: var(--text-3); font-size: .84rem; }
.pagination__links { display: flex; gap: 4px; flex-wrap: wrap; }
.pagination__links a, .pagination__links span { min-width: 36px; height: 36px; padding: 0 8px; border-radius: var(--radius-sm); display: grid; place-items: center; font-size: .85rem; color: var(--text-2); border: 1px solid transparent; }
.pagination__links a:hover { background: var(--surface-2); text-decoration: none; }
.pagination__links .is-current { background: var(--accent-50); color: var(--accent-600); font-weight: 600; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; border: 1px solid var(--border); }
.badge-success { background: var(--success-bg); color: var(--success); border-color: transparent; }
.badge-warning { background: var(--warning-bg); color: var(--warning); border-color: transparent; }
.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.badge-info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.badge-accent { background: var(--accent-50); color: var(--accent-600); border-color: transparent; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-booked { background: #EEF2FF; color: #4F46E5; } .status-confirmed { background: var(--info-bg); color: var(--info); }
.status-arrived { background: var(--warning-bg); color: var(--warning); } .status-completed { background: var(--success-bg); color: var(--success); }
.status-no_show { background: var(--danger-bg); color: var(--danger); } .status-cancelled { background: var(--surface-2); color: var(--text-3); text-decoration: line-through; }
[data-theme="dark"] .status-booked { background: #1E1B4B; color: #A5B4FC; }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: .9rem; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.alert-danger { background: var(--danger-bg); color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: var(--warning); }
.alert-info { background: var(--info-bg); color: var(--info); }
.alert-success { background: var(--success-bg); color: var(--success); }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--text-2); }
.empty__icon { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-50); color: var(--accent-600); display: grid; place-items: center; margin: 0 auto 12px; }
.empty__icon svg.lucide { width: 26px; height: 26px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { padding: 10px 14px; color: var(--text-2); font-weight: 500; font-size: .9rem; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; font-family: inherit; }
.tabs a:hover, .tabs button:hover { color: var(--text); text-decoration: none; }
.tabs .is-active { color: var(--accent-600); border-bottom-color: var(--accent); }
.tab-panel { display: none; } .tab-panel.is-active { display: block; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; top: 14px; right: 14px; left: 14px; z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); border-radius: var(--radius); padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; max-width: 420px; width: 100%; animation: toastIn .25s ease; font-size: .9rem; }
.toast__bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--info); flex-shrink: 0; }
.toast-success .toast__bar { background: var(--success); } .toast-error .toast__bar { background: var(--danger); }
.toast.is-leaving { opacity: 0; transform: translateY(-6px); transition: all .25s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: flex-end; justify-content: center; }
.modal.is-open { display: flex; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15, 18, 24, .45); }
.modal__dialog { position: relative; background: var(--surface); width: 100%; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; box-shadow: var(--shadow-lg); animation: slideUp .2s ease; }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal__head h3 { margin: 0; }
.modal__body { padding: 18px; }
.modal__foot { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: 0; background: var(--surface); }
@media (min-width: 720px) {
  .modal { align-items: center; padding: 20px; }
  .modal__dialog { max-width: 560px; border-radius: 16px; animation: toastIn .2s ease; }
  .modal--lg .modal__dialog { max-width: 820px; }
}

/* ---------- Dropdown ---------- */
.dropdown { position: relative; display: inline-block; }
.dropdown__menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 50; }
.dropdown.is-open .dropdown__menu { display: block; }
.dropdown__menu a, .dropdown__menu button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 6px; color: var(--text); font-size: .9rem; background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left; }
.dropdown__menu a:hover, .dropdown__menu button:hover { background: var(--surface-2); text-decoration: none; }

/* ---------- Autocomplete ---------- */
.ac { position: relative; }
.ac__list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); z-index: 60; max-height: 280px; overflow-y: auto; display: none; }
.ac__list.is-open { display: block; }
.ac__item { padding: 10px 12px; cursor: pointer; font-size: .9rem; display: flex; justify-content: space-between; gap: 10px; }
.ac__item:hover, .ac__item.is-active { background: var(--accent-50); }
.ac__item small { color: var(--text-3); }

/* ---------- Misc components ---------- */
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-100); color: var(--accent-600); display: inline-grid; place-items: center; font-weight: 600; font-size: .85rem; flex-shrink: 0; object-fit: cover; overflow: hidden; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.2rem; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person__name { font-weight: 500; color: var(--text); }
.person__meta { font-size: .8rem; color: var(--text-3); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: .9rem; }
.kv dt { color: var(--text-3); } .kv dd { margin: 0; word-break: break-word; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.list > li:last-child { border-bottom: 0; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.timeline li:last-child { border-bottom: 0; }
.timeline__time { font-weight: 600; font-variant-numeric: tabular-nums; font-size: .9rem; }
.timeline__card { border-left: 3px solid var(--accent); padding-left: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .82rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-btn { padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font: 500 .85rem var(--font); color: var(--text); min-height: 40px; }
.slot-btn:hover { border-color: var(--accent); background: var(--accent-50); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.thumb { position: relative; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 1; background: var(--surface-2); display: grid; place-items: center; color: var(--text-3); font-size: .75rem; text-align: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__label { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: .68rem; padding: 2px 6px; border-radius: 4px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.file-row:last-child { border-bottom: 0; }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 18px; text-align: center; color: var(--text-2); cursor: pointer; position: relative; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-50); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.progress { height: 8px; background: var(--surface-2); border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.progress__bar { height: 100%; background: var(--accent); border-radius: 8px; }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 220px; }
.color-swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; vertical-align: middle; }
.totals { margin-left: auto; max-width: 360px; width: 100%; }
.totals .row { display: flex; justify-content: space-between; padding: 6px 0; font-size: .92rem; }
.totals .row.grand { font-size: 1.15rem; font-weight: 700; border-top: 1px solid var(--border-strong); padding-top: 10px; margin-top: 4px; }
.line-items .input, .line-items .select { min-height: 38px; padding: 7px 9px; font-size: .88rem; }
.line-items td { padding: 6px 6px; }
@media (max-width: 767.98px) {
  .line-items thead { display: none; }
  .line-items tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .line-items td { display: block; padding: 0; border: 0; }
  .line-items td.li-desc { grid-column: 1 / -1; }
  .line-items td::before { content: attr(data-label); display: block; font-size: .72rem; color: var(--text-3); margin-bottom: 2px; }
}

/* ---------- Auth pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.auth__side { display: none; background: linear-gradient(150deg, var(--accent) 0%, var(--accent-600) 100%); color: #fff; padding: 48px; position: relative; overflow: hidden; }
.auth__side::before, .auth__side::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.1); }
.auth__side::before { width: 420px; height: 420px; right: -120px; top: -100px; }
.auth__side::after { width: 300px; height: 300px; left: -80px; bottom: -60px; }
.auth__side h2 { font-size: 2rem; font-weight: 700; max-width: 380px; position: relative; z-index: 1; margin-top: 30vh; }
.auth__side p { opacity: .85; max-width: 380px; position: relative; z-index: 1; }
.auth__main { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth__box { width: 100%; max-width: 380px; }
.auth__logo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; font-weight: 700; font-size: 1.15rem; }
.auth__logo img { max-height: 48px; }
@media (min-width: 960px) { .auth { grid-template-columns: 1.1fr 1fr; } .auth__side { display: block; } }

/* ---------- Calendar (FullCalendar overrides) ---------- */
.fc { --fc-border-color: var(--border); --fc-today-bg-color: var(--accent-50); --fc-page-bg-color: var(--surface); --fc-neutral-bg-color: var(--surface-2); --fc-now-indicator-color: var(--accent); font-size: .85rem; }
.fc .fc-toolbar-title { font-size: 1.05rem; font-weight: 600; }
.fc .fc-button { background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); font-weight: 500; text-transform: none; box-shadow: none !important; padding: 6px 12px; }
.fc .fc-button:hover { background: var(--surface-2); color: var(--text); }
.fc .fc-button:disabled { opacity: .55; background: var(--surface); color: var(--text-2); }
.fc .fc-button-primary:not(:disabled).fc-button-active, .fc .fc-button-primary:not(:disabled):active { background: var(--accent); border-color: var(--accent); color: #fff; }
.fc .fc-timegrid-slot { height: 2.2em; }
.fc-event { border-radius: 6px !important; border-width: 0 0 0 3px !important; padding: 1px 3px; cursor: pointer; }
.fc .fc-non-business { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, transparent 6px, transparent 12px); }
.fc-event.is-cancelled { opacity: .45; text-decoration: line-through; }
.fc .fc-col-header-cell-cushion, .fc .fc-daygrid-day-number { color: var(--text-2); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: .8rem; color: var(--text-2); }
.day-list__day { font-weight: 600; margin: 18px 0 8px; display: flex; justify-content: space-between; }
.day-list__item { display: flex; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; border-left: 4px solid var(--accent); }
.day-list__time { font-weight: 600; min-width: 52px; font-variant-numeric: tabular-nums; }

/* ---------- Print ---------- */
@media print {
  .sidebar, .topbar, .bottombar, .fab, .fab-menu, .no-print, .toasts, .page-head__actions, .filters, .pagination { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; }
  .content { padding: 0 !important; max-width: none; }
  body { background: #fff; color: #000; }
  .card { border: 0; box-shadow: none; }
  .chart-box { height: 240px; }
}
