/* ==========================================================================
   Salon Platform — Premium Design System v3
   Full Light / Dark theme via [data-theme] on <html>
   Enhanced UI: animations, micro-interactions, improved components
   ========================================================================== */

/* ==================== DARK THEME ==================== */
/* ==================== DARK THEME ==================== */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --calendar-icon-filter: invert(1);
  --bg:            #080c17;
  --bg2:           #0e1422;
  --surface:       rgba(15, 21, 36, 0.75);
  --surface-solid: #0e1526;
  --surface2:      rgba(22, 30, 50, 0.80);
  --surface-soft:  rgba(20, 27, 45, 0.55);
  --border:        rgba(255,255,255,0.06);
  --border-strong: rgba(255,255,255,0.10);
  --ink:           #dce4f0;
  --ink-strong:    #f1f5fb;
  --ink-dim:       #7a8ba8;
  --muted:         #7a8ba8;
  --accent:        #10b981;
  --accent-rgb:    16,185,129;
  --accent-dim:    rgba(16,185,129,0.12);
  --accent-hover:  #059669;
  --accent-glow:   rgba(16,185,129,0.25);
  --gold:          #f59e0b;
  --gold-dim:      rgba(245,158,11,0.12);
  --gold-glow:     rgba(245,158,11,0.15);
  --red:           #ef4444;
  --red-dim:       rgba(239,68,68,0.10);
  --indigo:        #818cf8;
  --indigo-dim:    rgba(129,140,248,0.12);
  --blue:          #60a5fa;
  --blue-dim:      rgba(96,165,250,0.12);
  --shadow:        0 8px 32px 0 rgba(0,0,0,0.25);
  --shadow-lg:     0 8px 32px 0 rgba(0,0,0,0.35);
  --shadow-glow:   0 0 0 1px rgba(var(--accent-rgb), 0.2), 0 8px 24px rgba(var(--accent-rgb), 0.15);
  --radius:        14px;
  --radius-sm:     9px;
  --radius-xs:     6px;
  --sidebar-w:     248px;
  --topbar-h:      64px;

  /* Component tokens */
  --topbar-bg:       rgba(8,12,23,0.75);
  --sidebar-bg:      rgba(9,13,24,0.75);
  --card-bg:         rgba(14,20,34,0.60);
  --card-bg-hover:   rgba(18,26,44,0.70);
  --input-bg:        rgba(0,0,0,0.2);
  --table-head-bg:   rgba(255,255,255,0.025);
  --table-row-hover: rgba(255,255,255,0.025);
  --hero-bg:         linear-gradient(135deg, rgba(16,185,129,0.07) 0%, rgba(99,102,241,0.07) 100%);
  --heading-grad:    linear-gradient(135deg, #f1f5fb 0%, #7a8ba8 100%);
  --nav-active-bg:   rgba(16,185,129,0.10);
  --chip-bg:         rgba(16,185,129,0.06);
  --line:            rgba(255,255,255,0.06);
  --shimmer-bg:      linear-gradient(90deg, rgba(255,255,255,0.0) 0%, rgba(255,255,255,0.04) 50%, rgba(255,255,255,0.0) 100%);
}

