:root, [data-theme="dark"] {
  --bg-0: #0a0908;
  --bg-1: #12110f;
  --bg-2: #1a1916;
  --bg-3: #25231f;
  --line: rgba(213, 175, 55, 0.08);
  --line-strong: rgba(213, 175, 55, 0.18);
  --gold: #d5af37;
  --gold-soft: #e8c967;
  --gold-dark: #a88827;
  --amber: #ffb547;
  --ink: #f5f2ea;
  --ink-2: #b8b3a5;
  --ink-3: #6b685f;
  --success: #4ade80;
  --danger: #f87171;
  --info: #60a5fa;
  --noise-opacity: 0.4;
  --bg-radial-1: rgba(213, 175, 55, 0.08);
  --bg-radial-2: rgba(168, 136, 39, 0.05);
  --bg-radial-3: rgba(213, 175, 55, 0.04);
  --glass-bg: rgba(18, 17, 15, 0.72);
  --glass-border: rgba(213, 175, 55, 0.18);
  --glass-highlight: rgba(255, 255, 255, 0.06);
  --shadow-2: 0 20px 60px -20px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(213, 175, 55, 0.1);
  --gradient-text: linear-gradient(135deg, var(--ink) 0%, var(--gold) 100%);
  --gradient-btn: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  --status-confirmed-bg: rgba(96, 165, 250, 0.1);
  --status-confirmed-fg: var(--info);
  --status-awaiting-bg: rgba(255, 181, 71, 0.12);
  --status-awaiting-fg: var(--amber);
  --status-completed-bg: rgba(74, 222, 128, 0.1);
  --status-completed-fg: var(--success);
}

[data-theme="light"] {
  --bg-0: #f8f5ee;
  --bg-1: #ffffff;
  --bg-2: #fbf7ec;
  --bg-3: #f0e9d6;
  --line: rgba(168, 136, 39, 0.14);
  --line-strong: rgba(168, 136, 39, 0.3);
  --gold: #b8912a;
  --gold-soft: #d5af37;
  --gold-dark: #8a6a1a;
  --amber: #d97706;
  --ink: #1a1612;
  --ink-2: #5c544a;
  --ink-3: #8b8174;
  --success: #16a34a;
  --danger: #dc2626;
  --info: #2563eb;
  --noise-opacity: 0.18;
  --bg-radial-1: rgba(213, 175, 55, 0.14);
  --bg-radial-2: rgba(168, 136, 39, 0.1);
  --bg-radial-3: rgba(213, 175, 55, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(168, 136, 39, 0.25);
  --glass-highlight: rgba(255, 255, 255, 0.5);
  --shadow-2: 0 20px 60px -20px rgba(168, 136, 39, 0.25), 0 0 0 1px rgba(168, 136, 39, 0.14);
  --gradient-text: linear-gradient(135deg, var(--ink) 0%, var(--gold) 100%);
  --gradient-btn: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  --status-confirmed-bg: rgba(37, 99, 235, 0.1);
  --status-confirmed-fg: var(--info);
  --status-awaiting-bg: rgba(217, 119, 6, 0.14);
  --status-awaiting-fg: var(--amber);
  --status-completed-bg: rgba(22, 163, 74, 0.1);
  --status-completed-fg: var(--success);
}

:root, [data-theme="dark"], [data-theme="light"] {
  --ser: 'Instrument Serif', serif;
  --sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(800px 600px at 10% -10%, var(--bg-radial-1), transparent 50%),
    radial-gradient(600px 500px at 100% 20%, var(--bg-radial-2), transparent 60%),
    radial-gradient(400px 400px at 30% 110%, var(--bg-radial-3), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: var(--noise-opacity);
}

/* Top switcher */
.switcher {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  padding: 6px;
  display: flex;
  gap: 4px;
  box-shadow: var(--shadow-2), inset 0 1px 0 var(--glass-highlight);
}

.switcher button {
  background: transparent;
  border: none;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: -0.01em;
}

.switcher button:hover { color: var(--ink); }

.switcher button.active {
  background: var(--gradient-btn);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 30px -8px rgba(213, 175, 55, 0.6);
}

[data-theme="dark"] .switcher button.active { color: var(--bg-0); }

/* Theme toggle */
.theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 101;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-2), inset 0 1px 0 var(--glass-highlight);
}

