/* ============================================
   HOTEL PRO — Advanced UI/UX Design System
   Minimal • Professional • Dark/Light Modes
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;1,14..32,400&display=swap');

/* ============================================
   DESIGN TOKENS — Dark Mode (Default)
   ============================================ */
:root, [data-theme="dark"] {
  /* Backgrounds */
  --bg-body:          #0b0d14;
  --bg-sidebar:       #0d0f17;
  --bg-navbar:        rgba(13, 15, 23, 0.85);
  --bg-card:          #12151f;
  --bg-card-hover:    #181c29;
  --bg-surface:       #191d2b;
  --bg-surface2:      #1f2435;
  --bg-input:         #151924;
  --bg-input-focus:   #1a1f2e;

  /* Borders */
  --border:           rgba(255, 255, 255, 0.08);
  --border-medium:    rgba(255, 255, 255, 0.15);
  --border-focus:     #6366f1;

  /* Text */
  --text-primary:     #f1f5f9;
  --text-secondary:   #94a3b8;
  --text-muted:       #64748b;
  --text-heading:     #ffffff;

  /* Accents */
  --accent:           #6366f1;
  --accent-hover:     #4f46e5;
  --accent-soft:      rgba(99, 102, 241, 0.12);
  --accent-glow:      rgba(99, 102, 241, 0.25);
  --accent-gradient:  linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

  /* Shadows */
  --shadow-sm:        0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:        0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:        0 16px 48px rgba(0,0,0,0.55);
  --shadow-accent:    0 8px 32px rgba(99, 102, 241, 0.3);

  /* Sidebar */
  --sidebar-width:    256px;
  --navbar-height:    64px;

  /* Status */
  --available:        #10b981;
  --available-bg:     rgba(16, 185, 129, 0.14);
  --available-border: rgba(16, 185, 129, 0.3);
  --occupied:         #818cf8;
  --occupied-bg:      rgba(129, 140, 248, 0.14);
  --occupied-border:  rgba(129, 140, 248, 0.3);
  --cleaning:         #fbbf24;
  --cleaning-bg:      rgba(251, 191, 36, 0.14);
  --cleaning-border:  rgba(251, 191, 36, 0.3);
  --maintenance:      #f87171;
  --maintenance-bg:   rgba(248, 113, 113, 0.14);
  --maintenance-border: rgba(248, 113, 113, 0.3);

  /* Modal */
  --modal-bg:         #12151f;
  --overlay:          rgba(0, 0, 0, 0.65);
}

/* ============================================
   DESIGN TOKENS — Light Mode
   ============================================ */
[data-theme="light"] {
  --bg-body:          #f4f6fa;
  --bg-sidebar:       #ffffff;
  --bg-navbar:        rgba(255, 255, 255, 0.9);
  --bg-card:          #ffffff;
  --bg-card-hover:    #fafbff;
  --bg-surface:       #f1f5f9;
  --bg-surface2:      #e8edf5;
  --bg-input:         #f8faff;
  --bg-input-focus:   #ffffff;

  --border:           #e5e7eb;
  --border-medium:    #d1d5db;
  --border-focus:     #6366f1;

  --text-primary:     #1f2937;
  --text-secondary:   #6b7280;
  --text-muted:       #9ca3af;
  --text-heading:     #111827;

  --accent:           #4f46e5;
  --accent-hover:     #4338ca;
  --accent-soft:      rgba(99, 102, 241, 0.08);
  --accent-glow:      rgba(99, 102, 241, 0.18);
  --accent-gradient:  linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

  --shadow-sm:        0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md:        0 4px 16px rgba(15,23,42,0.08);
  --shadow-lg:        0 16px 48px rgba(15,23,42,0.12);
  --shadow-accent:    0 8px 24px rgba(99, 102, 241, 0.2);

  --available:        #059669;
  --available-bg:     #d1fae5;
  --available-border: #a7f3d0;
  --occupied:         #4f46e5;
  --occupied-bg:      #e0e7ff;
  --occupied-border:  #c7d2fe;
  --cleaning:         #d97706;
  --cleaning-bg:      #fef3c7;
  --cleaning-border:  #fde68a;
  --maintenance:      #dc2626;
  --maintenance-bg:   #fee2e2;
  --maintenance-border: #fecaca;

  --modal-bg:         #ffffff;
  --overlay:          rgba(15, 23, 42, 0.45);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.25);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6, .page-title, .brand-name, .stat-value, .modal-title {
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  color: var(--text-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.page-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-heading);
}