/* ==================== LIGHT THEME ==================== */
[data-theme="light"] {
  color-scheme: light;
  --calendar-icon-filter: none;
  --bg:            #f0f4fb;
  --bg2:           #e5eaf5;
  --surface:       rgba(255,255,255,0.75);
  --surface-solid: #ffffff;
  --surface2:      rgba(248,250,254,0.80);
  --surface-soft:  rgba(242,246,254,0.65);
  --border:        rgba(0,0,0,0.05);
  --border-strong: rgba(0,0,0,0.09);
  --ink:           #2e3a52;
  --ink-strong:    #0d1626;
  --ink-dim:       #5e7292;
  --muted:         #5e7292;
  --accent:        #059669;
  --accent-rgb:    5,150,105;
  --accent-dim:    rgba(5,150,105,0.10);
  --accent-hover:  #047857;
  --accent-glow:   rgba(5,150,105,0.20);
  --gold:          #d97706;
  --gold-dim:      rgba(217,119,6,0.10);
  --gold-glow:     rgba(217,119,6,0.12);
  --red:           #dc2626;
  --red-dim:       rgba(220,38,38,0.08);
  --indigo:        #6366f1;
  --indigo-dim:    rgba(99,102,241,0.10);
  --blue:          #3b82f6;
  --blue-dim:      rgba(59,130,246,0.10);
  --shadow:        0 8px 32px 0 rgba(31, 38, 135, 0.06);
  --shadow-lg:     0 8px 32px 0 rgba(31, 38, 135, 0.1);
  --shadow-glow:   0 0 0 1px rgba(var(--accent-rgb), 0.15), 0 6px 20px rgba(var(--accent-rgb), 0.10);
  --radius:        14px;
  --radius-sm:     9px;
  --radius-xs:     6px;
  --sidebar-w:     248px;
  --topbar-h:      64px;

  --topbar-bg:       rgba(255,255,255,0.75);
  --sidebar-bg:      rgba(255,255,255,0.75);
  --card-bg:         rgba(255,255,255,0.60);
  --card-bg-hover:   rgba(248,252,255,0.70);
  --input-bg:        rgba(255,255,255,0.50);
  --table-head-bg:   rgba(0,0,0,0.022);
  --table-row-hover: rgba(0,0,0,0.018);
  --hero-bg:         linear-gradient(135deg, rgba(5,150,105,0.05) 0%, rgba(99,102,241,0.04) 100%);
  --heading-grad:    linear-gradient(135deg, #0d1626 0%, #2e3a52 100%);
  --nav-active-bg:   rgba(5,150,105,0.08);
  --chip-bg:         rgba(5,150,105,0.06);
  --line:            rgba(0,0,0,0.05);
  --shimmer-bg:      linear-gradient(90deg, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.03) 50%, rgba(0,0,0,0.0) 100%);
}

/* ==================== RESET & BASE ==================== */

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

html {
  font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
  min-height: 100%;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  min-height: 100vh;
  background: var(--bg);
  overflow-x: hidden;
}
body.dashboard-page {
  height: 100vh;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; background: transparent; border: 0; outline: none; }
img { display: block; max-width: 100%; }

[hidden] { display: none !important; }

/* ==================== ANIMATIONS ==================== */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}
@keyframes spinOnce {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes borderGlow {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50%       { box-shadow: 0 0 0 4px var(--accent-glow); }
}

.animate-fade-up  { animation: fadeInUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
.animate-fade-in  { animation: fadeIn 0.3s ease both; }
.animate-scale-in { animation: scaleIn 0.25s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* Stagger children */
.stack > *:nth-child(1) { animation-delay: 0ms; }
.stack > *:nth-child(2) { animation-delay: 50ms; }
.stack > *:nth-child(3) { animation-delay: 100ms; }
.stack > *:nth-child(4) { animation-delay: 150ms; }
.stack > *:nth-child(5) { animation-delay: 200ms; }

/* ==================== SCROLLBAR STYLING ==================== */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-dim); }

/* ==================== THEME TOGGLE ==================== */

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.theme-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.theme-toggle-btn i { font-size: 1rem; }

[data-theme="dark"]  .theme-icon-light,
[data-theme="dark"]  .theme-label-light { display: none; }
[data-theme="light"] .theme-icon-dark,
[data-theme="light"] .theme-label-dark  { display: none; }

/* ==================== APP SHELL ==================== */

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ---- MOBILE HAMBURGER TOGGLE ---- */
.sidebar-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}

/* ---- SIDEBAR OVERLAY (mobile) ---- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 90;
  transition: opacity 0.3s ease;
}
.sidebar-overlay.active { display: block; }

/* ---- TOPBAR ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 64px;
  padding: 0 24px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-wrap: nowrap;
  overflow: hidden;
  box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(0,0,0,0.08);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.4);
  transition: transform 0.2s;
}
.topbar-logo:hover { transform: scale(1.08) rotate(3deg); }

.topbar-brand-text {
  min-width: 0;
  overflow: hidden;
}
.topbar-brand-text .brand-name {
  font-family: "Outfit", sans-serif;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--ink-strong);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-brand-text .brand-sub {
  font-size: 0.7rem;
  color: var(--ink-dim);
  font-weight: 500;
  line-height: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex-shrink: 0;
  overflow: hidden;
  min-width: 0;
}

/* User chip */
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 8px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--chip-bg);
  cursor: default;
  max-width: 100%;
  flex-wrap: wrap;
  transition: border-color 0.2s;
}
.user-chip:hover { border-color: var(--border-strong); }
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.user-info span {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-strong);
  line-height: 1.2;
}
.user-info small {
  font-size: 0.67rem;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.logout-form button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.2);
  background: var(--red-dim);
  cursor: pointer;
  transition: all 0.15s;
}
.logout-form button:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 2px 8px rgba(239,68,68,0.35);
}

