/* ==========================================================================
   Речь Порт — Admin Panel Design System
   ========================================================================== */

/* ====== TOKENS ====== */
:root {
  --bg: #070B18;
  --bg2: #0B1430;
  --surface: rgba(255,255,255,0.06);
  --surface-strong: rgba(255,255,255,0.10);
  --stroke: rgba(255,255,255,0.12);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.68);
  --subtle: rgba(255,255,255,0.48);
  --accent: #FF3D7F;
  --accent-hover: #FF5A92;
  --accent-soft: rgba(255,61,127,0.14);
  --danger: #FF4D4D;
  --warning: #FFB020;
  --success: #38D996;
  --info: #38BDF8;
  --purple-glow: rgba(152,88,255,0.35);
  --cyan-glow: rgba(56,189,248,0.18);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --fs-h1: 28px; --fs-h2: 20px; --fs-h3: 16px; --fs-body: 14px; --fs-micro: 12px;
  --fw-regular: 400; --fw-medium: 500; --fw-semi: 600; --fw-bold: 700;
  --lh-tight: 1.15; --lh-normal: 1.35; --lh-relaxed: 1.6;
  --radius-sm: 12px; --radius-md: 16px; --radius-lg: 22px;
  --shadow-card: 0 16px 40px rgba(0,0,0,0.30);
  --blur-glass: 16px;
  --transition-fast: 140ms ease;
  --transition-base: 220ms cubic-bezier(0.2,0.8,0.2,1);
  --sidebar-w: 280px;
  --topbar-h: 64px;
  --content-max: 1320px;
  --gutter: 20px;
}

/* ====== RESET ====== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-y: auto;
}
body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: visible;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition-base), color var(--transition-base);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
  font: inherit; color: inherit; background: none; border: none; outline: none;
}
button { cursor: pointer; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
table { border-collapse: collapse; width: 100%; }

/* ====== SCROLLBAR ====== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,61,127,0.55); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,61,127,0.82); }

/* ====== APP SHELL ====== */
.admin-app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  background:
    radial-gradient(900px 600px at 70% 0%, rgba(152,88,255,0.25) 0%, transparent 55%),
    radial-gradient(800px 500px at 15% 90%, rgba(56,189,248,0.14) 0%, transparent 55%),
    linear-gradient(180deg, #070B18 0%, #061026 55%, #050B1A 100%);
  background-attachment: fixed;
}

/* ====== SIDEBAR ====== */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.04);
  border-right: 1px solid rgba(255,255,255,0.10);
  z-index: 100;
  transition: transform var(--transition-base);
}
.sidebar-brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 0 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}
.brand-link {
  font-size: 18px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.accent-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin: 0 1px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
.sidebar-nav {
  flex: 1;
  padding: 12px 12px;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  transition: background var(--transition-fast), color var(--transition-fast);
  position: relative;
  margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.nav-item.active {
  background: var(--accent-soft);
  color: var(--text);
}
.nav-item .nav-icon { display: flex; flex-shrink: 0; }
.nav-item .nav-icon svg { width: 20px; height: 20px; }
.nav-dot {
  display: none;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: auto;
}
.nav-item.active .nav-dot { display: block; }
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sidebar-owner-menu {
  margin-bottom: 8px;
}
.owner-nav-item {
  margin-bottom: 0;
}
.sidebar-client-tools {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}
.sidebar-client-tool-btn {
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,61,127,0.45);
  background: rgba(255,255,255,0.03);
  color: #ffd2e5;
  font-size: 12px;
  font-weight: var(--fw-medium);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.sidebar-client-tool-btn:hover {
  background: rgba(255,61,127,0.14);
  color: #fff;
  border-color: rgba(255,61,127,0.75);
}
.sidebar-client-tool-btn--danger {
  border-color: rgba(255, 120, 120, 0.45);
  color: #ffc9c9;
}
.sidebar-client-tool-btn--danger:hover {
  color: #ff9090;
  background: rgba(255, 120, 120, 0.12);
  border-color: rgba(255, 120, 120, 0.7);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-micro);
  font-weight: var(--fw-semi);
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { display: block; font-size: var(--fs-micro); font-weight: var(--fw-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { display: block; font-size: 11px; color: var(--subtle); }
.sidebar-studio-note {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(124, 92, 255, 0.18);
  color: var(--accent);
  font-size: 12px;
  font-weight: var(--fw-medium);
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-studio-note-title {
  font-size: 10px;
  color: var(--subtle);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.user-logout-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--subtle);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.user-logout-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); }

/* Sidebar collapse button */
.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  color: var(--subtle);
  margin-left: auto;
  flex-shrink: 0;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.sidebar-collapse-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); }

/* ====== SIDEBAR COLLAPSED STATE ====== */
.sidebar-collapsed .sidebar {
  width: 68px;
}
.sidebar-collapsed {
  grid-template-columns: 68px 1fr;
}
.sidebar-collapsed .sidebar-brand {
  padding: 0;
  justify-content: center;
}
.sidebar-collapsed .brand-link {
  display: none;
}
.sidebar-collapsed .sidebar-collapse-btn {
  margin-left: 0;
}
.sidebar-collapsed .sidebar-nav {
  padding: 12px 8px;
}
.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 10px 0;
  gap: 0;
}
.sidebar-collapsed .nav-label {
  display: none;
}
.sidebar-collapsed .nav-dot {
  display: none !important;
}
.sidebar-collapsed .sidebar-footer {
  padding: 8px;
}
.sidebar-collapsed .sidebar-owner-menu {
  margin-bottom: 6px;
}
.sidebar-collapsed .sidebar-client-tools {
  display: none !important;
}
.sidebar-collapsed .sidebar-user {
  flex-direction: column;
  gap: 8px;
  padding: 8px 4px;
  align-items: center;
}
.sidebar-collapsed .user-info {
  display: none;
}
.sidebar-collapsed .user-logout-btn {
  width: 28px; height: 28px;
}

/* Tooltip on nav items when collapsed */
.sidebar-collapsed .nav-item {
  position: relative;
}
.sidebar-collapsed .nav-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: var(--fw-medium);
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s, visibility .15s;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
  z-index: 200;
}
.sidebar-collapsed .nav-item:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Smooth transition for sidebar width */
.sidebar {
  transition: width .25s ease, transform var(--transition-base);
}
.admin-app {
  transition: grid-template-columns .25s ease;
}

/* ====== MAIN AREA ====== */
.main-area {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  overflow: visible;
}

/* ====== TOPBAR ====== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 var(--gutter);
  background: rgba(11,20,48,0.72);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topbar-left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.sidebar-toggle {
  display: none;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--muted);
}
.sidebar-toggle:hover { background: var(--surface); color: var(--text); }
.page-title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-semi);
  white-space: nowrap;
}
.topbar-center { flex: 1; display: flex; justify-content: center; min-width: 0; }
.topbar-role-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--surface);
  max-width: 100%;
}
.topbar-role-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-semi);
  border-radius: 999px;
  padding: 6px 10px;
  white-space: nowrap;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.topbar-role-btn:hover {
  color: var(--text);
}
.topbar-role-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.search-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;
}
.search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  display: flex;
  color: var(--subtle);
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 40px;
  padding: 0 50px 0 42px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: var(--fs-body);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.search-input::placeholder { color: var(--subtle); }
.search-input:focus { border-color: rgba(255,61,127,0.5); background: rgba(255,255,255,0.07); }
.search-kbd {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--subtle);
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.10);
  pointer-events: none;
}
.topbar-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  font-size: var(--fs-micro);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.topbar-pill svg { width: 14px; height: 14px; }
.topbar-icon-btn {
  position: relative;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--muted);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.topbar-icon-btn:hover { background: var(--surface); color: var(--text); }
.topbar-icon-btn svg { width: 20px; height: 20px; }
.notif-badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: var(--fw-bold);
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  padding: 0 4px;
}
.notif-badge:empty { display: none; }

/* ====== NOTIFICATION PANEL ====== */
.notif-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: transparent;
}
.notif-panel {
  position: absolute;
  top: 56px;
  right: 120px;
  width: 380px;
  max-height: 520px;
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 48px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: notifSlideIn 180ms ease;
}
@keyframes notifSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--stroke);
}
.notif-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-h3);
  font-weight: var(--fw-semi);
  color: var(--text);
}
.notif-panel-close {
  background: none; border: none; cursor: pointer;
  color: var(--muted);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.notif-panel-close:hover { background: var(--surface); color: var(--text); }
.notif-panel-empty {
  padding: 48px 24px;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  color: var(--subtle);
  text-align: center;
}
.notif-panel-empty svg { opacity: 0.5; }
.notif-panel-list {
  overflow-y: auto;
  flex: 1;
  padding: 6px 0;
}
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 18px;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.notif-item:hover { background: var(--surface); }
.notif-item-icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  margin-top: 2px;
}
.notif-item-pending .notif-item-icon { background: rgba(255,176,32,0.15); color: var(--warning); }
.notif-item-upcoming .notif-item-icon { background: rgba(56,189,248,0.15); color: var(--info); }
.notif-item-change .notif-item-icon { background: rgba(152,88,255,0.15); color: #9858FF; }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title {
  font-size: 13px;
  font-weight: var(--fw-medium);
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 2px;
}
.notif-item-text {
  font-size: var(--fs-micro);
  color: var(--muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-item-time {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--subtle);
  margin-top: 3px;
}
/* Unread indicator */
.notif-item-unread {
  position: relative;
}
.notif-item-unread::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transition: opacity 400ms ease;
}
/* Panel header actions */
.notif-panel-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.notif-panel-btn {
  background: none; border: none; cursor: pointer;
  color: var(--muted);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.notif-panel-btn:hover { background: var(--surface); color: var(--text); }
#notifReadAll:hover { color: var(--success); }
#notifClearAll:hover { color: var(--danger); }

/* ====== CONTENT ====== */
.content-area {
  flex: 1;
  padding: var(--gutter) calc(var(--gutter) + 8px);
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: visible;
}

/* ====== GLASS CARD ====== */
.glass-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 18px;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
/* Hover animation only for dashboard pie/chart cards and metric row cards */
.metrics-row .glass-card,
.pie-grid .glass-card {
  transition: background var(--transition-fast), transform var(--transition-base), box-shadow var(--transition-base);
}
.metrics-row .glass-card:hover,
.pie-grid .glass-card:hover { background: var(--surface-strong); transform: translateY(-2px); box-shadow: 0 20px 50px rgba(0,0,0,0.35); }
.glass-card-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semi);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  word-break: break-word;
}
.card-subtitle {
  font-size: var(--fs-micro);
  color: var(--subtle);
  margin-top: -10px;
  margin-bottom: 12px;
}