.page-subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.text-muted { color: var(--text-secondary) !important; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.8125rem; }
.text-md { font-size: 0.9375rem; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.tracking-wide { letter-spacing: 0.06em; }

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

/* ============================================
   SIDEBAR
   ======================================/* ============================================
   SIDEBAR COMPONENT (ENHANCED DESIGN SYSTEM)
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 1100;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), width 0.38s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.38s ease, background 0.3s ease;
  overflow: hidden;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  will-change: transform, width;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border-medium);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.05) 0%, transparent 100%);
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-name-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-name {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.02em;
}

.badge-pro {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 0.5625rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 2px;
}

.status-dot-online {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.sidebar-quick-action {
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border-medium);
}

.btn-checkin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 11px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn-checkin:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
  color: #fff;
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

.kbd-hint {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 5px;
  margin-left: auto;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav::-webkit-scrollbar { width: 0; }

.nav-section-label {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.8375rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.nav-item:hover {
  background: var(--accent-soft);
  color: var(--text-heading);
  transform: translateX(4px);
}

.nav-item.active {
  background: linear-gradient(90deg, var(--accent-soft) 0%, rgba(99, 102, 241, 0.05) 100%);
  color: var(--accent);
  font-weight: 700;
  border: 1px solid var(--accent-border);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 60%;
  width: 3.5px;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px var(--accent);
}

.nav-item i {
  font-size: 1.05rem;
  width: 20px;
  flex-shrink: 0;
  text-align: center;
  transition: transform 0.18s ease;
}

.nav-item:hover i {
  transform: scale(1.15);
}

.nav-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
  line-height: 1.2;
}

.nav-badge-active {
  background: var(--occupied-bg);
  color: var(--occupied);
  border: 1px solid var(--occupied-border);
}

.nav-badge-dues {
  background: var(--maintenance-bg);
  color: var(--maintenance);
  border: 1px solid var(--maintenance-border);
}

.nav-badge-shift {
  background: var(--available-bg);
  color: var(--available);
  border: 1px solid var(--available-border);
  display: inline-flex;
  align-items: center;
}

.sidebar-user {
  margin: 8px 10px 10px;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.user-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid var(--bg-sidebar);
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 1px;
}

.btn-logout {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
}

.btn-logout:hover {
  background: var(--maintenance-bg);
  color: #ef4444;
  border-color: var(--maintenance-border);
}

/* Sidebar mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 1099;
  backdrop-filter: blur(2px);
}

/* ============================================
   SIDEBAR COLLAPSED & HIDDEN MODES (DESKTOP)
   ============================================ */
/* Collapsed (Icon-Only Mode) */
.sidebar-collapsed .sidebar,
body.sidebar-collapsed .sidebar {
  width: 68px !important;
}

.sidebar-collapsed .brand-name,
.sidebar-collapsed .brand-version,
.sidebar-collapsed .kbd-hint,
.sidebar-collapsed .btn-checkin span:not(.bi),
.sidebar-collapsed .nav-section-label,
.sidebar-collapsed .nav-item span,
.sidebar-collapsed .user-name,
.sidebar-collapsed .user-role,
body.sidebar-collapsed .brand-name,
body.sidebar-collapsed .brand-version,
body.sidebar-collapsed .kbd-hint,
body.sidebar-collapsed .btn-checkin span:not(.bi),
body.sidebar-collapsed .nav-section-label,
body.sidebar-collapsed .nav-item span,
body.sidebar-collapsed .user-name,
body.sidebar-collapsed .user-role {
  display: none !important;
}

.sidebar-collapsed .sidebar-quick-action,
body.sidebar-collapsed .sidebar-quick-action {
  padding: 10px 8px !important;
}

.sidebar-collapsed .btn-checkin,
body.sidebar-collapsed .btn-checkin {
  padding: 10px !important;
  justify-content: center !important;
  border-radius: 10px !important;
}

.sidebar-collapsed .nav-item,
body.sidebar-collapsed .nav-item {
  justify-content: center !important;
  padding: 11px 0 !important;
}

.sidebar-collapsed .nav-item i,
body.sidebar-collapsed .nav-item i {
  margin: 0 !important;
  font-size: 1.15rem !important;
}

.sidebar-collapsed .sidebar-user,
body.sidebar-collapsed .sidebar-user {
  padding: 12px 10px !important;
  justify-content: center !important;
}

.sidebar-collapsed .btn-logout,
body.sidebar-collapsed .btn-logout {
  margin-left: 0 !important;
}

.sidebar-collapsed .main-wrapper,
body.sidebar-collapsed .main-wrapper {
  margin-left: 68px !important;
}

/* Hidden Mode */
.sidebar-hidden .sidebar,
body.sidebar-hidden .sidebar {
  transform: translateX(-100%) !important;
  box-shadow: none !important;
}

.sidebar-hidden .main-wrapper,
body.sidebar-hidden .main-wrapper {
  margin-left: 0 !important;
}

/* Sidebar Toggle Button Spring Micro-Animations */
#sidebarToggleBtn {
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

#sidebarToggleBtn i {
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.25s ease;
  display: inline-block;
  will-change: transform;
}