.topbar-page-title {
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-strong);
}
.eyebrow {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ---- BODY LAYOUT ---- */
.body-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 16px 10px;
  gap: 2px;
  position: sticky;
  top: var(--topbar-h);
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-section-label {
  font-size: 0.63rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--ink-dim);
  padding: 14px 10px 5px;
  margin-top: 4px;
  opacity: 0.7;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-dim);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.side-nav a::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 0; height: 60%;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
  transition: width 0.2s ease;
}
.side-nav a i {
  font-size: 1.15rem;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  transition: transform 0.2s;
}
.side-nav a:hover {
  color: var(--ink-strong);
  background: var(--nav-active-bg);
  border-color: var(--border);
  padding-left: 16px;
}
.side-nav a:hover i { transform: scale(1.1); }
.side-nav a.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(var(--accent-rgb), 0.15);
  font-weight: 700;
  padding-left: 16px;
}
.side-nav a.active::before { width: 3px; }
.side-nav a.active i { color: var(--accent); transform: scale(1.1); }

/* Nav badge */
.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ---- MAIN CONTENT AREA ---- */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 28px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  height: 100%;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ==================== PANELS / CARDS ==================== */

.panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
  animation: fadeInUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.panel h2, .panel-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink-strong);
  margin-bottom: 0;
}

.panel h3.section-title {
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-strong);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Luxury Hero Panel */
.luxury-hero {
  background: var(--hero-bg);
  border-left: 3px solid var(--accent);
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}
.luxury-hero::after {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.07) 0%, transparent 70%);
  pointer-events: none;
}
.luxury-hero h2 {
  font-family: "Outfit", sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  background: var(--heading-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 4px 0 6px;
  line-height: 1.2;
}
.luxury-hero p {
  font-size: 0.875rem;
  color: var(--ink-dim);
  max-width: 680px;
  line-height: 1.6;
}

.panel-desc {
  font-size: 0.875rem;
  color: var(--ink-dim);
  margin-top: 4px;
}

/* ==================== STAT CARDS ==================== */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.22s cubic-bezier(0.22,1,0.36,1), box-shadow 0.22s, border-color 0.2s;
  animation: fadeInUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--accent-rgb), 0.2);
}
.stat-card::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  opacity: 0.8;
}
.stat-card .stat-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  background: var(--accent-dim);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  transition: transform 0.2s;
}
.stat-card:hover .stat-icon { transform: scale(1.1); }
.stat-card .stat-icon i {
  font-size: 1.15rem;
  color: var(--accent);
}
.stat-card small {
  display: block;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ink-dim);
  margin-bottom: 4px;
}
.stat-card h3 {
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.2rem, 4vw, 1.9rem);
  font-weight: 800;
  color: var(--ink-strong);
  line-height: 1.1;
  word-break: break-word;
}
.stat-card .stat-change {
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-card.stat-warn::after { background: linear-gradient(90deg, var(--red), transparent 70%); }
.stat-card.stat-warn .stat-icon { background: var(--red-dim); }
.stat-card.stat-warn .stat-icon i { color: var(--red); }
.stat-card.stat-warn h3 { color: var(--red); }

.stat-card.stat-gold::after { background: linear-gradient(90deg, var(--gold), transparent 70%); }
.stat-card.stat-gold .stat-icon { background: var(--gold-dim); }
.stat-card.stat-gold .stat-icon i { color: var(--gold); }
.stat-card.stat-gold h3 { color: var(--gold); }

.stat-card.stat-indigo::after { background: linear-gradient(90deg, var(--indigo), transparent 70%); }
.stat-card.stat-indigo .stat-icon { background: var(--indigo-dim); }
.stat-card.stat-indigo .stat-icon i { color: var(--indigo); }
.stat-card.stat-indigo h3 { color: var(--indigo); }

/* ==================== BUTTONS ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.15s;
}
.btn:hover::after { background: rgba(255,255,255,0.05); }
.btn i { font-size: 1rem; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.35);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.2);
}
.btn-secondary:hover { background: var(--accent); color: #fff; box-shadow: 0 3px 12px rgba(var(--accent-rgb),0.4); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--surface2);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(239,68,68,0.2);
}
.btn-danger:hover { background: var(--red); color: #fff; box-shadow: 0 3px 10px rgba(239,68,68,0.4); }

.btn-sm  { min-height: 30px; padding: 0 12px; font-size: 0.78rem; border-radius: var(--radius-xs); }
.btn-lg  { min-height: 48px; padding: 0 28px; font-size: 1rem; }

/* Button loading spinner */
.btn.loading {
  pointer-events: none;
  opacity: 0.8;
}
.btn.loading i { animation: spinOnce 1s linear infinite; }

/* ==================== FORM ELEMENTS ==================== */

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-strong);
}
.form-control,
.form-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--input-bg);
  color: var(--ink-strong);
  font-size: 0.9rem;
  transition: border-color 0.18s, box-shadow 0.18s, background-color 0.18s;
}