/* ====== METRICS ====== */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
  margin-bottom: var(--gutter);
}
.metric-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background var(--transition-fast), transform var(--transition-base), box-shadow var(--transition-base);
  box-shadow: var(--shadow-card);
}
.metric-card:hover { background: var(--surface-strong); transform: translateY(-2px); box-shadow: 0 20px 50px rgba(0,0,0,0.35); }
.metric-label {
  font-size: var(--fs-micro);
  color: var(--subtle);
  font-weight: var(--fw-medium);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.metric-value {
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  letter-spacing: -0.5px;
  line-height: var(--lh-tight);
  word-break: break-word;
  overflow-wrap: break-word;
}
.metric-hint {
  font-size: var(--fs-micro);
  color: var(--subtle);
}
.metric-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.metric-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
}
.metric-trend.up { color: var(--success); }
.metric-trend.down { color: var(--danger); }
.metric-cta {
  font-size: var(--fs-micro);
  color: var(--accent);
  cursor: pointer;
  transition: color var(--transition-fast);
}
.metric-cta:hover { color: var(--accent-hover); }

/* -- metric expand -- */
.metric-expand-arrow {
  font-size: 10px;
  color: var(--subtle);
  transition: transform var(--transition-base);
  margin-left: auto;
}
.metric-card--expanded .metric-expand-arrow { transform: rotate(180deg); }
.metric-detail {
  margin-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 10px;
  animation: metricSlide .2s ease;
}
@keyframes metricSlide { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.metric-detail-head {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-micro);
  color: var(--subtle);
  margin-bottom: 8px;
  font-weight: var(--fw-medium);
}
.metric-detail-list {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metric-detail-list::-webkit-scrollbar { width: 4px; }
.metric-detail-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
.metric-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  transition: background var(--transition-fast);
}
.metric-detail-row:hover { background: rgba(255,255,255,0.08); }
.metric-detail-left { flex: 1; min-width: 0; }
.metric-detail-client {
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.metric-detail-svc {
  font-size: var(--fs-micro);
  color: var(--subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.metric-detail-date {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}
.metric-detail-price {
  font-size: var(--fs-body);
  font-weight: var(--fw-semi);
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}
.metric-detail-empty {
  text-align: center;
  color: var(--subtle);
  font-size: var(--fs-micro);
  padding: 12px 0;
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  transition: background var(--transition-fast), transform 80ms ease, box-shadow var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); border: 1px solid var(--stroke); color: var(--text); }
.btn-secondary:hover { background: var(--surface-strong); }
.btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,0.14); color: var(--muted); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #ff6666; }
.btn-sm { padding: 6px 14px; font-size: var(--fs-micro); border-radius: var(--radius-sm); }
.btn-xs { padding: 4px 10px; font-size: 11px; border-radius: 8px; }
.btn-icon {
  width: 32px; height: 32px; padding: 0;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--stroke);
  color: var(--muted);
}
.btn-icon:hover { background: var(--surface-strong); color: var(--text); }

/* ====== DATA TABLE ====== */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: var(--fs-micro);
  font-weight: var(--fw-semi);
  color: var(--subtle);
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--stroke);
  white-space: nowrap;
}
.table-sort {
  cursor: pointer;
  user-select: none;
}
.table-sort .sort-arrow {
  margin-left: 6px;
  font-size: 10px;
  color: var(--subtle);
}
.table-sort.active .sort-arrow { color: var(--text); }
.data-table thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.data-table thead th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
.data-table tbody td {
  padding: 10px 14px;
  font-size: var(--fs-body);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  vertical-align: middle;
}
.data-table tbody tr { transition: background var(--transition-fast); }
.data-table tbody tr:hover { background: rgba(255,255,255,0.04); }
.table-empty {
  text-align: center;
  padding: 40px 14px !important;
  color: var(--subtle);
}
/* Bulk select checkboxes */
.tbl-cb { width: 32px; text-align: center; }
.tbl-cb input[type="checkbox"] { accent-color: var(--accent); cursor: pointer; width: 15px; height: 15px; }
tr.row-selected { background: rgba(124,92,255,0.08) !important; }
/* Bulk action bar */
.bulk-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; margin-bottom: 12px;
  background: rgba(124,92,255,0.10);
  border: 1px solid rgba(124,92,255,0.25);
  border-radius: var(--radius-md);
  font-size: 13px; color: var(--text);
}
.bulk-bar .bulk-count { font-weight: var(--fw-semibold); }
.bulk-bar .btn-bulk-delete {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 8px;
  background: rgba(255,77,77,0.12); color: var(--danger);
  border: 1px solid rgba(255,77,77,0.3);
  cursor: pointer; font-size: 12px; font-weight: var(--fw-medium);
  transition: background .15s;
}
.bulk-bar .btn-bulk-delete:hover { background: rgba(255,77,77,0.22); }
.bulk-bar .btn-bulk-clear {
  padding: 6px 12px; border-radius: 8px;
  background: transparent; color: var(--muted); border: 1px solid var(--stroke);
  cursor: pointer; font-size: 12px;
  transition: background .15s;
}
.bulk-bar .btn-bulk-clear:hover { background: rgba(255,255,255,0.06); }
/* Archived clients separate list */
.cli-archive-section { margin-top: 16px; opacity: 0.7; }
.cli-archive-section .glass-card-title { font-size: 13px; }