#sidebarToggleBtn:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
  transform: scale(1.06);
}

#sidebarToggleBtn:active {
  transform: scale(0.94);
}

/* When Sidebar is Hidden, Rotate Toggle Icon 180 degrees & Glow */
.sidebar-hidden #sidebarToggleBtn,
body.sidebar-hidden #sidebarToggleBtn {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
  box-shadow: 0 0 14px var(--accent-soft);
}

.sidebar-hidden #sidebarToggleBtn i,
body.sidebar-hidden #sidebarToggleBtn i {
  transform: rotate(-180deg) scale(1.1);
  color: var(--accent);
}

/* Click Ripple Pulse Animation */
@keyframes toggleBtnPulse {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(99, 102, 241, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.toggle-pulse {
  animation: toggleBtnPulse 0.4s ease-out;
}

/* ============================================
   MAIN WRAPPER
   ============================================ */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: margin-left;
}

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
  height: var(--navbar-height);
  background: var(--bg-navbar);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.topbar-left { display: flex; align-items: center; gap: 12px; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* Mobile menu toggle */
.btn-menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-menu:hover { background: var(--bg-surface2); color: var(--text-primary); }

/* Search */
.search-wrap {
  position: relative;
  width: 300px;
}

.search-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.875rem;
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  height: 38px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.8125rem;
  padding: 0 12px 0 36px;
  transition: all 0.2s ease;
  outline: none;
  font-family: inherit;
}

.search-wrap input::placeholder { color: var(--text-muted); }

.search-wrap input:focus {
  background: var(--bg-input-focus);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: var(--modal-bg);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 1050;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s ease;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-surface); }

/* Clock */
.topbar-clock {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Theme toggle */
.btn-theme {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9375rem;
}

.btn-theme:hover {
  background: var(--accent-soft);
  border-color: var(--border-focus);
  color: var(--accent);
}

/* Role pill */
.role-pill {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-glow);
  padding: 4px 12px;
  border-radius: 20px;
}

/* ============================================
   PAGE CONTENT
   ============================================ */
.page-body {
  padding: 24px 28px;
  flex: 1;
}

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

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.card:hover { 
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}
.card-body { padding: 22px; }

/* Stat Cards */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  border-color: var(--accent-glow);
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.15);
  transform: translateY(-2px);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.stat-value {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 8px 0 3px;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ============================================
   ROOM GRID CARDS
   ============================================ */
.room-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.room-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  border-radius: 12px 0 0 12px;
}

.room-card.room-available::before  { background: var(--available); }
.room-card.room-occupied::before   { background: var(--occupied); }
.room-card.room-cleaning::before   { background: var(--cleaning); }
.room-card.room-maintenance::before { background: var(--maintenance); }

.room-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.room-card.room-available:hover { border-color: var(--available-border); }
.room-card.room-occupied:hover  { border-color: var(--occupied-border); }
.room-card.room-cleaning:hover  { border-color: var(--cleaning-border); }
.room-card.room-maintenance:hover { border-color: var(--maintenance-border); }

.room-num {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.02em;
}