.theme-toggle:hover {
  transform: rotate(20deg);
  border-color: var(--gold);
  color: var(--gold);
}

.theme-toggle svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }

[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }
[data-theme="light"] .theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .moon { display: block; }

/* Views */
.view { display: none; min-height: 100vh; position: relative; z-index: 1; animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.view.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* ===== OWNER /lk ===== */
.lk-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }

.lk-sidebar {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--line);
  padding: 90px 20px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.brand {
  font-family: var(--ser);
  font-size: 32px;
  font-style: italic;
  letter-spacing: -0.02em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 0 12px 24px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: middle;
  box-shadow: 0 0 12px var(--gold);
  animation: pulse 2s ease-in-out infinite;
}

.nav-section {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  padding: 16px 12px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  margin: 2px 0;
  cursor: pointer;
}

.nav-item:hover { background: rgba(213, 175, 55, 0.08); color: var(--ink); }
[data-theme="light"] .nav-item:hover { background: rgba(168, 136, 39, 0.08); }

.nav-item.active {
  background: linear-gradient(90deg, rgba(213, 175, 55, 0.14) 0%, rgba(213, 175, 55, 0.02) 100%);
  color: var(--gold);
  position: relative;
}

[data-theme="light"] .nav-item.active {
  background: linear-gradient(90deg, rgba(184, 145, 42, 0.14) 0%, rgba(184, 145, 42, 0.02) 100%);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--gold);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px var(--gold);
}

.nav-icon { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.8; fill: none; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--gold);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  font-family: var(--mono);
}

[data-theme="dark"] .nav-badge { color: var(--bg-0); }

.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #fff;
  font-size: 13px;
  flex-shrink: 0;
}

[data-theme="dark"] .user-avatar { color: var(--bg-0); }

.user-info { min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--ink-3); font-family: var(--mono); }

.lk-main { padding: 90px 40px 60px; max-width: 1400px; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  gap: 24px;
  flex-wrap: wrap;
}

.page-title {
  font-family: var(--ser);
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 400;
  color: var(--ink);
}

.page-title em { font-style: italic; color: var(--gold); }
.page-subtitle { font-size: 15px; color: var(--ink-2); margin-top: 8px; }
.page-actions { display: flex; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--r-md);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: transparent;
  color: var(--ink);
}

.btn-primary {
  background: var(--gradient-btn);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 20px -6px rgba(213, 175, 55, 0.5);
}

[data-theme="dark"] .btn-primary { color: var(--bg-0); }

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -6px rgba(213, 175, 55, 0.6); }

.btn-ghost {
  background: rgba(213, 175, 55, 0.04);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

[data-theme="light"] .btn-ghost { background: rgba(255, 255, 255, 0.7); }
.btn-ghost:hover { background: rgba(213, 175, 55, 0.1); border-color: var(--gold); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }

.stat-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

[data-theme="dark"] .stat-card {
  background: linear-gradient(180deg, var(--bg-1) 0%, rgba(18, 17, 15, 0.6) 100%);
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

.stat-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-2); }

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(213, 175, 55, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.stat-label { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); margin-bottom: 12px; }
.stat-value { font-family: var(--ser); font-size: 44px; line-height: 1; font-weight: 400; color: var(--ink); letter-spacing: -0.02em; }
.stat-value .unit { font-family: var(--sans); font-size: 16px; color: var(--ink-2); font-weight: 400; margin-left: 4px; vertical-align: middle; }

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 100px;
  margin-top: 16px;
}