.table-actions { display: flex; gap: 4px; }
.btn-action {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: var(--subtle);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.btn-action:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.btn-action svg { width: 15px; height: 15px; }
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 12px 0 0;
}
.page-btn {
  min-width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: var(--fs-micro);
  color: var(--muted);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.page-btn:hover { background: var(--surface); color: var(--text); }
.page-btn.active { background: var(--accent-soft); color: var(--accent); font-weight: var(--fw-semi); }
.page-btn:disabled { opacity: 0.35; pointer-events: none; }

/* ====== CHIPS ====== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.chip-pending  { background: rgba(255,176,32,0.18);  color: var(--warning); }
.chip-confirmed{ background: rgba(56,217,150,0.18);  color: var(--success); }
.chip-cancelled{ background: rgba(255,77,77,0.18);   color: var(--danger); }
.chip-completed{ background: rgba(14,165,233,0.18);  color: var(--info); }
.chip-locked   { background: rgba(255,61,127,0.14);  color: var(--accent); }
.chip-info     { background: rgba(56,189,248,0.18);  color: var(--info); }
.chip-active   { background: rgba(56,217,150,0.18);  color: var(--success); }
.chip-inactive { background: rgba(255,255,255,0.08);  color: var(--subtle); }
.chip-btn {
  border: none;
  cursor: pointer;
  padding: 3px 10px;
  background: transparent;
}
.svc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--muted);
  font-size: var(--fs-micro);
}
.svc-toggle:not(.on) { color: var(--danger); }
.svc-toggle-track {
  width: 36px;
  height: 20px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  position: relative;
  display: inline-block;
  transition: background var(--transition-fast);
}
.svc-toggle:not(.on) .svc-toggle-track { background: rgba(255,77,77,0.28); }
.svc-toggle-knob {
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  left: 4px;
  top: 3px;
  transition: transform var(--transition-fast);
}
.svc-toggle.on .svc-toggle-track { background: rgba(56,217,150,0.35); }
.svc-toggle.on .svc-toggle-knob { transform: translateX(16px); }
.svc-toggle-label {
  color: inherit;
  min-width: 10ch;
  display: inline-block;
}

/* ====== FORMS ====== */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  color: var(--muted);
  margin-bottom: 6px;
}
.form-label-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.client-add-btn {
  background: none; border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: var(--subtle); font-size: 11px; padding: 2px 8px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 3px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.client-add-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: var(--fs-body);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.status-select {
  width: auto;
  min-width: 140px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: var(--fw-medium);
  border: 1px solid transparent;
}
.status-select-pending   { background: rgba(255,176,32,0.15);  color: var(--warning); border-color: rgba(255,176,32,0.3); }
.status-select-confirmed { background: rgba(56,217,150,0.15);  color: var(--success); border-color: rgba(56,217,150,0.3); }
.status-select-completed { background: rgba(14,165,233,0.15);  color: var(--info);    border-color: rgba(14,165,233,0.3); }
.status-select-cancelled { background: rgba(255,77,77,0.15);   color: var(--danger);  border-color: rgba(255,77,77,0.3); }

/* Ads consent toggle button */
/* Mini toggle switch */
.mini-toggle {
  position: relative;
  display: inline-block;
  width: 36px; height: 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background .2s;
  vertical-align: middle;
  padding: 0;
}
.mini-toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}
.mini-toggle.on  { background: var(--success); }
.mini-toggle.off { background: rgba(255,255,255,0.15); }
.mini-toggle.on::after  { transform: translateX(16px); }
.mini-toggle.off::after { transform: translateX(0); }
.mini-toggle:hover { opacity: 0.85; }

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.08);
}
/* Hide number input spinners */
.form-input[type="number"]::-webkit-inner-spin-button,
.form-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.form-input[type="number"] { -moz-appearance: textfield; }
.form-select { appearance: none; cursor: pointer; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
/* Date input: full-area clickable, white calendar icon */
.form-input[type="date"] { cursor: pointer; position: relative; }
.form-input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  opacity: 0;
}
.form-input[type="date"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}
/* Time input: full-area clickable, white clock icon */
.form-input[type="time"] { cursor: pointer; position: relative; }
.form-input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  opacity: 0;
}
.form-input[type="time"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}
/* Settings form compact layout */
.settings-form { max-width: 480px; }
/* Work days toggles */
.workdays-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.workday-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--subtle);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}
.workday-chip:hover { border-color: rgba(255,255,255,0.25); color: var(--text); }
.workday-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.workday-chip.active:hover { background: var(--accent-hover); }
.form-select option { background: #141830; color: rgba(255,255,255,0.9); }
.form-select option:hover, .form-select option:checked { background: #1e2545; color: #fff; }
.filter-select option { background: #141830; color: rgba(255,255,255,0.9); }
.filter-select option:hover, .filter-select option:checked { background: #1e2545; color: #fff; }
.form-textarea { min-height: 80px; resize: vertical; }
.form-hint { font-size: 11px; color: var(--subtle); margin-top: 4px; }
.room-inactive-hint {
  font-size: 11px;
  color: var(--warning);
  margin: -8px 0 12px;
  line-height: 1.4;
}
.room-inactive-hint a {
  color: var(--accent);
  font-weight: var(--fw-medium);
  cursor: pointer;
}
.room-inactive-hint a:hover { text-decoration: underline; }
/* Client search dropdown */
.client-search-wrap { position: relative; }
.client-search-input { width: 100%; padding-right: 40px !important; }
.client-search-icon {
  position: absolute;
  right: 8px; top: 0;
  height: 40px;
  background: none; border: none; padding: 4px 6px; cursor: pointer;
  color: rgba(255,255,255,0.5);
  transition: color var(--transition-fast);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.client-search-icon:hover { color: rgba(255,255,255,0.9); }
.client-search-dropdown {
  display: none;
  position: absolute;
  left: 0; right: 0; top: 100%;
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
  background: #141830;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.client-search-dropdown.open { display: block; }
.client-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background var(--transition-fast);
  color: rgba(255,255,255,0.88);
  font-size: 13px;
}
.client-search-item:hover { background: rgba(255,255,255,0.08); }
.client-search-item-new { border-top: 1px solid rgba(255,255,255,0.08); }
.client-search-new { color: var(--accent); font-weight: 600; }
.client-search-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-search-phone { color: var(--subtle); font-size: 12px; white-space: nowrap; }
.client-search-empty { padding: 10px 14px; color: var(--subtle); font-size: 12px; text-align: center; }
/* Selected client chip */
.client-selected {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
}
.client-selected-name { font-weight: 500; color: var(--text); font-size: 14px; }
.client-selected-phone { color: var(--subtle); font-size: 13px; }
.client-selected-clear {
  margin-left: auto;
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.4);
  padding: 2px; display: flex; align-items: center;
  transition: color var(--transition-fast);
}
.client-selected-clear:hover { color: rgba(255,255,255,0.9); }
.btn-sm { font-size: 12px; padding: 4px 10px; }
/* Checkbox group */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 0;
  font-size: var(--fs-body);
  color: var(--text);
}
.checkbox-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.checkbox-item input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 6px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checkbox-item:hover input[type="checkbox"] { border-color: rgba(255,255,255,0.45); }
.form-checkbox-single { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 0; }
.form-checkbox-single input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.15s;
}
.form-checkbox-single input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.form-checkbox-single input[type="checkbox"]:checked::after {
  content: ''; position: absolute; left: 4px; top: 1px;
  width: 6px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.form-checkbox-single:hover input[type="checkbox"] { border-color: rgba(255,255,255,0.45); }
.form-checkbox-single span { font-size: var(--fs-body); color: var(--text); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-toggle-wrap { display: flex; align-items: center; gap: 10px; }
.form-toggle {
  position: relative;
  width: 44px; height: 24px;
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}
.form-toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition-fast);
}
.form-toggle.on { background: var(--accent); }
.form-toggle.on::after { transform: translateX(20px); }

/* -- Color picker -- */
.form-color-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-color {
  -webkit-appearance: none;
  appearance: none;
  width: 40px; height: 40px;
  border: 2px solid var(--stroke);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  padding: 2px;
}
.form-color::-webkit-color-swatch-wrapper { padding: 0; }
.form-color::-webkit-color-swatch { border: none; border-radius: 8px; }
.form-color::-moz-color-swatch { border: none; border-radius: 8px; }
.form-color-hex {
  font-size: var(--fs-micro);
  color: var(--muted);
  font-family: monospace;
  letter-spacing: 0.5px;
}
.svc-color-pick {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}
.svc-color-input {
  position: absolute;
  width: 0; height: 0;
  opacity: 0;
  pointer-events: none;
}
.svc-color-dot {
  display: inline-block;
  width: 22px; height: 22px;
  border-radius: 6px;
  vertical-align: middle;
  border: 2px solid rgba(255,255,255,0.12);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.svc-color-dot:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
}

/* ====== PREMISES (помещения) ====== */
.premise-hint b { color: var(--text); font-weight: var(--fw-semi); }
.premise-block {
  margin-bottom: 20px;
  padding: 16px 18px;
}
.premise-block-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.premise-block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.premise-block-icon {
  display: flex;
  color: var(--accent);
}
.premise-block-name {
  font-size: var(--fs-h2);
  font-weight: var(--fw-semi);
}
.premise-block-meta {
  font-size: var(--fs-micro);
  color: var(--subtle);
}
.premise-block-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.premise-block-address {
  font-size: var(--fs-micro);
  color: var(--muted);
  margin-bottom: 12px;
}
.premise-empty {
  font-size: var(--fs-body);
  color: var(--subtle);
  padding: 12px 0 4px;
}
.premise-rooms-grid {
  margin-top: 4px;
}
.premise-block-orphan {
  border-style: dashed;
}

/* ====== ROOM CARDS ====== */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.room-card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.room-card:hover { background: var(--surface-strong); border-color: rgba(255,255,255,0.18); }
.room-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.room-card-dot {
  width: 14px; height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}
.room-card-name {
  font-weight: var(--fw-semi);
  font-size: var(--fs-h3);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-card-status { flex-shrink: 0; }
.room-toggle-active {
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 0;
  transition: opacity var(--transition-fast);
}
.room-toggle-active:hover { opacity: 0.7; }
.room-card-desc {
  font-size: var(--fs-micro);
  color: var(--muted);
  line-height: var(--lh-relaxed);
  margin-bottom: 10px;
}
.room-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--stroke);
  padding-top: 10px;
  margin-top: 4px;
}
.room-card-actions { display: flex; gap: 4px; }
.room-card-services {
  font-size: 12px;
  color: var(--subtle);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

/* Room service list in modal */
.room-svc-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
  padding: 2px 0;
}
.room-svc-list::-webkit-scrollbar { width: 4px; }
.room-svc-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }
.room-svc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.room-svc-name { font-size: 13px; font-weight: var(--fw-medium); }
.room-svc-toggle {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: rgba(255,255,255,0.12);
  position: relative;
  cursor: pointer;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}
.room-svc-toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform var(--transition-fast);
}
.room-svc-toggle.on { background: var(--success); }
.room-svc-toggle.on::after { transform: translateX(18px); }
.theme-light .room-svc-row {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
}
.theme-light .room-svc-toggle { background: rgba(0,0,0,0.12); }
.theme-light .room-svc-toggle.on { background: var(--success); }
.theme-light .room-svc-list::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.10); }