.room-type {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.room-rate {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.room-guest {
  font-size: 0.75rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-top: 6px;
}

.room-guest-phone {
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.room-balance {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cleaning);
  margin-top: 4px;
}

.room-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 10px;
  text-decoration: none;
}

.room-action.action-checkin {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--occupied-border);
}

.room-action.action-checkin:hover {
  background: var(--accent);
  color: #fff;
}

.room-action.action-checkout {
  background: var(--occupied-bg);
  color: var(--occupied);
  border: 1px solid var(--occupied-border);
}

.room-action.action-checkout:hover {
  background: var(--occupied);
  color: #fff;
}

.room-action.action-clean {
  background: var(--cleaning-bg);
  color: var(--cleaning);
  border: 1px solid var(--cleaning-border);
}

.room-action.action-clean:hover {
  background: var(--cleaning);
  color: #fff;
}

/* ============================================
   BADGES
   ============================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-badge.available   { background: var(--available-bg);   color: var(--available);   border: 1px solid var(--available-border); }
.status-badge.occupied    { background: var(--occupied-bg);    color: var(--occupied);    border: 1px solid var(--occupied-border); }
.status-badge.cleaning    { background: var(--cleaning-bg);    color: var(--cleaning);    border: 1px solid var(--cleaning-border); }
.status-badge.maintenance { background: var(--maintenance-bg); color: var(--maintenance); border: 1px solid var(--maintenance-border); }

/* Legacy support for old badge class */
.badge-status { display: inline-flex; align-items: center; gap: 5px; }
.badge-available   { background: var(--available-bg);   color: var(--available);   border: 1px solid var(--available-border); padding: 4px 10px; border-radius: 20px; font-size: 0.6875rem; font-weight: 700; }
.badge-occupied    { background: var(--occupied-bg);    color: var(--occupied);    border: 1px solid var(--occupied-border);  padding: 4px 10px; border-radius: 20px; font-size: 0.6875rem; font-weight: 700; }
.badge-cleaning    { background: var(--cleaning-bg);    color: var(--cleaning);    border: 1px solid var(--cleaning-border);  padding: 4px 10px; border-radius: 20px; font-size: 0.6875rem; font-weight: 700; }
.badge-maintenance { background: var(--maintenance-bg); color: var(--maintenance); border: 1px solid var(--maintenance-border); padding: 4px 10px; border-radius: 20px; font-size: 0.6875rem; font-weight: 700; }

/* ============================================
   GUEST DIRECTORY ACTION BUTTONS
   ============================================ */
.btn-guest-action {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid transparent !important;
  outline: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* History Action Button */
.btn-action-history {
  background: rgba(99, 102, 241, 0.1) !important;
  color: #6366f1 !important;
  border-color: rgba(99, 102, 241, 0.25) !important;
}

.btn-action-history:hover {
  background: #6366f1 !important;
  color: #ffffff !important;
  border-color: #6366f1 !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35) !important;
  transform: translateY(-1px);
}

/* Book Stay Action Button */
.btn-action-book {
  background: rgba(16, 185, 129, 0.1) !important;
  color: #059669 !important;
  border-color: rgba(16, 185, 129, 0.25) !important;
}

[data-theme="dark"] .btn-action-book {
  color: #10b981 !important;
}

.btn-action-book:hover {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
  transform: translateY(-1px);
}

/* Edit Action Button */
.btn-action-edit {
  background: rgba(100, 116, 139, 0.1) !important;
  color: #475569 !important;
  border-color: rgba(100, 116, 139, 0.2) !important;
}

[data-theme="dark"] .btn-action-edit {
  color: #cbd5e1 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.btn-action-edit:hover {
  background: #475569 !important;
  color: #ffffff !important;
  border-color: #475569 !important;
  box-shadow: 0 4px 12px rgba(71, 85, 105, 0.25) !important;
  transform: translateY(-1px);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary-grad {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99,102,241,0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  letter-spacing: 0.01em;
  font-family: inherit;
}

.btn-primary-grad:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.45);
  color: #fff;
}

.btn-primary-grad:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Old class support */
.btn-saas-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99,102,241,0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  font-family: inherit;
}

.btn-saas-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.45);
  color: #fff;
}