.stat-change.up { background: rgba(74, 222, 128, 0.1); color: var(--success); }
[data-theme="light"] .stat-change.up { background: rgba(22, 163, 74, 0.12); }
.stat-change.down { background: rgba(248, 113, 113, 0.1); color: var(--danger); }
[data-theme="light"] .stat-change.down { background: rgba(220, 38, 38, 0.1); }

.content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-bottom: 32px; }

.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: all 0.3s ease;
}

.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.card-title { font-family: var(--ser); font-size: 24px; letter-spacing: -0.02em; color: var(--ink); }
.card-title em { font-style: italic; color: var(--gold); }

.appt-list { display: flex; flex-direction: column; gap: 10px; }

.appt-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 16px;
  background: var(--bg-2);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.appt-row:hover { background: rgba(213, 175, 55, 0.06); border-color: var(--line-strong); transform: translateX(4px); }
[data-theme="light"] .appt-row:hover { background: rgba(168, 136, 39, 0.08); }

.appt-time { font-family: var(--ser); font-size: 22px; color: var(--gold); font-style: italic; letter-spacing: -0.01em; }
.appt-time-date { font-family: var(--mono); font-size: 10px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
.appt-client { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.appt-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.appt-meta span:not(:first-child)::before { content: '·'; margin-right: 8px; color: var(--ink-3); }

.appt-status {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  border-radius: 100px;
  font-weight: 600;
}

.appt-status.confirmed { background: var(--status-confirmed-bg); color: var(--status-confirmed-fg); }
.appt-status.awaiting { background: var(--status-awaiting-bg); color: var(--status-awaiting-fg); animation: pulse 2s ease-in-out infinite; }
.appt-status.completed { background: var(--status-completed-bg); color: var(--status-completed-fg); }

.side-card { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; margin-bottom: 16px; }

.ai-spotlight {
  background: linear-gradient(135deg, rgba(213, 175, 55, 0.08) 0%, rgba(168, 136, 39, 0.02) 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}

[data-theme="light"] .ai-spotlight { background: linear-gradient(135deg, rgba(213, 175, 55, 0.16) 0%, rgba(213, 175, 55, 0.04) 100%); }

.ai-spotlight::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(213, 175, 55, 0.18) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}

.ai-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--gradient-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .ai-icon { color: var(--bg-0); }

.ai-title { font-family: var(--ser); font-size: 22px; font-style: italic; color: var(--ink); margin-bottom: 4px; letter-spacing: -0.01em; position: relative; z-index: 1; }

.ai-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.ai-status::before { content: ''; width: 6px; height: 6px; background: var(--success); border-radius: 50%; box-shadow: 0 0 8px var(--success); }

.ai-desc { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin: 12px 0 16px; position: relative; z-index: 1; }
.ai-metric { font-family: var(--ser); font-size: 40px; color: var(--gold); font-style: italic; line-height: 1; position: relative; z-index: 1; }
.ai-metric-label { font-size: 11px; color: var(--ink-2); margin-top: 6px; position: relative; z-index: 1; }

.alert-card {
  background: rgba(255, 181, 71, 0.08);
  border: 1px solid rgba(255, 181, 71, 0.25);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 16px;
}

[data-theme="light"] .alert-card { background: rgba(217, 119, 6, 0.1); border-color: rgba(217, 119, 6, 0.3); }

.alert-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--amber); margin-bottom: 12px; }
.alert-body { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin-bottom: 16px; }
.alert-actions { display: flex; gap: 8px; }
.btn-sm { padding: 8px 14px; font-size: 12px; border-radius: var(--r-sm); }

/* ===== CLIENT /my ===== */
.my-shell { max-width: 440px; margin: 0 auto; padding: 90px 20px calc(140px + env(safe-area-inset-bottom, 0px)); }
.my-header { margin-bottom: 32px; }
.my-greeting { font-size: 13px; color: var(--ink-2); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em; }

.my-name {
  font-family: var(--ser);
  font-size: 52px;
  line-height: 1;
  color: var(--ink);
  margin-top: 8px;
  letter-spacing: -0.03em;
}