/* Premium Custom Dropdown styling for select elements */
select.form-input {
  cursor: pointer;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a8ba8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px !important;
  padding-right: 40px;
}

select.form-input::-ms-expand {
  display: none;
}

[data-theme="light"] select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235e7292' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
.form-control::placeholder,
.form-input::placeholder { color: var(--ink-dim); }
.form-control:focus,
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background-color: var(--surface);
}
.form-input:hover:not(:focus) { border-color: var(--border-strong); }
.form-input:disabled,
.form-input[readonly] {
  opacity: 0.65;
  cursor: not-allowed;
  background-color: var(--surface-soft);
  color: var(--ink);
  border-color: var(--border);
}
.form-textarea { min-height: 100px; resize: vertical; }
.form-help { font-size: 0.78rem; color: var(--ink-dim); }
.form-error {
  padding: 10px 14px;
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-sm);
  background: var(--red-dim);
  color: var(--red);
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  animation: fadeInUp 0.25s ease both;
}
.form-actions-right {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* Floating label effect for inputs */
.form-field.float-label { position: relative; }
.form-field.float-label .form-label {
  position: absolute;
  top: 11px; left: 14px;
  pointer-events: none;
  transition: all 0.18s;
  font-weight: 500;
  color: var(--ink-dim);
}
.form-field.float-label .form-input:focus ~ .form-label,
.form-field.float-label .form-input:not(:placeholder-shown) ~ .form-label {
  top: -9px; left: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--card-bg);
  padding: 0 4px;
}

/* Luxury Custom Tooltip Info Helper */
.info-helper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  color: var(--accent);
  cursor: help;
  font-size: 0.95rem;
  vertical-align: middle;
}
.info-helper:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg2);
  border: 1px solid var(--border-strong);
  color: var(--ink-strong);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: normal;
  white-space: normal;
  width: 260px;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  line-height: 1.4;
  text-align: left;
  backdrop-filter: blur(10px);
  animation: scaleIn 0.15s ease both;
}
.info-helper:hover::before {
  content: "";
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--border-strong) transparent transparent transparent;
  z-index: 1000;
}

/* Three-dots Sharing Menu & Dropdowns */
.share-menu-container {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-block;
  z-index: 10;
}
.share-trigger-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--ink-dim);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.share-trigger-btn:hover {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
  transform: scale(1.1);
}
.share-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--surface-solid, #0e1526) !important;
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.15)) !important;
  border-radius: var(--radius-sm, 10px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  display: none;
  flex-direction: column;
  min-width: 190px;
  z-index: 999999 !important;
  overflow: hidden;
}
[data-theme="light"] .share-dropdown-menu {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
}
.share-dropdown-menu.active {
  display: flex;
  animation: scaleIn 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: top right;
}
.share-dropdown-item {
  padding: 10px 15px;
  font-size: 0.82rem;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.share-dropdown-item:hover {
  background: var(--nav-active-bg);
  color: var(--accent);
}
.share-dropdown-item i { font-size: 1rem; }

/* Boxicons browser compatibility helper */
i.bx, i.bxs, i.bxl {
  font-family: 'boxicons' !important;
  font-weight: normal;
  font-style: normal;
  font-variant: normal;
  line-height: 1;
  text-transform: none;
  display: inline-block;
  vertical-align: middle;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Premium QR Code Modal */
.qr-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.qr-modal.active { display: flex; opacity: 1; }
.qr-modal-content {
  background: var(--card-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 30px;
  width: 90%;
  max-width: 380px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
  position: relative;
}
.qr-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  color: var(--ink-dim);
  cursor: pointer;
  font-size: 1.4rem;
  transition: color 0.2s, transform 0.2s;
}
.qr-modal-close:hover { color: var(--red); transform: scale(1.1); }
.qr-code-img {
  margin: 20px auto;
  border: 8px solid #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  display: block;
}

/* ==================== MODAL ==================== */

/* ==================== MODAL ==================== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 23, 0.68);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.modal[hidden] { display: none !important; }

.modal-content {
  width: 100%;
  max-width: 600px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 32px 30px !important;
  border-radius: var(--radius) !important;
  transition: transform 0.2s ease, opacity 0.2s ease;
  animation: modalScaleIn 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Light / Dark Adaptive Styling for Pop-up Cards */
[data-theme="light"] .modal-content {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 24px 60px rgba(13, 22, 38, 0.16), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="dark"] .modal-content {
  background: rgba(14, 20, 34, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.50), inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
}

.modal-content .grid-columns-2,
.modal-content .grid-columns-3 {
  grid-template-columns: 1fr;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border) !important;
  padding-bottom: 16px !important;
}
.modal-header h4 {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink-strong);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Red Hover Close Button Indicator */
.modal-header .btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0 !important;
  border-radius: var(--radius-xs);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--ink-dim) !important;
  background: transparent;
}
.modal-header .btn-ghost:hover {
  background: var(--red-dim) !important;
  color: var(--red) !important;
  transform: rotate(90deg);
}

