/* ============================================================
   MeetBook — Premium CSS
   ============================================================ */
:root {
  /* ---- Light Theme (Default) ---- */
  --primary:        #4F46E5;
  --primary-dark:   #3730A3;
  --primary-light:  #EEF2FF;
  --accent:         #0EA5E9;
  --accent-glow:    rgba(14, 165, 233, 0.2);
  --sidebar-bg:     #1E1B4B;
  --sidebar-text:   #C7D2FE;
  --sidebar-active: #818CF8;
  --sidebar-hover:  rgba(255,255,255,0.06);
  --bg:             #F8FAFC;
  --card:           #FFFFFF;
  --card-border:    #E2E8F0;
  --text:           #0F172A;
  --muted:          #64748B;
  --border:         #E2E8F0;
  --success:        #10B981;
  --success-light:  #D1FAE5;
  --warning:        #F59E0B;
  --warning-light:  #FEF3C7;
  --danger:         #EF4444;
  --danger-light:   #FEE2E2;
  --info:           #3B82F6;
  --info-light:     #DBEAFE;
  --glass-bg:       rgba(255, 255, 255, 0.8);
  --glass-border:   rgba(255, 255, 255, 0.5);
  --shadow-sm:      0 1px 2px rgba(0,0,0,0.05);
  --shadow:         0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-md:      0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --shadow-lg:      0 25px 50px -12px rgba(0,0,0,0.15);
  --radius-sm:      8px;
  --radius:         12px;
  --radius-md:      16px;
  --radius-lg:      20px;
  --radius-xl:      24px;
  --sidebar-w:      220px;
  --topbar-h:       68px;
  --transition:     all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --primary:        #818CF8;
  --primary-dark:   #4F46E5;
  --primary-light:  rgba(129, 140, 248, 0.1);
  --accent:         #06B6D4;
  --bg:             #020617;
  --card:           rgba(30, 41, 59, 0.8);
  --card-border:    rgba(255, 255, 255, 0.1);
  --text:           #F8FAFC;
  --muted:          #94A3B8;
  --border:         rgba(255, 255, 255, 0.1);
  --glass-bg:       rgba(15, 23, 42, 0.8);
  --glass-border:   rgba(255, 255, 255, 0.12);
  --shadow:         0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-md:      0 12px 40px 0 rgba(0, 0, 0, 0.45);
}

/* ---- Scrollbars ---- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
ul { list-style: none; }

/* ---- Layout ---- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), #818CF8);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}
.logo-text {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.sidebar .logo-text {
  color: #fff;
}
.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: var(--sidebar-text);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  line-height: 1;
}
.sidebar-nav {
  flex: 1;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(199,210,254,0.45);
  padding: 10px 8px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.nav-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
  text-decoration: none;
}
.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
  position: relative;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 60%;
  background: #fff;
  border-radius: 0 4px 4px 0;
}
.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}
.nav-item.active .nav-icon,
.nav-item:hover .nav-icon { opacity: 1; }

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.sidebar-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--sidebar-text);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  text-align: left;
}
.sidebar-action-btn svg {
  width: 16px;
  height: 16px;
}
.sidebar-action-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.sidebar-action-btn.logout:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #818CF8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role {
  font-size: 0.75rem;
  color: var(--sidebar-text);
  opacity: 0.6;
}

/* ---- Sidebar Overlay ---- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

/* ---- Main Wrapper ---- */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: var(--transition);
}

/* ---- Mobile Topbar ---- */
.mobile-topbar {
  display: none;
  height: 60px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.user-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-wrapper { margin-left: 0; }
  .mobile-topbar { display: flex; }
  .sidebar-close { display: block; }
  .hamburger { display: block; }
}

/* ---- Desktop Nav ---- */
.desktop-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.desktop-nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  padding: 4px 0;
}
.desktop-nav a:hover { color: var(--primary); }
.desktop-nav a.active { color: var(--primary); }
.desktop-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -22px;
  left: 0; right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
}
@media (max-width: 900px) {
  .desktop-nav { display: none; }
}

/* ---- Main Content ---- */
.main-content {
  flex: 1;
  padding: 28px 28px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ---- Cards ---- */
.card {
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 8px 32px 0 rgba(99, 102, 241, 0.15);
}
.card-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}
.card-subtitle {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}
.card-body {
  padding: 20px 22px;
}
.card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ---- Stat Cards ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 26px; height: 26px; }
.stat-icon.primary { background: var(--primary-light); color: var(--primary); }
.stat-icon.success { background: var(--success-light); color: var(--success); }
.stat-icon.warning { background: var(--warning-light); color: var(--warning); }
.stat-icon.info    { background: var(--info-light); color: var(--info); }
.stat-icon.danger  { background: var(--danger-light); color: var(--danger); }
.stat-info { flex: 1; min-width: 0; }
.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
}
.stat-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn svg { flex-shrink: 0; }