.my-name em { font-style: italic; color: var(--gold); }

.tier-card {
  background: linear-gradient(135deg, #1a1612 0%, #2d2418 100%);
  border: 1px solid rgba(213, 175, 55, 0.25);
  border-radius: var(--r-xl);
  padding: 32px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.4);
  color: #f5f2ea;
}

.tier-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(400px 200px at 100% 0%, rgba(213, 175, 55, 0.22), transparent 50%),
    radial-gradient(300px 200px at 0% 100%, rgba(168, 136, 39, 0.14), transparent 50%);
  pointer-events: none;
}

.tier-label { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: #d5af37; margin-bottom: 12px; position: relative; }
.tier-name { font-family: var(--ser); font-size: 44px; font-style: italic; color: #f5f2ea; letter-spacing: -0.02em; line-height: 1; position: relative; }
.tier-points { display: flex; align-items: baseline; gap: 6px; margin: 24px 0 16px; position: relative; }
.tier-points-value { font-family: var(--ser); font-size: 64px; color: #d5af37; line-height: 1; letter-spacing: -0.03em; }
.tier-points-label { font-size: 14px; color: #b8b3a5; }
.tier-progress { margin-top: 20px; position: relative; }
.tier-progress-meta { display: flex; justify-content: space-between; font-size: 11px; font-family: var(--mono); color: #b8b3a5; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.tier-bar { height: 3px; background: rgba(255, 255, 255, 0.08); border-radius: 100px; overflow: hidden; }

.tier-fill {
  height: 100%;
  background: linear-gradient(90deg, #a88827 0%, #d5af37 50%, #e8c967 100%);
  width: 68%;
  border-radius: 100px;
  animation: fillBar 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fillBar { from { width: 0%; } to { width: 68%; } }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }

.quick-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.quick-card:hover { background: var(--bg-2); border-color: var(--line-strong); transform: translateY(-2px); }

.quick-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: rgba(213, 175, 55, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  margin-bottom: 12px;
}

[data-theme="light"] .quick-icon { background: rgba(184, 145, 42, 0.14); }
.quick-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.quick-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.quick-value { font-family: var(--ser); font-size: 24px; color: var(--gold); margin-top: 4px; letter-spacing: -0.01em; }
.quick-desc { font-size: 12px; color: var(--ink-2); margin-top: 2px; }

.upcoming-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upcoming-card:hover { background: var(--bg-2); border-color: var(--line-strong); }

.upcoming-date {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: var(--bg-2);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
}

[data-theme="dark"] .upcoming-date { background: linear-gradient(135deg, var(--bg-3) 0%, var(--bg-2) 100%); }

.upcoming-day { font-family: var(--ser); font-size: 24px; font-style: italic; color: var(--gold); line-height: 1; }
.upcoming-month { font-family: var(--mono); font-size: 9px; text-transform: uppercase; color: var(--ink-2); letter-spacing: 0.1em; margin-top: 2px; }
.upcoming-info { flex: 1; min-width: 0; }
.upcoming-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.upcoming-sub { font-size: 12px; color: var(--ink-2); }
.upcoming-time { font-family: var(--mono); font-size: 14px; color: var(--gold); font-weight: 500; }

.ai-banner {
  background: linear-gradient(135deg, rgba(213, 175, 55, 0.08) 0%, rgba(213, 175, 55, 0.02) 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .ai-banner { background: linear-gradient(135deg, rgba(213, 175, 55, 0.16) 0%, rgba(213, 175, 55, 0.04) 100%); }

.ai-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(213, 175, 55, 0.12) 0%, transparent 70%);
}

.ai-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--gradient-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  position: relative;
}

[data-theme="dark"] .ai-banner-icon { color: var(--bg-0); }

.ai-banner-text { flex: 1; position: relative; }
.ai-banner-title { font-family: var(--ser); font-size: 18px; font-style: italic; color: var(--ink); letter-spacing: -0.01em; }
.ai-banner-desc { font-size: 12px; color: var(--ink-2); margin-top: 2px; }

.section-title { font-family: var(--ser); font-size: 28px; color: var(--ink); margin: 32px 0 16px; letter-spacing: -0.02em; }
.section-title em { font-style: italic; color: var(--gold); }

/* ===== iOS-style glass tab bar with liquid blob ===== */
.tab-bar {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass-bg);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  padding: 8px;
  display: flex;
  gap: 2px;
  z-index: 50;
  will-change: bottom, opacity;
  transition: bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease,
              background 0.4s ease,
              border-color 0.4s ease;
  box-shadow:
    0 20px 60px -10px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(213, 175, 55, 0.1),
    inset 0 1px 0 var(--glass-highlight);
}

.tab-bar.tab-bar-hidden {
  bottom: -120px;
  opacity: 0;
  pointer-events: none;
}

/* Liquid blob indicator */
.tab-blob {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 52px;
  height: 44px;
  background: var(--gradient-btn);
  border-radius: 100px;
  box-shadow: 
    0 8px 24px -4px rgba(213, 175, 55, 0.6),
    0 0 0 1px rgba(213, 175, 55, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  z-index: 0;
}

/* Splash droplet - the liquid aftertrail */
.tab-blob::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  box-shadow: 0 0 20px var(--gold);
}

.tab-blob.splashing::before {
  animation: splashDrop 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes splashDrop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0.8; }
  50% { transform: translate(-50%, -50%) scale(3); opacity: 0.4; }
  100% { transform: translate(-50%, -50%) scale(6); opacity: 0; }
}

.tab-item {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 44px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: transparent;
  border: none;
  flex-shrink: 0;
}

.tab-item:hover:not(.active) { color: var(--ink); transform: translateY(-2px); }

.tab-item.active {
  color: #fff;
}

[data-theme="dark"] .tab-item.active { color: var(--bg-0); }

.tab-item:active {
  transform: scale(0.88);
}

.tab-item svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }

.tab-item.active svg {
  transform: scale(1.1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* Ripple on tap */
.tab-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(213, 175, 55, 0.3);
  transform: scale(0);
  pointer-events: none;
  animation: ripple 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes ripple {
  0% { transform: scale(0); opacity: 0.8; }
  100% { transform: scale(4); opacity: 0; }
}

/* ===== STAFF /staff ===== */
.staff-shell { max-width: 460px; margin: 0 auto; padding: 90px 20px 60px; }
.staff-header { margin-bottom: 28px; }
.staff-meta { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); }
.staff-name { font-family: var(--ser); font-size: 44px; font-style: italic; color: var(--ink); letter-spacing: -0.02em; line-height: 1; margin-top: 10px; }
.staff-subtitle { font-size: 14px; color: var(--ink-2); margin-top: 10px; }

.today-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 24px;
}

.summary-cell { text-align: center; padding: 8px; }
.summary-cell + .summary-cell { border-left: 1px solid var(--line); }
.summary-value { font-family: var(--ser); font-size: 32px; color: var(--gold); line-height: 1; letter-spacing: -0.02em; }
.summary-label { font-family: var(--mono); font-size: 10px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 6px; }

.day-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin: 24px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.day-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.visit-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.visit-card.awaiting {
  background: linear-gradient(135deg, rgba(255, 181, 71, 0.08) 0%, var(--bg-1) 50%);
  border-color: rgba(255, 181, 71, 0.25);
}

[data-theme="light"] .visit-card.awaiting {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.1) 0%, var(--bg-1) 50%);
  border-color: rgba(217, 119, 6, 0.3);
}