/* Inner Tab Pills Navigation */
.modal-tab-btn {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-dim) !important;
  padding: 8px 16px !important;
  border-radius: var(--radius-sm) !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
  border: none !important;
  cursor: pointer;
}
.modal-tab-btn:hover {
  color: var(--ink-strong) !important;
  background: var(--surface-soft) !important;
}
.modal-tab-btn.active {
  color: var(--accent) !important;
  background: var(--accent-dim) !important;
}

/* Form refinement inside pop-ups */
.modal-content .form-label {
  font-weight: 700;
  color: var(--ink-strong);
  font-size: 0.82rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.modal-content .form-input {
  min-height: 44px;
  border-radius: 8px !important;
  padding: 10px 16px !important;
  border: 1px solid var(--border-strong) !important;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}
[data-theme="light"] .modal-content .form-input {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}
[data-theme="dark"] .modal-content .form-input {
  background-color: rgba(0, 0, 0, 0.25) !important;
  color: #f8fafc !important;
}
.modal-content .form-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-dim) !important;
  background-color: var(--surface) !important;
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ==================== CUSTOM ALERT DIALOG ==================== */

.web-custom-alert-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.web-custom-alert-overlay.active { opacity: 1; }
.web-custom-alert-box {
  background: var(--card-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 30px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  animation: scaleIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.web-custom-alert-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}
.web-custom-alert-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink-strong);
  margin-bottom: 10px;
}
.web-custom-alert-message {
  font-size: 0.875rem;
  color: var(--ink-dim);
  line-height: 1.6;
  margin-bottom: 22px;
}
.web-custom-alert-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.web-custom-alert-btn {
  min-height: 38px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.web-custom-alert-btn.confirm-btn {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(var(--accent-rgb),0.35);
}
.web-custom-alert-btn.confirm-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(var(--accent-rgb),0.5);
}
.web-custom-alert-btn.cancel-btn {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.web-custom-alert-btn.cancel-btn:hover {
  background: var(--surface2);
  border-color: var(--accent);
  color: var(--accent);
}

/* ==================== DATA TABLES ==================== */

.table-container {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  max-width: 100%;
}
.panel,
.grid-columns-2 > *,
.grid-columns-3 > *,
.split-layout > * { min-width: 0; }

.luxury-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  text-align: left;
}
.luxury-table thead { position: sticky; top: 0; z-index: 1; }
.luxury-table th,
.luxury-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); }
.luxury-table th {
  background: var(--table-head-bg);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-dim);
  white-space: nowrap;
}
.luxury-table td { font-size: 0.875rem; color: var(--ink); }
.luxury-table tr:last-child td { border-bottom: 0; }
.luxury-table tbody tr {
  transition: background 0.15s;
}
.luxury-table tbody tr:hover td {
  background: var(--table-row-hover);
}

/* Table row entrance animation */
.luxury-table tbody tr {
  animation: fadeIn 0.3s ease both;
}
.luxury-table tbody tr:nth-child(1)  { animation-delay: 0ms; }
.luxury-table tbody tr:nth-child(2)  { animation-delay: 30ms; }
.luxury-table tbody tr:nth-child(3)  { animation-delay: 60ms; }
.luxury-table tbody tr:nth-child(4)  { animation-delay: 90ms; }
.luxury-table tbody tr:nth-child(5)  { animation-delay: 120ms; }
.luxury-table tbody tr:nth-child(6)  { animation-delay: 150ms; }

/* ==================== BADGES & PILLS ==================== */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.pill-active, .pill-confirmed, .pill-completed {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
}
.pill-pending {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(245,158,11,0.2);
}
.pill-cancelled {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.2);
}
.pill-mini {
  display: inline-flex;
  padding: 2px 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--ink-dim);
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
}
.gold-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.warn-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Status indicator dot */
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}
.status-dot::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.online::before  { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); animation: pulse 2s infinite; }
.status-dot.offline::before { background: var(--red); }
.status-dot.away::before    { background: var(--gold); }