/* ====== SEGMENTED ====== */
.segmented {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  padding: 3px;
}
.segmented-btn {
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  color: var(--muted);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.segmented-btn:hover { color: var(--text); }
.segmented-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ====== FILTERS ====== */
.filters-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: var(--gutter);
}
.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--stroke);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.filter-chip:hover { background: var(--surface-strong); color: var(--text); }
.filter-chip.active { background: var(--accent-soft); color: var(--accent); border-color: rgba(255,61,127,0.3); }
.filter-select {
  padding: 6px 30px 6px 12px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  font-size: var(--fs-micro);
  color: var(--muted);
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}

/* ====== PAGE HEADER ====== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: var(--gutter);
  flex-wrap: wrap;
}
.page-header-actions { display: flex; align-items: center; gap: 8px; }
.page-header-sticky {
  position: sticky;
  top: var(--topbar-h);
  z-index: 80;
  background: var(--bg);
  padding: 10px 0 12px;
}
.page-tools { display: flex; align-items: center; gap: 10px; }
.page-desc { color: var(--subtle); font-size: var(--fs-body); margin-bottom: var(--gutter); }

/* ====== TWO COLUMN ====== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--gutter);
  margin-bottom: var(--gutter);
}
.two-col-equal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
}

/* ====== ACTION LIST ====== */
.action-list { display: flex; flex-direction: column; gap: 8px; }
.action-list .btn { justify-content: flex-start; width: 100%; }

/* ====== TABS ====== */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--stroke);
  margin-bottom: 16px;
}
.tab-btn {
  padding: 10px 20px;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--subtle);
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ====== MODAL ====== */
.modal-backdrop {
  position: fixed; inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}
.modal-backdrop.active { opacity: 1; visibility: visible; }
.modal-container {
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  width: 100%; max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-base);
}
.modal-backdrop.active .modal-container { transform: translateY(0) scale(1); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg2);
}
.modal-title { font-size: var(--fs-h2); font-weight: var(--fw-semi); }
.modal-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--subtle);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.modal-close:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.modal-body { padding: 22px; }
.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 14px 22px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ====== DRAWER ====== */
.drawer-backdrop {
  position: fixed; inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.45);
  opacity: 0; visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}
.drawer-backdrop.active { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 480px; max-width: 90vw;
  background: var(--bg2);
  border-left: 1px solid var(--stroke);
  box-shadow: -10px 0 40px rgba(0,0,0,0.35);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-base);
  z-index: 1001;
}
.drawer-backdrop.active .drawer { transform: translateX(0); }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg2);
}
.drawer-title { font-size: var(--fs-h2); font-weight: var(--fw-semi); }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px; }
.drawer-footer {
  display: flex; gap: 10px; align-items: center;
  padding: 14px 22px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.drawer-delete-btn {
  margin-left: auto;
  color: var(--subtle);
  display: inline-flex; align-items: center; gap: 5px;
}
.drawer-delete-btn:hover { color: var(--danger); }

/* ====== TOAST ====== */
.toast-stack {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 2000;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 12px 20px;
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  font-size: var(--fs-body);
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
  animation: toastIn 300ms ease forwards;
  max-width: 400px;
}
.toast.removing { animation: toastOut 250ms ease forwards; }
.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-info    { border-left: 3px solid var(--info); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } }

/* ====== CALENDAR ====== */
.cal-container { position: relative; }
.cal-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  position: sticky;
  top: var(--topbar-h);
  z-index: 70;
  background: var(--bg);
  padding: 8px 0;
}
.cal-nav-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semi);
  min-width: 200px;
  text-align: center;
  flex: 1 1 240px;
}
.cal-views { margin-left: auto; }
.cal-header {
  display: grid;
  grid-template-columns: 54px repeat(7, 1fr);
  border-bottom: 1px solid var(--stroke);
}
.cal-time-header { /* empty cell */ }
.cal-day-header {
  text-align: center;
  padding: 8px 4px;
  font-size: var(--fs-micro);
  cursor: pointer;
  border-radius: 8px;
  transition: background .15s;
}
.cal-day-header:hover { background: rgba(255,255,255,.06); }
.cal-day-header .cal-day-name { color: var(--subtle); display: block; }
.cal-day-header .cal-day-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-weight: var(--fw-semi);
  font-size: var(--fs-body);
  transition: background .15s, color .15s, box-shadow .15s;
}
.cal-day-header.is-today .cal-day-num { background: var(--accent); color: #fff; }
.cal-day-header.is-selected .cal-day-num { box-shadow: 0 0 0 2px var(--accent); }
.cal-day-header.is-selected.is-today .cal-day-num { box-shadow: 0 0 0 3px rgba(255,255,255,.3); }
.cal-day-header.is-dayoff { opacity: 0.55; }
.cal-day-header.is-dayoff .cal-day-name { text-decoration: line-through; color: var(--danger); }
.cal-day-off {
  /* stripes rendered via overlay */
}
.cal-dayoff-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(180,180,180,0.08),
      rgba(180,180,180,0.08) 5px,
      rgba(180,180,180,0.18) 5px,
      rgba(180,180,180,0.18) 10px
    ),
    rgba(0,0,0,0.25);
}
.cal-dayoff-overlay span {
  position: relative;
  z-index: 11;
  background: rgba(255,77,77,0.40);
  color: #fff;
  font-size: 12px;
  font-weight: var(--fw-bold);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid rgba(255,100,100,0.50);
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.cal-body {
  display: grid;
  grid-template-columns: 54px repeat(7, 1fr);
  position: relative;
  overflow: visible;
  max-height: none;
  padding-top: 28px;
}
.cal-time-col { position: relative; }
.cal-time-label {
  position: absolute;
  left: 0; right: 4px;
  text-align: right;
  font-size: 11px;
  color: var(--subtle);
  transform: translateY(-7px);
}
.cal-day-col {
  position: relative;
  border-left: 1px solid rgba(255,255,255,0.05);
  min-height: 100%;
}
.cal-slot {
  position: absolute;
  left: 0; right: 0;
  height: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.cal-slot.cal-slot-hour { border-bottom-color: rgba(255,255,255,0.07); }
.cal-event {
  position: absolute;
  left: 2px; right: 2px;
  border-radius: 6px;
  padding: 4px 6px 10px;
  font-size: 11px;
  line-height: 1.25;
  box-sizing: border-box;
  overflow: hidden;
  cursor: pointer;
  z-index: 2;
  transition: opacity var(--transition-fast);
}
.cal-event:hover { opacity: 0.85; }
.cal-event-confirmed { background: rgba(56,217,150,0.22); border-left: 3px solid var(--success); color: var(--text); }
.cal-event-pending   { background: rgba(255,176,32,0.22);  border-left: 3px solid var(--warning); color: var(--text); }
.cal-event-cancelled { background: rgba(255,77,77,0.15);   border-left: 3px solid var(--danger); color: var(--subtle); text-decoration: line-through; }
.cal-event-completed { background: rgba(14,165,233,0.18);  border-left: 3px solid var(--info); color: var(--text); }
.cal-event-locked    { background: rgba(255,61,127,0.15);  border-left: 3px solid var(--accent); color: var(--muted); }
.cal-event-techpause { background: rgba(160,160,180,0.15); border-left: 3px solid rgba(160,160,180,0.6); color: var(--muted); }
.cal-event-title { font-weight: var(--fw-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.cal-pay-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--warning); color: #000;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
  line-height: 1;
}
.cal-pay-badge.cal-pay-paid { background: var(--success); }
.cal-event-sub { color: var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event-sub-room { display: block; }
.cal-event-sub-main { display: block; margin-top: 2px; }
.cal-event-sub-addons { display: block; margin-top: 1px; font-size: 10px; opacity: .65; }
.cal-now-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  z-index: 5;
  pointer-events: none;
}
.cal-now-line::before {
  content: '';
  position: absolute;
  left: -4px; top: -3px;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

/* Calendar tooltip */
.cal-tooltip {
  position: fixed;
  z-index: 9999;
  background: rgba(20,24,48,0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.55);
  min-width: 200px;
  max-width: 340px;
  font-size: 12px;
  line-height: 1.5;
  pointer-events: none;
  animation: calTipIn .12s ease;
}
@keyframes calTipIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }
.cal-tip-section { margin-bottom: 2px; }
.cal-tip-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--subtle);
  font-weight: var(--fw-semi);
  margin-bottom: 4px;
}
.cal-tip-row {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-tip-muted { color: var(--subtle); }
.cal-tip-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 8px 0;
}
.theme-light .cal-tooltip {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-color: rgba(0,0,0,0.10);
  box-shadow: 0 8px 28px rgba(0,0,0,0.16);
}
.theme-light .cal-tip-divider { background: rgba(0,0,0,0.08); }