.visit-card.awaiting::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--amber);
  box-shadow: 0 0 12px var(--amber);
}

.visit-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 12px; }
.visit-time { font-family: var(--ser); font-size: 28px; color: var(--gold); font-style: italic; line-height: 1; letter-spacing: -0.01em; }

.visit-badge {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 100px;
  font-weight: 600;
}

.visit-badge.pending { background: var(--status-confirmed-bg); color: var(--status-confirmed-fg); }
.visit-badge.awaiting { background: var(--status-awaiting-bg); color: var(--status-awaiting-fg); }

.visit-client { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.visit-detail { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; }
.visit-detail .dot { width: 3px; height: 3px; background: var(--ink-3); border-radius: 50%; }
.visit-actions { display: flex; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

.visit-btn {
  flex: 1;
  padding: 11px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.visit-btn.confirm {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.14) 0%, rgba(74, 222, 128, 0.04) 100%);
  border-color: rgba(74, 222, 128, 0.3);
  color: var(--success);
}

[data-theme="light"] .visit-btn.confirm {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.14) 0%, rgba(22, 163, 74, 0.04) 100%);
  border-color: rgba(22, 163, 74, 0.3);
}

.visit-btn.confirm:hover { background: rgba(74, 222, 128, 0.18); transform: translateY(-1px); }
[data-theme="light"] .visit-btn.confirm:hover { background: rgba(22, 163, 74, 0.16); }