/* ==================== LUXURY CARDS (Salons / Products grid) ==================== */

.salons-grid, .products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.luxury-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), box-shadow 0.25s, border-color 0.2s;
  box-shadow: var(--shadow);
  animation: fadeInUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  position: relative;
}
.luxury-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--accent-rgb), 0.3);
  background: var(--card-bg-hover);
}
.luxury-card .card-image-strip {
  height: 6px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h4 {
  font-family: "Outfit", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink-strong);
}
.card-desc { font-size: 0.84rem; color: var(--ink-dim); line-height: 1.55; }
.card-metadata {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--ink-dim);
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.card-metadata span { display: flex; align-items: center; gap: 7px; }
.card-actions {
  padding: 13px 20px;
  background: var(--surface2);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.quick-links { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--border); }
.quick-links a {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.15s, color 0.15s;
}
.quick-links a:hover { gap: 10px; }

/* ==================== LIST ITEMS ==================== */

.list-item {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
  animation: fadeInUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.list-item:hover {
  border-color: rgba(var(--accent-rgb), 0.2);
  background: var(--card-bg-hover);
}
.list-item h5 { font-size: 0.95rem; font-weight: 700; color: var(--ink-strong); margin-bottom: 4px; }
.list-item p { font-size: 0.84rem; color: var(--ink-dim); line-height: 1.55; }

/* ==================== MISC UTILITIES ==================== */

.luxury-divider {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.empty-state {
  padding: 56px 24px;
  text-align: center;
  color: var(--ink-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.empty-state i { font-size: 3rem; color: var(--border-strong); }
.empty-state h4 { font-family: "Outfit", sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--ink-strong); }
.empty-state p { font-size: 0.9rem; max-width: 360px; }

/* Timeline */
.timeline-queue { display: flex; flex-direction: column; gap: 10px; }
.timeline-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  transition: border-color 0.18s;
}
.timeline-item:hover { border-color: rgba(var(--accent-rgb),0.2); }
.time-badge { font-size: 0.82rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
.timeline-body h4 { font-weight: 700; color: var(--ink-strong); margin-bottom: 4px; font-size: 0.9rem; }
.timeline-body p { font-size: 0.82rem; color: var(--ink-dim); }

/* Grid helpers */
.grid-columns-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-columns-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.split-layout    { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; }

/* Checkbox/Radio */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--ink);
  transition: color 0.15s;
}
.checkbox-label:hover { color: var(--ink-strong); }
.checkbox-label input { width: 16px; height: 16px; accent-color: var(--accent); }

/* Role picker */
.role-picker { display: grid; gap: 10px; border: 0; }
.role-picker legend { font-size: 0.82rem; font-weight: 700; color: var(--ink-strong); margin-bottom: 6px; }
.role-picker label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  cursor: pointer;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}
.role-picker label:hover { border-color: var(--accent); background: var(--accent-dim); }
.role-picker input { width: 16px; height: 16px; accent-color: var(--accent); margin-top: 2px; }
.role-picker span { display: flex; flex-direction: column; gap: 3px; }
.role-picker span strong { color: var(--ink-strong); font-size: 0.9rem; }
.role-picker small { font-size: 0.78rem; color: var(--ink-dim); line-height: 1.4; }

/* Chart containers */
.chart-box { height: 220px; position: relative; }

#slotsGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Back button */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  width: fit-content;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  transition: all 0.18s;
  margin-bottom: 8px;
}
.btn-back:hover {
  color: var(--accent);
  background: var(--accent-dim);
  gap: 10px;
}

/* Search input with icon */
.search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.search-wrap i {
  position: absolute;
  left: 12px;
  color: var(--ink-dim);
  font-size: 1rem;
  pointer-events: none;
}
.search-wrap input { padding-left: 36px; }

/* Slot pill for booking */
.slot-btn {
  min-height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slot-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}
.slot-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.4);
}
.slot-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Touch-friendly tap targets */
@media (hover: none) {
  .btn { min-height: 44px; }
  .side-nav a { min-height: 44px; }
  .form-input { min-height: 44px; }
  .slot-btn { min-height: 44px; }
}

/* ==================== AUTH PAGES ==================== */