/* Sizes */
.btn-sm  { padding: 7px 12px; font-size: 0.78rem; }
.btn-md  { padding: 10px 18px; font-size: 0.88rem; }
.btn-lg  { padding: 13px 24px; font-size: 0.95rem; }
.btn     { padding: 10px 18px; font-size: 0.88rem; }

/* Variants */
.btn-primary   { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: #e2e8f0; }
.btn-success   { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #059669; }
.btn-danger    { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #DC2626; }
.btn-warning   { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-warning:hover { background: #D97706; }
.btn-info      { background: var(--info); color: #fff; border-color: var(--info); }
.btn-info:hover { background: #2563EB; }
.btn-outline-primary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary-light); }
.btn-outline-danger  { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-outline-danger:hover  { background: var(--danger-light); }
.btn-outline-secondary { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-outline-secondary:hover { background: var(--bg); }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---- Forms ---- */
.form-group { margin-bottom: 18px; }
.form-group:last-child { margin-bottom: 0; }
.form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 10px 13px;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
  -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
.form-control::placeholder { color: #9CA3AF; }
.form-control.is-invalid  { border-color: var(--danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.12); }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; }
.form-hint  { font-size: 0.78rem; color: var(--muted); margin-top: 5px; }
.form-error { font-size: 0.78rem; color: var(--danger); margin-top: 5px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input[type=checkbox] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}
.form-check label { font-size: 0.88rem; cursor: pointer; }

/* ---- Tables ---- */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.table th {
  background: var(--bg);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 11px 16px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1.5px solid var(--border);
}
.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--bg); }
.table tbody tr.cancelled td {
  opacity: 0.55;
  text-decoration: line-through;
}
.table tbody tr.cancelled td .badge,
.table tbody tr.cancelled td .btn { text-decoration: none; opacity: 1; }

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.badge-primary  { background: var(--primary-light); color: var(--primary); }
.badge-success  { background: var(--success-light); color: #047857; }
.badge-warning  { background: var(--warning-light); color: #92400E; }
.badge-danger   { background: var(--danger-light); color: #B91C1C; }
.badge-info     { background: var(--info-light); color: #1D4ED8; }
.badge-muted    { background: var(--border); color: var(--muted); }
.badge-big      { background: #DBEAFE; color: #1D4ED8; }
.badge-small    { background: #D1FAE5; color: #065F46; }
.badge-admin    { background: var(--primary-light); color: var(--primary); }
.badge-client   { background: var(--info-light); color: #1D4ED8; }
.badge-confirmed { background: var(--success-light); color: #047857; }
.badge-cancelled { background: var(--border); color: var(--muted); }

/* ---- Modal ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.22s ease;
}
.modal-box.modal-lg { max-width: 720px; }
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 1.05rem; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  border-radius: 4px;
  line-height: 1;
  transition: var(--transition);
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 20px 22px; }
.modal-footer {
  padding: 14px 22px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ---- Progress Bar ---- */
.progress-wrap { width: 100%; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.progress-bar-bg {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s ease;
}
.progress-bar-fill.green  { background: linear-gradient(90deg, var(--success), #34D399); }
.progress-bar-fill.yellow { background: linear-gradient(90deg, var(--warning), #FCD34D); }
.progress-bar-fill.red    { background: linear-gradient(90deg, var(--danger), #F87171); }

/* ---- Quota Cards ---- */
.quota-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 28px; }
.quota-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.quota-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.quota-category-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.quota-category-icon.big   { background: var(--info-light); }
.quota-category-icon.small { background: var(--success-light); }
.quota-card-title { font-size: 1rem; font-weight: 700; }
.quota-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.quota-stat { text-align: center; }
.quota-stat-value { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.5px; }
.quota-stat-label { font-size: 0.72rem; color: var(--muted); font-weight: 500; margin-top: 2px; }
.quota-over-msg {
  margin-top: 12px;
  padding: 10px 13px;
  background: var(--warning-light);
  border: 1px solid #FDE68A;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: #92400E;
  display: flex; gap: 8px; align-items: flex-start;
}

/* ---- Room Cards ---- */
.rooms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.room-card {
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}
.room-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.room-card-banner {
  height: 8px;
}
.room-card-banner.big   { background: linear-gradient(90deg, #3B82F6, #60A5FA); }
.room-card-banner.small { background: linear-gradient(90deg, #10B981, #34D399); }
.room-card-body { padding: 18px; }
.room-card-name { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.room-card-meta { font-size: 0.82rem; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.room-card-desc { font-size: 0.83rem; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.room-card-amenities { font-size: 0.8rem; color: var(--muted); margin-bottom: 14px; }
.room-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 400px;
  min-width: 280px;
  border-left: 4px solid transparent;
  background: var(--card);
  animation: toastIn 0.3s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
.toast-success { border-color: var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-danger,
.toast-error  { border-color: var(--danger); }
.toast-danger .toast-icon,
.toast-error  .toast-icon  { color: var(--danger); }
.toast-warning { border-color: var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info    { border-color: var(--info); }
.toast-info    .toast-icon { color: var(--info); }
.toast-icon { flex-shrink: 0; line-height: 1; }
.toast-message { font-size: 0.87rem; font-weight: 500; color: var(--text); flex: 1; }
.toast-close {
  background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 2px;
  line-height: 1; flex-shrink: 0;
  border-radius: 4px; transition: var(--transition);
}
.toast-close:hover { background: var(--bg); }

/* ---- Pagination ---- */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  border: 1.5px solid var(--border);
  background: var(--card);
  text-decoration: none;
  transition: var(--transition);
}
.page-link:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); text-decoration: none; }
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-link.disabled { opacity: 0.45; pointer-events: none; }

/* ---- Section header ---- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}
.section-title { font-size: 1.05rem; font-weight: 700; }
.section-subtitle { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }

/* ---- Alert boxes ---- */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  border-left: 4px solid transparent;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.alert-success { background: var(--success-light); border-color: var(--success); color: #065F46; }
.alert-warning { background: var(--warning-light); border-color: var(--warning); color: #92400E; }
.alert-danger  { background: var(--danger-light);  border-color: var(--danger);  color: #B91C1C; }
.alert-info    { background: var(--info-light);    border-color: var(--info);    color: #1E40AF; }

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}
.empty-state-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--muted);
}
.empty-state-icon svg { width: 36px; height: 36px; }
.empty-state-title { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.empty-state-desc  { font-size: 0.88rem; color: var(--muted); margin-bottom: 18px; }

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

/* ---- Filters bar ---- */
.filter-bar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.filter-bar .form-group { margin-bottom: 0; }
.filter-bar .form-label { font-size: 0.78rem; }
.filter-bar .form-control { font-size: 0.84rem; padding: 8px 11px; min-width: 140px; }

/* ---- Booking Layout ---- */
.booking-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
@media (max-width: 1100px) { .booking-layout { grid-template-columns: 1fr; } }

/* ---- Login page ---- */
.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 40%, #4F46E5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.35);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary), #818CF8);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: #fff;
  margin: 0 auto 14px;
}
.login-logo-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.5px; }
.login-logo-sub   { font-size: 0.88rem; color: var(--muted); margin-top: 4px; }

/* ---- Install page ---- */
.install-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 40%, #4F46E5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.install-card {
  background: rgba(255,255,255,0.97);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.35);
  padding: 44px 40px;
  width: 100%;
  max-width: 540px;
}
.install-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 10px 0;
}
.install-step-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 700;
  flex-shrink: 0;
}
.install-step-icon.ok     { background: var(--success-light); color: var(--success); }
.install-step-icon.error  { background: var(--danger-light);  color: var(--danger); }
.install-step-icon.pending{ background: var(--border); color: var(--muted); }

/* ---- Utility ---- */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 4px; }
.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-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.text-muted   { color: var(--muted); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-center  { text-align: center; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.small  { font-size: 0.82rem; }
.w-100  { width: 100%; }
.d-none { display: none; }
.d-block{ display: block; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Booking form stepper ---- */
.booking-steps {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  overflow-x: auto;
}
.booking-step {
  flex: 1;
  text-align: center;
  position: relative;
  min-width: 90px;
}
.booking-step::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.booking-step:last-child::after { display: none; }
.step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 6px;
  position: relative; z-index: 1;
  transition: var(--transition);
}
.booking-step.active .step-num {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.booking-step.done .step-num {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.step-label { font-size: 0.75rem; color: var(--muted); font-weight: 500; }
.booking-step.active .step-label { color: var(--primary); font-weight: 600; }

/* ---- Selectable cards ---- */
.selectable-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
}
.selectable-card:hover { border-color: var(--primary); background: var(--primary-light); }
.selectable-card.selected { border-color: var(--primary); background: var(--primary-light); }

/* ---- Summary info rows ---- */
.info-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.info-row:last-child { border-bottom: 0; }
.info-row-label { color: var(--muted); font-weight: 500; }
.info-row-value { font-weight: 600; }

/* ---- Section category divider ---- */
.category-header {
  display: flex; align-items: center; gap: 12px; margin: 24px 0 14px;
}
.category-header-line { flex: 1; height: 1px; background: var(--border); }
.category-header-title {
  font-size: 0.9rem; font-weight: 700;
  display: flex; align-items: center; gap: 7px;
  color: var(--text);
}

/* ---- Mobile Card View (For Tables) ---- */
.mobile-card-list { display: none; flex-direction: column; gap: 12px; }
.m-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
}
.m-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.m-card-title { font-weight: 700; font-size: 1rem; color: var(--text); }
.m-card-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 0.85rem; }
.m-card-label { color: var(--muted); font-weight: 500; }
.m-card-value { color: var(--text); font-weight: 600; text-align: right; }
.m-card-footer { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }

/* ---- Bottom Navigation ---- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 68px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--glass-border);
  z-index: 900;
  padding: 0 12px;
  justify-content: space-around;
  align-items: center;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 8px;
  transition: var(--transition);
}
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-icon { width: 22px; height: 22px; }

/* ---- Futuristic Hero ---- */
.hero-glass {
  position: relative;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.1) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
}
.hero-glass::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
  animation: rotate 20s linear infinite;
  pointer-events: none;
}
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: flex; }
  .sidebar-overlay.open { display: block; }
  .main-wrapper { margin-left: 0; }
  .hamburger { display: flex; }
  .topbar-username { display: none; }
  .quota-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  
  .main-content { padding-bottom: 90px; } /* Space for bottom nav */
  .bottom-nav { display: flex; }
  .table-responsive.hide-on-mobile { display: none; }
  .mobile-card-list { display: flex; }
}
@media (max-width: 600px) {
  .header-actions { flex-direction: column; align-items: center !important; width: 100%; }
  .header-actions form { display: flex; width: 100%; justify-content: center; }
  .header-actions form input { flex: 1; min-width: 0 !important; }
  .header-actions .btn { width: 100%; justify-content: center; }
  .main-content { padding: 16px; padding-bottom: 90px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .rooms-grid { grid-template-columns: 1fr; }
  .login-card, .install-card { padding: 28px 20px; }
  .filter-bar { flex-direction: column; align-items: center; }
  .filter-bar .form-control { min-width: 100%; }
  .filter-bar .form-group { width: 100%; text-align: center; }
  .topbar { padding: 0 14px; }

  /* Client top nav — center aligned */
  .dashboard-top-nav { flex-direction: column; align-items: center !important; text-align: center; }
  .dashboard-top-nav .sidebar-logo { justify-content: center; }
  .dashboard-top-nav .top-nav-actions { justify-content: center; width: 100%; }
  .dashboard-top-nav .sidebar-logo .logo-text { font-size: 1.1rem !important; }

  /* Section headers — center aligned */
  .section-header { flex-direction: column; align-items: center; text-align: center; }
  .section-header .btn-group { width: 100%; justify-content: center; }
  .section-header .btn-group .btn { flex: 1; justify-content: center; text-align: center; }

  /* Modals */
  .modal-overlay { padding: 10px; }
  .modal-box { border-radius: 14px; }
  .modal-header { padding: 16px; }
  .modal-body { padding: 16px; }
  .modal-footer { padding: 12px 16px; justify-content: center; }

  /* Table/Card */
  .card-header { padding: 14px 16px 12px; flex-direction: column; align-items: center; text-align: center; }
  .card-body { padding: 14px 16px; }

  /* Empty states */
  .empty-state { padding: 32px 16px; }

  /* Mobile card list */
  .m-card { padding: 12px 14px; margin-bottom: 4px; border-radius: 12px; }
  .m-card-header { display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 8px; text-align: left; margin-bottom: 8px; }
  .m-card-title { font-size: 0.95rem; }
  .m-card-body { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; text-align: left; border-top: 1px dashed var(--border); padding-top: 8px; }
  .m-card-label { text-align: left; font-size: 0.8rem; }
  .m-card-value { text-align: right; font-size: 0.8rem; }
  .m-card-footer { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); justify-content: flex-end; }

  /* Pagination */
  .pagination { justify-content: center; }
  .flex-between.flex-wrap { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
}
@media (max-width: 400px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ---- Hero Glass ---- */
.hero-glass {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
}
.hero-glass .hero-name {
  background: linear-gradient(90deg, #fff, rgba(255,255,255,0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-glass p { color: rgba(255,255,255,0.8) !important; }

[data-theme="dark"] .hero-glass {
  background: var(--card);
  border: 1px solid var(--border);
}

/* ---- Utilities ---- */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-capitalize { text-transform: capitalize; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-3 { margin-top: 12px; }
.w-full { width: 100%; }
.p-4 { padding: 16px; }