/* ====== CALENDAR + DAY BOOKINGS LAYOUT ====== */
.cal-layout {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.cal-layout-main { flex: 1; min-width: 0; }
.cal-resizer {
  width: 12px;
  flex-shrink: 0;
  cursor: col-resize;
  position: relative;
  border-radius: 3px;
  transition: background .15s;
}
.cal-resizer::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 80px;
  border-radius: 2px;
  background: rgba(255,255,255,.18);
  transition: background .15s, height .15s;
}
.cal-resizer::after {
  content: '⋮';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  letter-spacing: -2px;
  color: rgba(255,255,255,.3);
  transition: color .15s;
}
.cal-resizer:hover::before {
  background: rgba(255,255,255,.35);
  height: 120px;
}
.cal-resizer:hover::after {
  color: rgba(255,255,255,.6);
}

/* Day panel toggle button */
.day-panel-toggle {
  width: 36px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  color: var(--muted);
  cursor: pointer;
  z-index: 5;
  transition: background .15s, color .15s, box-shadow .15s;
  align-self: center;
}
.day-panel-toggle:hover {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(255,61,127,.2);
}

/* Hidden state */
.day-panel-hidden .day-bookings { display: none; }
.day-panel-hidden .cal-resizer { display: none; }

/* ====== DAY BOOKINGS LIST ====== */
.day-bookings {
  width: 640px;
  flex-shrink: 0;
  align-self: flex-start;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 16px 16px;
  backdrop-filter: blur(18px);
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
  max-height: none;
  overflow: visible;
}
.day-bookings-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.day-bookings-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-body);
  font-weight: var(--fw-semi);
  color: var(--text);
}
.day-bookings-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  font-size: var(--fs-micro);
  font-weight: var(--fw-semi);
  background: var(--accent);
  color: #fff;
}
.day-bookings-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 0 16px;
  color: var(--subtle);
  font-size: var(--fs-small);
}
.day-bookings-empty svg { opacity: .35; }
.day-bookings-list { display: flex; flex-direction: column; gap: 8px; }

.day-booking-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px 14px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.day-booking-card:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.12);
}
.day-booking-top {
  display: flex;
  align-items: center;
  gap: 16px;
}
.day-booking-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.day-booking-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  font-size: var(--fs-body);
  font-weight: var(--fw-semi);
  color: var(--accent);
  line-height: 1.3;
}
.day-booking-time-sep {
  font-size: var(--fs-micro);
  color: var(--subtle);
  font-weight: var(--fw-normal);
}
.day-booking-left { flex: 1; min-width: 0; }
.day-booking-client {
  font-size: var(--fs-body);
  font-weight: var(--fw-semi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.day-booking-room {
  font-size: var(--fs-micro);
  font-weight: var(--fw-normal);
  color: var(--subtle);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.day-booking-main-svc {
  font-size: var(--fs-small);
  color: var(--text);
  margin-top: 4px;
}
.day-booking-addons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.day-booking-addon {
  font-size: 11px;
  color: var(--subtle);
  background: rgba(255,255,255,.06);
  padding: 2px 8px;
  border-radius: 4px;
}
.day-booking-actions .status-select {
  min-width: 120px;
  padding: 4px 8px;
  font-size: 11px;
}
.day-booking-price {
  font-size: var(--fs-small);
  font-weight: var(--fw-semi);
  white-space: nowrap;
}
.day-booking-delete {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: var(--fs-small);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background var(--transition-fast);
}
.day-booking-delete:hover {
  background: rgba(255,77,77,0.15);
}

/* Status left border accent */
.day-booking-pending   { border-left: 3px solid var(--warning); }
.day-booking-confirmed { border-left: 3px solid var(--success); }
.day-booking-completed { border-left: 3px solid var(--info); }
.day-booking-cancelled { border-left: 3px solid var(--danger); }

/* ====== DETAIL PAIRS ====== */
.detail-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.detail-label { font-size: var(--fs-micro); color: var(--subtle); min-width: 120px; flex-shrink: 0; }
.detail-value { font-size: var(--fs-body); }

/* Payment link section */
.pay-link-section {
  margin: 16px 0;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
}
.pay-link-header {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}
.pay-link-paid {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--success);
}
.pay-link-result { margin-top: 12px; }
.pay-link-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.pay-link-input {
  flex: 1;
  font-size: 12px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: text;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pay-link-copy {
  flex-shrink: 0;
  padding: 8px 10px;
}
.pay-link-hint {
  font-size: 12px;
  color: var(--success);
  margin-top: 6px;
}

.settings-time-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
@media (max-width: 560px) {
  .settings-time-pair { grid-template-columns: 1fr; }
}

.data-table tbody tr.row-clickable { cursor: pointer; }
.data-table tbody tr.row-clickable:hover td {
  background: rgba(99, 102, 241, 0.06);
}
.theme-light .data-table tbody tr.row-clickable:hover td {
  background: rgba(99, 102, 241, 0.08);
}
.cli-card.row-clickable { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cli-card.row-clickable:hover {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.12);
}
.client-drawer-head { margin-bottom: 4px; }
.client-drawer-name {
  font-size: 18px;
  font-weight: var(--fw-semi, 600);
  margin-bottom: 12px;
}
.client-drawer-archived { font-size: 12px; color: var(--muted); font-weight: 400; }
.client-drawer-contacts .detail-row { margin-bottom: 6px; }
.client-drawer-kpi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}
.client-kpi-tile {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line, rgba(148,163,184,.2));
  border-radius: 10px;
  padding: 12px 14px;
}
.client-kpi-label { font-size: 11px; color: var(--subtle); text-transform: uppercase; letter-spacing: .03em; }
.client-kpi-value { font-size: 17px; font-weight: 600; margin-top: 6px; line-height: 1.3; }
.client-kpi-value small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.client-drawer-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.client-booking-list { display: flex; flex-direction: column; gap: 8px; }
.client-booking-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line, rgba(148,163,184,.2));
  background: rgba(255,255,255,.03);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s;
}
.client-booking-row:hover {
  border-color: var(--accent);
  background: rgba(99,102,241,.08);
}
.client-booking-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.client-booking-date { font-size: 13px; font-weight: 500; }
.client-booking-room { font-size: 12px; color: var(--subtle); }
.client-booking-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.client-booking-sum { font-size: 13px; font-weight: 600; color: var(--accent); }
.theme-light .client-kpi-tile,
.theme-light .client-booking-row { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.08); }

.drawer-datetime-display { display: flex; align-items: center; gap: 8px; }
.btn-icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 6px;
  color: var(--subtle);
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.btn-icon-inline:hover { background: rgba(255,255,255,.1); color: var(--accent); }