.auth-mesh-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  mix-blend-mode: screen;
  animation: floatGlow 20s infinite alternate ease-in-out;
}
[data-theme="light"] .glow-blob {
  opacity: 0.07;
  mix-blend-mode: multiply;
  filter: blur(80px);
}
.glow-blob-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: var(--accent);
}
.glow-blob-2 {
  bottom: -10%;
  right: -10%;
  width: 45vw;
  height: 45vw;
  background: var(--indigo);
  animation-delay: -5s;
  animation-duration: 25s;
}
.glow-blob-3 {
  top: 40%;
  left: 60%;
  width: 30vw;
  height: 30vw;
  background: var(--gold);
  animation-delay: -10s;
  animation-duration: 18s;
}
@keyframes floatGlow {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4vw, -3vh) scale(1.1); }
  100% { transform: translate(-2vw, 5vh) scale(0.9); }
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: var(--bg);
  position: relative;
  z-index: 1;
}

.auth-card {
  width: min(100%, 540px);
  padding: 20px clamp(16px, 4vw, 24px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  animation: scaleIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.auth-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 32px rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.25);
  transform: translateY(-2px);
}
.auth-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.auth-card .form-input {
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  background: var(--input-bg);
}
.auth-card .form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim), inset 0 1px 2px rgba(0,0,0,0.1);
  background: var(--input-bg);
}

.auth-card button[type="submit"] {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border: none;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.auth-card button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.4);
}
.auth-card button[type="submit"]:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(var(--accent-rgb), 0.2);
}
 
.auth-brand {
  margin-bottom: 12px;
  text-align: left;
}
.auth-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.auth-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: #fff;
  margin: 0;
  box-shadow: 0 3px 12px rgba(var(--accent-rgb), 0.35);
  flex-shrink: 0;
}
.auth-brand h1 {
  font-family: "Outfit", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink-strong);
  margin: 0;
}
.auth-brand p.auth-intro {
  font-size: 0.76rem;
  color: var(--ink-dim);
  line-height: 1.35;
  margin: 0;
}
.auth-form { display: flex; flex-direction: column; gap: 8px; }
.auth-theme-toggle { position: fixed; top: 16px; right: 16px; }

.auth-row {
  display: flex;
  gap: 12px;
  margin-bottom: 4px;
  width: 100%;
}
.auth-col {
  flex: 1;
  min-width: 0;
}
@media (max-width: 520px) {
  .auth-row {
    flex-direction: column;
    gap: 8px;
  }
}

.auth-card .form-input {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.85rem;
}
.auth-card .form-label {
  font-size: 0.78rem;
  margin-bottom: 0;
}

/* ==================== PUBLIC LANDING PAGE ==================== */

.public-hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  background: var(--hero-bg);
}
.hero-content { max-width: 700px; }
.hero-eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 5px 16px;
  border-radius: 99px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.public-hero h1 {
  font-family: "Outfit", sans-serif;
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--ink-strong);
  margin-bottom: 18px;
}
.public-hero h1 .hero-accent { color: var(--accent); }
.public-hero p {
  font-size: 1rem;
  color: var(--ink-dim);
  line-height: 1.7;
  margin-bottom: 32px;
}
.hero-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-feature-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  text-align: left;
}
.hero-feature-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), border-color 0.2s;
}
.hero-feature-card:hover { transform: translateY(-4px); border-color: rgba(var(--accent-rgb),0.25); }
.feat-icon { font-size: 1.8rem; margin-bottom: 10px; color: var(--accent); }
.hero-feature-card h4 { font-weight: 700; font-size: 0.9rem; color: var(--ink-strong); margin-bottom: 6px; }
.hero-feature-card p { font-size: 0.8rem; color: var(--ink-dim); line-height: 1.5; }

/* Nested services pill strip */
.nested-services-pill {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}


/* ==================== TABBED PANEL LAYOUT & COMPONENT SYSTEMS ==================== */

.tabbed-panel-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  min-height: 480px;
}

.tab-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid var(--border);
  padding-right: 20px;
}

.tab-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--ink-dim);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-align: left;
}

.tab-btn:hover {
  color: var(--accent);
  background: var(--accent-dim);
  padding-left: 18px;
}

.tab-btn.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(var(--accent-rgb), 0.12);
  font-weight: 700;
  padding-left: 18px;
}

