/* =============================================
   StayPro — Design System
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── CSS Variables ─── */
:root {
  --drag-color: rgba(99, 102, 241, 0.2);
  --drag-border: #6366f1;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --sidebar-w: 240px;
  --sidebar-collapsed: 68px;
  --header-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1117;
  --bg-secondary: #161b25;
  --bg-card: #1a2035;
  --bg-card-hover: #1f2840;
  --bg-input: #1e2738;
  --border: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(99, 179, 237, 0.5);
  --text: #e8edf5;
  --text-secondary: #8892a4;
  --text-muted: #4a5568;
  --sidebar-bg: #0d1321;
  --sidebar-border: rgba(255, 255, 255, 0.05);
  --header-bg: rgba(13, 19, 33, 0.85);
  --accent: #4f8ef7;
  --accent-hover: #6ba3ff;
  --accent-glow: rgba(79, 142, 247, 0.25);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --gradient-1: linear-gradient(135deg, #4f8ef7 0%, #8b5cf6 100%);
  --gradient-2: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --gradient-3: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --gradient-4: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f0f4f9;
  --bg-secondary: #e8edf5;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafd;
  --bg-input: #f0f4f9;
  --border: rgba(0, 0, 0, 0.07);
  --border-focus: rgba(79, 142, 247, 0.4);
  --text: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #a0aec0;
  --sidebar-bg: #1a2035;
  --sidebar-border: rgba(255, 255, 255, 0.05);
  --header-bg: rgba(240, 244, 249, 0.9);
  --accent: #4f8ef7;
  --accent-hover: #3a7bed;
  --accent-glow: rgba(79, 142, 247, 0.2);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --gradient-1: linear-gradient(135deg, #4f8ef7 0%, #8b5cf6 100%);
  --gradient-2: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --gradient-3: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --gradient-4: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
}

/* ─── Ocean Theme ─── */
[data-theme="ocean"] {
  color-scheme: dark;
  --bg: #061728;
  --bg-secondary: #0a2137;
  --bg-card: #0d2a45;
  --bg-card-hover: #103353;
  --bg-input: #0e2e4a;
  --border: rgba(0, 200, 255, 0.1);
  --border-focus: rgba(0, 200, 255, 0.4);
  --text: #d8f0ff;
  --text-secondary: #7ab8d8;
  --text-muted: #3a6688;
  --sidebar-bg: #040f1a;
  --sidebar-border: rgba(0, 200, 255, 0.06);
  --header-bg: rgba(4, 15, 26, 0.88);
  --accent: #00c8ff;
  --accent-hover: #33d5ff;
  --accent-glow: rgba(0, 200, 255, 0.22);
  --success: #00e5a0;
  --warning: #ffb938;
  --danger: #ff4f6a;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --cyan: #00c8ff;
  --gradient-1: linear-gradient(135deg, #00c8ff 0%, #0070d8 100%);
  --gradient-2: linear-gradient(135deg, #00e5a0 0%, #00c8ff 100%);
  --gradient-3: linear-gradient(135deg, #ffb938 0%, #ff4f6a 100%);
  --gradient-4: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
}

/* ─── Forest Theme ─── */
[data-theme="forest"] {
  color-scheme: dark;
  --bg: #0b1a12;
  --bg-secondary: #0f2118;
  --bg-card: #132a1e;
  --bg-card-hover: #183226;
  --bg-input: #163024;
  --border: rgba(52, 211, 153, 0.1);
  --border-focus: rgba(52, 211, 153, 0.4);
  --text: #d4f0e0;
  --text-secondary: #6db88a;
  --text-muted: #2d6b4a;
  --sidebar-bg: #07120d;
  --sidebar-border: rgba(52, 211, 153, 0.06);
  --header-bg: rgba(7, 18, 13, 0.88);
  --accent: #34d399;
  --accent-hover: #6ee7b7;
  --accent-glow: rgba(52, 211, 153, 0.2);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #a78bfa;
  --pink: #f472b6;
  --cyan: #22d3ee;
  --gradient-1: linear-gradient(135deg, #34d399 0%, #059669 100%);
  --gradient-2: linear-gradient(135deg, #6ee7b7 0%, #22d3ee 100%);
  --gradient-3: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --gradient-4: linear-gradient(135deg, #f472b6 0%, #a78bfa 100%);
}

/* ─── Sunset Theme ─── */
[data-theme="sunset"] {
  color-scheme: dark;
  --bg: #1a0e08;
  --bg-secondary: #22140a;
  --bg-card: #2c1b10;
  --bg-card-hover: #352215;
  --bg-input: #301d12;
  --border: rgba(251, 146, 60, 0.12);
  --border-focus: rgba(251, 146, 60, 0.4);
  --text: #fdf0e5;
  --text-secondary: #c8906a;
  --text-muted: #7a4a2a;
  --sidebar-bg: #110900;
  --sidebar-border: rgba(251, 146, 60, 0.07);
  --header-bg: rgba(17, 9, 0, 0.88);
  --accent: #fb923c;
  --accent-hover: #fdba74;
  --accent-glow: rgba(251, 146, 60, 0.22);
  --success: #4ade80;
  --warning: #fbbf24;
  --danger: #f87171;
  --purple: #c084fc;
  --pink: #fb7185;
  --cyan: #67e8f9;
  --gradient-1: linear-gradient(135deg, #fb923c 0%, #ef4444 100%);
  --gradient-2: linear-gradient(135deg, #fbbf24 0%, #fb923c 100%);
  --gradient-3: linear-gradient(135deg, #f87171 0%, #be123c 100%);
  --gradient-4: linear-gradient(135deg, #fb7185 0%, #c084fc 100%);
}

/* ─── Midnight Purple Theme ─── */
[data-theme="midnight"] {
  color-scheme: dark;
  --bg: #0f0b1e;
  --bg-secondary: #160f2a;
  --bg-card: #1c1435;
  --bg-card-hover: #221a3e;
  --bg-input: #1e1638;
  --border: rgba(167, 139, 250, 0.1);
  --border-focus: rgba(167, 139, 250, 0.4);
  --text: #ede9fe;
  --text-secondary: #a48ec4;
  --text-muted: #5b3d8a;
  --sidebar-bg: #090617;
  --sidebar-border: rgba(167, 139, 250, 0.07);
  --header-bg: rgba(9, 6, 23, 0.9);
  --accent: #a78bfa;
  --accent-hover: #c4b5fd;
  --accent-glow: rgba(167, 139, 250, 0.22);
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --purple: #a78bfa;
  --pink: #f472b6;
  --cyan: #67e8f9;
  --gradient-1: linear-gradient(135deg, #a78bfa 0%, #ec4899 100%);
  --gradient-2: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
  --gradient-3: linear-gradient(135deg, #fbbf24 0%, #f87171 100%);
  --gradient-4: linear-gradient(135deg, #f472b6 0%, #a78bfa 100%);
}

/* ─── Rose Gold Theme ─── */
[data-theme="rose"] {
  color-scheme: light;
  --bg: #fdf5f5;
  --bg-secondary: #fce8ea;
  --bg-card: #ffffff;
  --bg-card-hover: #fff5f6;
  --bg-input: #fdf0f1;
  --border: rgba(220, 38, 127, 0.1);
  --border-focus: rgba(244, 114, 182, 0.45);
  --text: #3d1a27;
  --text-secondary: #944d6a;
  --text-muted: #c8929f;
  --sidebar-bg: #3d1a27;
  --sidebar-border: rgba(255, 255, 255, 0.07);
  --header-bg: rgba(253, 245, 245, 0.92);
  --accent: #e11d68;
  --accent-hover: #be185d;
  --accent-glow: rgba(225, 29, 104, 0.18);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #a855f7;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --gradient-1: linear-gradient(135deg, #f472b6 0%, #e11d68 100%);
  --gradient-2: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
  --gradient-3: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --gradient-4: linear-gradient(135deg, #e879f9 0%, #8b5cf6 100%);
}


/* ─── Reset ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  transition: background var(--transition-slow), color var(--transition-slow);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ─── Sidebar ─── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  transition: width var(--transition-slow);
  overflow: hidden;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .user-details {
  display: none;
}

.sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 0 16px;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 12px;
}

.sidebar.collapsed .user-info {
  justify-content: center;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: var(--header-h);
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 24px;
  filter: drop-shadow(0 0 8px rgba(79, 142, 247, 0.5));
  flex-shrink: 0;
}

.logo-text {
  font-size: 18px;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color var(--transition), background var(--transition);
}

.sidebar-toggle:hover {
  color: var(--text);
  background: var(--border);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 16px 20px 6px;
  white-space: nowrap;
  overflow: hidden;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: 2px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  flex-shrink: 0;
}

.nav-badge.ai-badge {
  background: rgba(139, 92, 246, 0.2);
  color: var(--purple);
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.user-info:hover {
  background: rgba(255, 255, 255, 0.05);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.user-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* ─── Main Wrapper ─── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  transition: margin-left var(--transition-slow);
  position: relative;
}

body.sidebar-collapsed .main-wrapper {
  margin-left: var(--sidebar-collapsed);
}

/* ─── Header ─── */
.header {
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background var(--transition-slow);
}

.page-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  color: var(--text-secondary);
  transition: border-color var(--transition);
}

.search-box:focus-within {
  border-color: var(--accent);
}

.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  width: 180px;
  font-family: var(--font);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
}

.btn-icon:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-glow);
}

[data-theme="dark"] .icon-moon {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: block;
}

[data-theme="light"] .icon-sun {
  display: none;
}

[data-theme="light"] .icon-moon {
  display: block;
}

[data-theme="ocean"] .icon-moon {
  display: none;
}

[data-theme="ocean"] .icon-sun {
  display: block;
}

[data-theme="forest"] .icon-moon {
  display: none;
}

[data-theme="forest"] .icon-sun {
  display: block;
}

[data-theme="sunset"] .icon-moon {
  display: none;
}

[data-theme="sunset"] .icon-sun {
  display: block;
}

[data-theme="midnight"] .icon-moon {
  display: none;
}

[data-theme="midnight"] .icon-sun {
  display: block;
}

[data-theme="rose"] .icon-sun {
  display: none;
}

[data-theme="rose"] .icon-moon {
  display: block;
}

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid var(--bg);
}

.hotel-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: all var(--transition);
}

.hotel-selector:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

/* ─── Main Content ─── */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 28px;
  height: calc(100vh - var(--header-h));
  scroll-behavior: smooth;
}

/* ─── Cards ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: background var(--transition-slow), box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── KPI Cards ─── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: transform var(--transition), box-shadow var(--transition);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.kpi-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  opacity: 0.08;
  transform: translate(20px, -20px);
}

.kpi-card.blue::after {
  background: var(--accent);
}

.kpi-card.green::after {
  background: var(--success);
}

.kpi-card.yellow::after {
  background: var(--warning);
}

.kpi-card.purple::after {
  background: var(--purple);
}

.kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.kpi-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 20px;
}

.kpi-change.up {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.kpi-change.down {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.kpi-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 22px;
  opacity: 0.6;
}

/* ─── Grid Layouts ─── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.col-span-2 {
  grid-column: span 2;
}

/* ─── Charts ─── */
.chart-container {
  position: relative;
  width: 100%;
}

.chart-container canvas {
  max-width: 100%;
}

/* ─── Tables ─── */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: var(--bg-card-hover);
}

/* ─── Badges / Tags ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge-yellow {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.badge-blue {
  background: rgba(79, 142, 247, 0.15);
  color: var(--accent);
}

.badge-purple {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple);
}

.badge-gray {
  background: rgba(128, 128, 128, 0.15);
  color: var(--text-secondary);
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-xs {
  padding: 4px 9px;
  font-size: 11px;
}

/* ─── Forms ─── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition);
}

.form-control:focus {
  border-color: var(--accent);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

select.form-control {
  cursor: pointer;
  /* Fix for dark theme: force browser to render dropdown with proper colors */
  color-scheme: dark;
}

/* ─── Global select/option dark theme fix ─── */
/* Forces all native selects to render properly in dark mode */
select {
  color-scheme: dark;
  color: var(--text);
  background-color: var(--bg-input);
}

select option {
  background-color: var(--bg-card, #1e2130);
  color: var(--text, #e2e8f0);
}

select option:hover,
select option:focus,
select option:checked {
  background-color: var(--primary, #6366f1);
  color: white;
}

/* Light themes override */
[data-theme="light"] select,
[data-theme="rose"] select {
  color-scheme: light;
  background-color: #ffffff;
  color: #1a1a2e;
}

[data-theme="light"] select option,
[data-theme="rose"] select option {
  background-color: #ffffff;
  color: #1a1a2e;
}

/* Шахматка month selector inline fix */
.chess-board-wrapper select,
.card select {
  color: var(--text);
  background-color: var(--bg-input);
}


/* ─── Progress Bars ─── */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s ease;
}

/* ─── Tabs ─── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  margin-bottom: -1px;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* ─── Toggle Switch ─── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  cursor: pointer;
  transition: background var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--accent);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(20px);
}

/* ─── Chess Board (Шахматка) ─── */
.chess-board-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.chess-board {
  display: grid;
  min-width: max-content;
}

.chess-header-row {
  display: flex;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.chess-room-col {
  width: 120px;
  min-width: 120px;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}

.chess-day-header {
  width: 48px;
  min-width: 48px;
  padding: 10px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  border-right: 1px solid var(--border);
}

.chess-day-header.today {
  color: var(--accent);
  background: var(--accent-glow);
}

.chess-row {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.chess-row:last-child {
  border-bottom: none;
}

.chess-room-label {
  width: 120px;
  min-width: 120px;
  padding: 10px 14px;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chess-room-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.chess-room-type {
  font-size: 11px;
  color: var(--text-muted);
}

.chess-cell {
  width: 48px;
  min-width: 48px;
  height: 52px;
  border-right: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: background var(--transition);
}

.chess-cell:hover {
  background: var(--bg-secondary);
}

.chess-cell.today {
  background: rgba(79, 142, 247, 0.03);
}

.chess-booking {
  position: absolute;
  top: 5px;
  left: 2px;
  right: 2px;
  bottom: 5px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 600;
  color: white;
  overflow: hidden;
  cursor: pointer;
  z-index: 2;
  transition: filter var(--transition);
  white-space: nowrap;
}

.chess-booking:hover {
  filter: brightness(1.15);
}

.chess-booking.booking-occupied {
  background: linear-gradient(90deg, #4f8ef7, #6ba3ff);
}

.chess-booking.booking-checkout {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  color: #1a1a1a;
}

.chess-booking.booking-maintenance {
  background: linear-gradient(90deg, #6b7280, #9ca3af);
}

.chess-booking.booking-reserved {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

/* ─── Channel Cards ─── */
.channel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition);
}

.channel-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.channel-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.channel-info {
  flex: 1;
}

.channel-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.channel-stat {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* ─── AI Cards ─── */
.ai-card {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(79, 142, 247, 0.1) 100%);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius);
  padding: 20px;
}

.ai-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--purple);
  margin-bottom: 12px;
}

/* ─── Pricing Calendar ─── */
.price-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: transform var(--transition);
}

.cal-day:hover {
  transform: scale(1.05);
}

.cal-day-num {
  font-size: 13px;
  font-weight: 700;
}

.cal-day-price {
  font-size: 10px;
  opacity: 0.8;
}

.cal-high {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(239, 68, 68, 0.15));
  color: var(--danger);
}

.cal-medium {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(245, 158, 11, 0.15));
  color: var(--warning);
}

.cal-low {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(16, 185, 129, 0.15));
  color: var(--success);
}

/* ─── Loyalty Points ─── */
.loyalty-bar {
  height: 8px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 6px;
}

.loyalty-fill {
  height: 100%;
  background: var(--gradient-4);
  border-radius: 10px;
  transition: width 0.8s ease;
}

/* ─── Stats Row ─── */
.stats-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.stat-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

/* ─── Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(560px, 90vw);
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all var(--transition);
}

.modal-close:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.modal-body {
  padding: 24px;
}

/* ─── Toast Notifications ─── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  min-width: 280px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideLeft 0.3s ease;
  font-size: 13px;
  color: var(--text);
}

.toast-success {
  border-left: 3px solid var(--success);
}

.toast-warning {
  border-left: 3px solid var(--warning);
}

.toast-error {
  border-left: 3px solid var(--danger);
}

.toast-info {
  border-left: 3px solid var(--accent);
}

/* ─── Subscription Plans ─── */
.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  position: relative;
  transition: all var(--transition);
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.plan-card.popular {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
}

.plan-popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-1);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
}

.plan-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.plan-price {
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
}

.plan-price span {
  font-size: 14px;
  color: var(--text-secondary);
}

.plan-features {
  text-align: left;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.plan-feature .check {
  color: var(--success);
  font-weight: 700;
  width: 16px;
  text-align: center;
}

/* ─── Funnel ─── */
.funnel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.funnel-stage {
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: filter var(--transition);
}

.funnel-stage:hover {
  filter: brightness(1.1);
}

.funnel-label {
  font-size: 13px;
  font-weight: 600;
  color: white;
}

.funnel-value {
  font-size: 18px;
  font-weight: 800;
  color: white;
}

.funnel-rate {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

/* ─── Section Headers ─── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.section-actions {
  display: flex;
  gap: 8px;
}

/* ─── Divider ─── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ─── Housekeeping Grid ─── */
.hk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.hk-room {
  padding: 14px 10px;
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.hk-room:hover {
  transform: translateY(-2px);
}

.hk-room-num {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.hk-room-status {
  font-size: 11px;
  font-weight: 500;
}

.hk-room.clean {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.hk-room.dirty {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.hk-room.cleaning {
  background: rgba(79, 142, 247, 0.1);
  border-color: rgba(79, 142, 247, 0.2);
  color: var(--accent);
}

.hk-room.maintenance {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

/* ─── Animations ─── */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.animate-in {
  animation: fadeIn 0.3s ease, slideUp 0.3s ease;
}

/* ─── Shimmer Loading ─── */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-secondary) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

/* ─── Responsive ─── */
@media (max-width: 1200px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .col-span-2 {
    grid-column: span 1;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-box {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --sidebar-w: 0px;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
    width: 220px;
  }

  .main-wrapper {
    margin-left: 0;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 16px;
  }

  .header {
    padding: 0 16px;
  }

  .hotel-selector {
    display: none;
  }
}

/* ─── Utility ─── */
.flex {
  display: flex;
}

.flex-1 {
  flex: 1;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

.mt-1 {
  margin-top: 4px;
}

.mt-2 {
  margin-top: 8px;
}

.mt-3 {
  margin-top: 12px;
}

.mt-4 {
  margin-top: 16px;
}

.mb-4 {
  margin-bottom: 16px;
}

.mb-6 {
  margin-bottom: 24px;
}

.text-sm {
  font-size: 12px;
}

.text-xs {
  font-size: 11px;
}

.font-bold {
  font-weight: 700;
}

.color-success {
  color: var(--success);
}

.color-warning {
  color: var(--warning);
}

.color-danger {
  color: var(--danger);
}

.color-accent {
  color: var(--accent);
}

.color-muted {
  color: var(--text-muted);
}

.color-secondary {
  color: var(--text-secondary);
}

.text-right {
  text-align: right;
}

.w-full {
  width: 100%;
}

.opacity-60 {
  opacity: 0.6;
}

/* ─── Notification Panel ─── */
.notif-panel {
  position: absolute;
  top: calc(var(--header-h) + 8px);
  right: 16px;
  width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 150;
  animation: slideDown 0.2s ease;
  overflow: hidden;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.notif-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 0;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: var(--bg-card-hover);
}

.notif-item.notif-warning {
  border-left: 3px solid var(--warning);
}

.notif-item.notif-success {
  border-left: 3px solid var(--success);
}

.notif-item.notif-info {
  border-left: 3px solid var(--accent);
}

.notif-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-content {
  flex: 1;
}

.notif-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.notif-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.notif-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.notif-panel>.btn {
  margin: 8px 16px 16px;
  width: calc(100% - 32px);
}

/* ─── Housekeeping Grid ─── */
.hk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.hk-room {
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.hk-room:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hk-room.clean {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
}

.hk-room.dirty {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
}

.hk-room.cleaning {
  background: rgba(79, 142, 247, 0.12);
  border-color: rgba(79, 142, 247, 0.3);
}

.hk-room.maintenance {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
}

.hk-room-num {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.hk-room-status {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ─── Analytics Funnel ─── */
.funnel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.funnel-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: filter var(--transition);
}

.funnel-stage:hover {
  filter: brightness(1.1);
}

.funnel-label {
  font-size: 12.5px;
  font-weight: 600;
}

.funnel-rate {
  font-size: 11px;
  opacity: 0.85;
  margin-top: 2px;
}

.funnel-value {
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}

/* ─── Scrollbar Always Visible ─── */
.main-content::-webkit-scrollbar {
  width: 6px;
}

.main-content::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 10px;
}

.main-content::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 10px;
}

.main-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ─── Section Actions ─── */
.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─── Extra Utility ─── */
.mb-6 {
  margin-bottom: 24px;
}

.text-xs {
  font-size: 11px;
}

.text-sm {
  font-size: 12.5px;
}

.color-muted {
  color: var(--text-muted);
}

.color-secondary {
  color: var(--text-secondary);
}

.color-accent {
  color: var(--accent);
}

.color-success {
  color: var(--success);
}

.color-warning {
  color: var(--warning);
}

.color-danger {
  color: var(--danger);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ─── Theme Picker Panel ─── */
.theme-picker-panel {
  position: absolute;
  top: calc(var(--header-h) + 8px);
  right: 60px;
  width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 150;
  overflow: hidden;
  animation: slideDown 0.2s ease;
}

.theme-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.theme-swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 16px;
}

.theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform var(--transition);
}

.theme-swatch:hover {
  transform: scale(1.06);
}

.theme-swatch.active .theme-preview {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.theme-preview {
  width: 64px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: box-shadow var(--transition);
}

.theme-swatch:hover .theme-preview {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.theme-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
}

/* ─── Nav Tooltips ─── */
.nav-tooltip {
  position: fixed;
  z-index: 500;
  width: 240px;
  transform: translateY(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  pointer-events: auto;
  animation: tooltipIn 0.18s ease;
}

@keyframes tooltipIn {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

.nav-tooltip::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 6px solid var(--bg-card);
}

.nav-tooltip-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.nav-tooltip-body {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.nav-tooltip-help {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(79, 142, 247, 0.12);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.nav-tooltip-help:hover {
  background: rgba(79, 142, 247, 0.22);
}

/* ─── Extra Badges & KPI Colors ─── */
.badge-yellow {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.kpi-card.green {
  border-left: 4px solid var(--success);
}

.kpi-card.red {
  border-left: 4px solid var(--danger);
}

.kpi-card.blue {
  border-left: 4px solid var(--accent);
}

.kpi-card.purple {
  border-left: 4px solid #8b5cf6;
}

.kpi-card.cyan {
  border-left: 4px solid #06b6d4;
}

.kpi-change.up {
  color: var(--success);
}

.kpi-change.down {
  color: var(--danger);
}

/* Liquid Glass Theme (iOS-like) */
[data-theme="liquid-glass"] {
  color-scheme: dark;
  --bg-top: #0a0a0c;
  --bg-bottom: #1c1c1e;
  --bg: #000000;
  --bg-body: linear-gradient(135deg, #0a0a0c 0%, #1c1c1e 100%);
  --bg-card: rgba(28, 28, 30, 0.55);
  --bg-card-hover: rgba(44, 44, 46, 0.6);
  --bg-secondary: rgba(255, 255, 255, 0.08);
  --bg-input: rgba(28, 28, 30, 0.6);
  --border: rgba(255, 255, 255, 0.15);
  --border-light: rgba(255, 255, 255, 0.05);
  --border-focus: rgba(10, 132, 255, 0.4);
  --text: #ffffff;
  --text-secondary: rgba(235, 235, 245, 0.6);
  --text-muted: rgba(235, 235, 245, 0.3);
  --sidebar-bg: rgba(28, 28, 30, 0.4);
  --sidebar-border: rgba(255, 255, 255, 0.1);
  --header-bg: rgba(28, 28, 30, 0.4);

  --primary: #0a84ff;
  --primary-hover: #0070e6;
  --primary-light: rgba(10, 132, 255, 0.15);

  --accent: #5e5ce6;
  --accent-hover: #5250d1;
  --accent-glow: rgba(94, 92, 230, 0.2);

  --success: #32d74b;
  --success-light: rgba(50, 215, 75, 0.15);
  --warning: #ff9f0a;
  --warning-light: rgba(255, 159, 10, 0.15);
  --danger: #ff453a;
  --danger-light: rgba(255, 69, 58, 0.15);

  --purple: #bf5af2;
  --pink: #ff375f;
  --cyan: #64d2ff;

  --gradient-1: linear-gradient(135deg, #0a84ff 0%, #64d2ff 100%);
  --gradient-2: linear-gradient(135deg, #32d74b 0%, #0a84ff 100%);
  --gradient-3: linear-gradient(135deg, #ff9f0a 0%, #ff453a 100%);
  --gradient-4: linear-gradient(135deg, #ff375f 0%, #bf5af2 100%);

  --radius: 18px;
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

[data-theme="liquid-glass"] body {
  background: radial-gradient(circle at 10% 20%, rgba(94, 92, 230, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(10, 132, 255, 0.15) 0%, transparent 40%),
    linear-gradient(135deg, #0a0a0c 0%, #1c1c1e 100%);
  background-attachment: fixed;
}

[data-theme="liquid-glass"] .card,
[data-theme="liquid-glass"] .sidebar,
[data-theme="liquid-glass"] .header,
[data-theme="liquid-glass"] .modal,
[data-theme="liquid-glass"] .stats-card,
[data-theme="liquid-glass"] .kpi-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

[data-theme="liquid-glass"] .form-control {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
}

[data-theme="liquid-glass"] .btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* ═══════════════════════════════════════════
   📱 MOBILE RESPONSIVE — StayPro
   ═══════════════════════════════════════════ */

/* ─── Tablet (768px and below) ─── */
@media (max-width: 768px) {

  /* Sidebar becomes hidden overlay */
  .sidebar {
    transform: translateX(-100%);
    z-index: 9999 !important;
    transition: transform 0.3s ease;
    width: var(--sidebar-w) !important;
    position: fixed !important;
    overflow-y: auto;
  }

  .sidebar.mobile-open {
    transform: translateX(0) !important;
    box-shadow: 6px 0 40px rgba(0, 0, 0, 0.7);
  }

  /* Backdrop when sidebar is open */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    backdrop-filter: blur(3px);
  }

  .sidebar-backdrop.visible {
    display: block;
  }

  /* Main content takes full width */
  .main-wrapper {
    margin-left: 0 !important;
    width: 100%;
  }

  body.sidebar-collapsed .main-wrapper {
    margin-left: 0 !important;
  }

  /* Header mobile */
  .header {
    padding: 0 16px;
    height: 56px;
  }

  .page-title {
    font-size: 15px;
  }

  .breadcrumb {
    display: none;
  }

  /* Hide desktop header clutter on mobile */
  .search-box,
  .world-clock,
  .hotel-selector {
    display: none !important;
  }

  /* Show mobile menu toggle */
  .mobile-menu-btn {
    display: flex !important;
  }

  /* KPI cards stack vertically */
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

  .kpi-card {
    padding: 14px 12px;
  }

  .kpi-value {
    font-size: 22px !important;
  }

  /* 2-col grids become 1-col */
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr !important;
  }

  /* Cards padding reduce */
  .card {
    padding: 14px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Tables scrollable */
  .table-container {
    overflow-x: auto;
  }

  /* Main content padding reduce */
  .main-content {
    padding: 12px !important;
  }

  /* Tabs scrollable */
  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .tab {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 12px;
    padding: 8px 12px;
  }

  /* Section header stacks */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .section-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Chart containers */
  .chart-container {
    height: 200px !important;
  }

  /* Modal full screen on mobile */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* Form controls full width */
  .form-control {
    font-size: 16px;
    /* prevents zoom on iOS */
  }

  /* Buttons smaller */
  .btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* Chess board header */
  .chess-board-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ─── Small phones (480px and below) ─── */
@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }

  .kpi-value {
    font-size: 18px !important;
  }

  .kpi-icon {
    font-size: 20px !important;
  }

  .kpi-label {
    font-size: 10px !important;
  }

  .section-title {
    font-size: 15px;
  }

  .card-title {
    font-size: 14px;
  }

  /* Hide less important elements */
  .btn-icon:not(#notifBtn):not(.mobile-menu-btn) {
    display: none;
  }
}

/* ─── Mobile Menu Button (hidden on desktop) ─── */
.mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  flex-shrink: 0;
}