/* ====== REVENUE CHART ====== */
.rev-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.rev-chart-header .rev-total {
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  letter-spacing: -0.5px;
  word-break: break-word;
  overflow-wrap: break-word;
}
.rev-chart-header .rev-total-label {
  font-size: var(--fs-micro);
  color: var(--subtle);
}
.rev-period-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rev-period-controls .filter-chip { font-size: 12px; padding: 4px 12px; }
.rev-date-range {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}
.rev-period-sticky {
  padding: 0 0 14px;
  margin-bottom: 0;
}
.lock-sticky {
  position: sticky;
  top: var(--topbar-h);
  z-index: 80;
  background: var(--bg);
  padding: 8px 0 10px;
  margin-bottom: 12px;
  font-size: var(--fs-micro);
  color: var(--subtle);
}
.lock-sticky-label {
  margin-bottom: 6px;
}
.lock-sticky-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.lock-sticky-title {
  font-size: var(--fs-body);
  font-weight: var(--fw-semi);
  color: var(--text);
  min-width: 200px;
  text-align: center;
}
.rev-date-range .form-input {
  width: 130px;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 8px;
}
.rev-date-range .btn-sm { padding: 5px 10px; }
@media (max-width: 520px) {
  .rev-period-controls { gap: 4px; }
  .rev-period-controls .filter-chip { font-size: 11px; padding: 4px 8px; }
  .rev-date-range { margin-left: 0; margin-top: 6px; width: 100%; flex-wrap: wrap; }
  .rev-date-range .form-input { width: 110px; flex: 1; min-width: 0; }
}
.line-chart {
  position: relative;
  height: 220px;
  padding-top: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.line-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  z-index: 1;
  pointer-events: none;
}
.line-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  opacity: 0.9;
}
.line-point {
  position: absolute;
  z-index: 2;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(124,92,255,0.18);
  cursor: pointer;
}
.line-point:hover { box-shadow: 0 0 0 6px rgba(124,92,255,0.24); }
.line-tooltip {
  display: none;
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
  margin-bottom: 6px;
  box-shadow: var(--shadow-card);
}
.line-point:hover .line-tooltip { display: block; }
.chart-labels {
  display: flex;
  gap: 2px;
  margin-top: 6px;
}
.chart-label {
  flex: 1;
  text-align: center;
  font-size: 10px;
  color: var(--subtle);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-y-lines {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
}
.chart-y-line {
  position: absolute;
  left: 0; right: 0;
  border-top: 1px dashed rgba(255,255,255,0.06);
}
.chart-y-label {
  position: absolute;
  right: 4px;
  font-size: 10px;
  color: var(--subtle);
  transform: translateY(-50%);
}

/* ====== PIE CHART ====== */
.pie-wrap {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.pie-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gutter);
}
.pie-grid .glass-card {
  height: 100%;
}
.pie-chart {
  width: 180px;
  height: 180px;
  min-width: 140px;
  min-height: 140px;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  transition: transform var(--transition-fast), filter var(--transition-fast);
}
.pie-chart.active {
  filter: drop-shadow(0 0 12px rgba(0,0,0,0.25));
}
.pie-chart.active::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(transparent 0 var(--active-start), color-mix(in srgb, var(--active-color) 82%, white) var(--active-start) var(--active-end), transparent var(--active-end) 100%);
  transform: scale(1.03);
  transition: transform var(--transition-fast), filter var(--transition-fast);
  filter: saturate(1.2);
  pointer-events: none;
  z-index: 3;
}
.pie-center {
  position: absolute;
  inset: 18px;
  background: var(--bg2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-weight: var(--fw-bold);
  font-size: var(--fs-h3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
  z-index: 4;
}
.pie-chart.active .pie-center {
  background: color-mix(in srgb, var(--bg2) 70%, transparent);
}
.pie-center span {
  font-size: 11px;
  font-weight: var(--fw-medium);
  color: var(--subtle);
  margin-top: 2px;
}
.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
}
.pie-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-body);
  transition: color var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
  border-radius: 10px;
  padding: 4px 6px;
}
.pie-legend-item.active {
  background: rgba(255,255,255,0.06);
  transform: translateX(2px);
  color: var(--text);
}
.pie-mode-btn {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.pie-mode-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.pie-mode-btn:hover:not(.active) {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}
.pie-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pie-name {
  flex: 1;
  color: var(--text);
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.pie-count {
  color: var(--subtle);
  font-size: var(--fs-micro);
  flex-shrink: 0;
  white-space: nowrap;
}
/* Pie color context menu */
.pie-color-menu {
  position: fixed;
  z-index: 9999;
  background: var(--surface-strong);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.45);
  min-width: 160px;
  animation: pieMenuIn .15s ease;
}
@keyframes pieMenuIn { from { opacity:0; transform:scale(0.95); } to { opacity:1; transform:scale(1); } }
.pie-color-menu-title {
  font-size: var(--fs-body);
  font-weight: var(--fw-semi);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pie-color-menu-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.pie-color-menu-input {
  flex: 1;
  height: 36px;
  min-width: 60px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 2px;
  background: transparent;
}
.pie-color-menu-apply {
  white-space: nowrap;
  flex-shrink: 0;
}
.theme-light .pie-color-menu {
  background: #fff;
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 8px 28px rgba(0,0,0,0.14);
}
.theme-light .pie-color-menu-input {
  border-color: rgba(0,0,0,0.12);
}

/* ====== HISTORY ====== */
.history-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.history-time {
  min-width: 130px;
  font-size: 11px;
  color: var(--subtle);
}
.history-text {
  font-size: var(--fs-body);
  color: var(--text);
}

/* ====== TRAFFIC CHART ====== */
.traffic-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.traffic-row {
  display: grid;
  grid-template-columns: minmax(80px, 140px) 1fr minmax(50px, 90px);
  align-items: center;
  gap: 12px;
  font-size: var(--fs-body);
}
.traffic-name {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.traffic-bar {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.traffic-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}
.traffic-value {
  font-size: var(--fs-micro);
  color: var(--subtle);
  text-align: right;
}

/* ====== CONTEXT MENU ====== */
.ctx-menu {
  position: fixed;
  min-width: 180px;
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 6px;
  z-index: 2000;
  display: none;
}
.ctx-title {
  font-size: 11px;
  color: var(--subtle);
  padding: 6px 8px 2px;
}
.ctx-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 0 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 6px;
}
.ctx-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}
.ctx-item:hover { background: rgba(255,255,255,0.06); }
.ctx-item.active {
  background: rgba(124,92,255,0.16);
  color: var(--accent);
}
.ctx-item.danger { color: var(--danger); }
.ctx-item svg { vertical-align: -2px; margin-right: 6px; }
.ctx-divider { height: 1px; background: var(--stroke); margin: 4px 0; }

/* ====== EMPTY STATE ====== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--subtle);
}
.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.3; }

/* ====== RESPONSIVE ====== */
@media (max-width: 1200px) {
  .metrics-row { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .pie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* ====== LIGHT THEME ====== */
.theme-light {
  --bg: #F4F6FA;
  --bg2: #FFFFFF;
  --surface: rgba(0,0,0,0.04);
  --surface-strong: rgba(0,0,0,0.07);
  --stroke: rgba(0,0,0,0.10);
  --text: rgba(0,0,0,0.88);
  --muted: rgba(0,0,0,0.62);
  --subtle: rgba(0,0,0,0.42);
  --accent: #E0335C;
  --accent-hover: #C22A4E;
  --accent-soft: rgba(224,51,92,0.10);
  --danger: #DC3545;
  --warning: #E09100;
  --success: #1EA362;
  --info: #0D8ECF;
  --shadow-card: 0 4px 20px rgba(0,0,0,0.06);
  --glass: rgba(255,255,255,0.7);
}
.theme-light body { background: var(--bg); }
.theme-light .admin-app {
  background:
    radial-gradient(900px 600px at 70% 0%, rgba(224,51,92,0.06) 0%, transparent 55%),
    radial-gradient(800px 500px at 15% 90%, rgba(13,142,207,0.05) 0%, transparent 55%),
    linear-gradient(180deg, #F4F6FA 0%, #EEF0F6 55%, #F4F6FA 100%);
}
.theme-light .sidebar {
  background: rgba(255,255,255,0.85);
  border-right: 1px solid rgba(0,0,0,0.08);
  backdrop-filter: blur(12px);
}
.theme-light .sidebar-brand { border-bottom: 1px solid rgba(0,0,0,0.06); }
.theme-light .brand-link { color: var(--text); }
.theme-light .nav-item:hover { background: rgba(0,0,0,0.05); }
.theme-light .nav-item.active { background: var(--accent-soft); }
.theme-light .sidebar-footer { border-top: 1px solid rgba(0,0,0,0.06); }
.theme-light .user-avatar { background: var(--accent-soft); color: var(--accent); }
.theme-light .user-logout-btn:hover { background: rgba(0,0,0,0.06); }
.theme-light .sidebar-collapse-btn:hover { background: rgba(0,0,0,0.06); }
.theme-light .topbar {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.theme-light .topbar-pill { background: rgba(0,0,0,0.05); color: var(--muted); }
.theme-light .topbar-icon-btn { color: var(--muted); }
.theme-light .topbar-icon-btn:hover { background: rgba(0,0,0,0.06); color: var(--text); }
.theme-light .topbar-role-switch { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); }
.theme-light .topbar-role-btn.active { background: #fff; color: var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.theme-light .search-wrap input { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.10); color: var(--text); }
.theme-light .search-wrap input:focus { border-color: var(--accent); }
.theme-light .glass-card {
  background: rgba(255,255,255,0.75);
  border-color: rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
}
.theme-light .metrics-row .glass-card:hover,
.theme-light .pie-grid .glass-card:hover { background: rgba(255,255,255,0.9); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.10); }
.theme-light .pie-mode-btn { border-color: rgba(0,0,0,0.12); }
.theme-light .pie-mode-btn:hover:not(.active) { background: rgba(0,0,0,0.04); }
.theme-light .data-table thead th { background: rgba(0,0,0,0.03); border-bottom-color: rgba(0,0,0,0.08); color: var(--muted); }
.theme-light .data-table tbody td { border-bottom-color: rgba(0,0,0,0.06); }
.theme-light .data-table tbody tr:hover { background: rgba(0,0,0,0.03); }
.theme-light .form-input,
.theme-light .form-select,
.theme-light .form-textarea { background-color: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.12); color: var(--text); }
.theme-light .form-input:focus,
.theme-light .form-select:focus,
.theme-light .form-textarea:focus { border-color: var(--accent); background-color: #fff; }
.theme-light .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
}
.theme-light .form-input[type="time"] {
  background: rgba(0,0,0,0.03) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.theme-light .form-input[type="time"]:focus {
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.theme-light .form-input[type="date"] {
  background: rgba(0,0,0,0.03) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.theme-light .form-input[type="date"]:focus {
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.theme-light .btn-ghost { color: var(--muted); }
.theme-light .btn-ghost:hover { background: rgba(0,0,0,0.06); color: var(--text); }
.theme-light .filter-chip { background: rgba(0,0,0,0.05); color: var(--muted); }
.theme-light .filter-chip.active { background: var(--accent); color: #fff; }
.theme-light .filter-select { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.10); color: var(--text); }
.theme-light .segmented { background: rgba(0,0,0,0.05); }
.theme-light .segmented-btn { color: var(--muted); }
.theme-light .segmented-btn.active { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.theme-light .chip-pending  { background: rgba(224,145,0,0.12);  color: var(--warning); }
.theme-light .chip-confirmed{ background: rgba(30,163,98,0.12);  color: var(--success); }
.theme-light .chip-cancelled{ background: rgba(220,53,69,0.12);  color: var(--danger); }
.theme-light .chip-completed{ background: rgba(13,142,207,0.12); color: var(--info); }
.theme-light .chip-info     { background: rgba(13,142,207,0.12); color: var(--info); }
.theme-light .chip-active   { background: rgba(30,163,98,0.12);  color: var(--success); }
.theme-light .bk-card-status.status-pending   { background: rgba(224,145,0,0.12);  color: var(--warning); }
.theme-light .bk-card-status.status-confirmed { background: rgba(30,163,98,0.12);  color: var(--success); }
.theme-light .bk-card-status.status-completed { background: rgba(13,142,207,0.12); color: var(--info); }
.theme-light .bk-card-status.status-cancelled { background: rgba(220,53,69,0.12);  color: var(--danger); }
.theme-light .cal-header { background: rgba(255,255,255,0.6); border-bottom-color: rgba(0,0,0,0.08); }
.theme-light .cal-day-header:hover { background: rgba(0,0,0,0.04); }
.theme-light .cal-day-col { border-left-color: rgba(0,0,0,0.06); }
.theme-light .cal-slot { border-bottom-color: rgba(0,0,0,0.04); }
.theme-light .cal-slot-hour { border-bottom-color: rgba(0,0,0,0.08); }
.theme-light .cal-time-label { color: var(--subtle); }
.theme-light .cal-event-confirmed { background: rgba(30,163,98,0.15); border-left-color: var(--success); color: var(--text); }
.theme-light .cal-event-pending   { background: rgba(224,145,0,0.15);  border-left-color: var(--warning); color: var(--text); }
.theme-light .cal-event-cancelled { background: rgba(220,53,69,0.10);  border-left-color: var(--danger); color: var(--subtle); }
.theme-light .cal-event-completed { background: rgba(13,142,207,0.12); border-left-color: var(--info); color: var(--text); }
.theme-light .cal-event-locked    { background: rgba(224,51,92,0.08);  border-left-color: var(--accent); color: var(--muted); }
.theme-light .cal-event-techpause { background: rgba(130,130,150,0.10); border-left-color: rgba(130,130,150,0.5); color: var(--muted); }
.theme-light .cal-dayoff-overlay {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(0,0,0,0.03),
      rgba(0,0,0,0.03) 5px,
      rgba(0,0,0,0.08) 5px,
      rgba(0,0,0,0.08) 10px
    ),
    rgba(0,0,0,0.06);
}
.theme-light .cal-dayoff-overlay span {
  background: rgba(220,53,69,0.14);
  color: rgba(180,30,40,0.80);
  border-color: rgba(220,53,69,0.30);
  text-shadow: none;
}
.theme-light .workday-chip {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.12);
  color: var(--muted);
}
.theme-light .workday-chip:hover { border-color: rgba(0,0,0,0.25); color: var(--text); }
.theme-light .workday-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.theme-light .cal-nav { background: var(--bg); }
.theme-light .cal-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.10); }
.theme-light .cal-body::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.20); }
.theme-light .day-bookings {
  background: rgba(255,255,255,0.75);
  border-color: rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
}
.theme-light .day-booking-card {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.06);
}
.theme-light .day-booking-actions {
  border-top-color: rgba(0,0,0,0.06);
}
.theme-light .day-booking-delete:hover {
  background: rgba(220,53,69,0.10);
}
.theme-light .day-booking-card:hover {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.10);
}
.theme-light .day-booking-pending   { border-left-color: var(--warning); }
.theme-light .day-booking-confirmed { border-left-color: var(--success); }
.theme-light .day-booking-completed { border-left-color: var(--info); }
.theme-light .day-booking-cancelled { border-left-color: var(--danger); }
.theme-light .day-booking-addon { background: rgba(0,0,0,0.05); }
.theme-light .status-select-pending   { background: rgba(224,145,0,0.1);  color: var(--warning); border-color: rgba(224,145,0,0.25); }
.theme-light .status-select-confirmed { background: rgba(30,163,98,0.1);  color: var(--success); border-color: rgba(30,163,98,0.25); }
.theme-light .status-select-completed { background: rgba(13,142,207,0.1); color: var(--info);    border-color: rgba(13,142,207,0.25); }
.theme-light .status-select-cancelled { background: rgba(220,53,69,0.1);  color: var(--danger);  border-color: rgba(220,53,69,0.25); }
.theme-light .mini-toggle.off { background: rgba(0,0,0,0.15); }
.theme-light .mini-toggle.off::after { background: #fff; }
.theme-light .bulk-bar { background: rgba(124,92,255,0.06); border-color: rgba(124,92,255,0.15); }
.theme-light .bulk-bar .btn-bulk-clear { border-color: rgba(0,0,0,0.12); }
.theme-light .bulk-bar .btn-bulk-clear:hover { background: rgba(0,0,0,0.04); }
.theme-light tr.row-selected { background: rgba(124,92,255,0.05) !important; }
.theme-light .cal-resizer::before { background: rgba(0,0,0,0.12); }
.theme-light .cal-resizer::after { color: rgba(0,0,0,0.25); }
.theme-light .cal-resizer:hover::before { background: rgba(0,0,0,0.25); }
.theme-light .cal-resizer:hover::after { color: rgba(0,0,0,0.45); }
.theme-light .day-panel-toggle { background: rgba(255,255,255,0.8); border-color: rgba(0,0,0,0.1); color: var(--muted); }
.theme-light .day-panel-toggle:hover { background: var(--accent-soft); color: var(--accent); }
.theme-light .modal-backdrop { background: rgba(0,0,0,0.3); }
.theme-light .modal-container { background: #fff; border-color: rgba(0,0,0,0.1); }
.theme-light .modal-header { border-bottom-color: rgba(0,0,0,0.08); }
.theme-light .drawer-backdrop { background: rgba(0,0,0,0.2); }
.theme-light .drawer { background: #fff; border-left-color: rgba(0,0,0,0.08); }
.theme-light .drawer-header { border-bottom-color: rgba(0,0,0,0.08); }
.theme-light .drawer-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.theme-light .detail-row { border-bottom-color: rgba(0,0,0,0.06); }
.theme-light .pay-link-section { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.08); }
.theme-light .pay-link-input { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.12); }
.theme-light .toast { background: #fff; border-color: rgba(0,0,0,0.1); color: var(--text); }
.theme-light .ctx-menu { background: #fff; border-color: rgba(0,0,0,0.1); }
.theme-light .ctx-item:hover { background: rgba(0,0,0,0.05); }
.theme-light .ctx-divider { background: rgba(0,0,0,0.08); }
.theme-light .metric-card { background: rgba(255,255,255,0.7); border-color: rgba(0,0,0,0.08); }
.theme-light .metric-card:hover { background: rgba(255,255,255,0.9); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.10); }
.theme-light .metric-detail { border-top-color: rgba(0,0,0,0.08); }
.theme-light .metric-detail-row { background: rgba(0,0,0,0.03); }
.theme-light .metric-detail-row:hover { background: rgba(0,0,0,0.06); }
.theme-light .metric-detail-list::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); }
.theme-light .sidebar-overlay { background: rgba(0,0,0,0.55); }
.theme-light ::-webkit-scrollbar-track { background: rgba(0,0,0,0.03); }
.theme-light ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); }
.theme-light ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.22); }
/* Collapsed sidebar tooltip in light */
.theme-light .sidebar-collapsed .nav-item::after { background: #fff; color: var(--text); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.theme-light .notif-panel { background: #fff; border-color: rgba(0,0,0,0.1); box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
.theme-light .notif-panel-header { border-bottom-color: rgba(0,0,0,0.08); }
.theme-light .notif-panel-close:hover { background: rgba(0,0,0,0.05); }
.theme-light .notif-panel-btn:hover { background: rgba(0,0,0,0.05); }
.theme-light .notif-item:hover { background: rgba(0,0,0,0.03); }
.theme-light .room-card { border-color: rgba(0,0,0,0.08); }
.theme-light .room-card:hover { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.14); }
.theme-light .room-card-footer { border-top-color: rgba(0,0,0,0.06); }
.theme-light .form-color { border-color: rgba(0,0,0,0.12); }
.theme-light .svc-color-dot { border-color: rgba(0,0,0,0.12); }
.theme-light .svc-color-dot:hover { box-shadow: 0 0 0 3px rgba(0,0,0,0.08); }