.visit-btn.reject { color: var(--ink-2); }
.visit-btn.reject:hover { border-color: rgba(248, 113, 113, 0.3); color: var(--danger); background: rgba(248, 113, 113, 0.06); }
[data-theme="light"] .visit-btn.reject:hover { border-color: rgba(220, 38, 38, 0.3); background: rgba(220, 38, 38, 0.06); }

.visit-btn svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.2; fill: none; }

@media (max-width: 1024px) {
  .lk-shell { grid-template-columns: 1fr; }
  .lk-sidebar { display: none; }
  .lk-main { padding: 90px 20px 40px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 42px; }
}

@media (max-width: 640px) {
  .stats-row { grid-template-columns: 1fr; }
  .page-title { font-size: 36px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .switcher { flex-wrap: wrap; max-width: calc(100vw - 80px); }
  .switcher button { padding: 8px 12px; font-size: 12px; }
  .theme-toggle { top: 24px; right: 16px; width: 40px; height: 40px; }
}

/* ==== SEDE real cabinet overrides (no view switcher in production) ==== */
.view { display: block; }
.switcher { display: none !important; }

/* ===== /start — Registration choice screen ===== */
.reg-choice-shell {
  max-width: 1000px;
  margin: 0 auto;
  padding: 90px 20px 60px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.reg-choice-header { text-align: center; margin-bottom: 48px; }
.reg-choice-header .brand { display: inline-block; margin-bottom: 24px; }
.reg-choice-title {
  font-family: var(--ser);
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 12px;
}
.reg-choice-title em { font-style: italic; color: var(--gold); }
.reg-choice-subtitle {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.5;
}
.reg-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.reg-choice-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 32px 28px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), border-color .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  animation: slideUp .5s cubic-bezier(.4,0,.2,1) backwards;
}
.reg-choice-card:nth-child(1) { animation-delay: .1s; }
.reg-choice-card:nth-child(2) { animation-delay: .2s; }
.reg-choice-card:nth-child(3) { animation-delay: .3s; }
.reg-choice-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(213, 175, 55, 0.12) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}
.reg-choice-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 24px 60px -20px rgba(213, 175, 55, 0.3), 0 0 0 1px rgba(213, 175, 55, 0.2);
}
.reg-choice-card:hover::before { opacity: 1; }
.reg-choice-flag { font-size: 48px; line-height: 1; margin-bottom: 8px; }
.reg-choice-name {
  font-family: var(--ser);
  font-size: 32px;
  font-style: italic;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}