/* ============================================
   TABLES
   ============================================ */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead th {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  padding: 13px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table thead th:first-child { border-radius: 12px 0 0 0; }
.data-table thead th:last-child  { border-radius: 0 12px 0 0; }

.data-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.8375rem;
  vertical-align: middle;
  transition: background 0.15s ease;
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr:hover td { background: var(--bg-surface); }

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control,
.form-select {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: 9px;
  color: var(--text-primary);
  font-size: 0.8375rem;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}

textarea.form-control {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
}

.form-control::placeholder { color: var(--text-muted); }

.form-control:focus,
.form-select:focus {
  background: var(--bg-input-focus);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-group {
  display: flex;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--border-medium);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.875rem;
  border: none;
  flex-shrink: 0;
}

.input-group .form-control {
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.input-group .form-control:focus { box-shadow: none; }

/* ============================================
   MODALS
   ============================================ */
.modal-content {
  background: var(--modal-bg) !important;
  border: 1px solid var(--border-medium) !important;
  border-radius: 16px !important;
  box-shadow: var(--shadow-lg) !important;
  color: var(--text-primary) !important;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border) !important;
}

.modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading) !important;
}

.modal-body { padding: 20px 24px; }

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border) !important;
}

.btn-close {
  filter: var(--btn-close-filter, invert(0.5));
}

/* ============================================
   TABS
   ============================================ */
.nav-tabs {
  border-bottom: 1px solid var(--border) !important;
  gap: 2px;
}

.nav-tabs .nav-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: none;
  padding: 8px 16px;
  border-radius: 8px 8px 0 0;
  transition: all 0.15s ease;
  background: transparent;
}

.nav-tabs .nav-link:hover { color: var(--text-primary); }

.nav-tabs .nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-bottom: 2px solid var(--accent);
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress {
  height: 6px;
  background: var(--bg-surface2);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  background: var(--accent-gradient);
  border-radius: 10px;
  transition: width 0.6s ease;
}

/* ============================================
   SECTION DIVIDER (floor names etc)
   ============================================ */
.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

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

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.custom-toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  font-size: 0.8125rem;
  font-weight: 500;
}

.custom-toast.toast-success { border-left: 3px solid var(--available); }
.custom-toast.toast-error   { border-left: 3px solid var(--maintenance); }

@keyframes toastIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ============================================
   AUTH PAGE
   ============================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-body);
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  pointer-events: none;
}

.auth-page::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,0.08) 0%, transparent 70%);
  bottom: -150px;
  left: -100px;
  pointer-events: none;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}

/* ============================================
   MISCELLANEOUS UTILITIES
   ============================================ */
.saas-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, background 0.3s ease;
}

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

.mono { font-family: 'JetBrains Mono', 'Courier New', monospace; }

/* ============================================
   RESPONSIVE — Tablet & Mobile
   ============================================ */