@media (max-width: 960px) {
  .admin-app, .sidebar-collapsed { grid-template-columns: 1fr; }
  .sidebar-collapse-btn { display: none; }
  .sidebar-collapsed .sidebar { width: var(--sidebar-w); }
  .sidebar-collapsed .brand-link { display: inline; }
  .sidebar-collapsed .nav-label { display: inline; }
  .sidebar-collapsed .nav-item { justify-content: flex-start; padding: 10px 14px; gap: 12px; }
  .sidebar-collapsed .nav-item.active .nav-dot { display: block; }
  .sidebar-collapsed .sidebar-nav { padding: 12px 12px; }
  .sidebar-collapsed .user-info { display: block; }
  .sidebar-collapsed .sidebar-user { flex-direction: row; padding: 8px 10px; }
  .sidebar-collapsed .sidebar-footer { padding: 12px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 6px 0 30px rgba(0,0,0,0.5); }
  .sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
  }
  .sidebar-overlay.active { opacity: 1; visibility: visible; }
  .main-area { grid-column: 1; }
  .sidebar-toggle { display: flex; }
  .topbar-pill { max-width: 180px; }
  .search-kbd { display: none; }
  .search-wrap { max-width: 280px; }
  .cal-layout { flex-direction: column; }
  .cal-resizer { display: none; }
  .day-bookings { width: 100% !important; position: static; max-height: none; }
  .cal-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cal-header { min-width: 660px; }
  .cal-body { min-width: 660px; }
  .form-row { grid-template-columns: 1fr; }
  .two-col-equal { grid-template-columns: 1fr; }
  .pie-grid { grid-template-columns: 1fr; }
  .pie-wrap { flex-direction: column; align-items: center; }
  .pie-legend { min-width: 0; width: 100%; }
}
/* ====== BOOKING MOBILE CARDS ====== */
.bk-cards-mobile { display: none; flex-direction: column; gap: 12px; }
.bk-card { padding: 16px !important; }
.bk-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.bk-card-date { font-size: var(--fs-body); font-weight: var(--fw-semi); color: var(--text); }
.bk-card-status {
  font-size: 11px; font-weight: var(--fw-medium); padding: 3px 10px;
  border-radius: 999px; white-space: nowrap;
}
.bk-card-status.status-pending   { background: rgba(255,176,32,0.18);  color: var(--warning); }
.bk-card-status.status-confirmed { background: rgba(56,217,150,0.18);  color: var(--success); }
.bk-card-status.status-completed { background: rgba(14,165,233,0.18);  color: var(--info); }
.bk-card-status.status-cancelled { background: rgba(255,77,77,0.18);   color: var(--danger); }
.bk-card-client { font-size: 15px; font-weight: var(--fw-semi); margin-bottom: 6px; }
.bk-card-details {
  display: flex; flex-direction: column; gap: 3px;
  font-size: var(--fs-micro); color: var(--muted); margin-bottom: 10px;
}
.bk-card-details span { display: flex; align-items: center; gap: 5px; }
.bk-card-details svg { flex-shrink: 0; color: var(--subtle); }
.bk-card-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 10px; }
.bk-card-price { font-size: 16px; font-weight: var(--fw-bold); color: var(--accent); }
.bk-card-actions { display: flex; gap: 6px; }
.locks-cards-mobile { display: none; flex-direction: column; gap: 12px; }
.lock-card .bk-card-date svg { color: var(--subtle); }