.reg-choice-type {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
}
.reg-choice-desc {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 8px 0 12px;
  flex: 1;
}
.reg-choice-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-weight: 600;
  font-size: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  transition: gap .2s ease;
}
.reg-choice-action svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none; stroke-width: 2;
  transition: transform .2s ease;
}
.reg-choice-card:hover .reg-choice-action { gap: 12px; }
.reg-choice-card:hover .reg-choice-action svg { transform: translateX(4px); }
.reg-choice-footer {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14px;
}
.reg-choice-footer a { color: var(--gold); text-decoration: none; font-weight: 500; }
.reg-choice-footer a:hover { text-decoration: underline; }
@media (max-width: 800px) {
  .reg-choice-title { font-size: 40px; }
  .reg-choice-grid { grid-template-columns: 1fr; gap: 14px; }
  .reg-choice-shell { padding: 80px 16px 40px; }
}

/* ===== Owner tab-bar — только на мобильных ===== */
.tab-bar-owner { display: none; }
@media (max-width: 1024px) {
  .tab-bar-owner { display: flex; }
  .lk-main { padding-bottom: 120px !important; }
}

/* ===== Landing: social contacts + bot CTA block ===== */
.social-contacts {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 24px 0 8px;
  flex-wrap: wrap;
}
.social-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.social-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); }
.social-whatsapp { background: #25d366; color: #fff; }
.social-telegram { background: #0088cc; color: #fff; }
.social-max { background: linear-gradient(135deg, #7b61ff 0%, #5b41df 100%); color: #fff; }
.max-logo { font-size: 13px; font-weight: 800; letter-spacing: 0.5px; font-family: inherit; }
@media (max-width: 600px) {
  .social-btn { width: 52px; height: 52px; }
  .social-btn svg { width: 24px; height: 24px; }
  .max-logo { font-size: 11px; }
}

.bot-cta-block {
  text-align: center;
  padding: 40px 20px;
  margin: 20px 0;
}
.bot-cta-title {
  font-family: var(--ser);
  font-size: 36px;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.1;
}
.bot-cta-title em { font-style: italic; color: var(--gold); }
.bot-cta-sub {
  color: var(--ink-2);
  font-size: 15px;
  margin-bottom: 24px;
}
.bot-cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.bot-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 180px;
  justify-content: center;
}
.bot-btn svg { width: 22px; height: 22px; }
.bot-btn-tg {
  background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(0, 136, 204, 0.5);
}
.bot-btn-tg:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -8px rgba(0, 136, 204, 0.7); }
.bot-btn-max {
  background: linear-gradient(135deg, #ff7a00 0%, #e65100 100%);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(255, 122, 0, 0.5);
}
.bot-btn-max:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -8px rgba(255, 122, 0, 0.7); }
@media (max-width: 480px) {
  .bot-cta-buttons { flex-direction: column; align-items: center; }
  .bot-btn { width: 100%; max-width: 280px; }
  .bot-cta-title { font-size: 28px; }
}

/* ── SEDE Admin (системный кабинет /sede-admin) ── */
.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--glass-bg);
  border-right: 1px solid var(--line);
  padding: 24px;
}

.admin-main {
  padding: 32px;
}

.admin-brand {
  font-family: var(--ser);
  font-size: 24px;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 24px;
  line-height: 1;
}

.admin-brand::after {
  content: 'admin';
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-3);
  font-style: normal;
  margin-top: 4px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  margin: 2px 0;
  transition: all 0.2s ease;
}

.admin-nav-item:hover {
  background: rgba(213, 175, 55, 0.06);
  color: var(--ink);
}

.admin-nav-item.active {
  background: linear-gradient(90deg, rgba(213, 175, 55, 0.14) 0%, transparent 100%);
  color: var(--gold);
  border-left: 2px solid var(--gold);
}

.admin-warning-bar {
  background: linear-gradient(90deg, #dc2626 0%, #991b1b 100%);
  color: #fff;
  padding: 8px 24px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
}

.admin-warning-bar::before { content: '⚠ '; }

@media (max-width: 768px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { border-right: none; border-bottom: 1px solid var(--line); }
  .admin-main { padding: 20px; }
}