@media (max-width: 1024px) {
  :root { --sidebar-width: 240px; }
  .page-body { padding: 20px; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .sidebar-overlay.active { display: block; }

  .main-wrapper { margin-left: 0; }

  .btn-menu { display: flex; }

  .topbar { padding: 0 16px; }

  .search-wrap { width: 200px; }

  .topbar-clock { display: none; }

  .page-body { padding: 16px; }

  .page-header { flex-direction: column; align-items: stretch; }

  .page-header .actions { display: flex; flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 480px) {
  .search-wrap { width: 160px; }
  .role-pill { display: none; }
  .auth-card { padding: 24px 20px; }
}

/* ============================================
   MODAL SCROLLING & RESPONSIVENESS FIX
   ============================================ */
.modal-dialog-scrollable .modal-content {
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.modal-dialog-scrollable .modal-body {
  overflow-y: auto !important;
  flex: 1 1 auto !important;
  max-height: calc(90vh - 130px) !important;
  -webkit-overflow-scrolling: touch;
}

.modal-dialog-scrollable .modal-header,
.modal-dialog-scrollable .modal-footer {
  flex-shrink: 0 !important;
}

/* ============================================
   LIGHT & DARK MODE GLOBAL CONTRAST OVERRIDES
   ============================================ */
.table {
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
  background-color: transparent !important;
}

.table th,
.table td {
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

.table thead th {
  color: var(--text-secondary) !important;
  background-color: var(--bg-surface) !important;
  border-bottom: 1px solid var(--border) !important;
}

.table tbody tr:hover {
  background-color: var(--bg-surface) !important;
}

.table-dark,
[data-theme="light"] .table-dark {
  --bs-table-bg: var(--bg-card) !important;
  --bs-table-color: var(--text-primary) !important;
  --bs-table-border-color: var(--border) !important;
  --bs-table-hover-bg: var(--bg-surface) !important;
  background-color: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

.bg-dark,
[data-theme="light"] .bg-dark {
  background-color: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

.text-white,
[data-theme="light"] .text-white {
  color: var(--text-heading) !important;
}

.text-light,
[data-theme="light"] .text-light {
  color: var(--text-primary) !important;
}

.nav-tabs {
  border-bottom-color: var(--border) !important;
}

.nav-tabs .nav-link {
  color: var(--text-secondary) !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  background: transparent !important;
}

.nav-tabs .nav-link:hover {
  color: var(--text-heading) !important;
  border-bottom-color: var(--border-medium) !important;
}

.nav-tabs .nav-link.active {
  color: var(--accent) !important;
  border-bottom-color: var(--accent) !important;
  background: transparent !important;
  font-weight: 600 !important;
}

/* ============================================
   DESIGN SYSTEM UTILITIES & MODERN COMPONENTS
   ============================================ */

/* Utility belt */
.label-upper {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.gap-stack-xs { display: flex; flex-direction: column; gap: 2px; }
.gap-stack-sm { display: flex; flex-direction: column; gap: 6px; }
.gap-stack-md { display: flex; flex-direction: column; gap: 12px; }
.gap-stack-lg { display: flex; flex-direction: column; gap: 20px; }

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.badge-pill {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.6875rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Page Header Actions */
.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ============================================
   SKELETON SHIMMER LOADERS
   ============================================ */
@keyframes skeleton-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-surface2) 50%, var(--bg-surface) 75%);
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: 6px;
  display: block;
}

.skeleton-row  { height: 48px; width: 100%; margin-bottom: 4px; }
.skeleton-text { height: 14px; width: 60%; }
.skeleton-card { height: 110px; width: 100%; border-radius: 12px; }

/* ============================================
   EMPTY STATE COMPONENTS
   ============================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  gap: 12px;
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  background: var(--accent-soft);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 4px;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.empty-state-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-heading);
}

.empty-state-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 340px;
  line-height: 1.5;
}

/* ============================================
   SIDEBAR ICON-ONLY COLLAPSE MODE
   ============================================ */
.sidebar-icon-only {
  --sidebar-width: 64px !important;
}

.sidebar-icon-only .sidebar {
  width: 64px !important;
}

.sidebar-icon-only .brand-name,
.sidebar-icon-only .badge-pro,
.sidebar-icon-only .brand-status,
.sidebar-icon-only .sidebar-quick-action span,
.sidebar-icon-only .sidebar-quick-action .kbd-hint,
.sidebar-icon-only .nav-section-label,
.sidebar-icon-only .nav-item span:not(.nav-badge),
.sidebar-icon-only .kbd-hint,
.sidebar-icon-only .user-info,
.sidebar-icon-only .btn-logout {
  display: none !important;
}

.sidebar-icon-only .sidebar-brand {
  padding: 16px 12px !important;
  justify-content: center !important;
}

.sidebar-icon-only .sidebar-quick-action {
  padding: 10px 8px !important;
}

.sidebar-icon-only .btn-checkin {
  padding: 10px 0 !important;
  justify-content: center !important;
}

.sidebar-icon-only .nav-item {
  justify-content: center !important;
  padding: 10px 0 !important;
  position: relative;
}

.sidebar-icon-only .nav-item i {
  font-size: 1.15rem !important;
  margin: 0 !important;
}

.sidebar-icon-only .sidebar-user {
  padding: 12px 6px !important;
  justify-content: center !important;
}

.sidebar-icon-only .user-avatar-wrap {
  margin: 0 auto !important;
}

/* ============================================
   WHATSAPP & MESSAGING ACTION BUTTONS
   ============================================ */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff !important;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 8px 16px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-whatsapp:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
  background: linear-gradient(135deg, #1fa855 0%, #0e7064 100%);
  color: #ffffff !important;
}

.btn-whatsapp-sm {
  padding: 5px 10px;
  font-size: 0.75rem;
  border-radius: 8px;
  gap: 5px;
}