/* Traffic sources mobile cards */
.ts-cards-mobile { display: none; flex-direction: column; gap: 10px; }
.ts-card { padding: 14px 16px !important; }
.ts-card-top {
  display: flex; justify-content: space-between; align-items: center;
}
.ts-card-name {
  font-size: 15px; font-weight: var(--fw-semi); color: var(--text);
}
.ts-card-notes {
  font-size: 13px; color: var(--muted); margin-top: 6px;
}

/* Client mobile cards */
.cli-cards-mobile { display: none; flex-direction: column; gap: 10px; }
.cli-card { padding: 14px 16px !important; }
.cli-card-top {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}
.cli-card-name {
  font-size: 15px; font-weight: var(--fw-semi); color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.cli-card-details {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; color: var(--muted); margin-bottom: 10px;
}
.cli-card-row {
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cli-card-row a { color: var(--accent); text-decoration: none; }
.cli-card-bottom {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--stroke); padding-top: 10px;
}
.cli-archived { opacity: 0.55; }
.cli-card-stats { display: flex; gap: 14px; align-items: center; }
.cli-card-stat {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--muted); font-weight: var(--fw-medium);
}

@media (max-width: 960px) {
  .topbar-pill { display: none; }
  .bk-table-desktop { display: none !important; }
  .bk-cards-mobile { display: flex; }
  .locks-table-desktop { display: none !important; }
  .locks-cards-mobile { display: flex; }
  .cli-table-desktop { display: none !important; }
  .cli-cards-mobile { display: flex; }
  .ts-table-desktop { display: none !important; }
  .ts-cards-mobile { display: flex; }
  /* Force list view on mobile — hide calendar elements */
  .cal-layout { display: none !important; }
  .lock-sticky { display: none !important; }
  .page-tools .segmented { display: none !important; }
}

/* Dashboard drag-and-drop */
.dash-sortable { position: relative; }
.dash-section { position: relative; transition: transform 0.2s ease, opacity 0.2s ease; }
.dash-section.dragging { opacity: 0.4; }
.dash-section.drag-over { transform: scale(1.01); box-shadow: 0 0 0 2px var(--accent); border-radius: var(--radius-lg); }
.dash-drag-handle {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--subtle); cursor: grab; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04); opacity: 0; transition: opacity 0.2s;
  user-select: none;
}
.dash-section:hover .dash-drag-handle { opacity: 1; }
.dash-drag-handle:active { cursor: grabbing; }
/* Inner draggable cards (pies, metrics) */
.dash-inner-item { position: relative; cursor: grab; transition: transform 0.2s ease, opacity 0.2s ease; }
.dash-inner-item.dragging { opacity: 0.35; transform: scale(0.96); }
.dash-inner-item.drag-over { transform: scale(1.02); box-shadow: 0 0 0 2px var(--accent); border-radius: var(--radius-lg); }
.dash-inner-item:active { cursor: grabbing; }
.dash-inner-item > .glass-card { height: 100%; }

@media (max-width: 520px) {
  :root { --gutter: 14px; }
  .metrics-row { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .search-wrap { max-width: 100%; }
  .drawer { width: 100%; max-width: 100%; }
  .topbar-center { display: none; }
  .page-title { font-size: 16px; }
  .glass-card { padding: 14px; border-radius: var(--radius-md); overflow: hidden; }
  .data-table { font-size: var(--fs-micro); }
  .data-table thead th, .data-table tbody td { padding: 8px 6px; }
  /* Compact color picker column on mobile */
  .svc-color-dot { width: 18px; height: 18px; border-radius: 5px; }
  .svc-color-pick { padding: 0; }
  .filters-row { gap: 8px; }
  .modal-container { max-width: 95vw; margin: 10px; border-radius: var(--radius-md); }
  .notif-panel { right: 10px; left: 10px; width: auto; }
  .admin-login-card { margin: 16px; padding: 28px 24px; }
  .pie-chart { width: 140px; height: 140px; }
  .pie-center { font-size: 13px; inset: 14px; padding: 0 2px; }
  .pie-center span { font-size: 9px; }
  .metric-value { font-size: 28px; word-break: break-word; }
  .rev-total { font-size: 24px; word-break: break-word; }
}

/* ====== LOGIN SCREEN ====== */
/* Auth lock — hide everything behind overlay */
body.auth-locked {
  overflow: hidden !important;
  height: 100vh !important;
  height: 100dvh !important;
}
body.auth-locked .admin-app {
  display: none !important;
}
body.auth-locked .drawer-backdrop,
body.auth-locked .toast-stack {
  display: none !important;
}
.admin-login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 100000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-login-overlay.hidden {
  display: none;
}
.admin-login-card {
  width: 100%;
  max-width: 420px;
  padding: 28px;
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  text-align: center;
}
.admin-auth-tabs {
  display: flex;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 18px;
}
.admin-auth-tab {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}
.admin-auth-tab.active {
  background: rgba(255,255,255,0.12);
  color: var(--text);
}
.admin-login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}
.admin-login-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 18px;
}
.admin-login-field {
  text-align: left;
  margin-bottom: 12px;
}
.admin-login-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}
.admin-login-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.admin-login-field-row a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
}
.admin-login-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color 0.2s;
}
.admin-login-field input:focus {
  outline: none;
  border-color: var(--accent);
}
.admin-login-field input::placeholder {
  color: var(--subtle);
}
.admin-login-error {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(255,77,77,0.14);
  border-radius: var(--radius-sm);
  text-align: center;
}
.admin-login-error.hidden { display: none; }
.admin-login-info {
  color: var(--success);
  font-size: 13px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(56,217,150,0.14);
  border-radius: var(--radius-sm);
  text-align: center;
}
.admin-login-info.hidden { display: none; }
.hidden { display: none !important; }
.admin-auth-actions {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.admin-auth-link-btn {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.admin-auth-link-btn:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-color: rgba(255,255,255,0.18);
}
.admin-login-divider {
  margin: 14px 0;
  position: relative;
  color: var(--subtle);
  font-size: 12px;
}
.admin-login-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--stroke);
}
.admin-login-divider span {
  position: relative;
  background: var(--bg2);
  padding: 0 10px;
}
.admin-social-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-social-btn {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-weight: 600;
}
.admin-social-btn:hover { background: rgba(255,255,255,0.08); }
.admin-login-links {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.admin-login-links a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
}
.admin-login-links a:hover { color: var(--text); }
.admin-login-footnote {
  margin-top: 14px;
  color: var(--subtle);
  font-size: 13px;
}
.admin-login-footnote a {
  margin-left: 4px;
  color: var(--text);
  text-decoration: underline;
}
.admin-login-btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  transition: background 0.2s;
}
.admin-login-btn:hover { background: var(--accent-hover); }
.admin-login-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