.tab-btn i {
  font-size: 1.2rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.tab-btn.active i {
  color: var(--accent);
}

.tab-sheet {
  display: none;
  animation: fadeIn 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tab-sheet.active {
  display: block;
}

/* Premium Profile Photo Upload Widget */
.avatar-upload-widget {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  border: 3px solid rgba(var(--accent-rgb), 0.25);
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s, box-shadow 0.22s;
  margin: 0 auto;
}

.avatar-upload-widget:hover {
  transform: scale(1.04);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.22);
}

.avatar-upload-widget img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.avatar-upload-widget:hover .avatar-upload-overlay {
  opacity: 1;
}

.avatar-upload-overlay i {
  font-size: 1.3rem;
}

/* ---- Tablet Settings Tabs Adjustments ---- */
@media (max-width: 768px) {
  .tabbed-panel-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .tab-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 14px;
    gap: 12px;
  }
  .tab-nav-list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    width: 100%;
  }
  .tab-nav-list::-webkit-scrollbar {
    height: 4px;
  }
  .tab-btn {
    white-space: nowrap;
    width: auto;
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  .tab-btn:hover,
  .tab-btn.active {
    padding-left: 12px;
  }
}

/* ==================== RESPONSIVE ==================== */

/* ---- Tablet & below (960px) ---- */
@media (max-width: 960px) {
  .sidebar-toggle-btn { display: inline-flex; }

  .sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    bottom: 0;
    width: 270px;
    height: calc(100vh - var(--topbar-h));
    z-index: 95;
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.35);
  }

  .main-content { padding: 18px 16px; }
  .grid-columns-2 { grid-template-columns: 1fr; }
  .grid-columns-3 { grid-template-columns: 1fr; }
  .split-layout    { grid-template-columns: 1fr; }
  .stats-row       { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  :root {
    --topbar-h: 58px;
  }
  .topbar { padding: 0 14px; height: var(--topbar-h); }
  .main-content { padding: 14px 12px; }
  .panel { padding: 18px 16px; }
  .luxury-hero { padding: 20px 18px; }
  .luxury-hero h2 { font-size: 1.3rem; }
  .stats-row { grid-template-columns: 1fr; }
  .user-info { display: none; }
  .topbar-brand-text .brand-sub { display: none; }
  .brand-former-suffix { display: none !important; }
  .topbar-brand { min-width: 0; flex-shrink: 1; }
  .topbar-brand-text { min-width: 0; flex-shrink: 1; }
  .salons-grid, .products-grid { grid-template-columns: 1fr; }
  .luxury-table { min-width: 600px; }
  .theme-toggle-btn {
    padding: 0;
    width: 36px;
    justify-content: center;
  }
  .theme-toggle-btn span {
    display: none !important;
  }
}

@media (max-width: 400px) {
  .topbar { padding: 0 10px; }
  .panel { padding: 14px 12px; }
  .modal-content { padding: 20px 16px; }
}

/* Hide default password reveal eye in Edge and IE */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none !important;
}

.password-toggle-btn:hover {
  color: var(--accent) !important;
}

/* ==================== GLOBAL GLASSMORPHISM UI ==================== */
.panel, 
.stat-card, 
.topbar, 
.sidebar, 
.modal-box, 
.thread-panel,
.auth-form,
.share-menu,
.dropdown-menu,
.password-toggle-btn {
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.auth-form .form-field {
  margin-bottom: 16px;
}

.form-input,
.form-select,
.form-textarea,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
  background: var(--input-bg) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong) !important;
  transition: all 0.2s ease-in-out;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: var(--calendar-icon-filter);
  cursor: pointer;
}

/* Custom Select Arrow Styling */
select,
select.form-input,
select.form-select,
.form-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238892b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px !important;
  padding-right: 38px !important;
}

select option {
  background-color: var(--surface) !important;
  color: var(--ink-strong) !important;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  background: var(--surface) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-dim) !important;
}

.panel {
  border: 1px solid var(--border-strong);
}

.stat-card {
  border: 1px solid var(--border-strong);
}

/* ==================== DISABLED / READONLY INPUT STATES ==================== */
/* Must use !important to override the global glassmorphism input rule above  */
.form-input:disabled,
.form-input[readonly],
input:disabled,
input[readonly],
select:disabled,
textarea:disabled,
textarea[readonly] {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  background-color: var(--surface-soft) !important;
  border-color: var(--border) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ==================== MODAL SETTINGS GRID ==================== */
/* Extra safety: Collapse any nested settings-tab grids inside modal/panel on narrow screens */
@media (max-width: 720px) {
  .tabbed-panel-layout {
    flex-direction: column;
  }
  .tab-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    gap: 4px;
    padding-bottom: 4px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .tab-sidebar ul.tab-nav-list {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
    min-width: max-content;
  }
  .tab-btn {
    white-space: nowrap;
    min-width: max-content;
  }
}
