/* ===================================================================
   BSHM PROPERTY MANAGEMENT SYSTEM (PMS)
   Bachelor of Science in Hospitality Management
   Ultra-Modern Hospitality Design System & Stylesheet
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Brand Luxury Palette — Royal Espresso & Warm Bronze-Gold (Matched to BSHM ISU San Mariano Seal) */
  --navy-950: #17120a;
  --navy-900: #221b0f;
  --navy-800: #332816;
  --navy-700: #4a3a1f;
  --navy-600: #66512c;
  
  --gold-500: #d97706;
  --gold-400: #f59e0b;
  --gold-300: #fbbf24;
  --gold-100: #fef3c7;
  --gold-glow: rgba(245, 158, 11, 0.28);

  --slate-900: #1c1710;
  --slate-800: #292218;
  --slate-700: #443929;
  --slate-600: #5c4f3b;
  --slate-500: #786a54;
  --slate-400: #9c8e78;
  --slate-300: #d6cec0;
  --slate-200: #e8e2d7;
  --slate-100: #f4f0e8;
  --slate-50:  #faf8f4;
  
  /* Status Colors */
  --status-vacant: #10b981;
  --status-vacant-bg: rgba(16, 185, 129, 0.12);
  --status-occupied: #ef4444;
  --status-occupied-bg: rgba(239, 68, 68, 0.12);
  --status-maintenance: #f59e0b;
  --status-maintenance-bg: rgba(245, 158, 11, 0.12);
  --status-cleaning: #06b6d4;
  --status-cleaning-bg: rgba(6, 182, 212, 0.12);

  --primary: #4a3a1f;
  --primary-hover: #332816;
  --primary-light: #fef3c7;
  --accent: #d97706;
  --accent-light: #fffbeb;

  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  /* Typography */
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Elevations & Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 12px 32px rgba(11, 21, 51, 0.06);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Styles */
html {
  font-size: 14px;
  overflow-x: hidden;
}

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

body {
  font-family: var(--font-main);
  background-color: #faf8f4;
  color: var(--slate-800);
  line-height: 1.5;
  font-size: 0.95rem;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--navy-900);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--gold-500);
}

/* ===================================================================
   APP LAYOUT (Sidebar + Main Content Header)
   =================================================================== */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar */
.app-sidebar {
  width: 240px;
  background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
  transition: transform var(--transition-smooth);
}

.sidebar-brand {
  padding: 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  min-height: 66px;
}

.brand-icon {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--navy-950);
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow: 0 4px 14px var(--gold-glow);
  position: relative !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.brand-logo-btn {
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  overflow: hidden !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.brand-logo-btn:hover {
  transform: scale(1.04);
}

.brand-logo-btn.has-photo,
#sidebar-hotel-logo.has-photo,
#login-hotel-logo.has-photo {
  background: #ffffff !important;
  border: 2px solid var(--gold-400) !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25) !important;
}

.brand-logo-btn img,
#sidebar-hotel-logo img,
#login-hotel-logo img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
  border-radius: 50% !important;
  pointer-events: none;
  padding: 0 !important;
  box-sizing: border-box !important;
}

#sidebar-hotel-logo {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  flex-shrink: 0 !important;
  border-radius: 50% !important;
  overflow: hidden !important;
}

#login-hotel-logo {
  overflow: hidden !important;
  border-radius: 50% !important;
  cursor: default !important;
  pointer-events: none !important;
}

.logo-edit-hint {
  display: none !important;
}

.brand-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.brand-text h2 {
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text p {
  font-size: 0.72rem;
  color: var(--gold-300);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav {
  flex: 1;
  padding: 1.25rem 0.85rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-400);
  padding: 0.75rem 0.85rem 0.35rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  color: var(--slate-300);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.92rem;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link svg, .nav-link i {
  font-size: 1.15rem;
  width: 20px;
  text-align: center;
  opacity: 0.85;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  transform: translateX(3px);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.22) 0%, rgba(217, 119, 6, 0.05) 100%);
  color: var(--gold-300);
  font-weight: 600;
  border-left: 3px solid var(--gold-400);
}

.nav-badge {
  margin-left: auto;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 9999px;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.sidebar-footer {
  padding: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
}

.user-snippet {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--navy-600));
  border: 2px solid var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.user-info {
  flex: 1;
  overflow: hidden;
}

.user-info .name {
  font-weight: 600;
  font-size: 0.88rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-info .role-badge {
  display: inline-block;
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold-300);
}

/* Main Content Area */
.app-main {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  background: #faf8f4;
}

/* Header */
.app-header {
  min-height: 50px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.4rem 1rem;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  min-width: 0;
}

.header-title-box {
  min-width: 0;
  flex: 1 1 auto;
}

.header-title-box h1 {
  font-size: 1.05rem;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
}

.header-title-box p {
  font-size: 0.8rem;
  color: var(--slate-500);
}

.header-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  white-space: nowrap;
  min-width: 0;
}

.header-user-panel {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  padding-left: 0.55rem;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  flex: 0 0 auto;
}

.header-user-panel .user-avatar {
  width: 32px;
  height: 32px;
  font-size: 0.72rem;
}

.header-user-info {
  flex: 0 1 auto !important;
  overflow: hidden;
  min-width: 0;
}

.header-user-panel .user-info .name {
  color: #ffffff;
  font-size: 0.78rem;
  max-width: 9rem;
}

.header-user-panel .header-role-badge {
  background: rgba(217, 119, 6, 0.15);
  color: var(--gold-300);
}

.header-signout-btn {
  white-space: nowrap;
  flex: 0 0 auto;
  padding: 0.28rem 0.55rem !important;
  font-size: 0.75rem !important;
  line-height: 1.2;
}

.header-datetime {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

.header-role-switcher {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-light);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-md);
  border: 1px solid #bfdbfe;
}

.header-role-switcher label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
}

.header-role-switcher select {
  background: transparent;
  border: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy-900);
  cursor: pointer;
  outline: none;
}

/* App Page Body */
.page-body {
  padding: 2rem;
  flex: 1;
  min-width: 0;
}

.app-page-footer {
  position: relative;
  margin-top: auto;
  background: #ffffff;
  border-top: 3px solid var(--gold-400);
  box-shadow: 0 -2px 0 var(--navy-900);
  padding: 1rem 2rem;
}

.app-page-footer .footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.app-page-footer .footer-meta {
  font-size: 0.72rem;
  color: var(--slate-500);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-align: center;
  width: 100%;
}

/* ===================================================================
   DASHBOARD STATS & METRICS CARDS
   =================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.15rem 1rem;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.6rem;
  row-gap: 0.15rem;
  align-items: start;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.stat-card.vacant::after { background: var(--status-vacant); }
.stat-card.occupied::after { background: var(--status-occupied); }
.stat-card.revenue::after { background: var(--gold-500); }
.stat-card.complaints::after { background: #8b5cf6; }

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-meta {
  display: contents;
}

.stat-meta .stat-label {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  font-size: 0.72rem;
  color: var(--slate-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-meta .stat-value {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: clamp(1.2rem, 1.45vw, 1.65rem);
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--navy-950);
  line-height: 1.15;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.stat-meta .stat-sub {
  grid-column: 1 / -1;
  grid-row: 3;
  font-size: 0.74rem;
  color: var(--slate-500);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-icon {
  grid-column: 2;
  grid-row: 1;
}

.stat-sub.positive { color: var(--success); font-weight: 600; }
.stat-sub.warning { color: var(--warning); font-weight: 600; }

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: var(--slate-100);
  color: var(--navy-800);
}

.stat-card.vacant .stat-icon { background: var(--status-vacant-bg); color: var(--status-vacant); }
.stat-card.occupied .stat-icon { background: var(--status-occupied-bg); color: var(--status-occupied); }
.stat-card.revenue .stat-icon { background: var(--gold-100); color: var(--gold-500); }
.stat-card.complaints .stat-icon { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }

@media (max-width: 1240px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================================================================
   ROOM RACK / VISUAL GRID (REAL-TIME STATUS MONITORING)
   =================================================================== */
.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
}

.room-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.room-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--slate-300);
}

.room-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.room-number {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy-950);
}

.room-floor-tag {
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--slate-100);
  color: var(--slate-600);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.room-type {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 0.5rem;
}

.room-price {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.85rem;
}

.room-price span {
  font-size: 0.72rem;
  color: var(--slate-500);
  font-weight: 400;
}

.room-guest-info {
  font-size: 0.78rem;
  color: var(--slate-600);
  background: var(--slate-50);
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
  border-left: 2px solid var(--slate-300);
}

.room-guest-info strong {
  color: var(--navy-900);
  display: block;
}

.room-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  width: fit-content;
  margin-top: auto;
}

.room-status-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

/* Status Variations */
.status-vacant {
  background: var(--status-vacant-bg);
  color: var(--status-vacant);
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.status-vacant::before { background: var(--status-vacant); box-shadow: 0 0 6px var(--status-vacant); }

.status-occupied {
  background: var(--status-occupied-bg);
  color: var(--status-occupied);
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.status-occupied::before { background: var(--status-occupied); box-shadow: 0 0 6px var(--status-occupied); }

.status-maintenance {
  background: var(--status-maintenance-bg);
  color: var(--status-maintenance);
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.status-maintenance::before { background: var(--status-maintenance); box-shadow: 0 0 6px var(--status-maintenance); }

.status-cleaning {
  background: var(--status-cleaning-bg);
  color: var(--status-cleaning);
  border: 1px solid rgba(6, 182, 212, 0.25);
}
.status-cleaning::before { background: var(--status-cleaning); box-shadow: 0 0 6px var(--status-cleaning); }

/* Room Card Border Highlights */
.room-card[data-status="Vacant"] { border-top: 4px solid var(--status-vacant); }
.room-card[data-status="Occupied"] { border-top: 4px solid var(--status-occupied); }
.room-card[data-status="Under Maintenance"] { border-top: 4px solid var(--status-maintenance); }
.room-card[data-status="Cleaning"] { border-top: 4px solid var(--status-cleaning); }

/* Filter Tabs */
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  border: 1px solid var(--slate-200);
  background: #ffffff;
  color: var(--slate-600);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-btn:hover {
  background: var(--slate-100);
  color: var(--navy-900);
}

.filter-btn.active {
  background: var(--navy-900);
  color: #ffffff;
  border-color: var(--navy-900);
}

/* ===================================================================
   DATA TABLES & CARD PANELS
   =================================================================== */
#audit-log-panel[hidden] { display: none !important; }

.panel {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
  overflow: hidden;
}

.panel-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.panel-header h3 {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-header p {
  font-size: 0.82rem;
  color: var(--slate-500);
  margin-top: 0.15rem;
}

.panel-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.table-responsive {
  width: 100%;
  overflow-x: hidden;
}

.users-table-wrap {
  overflow-x: hidden;
}

.users-table {
  table-layout: fixed;
  width: 100%;
  font-size: 0.8rem;
}

.users-table th,
.users-table td {
  padding: 0.65rem 0.55rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.users-table th:nth-child(1),
.users-table td:nth-child(1) { width: 22%; }
.users-table th:nth-child(2),
.users-table td:nth-child(2) { width: 10%; }
.users-table th:nth-child(3),
.users-table td:nth-child(3) { width: 13%; }
.users-table th:nth-child(4),
.users-table td:nth-child(4) { width: 16%; }
.users-table th:nth-child(5),
.users-table td:nth-child(5) { width: 12%; }
.users-table th:nth-child(6),
.users-table td:nth-child(6) { width: 8%; }
.users-table th:nth-child(7),
.users-table td:nth-child(7) { width: 8%; }
.users-table th:nth-child(8),
.users-table td:nth-child(8) { width: 11%; }

.users-profile-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  min-width: 0;
}

.users-avatar {
  width: 32px !important;
  height: 32px !important;
  font-size: 0.7rem !important;
  border: 2px solid var(--gold-400);
  box-shadow: 0 2px 6px rgba(15,23,42,0.12);
  flex-shrink: 0;
}

.users-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.users-profile-text {
  min-width: 0;
  overflow: hidden;
}

.users-profile-text strong {
  display: block;
  color: var(--navy-950);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-profile-text span {
  display: block;
  font-size: 0.66rem;
  color: var(--slate-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--navy-900);
}

.users-email {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-pw-box {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--slate-100);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--slate-200);
  max-width: 100%;
}

.users-pw-toggle {
  padding: 0.05rem 0.25rem !important;
  font-size: 0.68rem !important;
  background: #fff !important;
  border: 1px solid var(--slate-300) !important;
  flex-shrink: 0;
}

.users-actions {
  display: flex;
  gap: 0.3rem;
  flex-wrap: nowrap;
}

.users-actions .btn {
  padding: 0.25rem 0.45rem;
  font-size: 0.7rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.data-table th {
  background: var(--slate-50);
  color: var(--slate-600);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid var(--slate-200);
  white-space: nowrap;
}

.data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-700);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: var(--slate-50);
}

/* Tag / Badge Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #059669; }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #dc2626; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.badge-info { background: rgba(59, 130, 246, 0.15); color: #2563eb; }
.badge-secondary { background: var(--slate-100); color: var(--slate-600); }

/* ===================================================================
   BUTTONS & FORM CONTROLS
   =================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  outline: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--navy-800) 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-950) 100%);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.35);
  color: #fff;
}

.btn-accent {
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-500) 100%);
  color: var(--navy-950);
  font-weight: 700;
  box-shadow: 0 2px 8px var(--gold-glow);
}

.btn-accent:hover {
  background: linear-gradient(135deg, var(--gold-500) 0%, #b45309 100%);
  color: #fff;
}

.btn-secondary {
  background: #ffffff;
  color: var(--slate-700);
  border: 1px solid var(--slate-300);
}

.btn-secondary:hover {
  background: var(--slate-100);
  color: var(--navy-900);
  border-color: var(--slate-400);
}

.btn-success {
  background: var(--status-vacant);
  color: #ffffff;
}

.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* Form Elements */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.4rem;
}

.form-control, .form-select {
  width: 100%;
  padding: 0.65rem 0.95rem;
  font-size: 0.9rem;
  font-family: var(--font-main);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--slate-800);
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

.form-control::placeholder {
  color: var(--slate-400);
}

textarea.form-control {
  resize: vertical;
  min-height: 85px;
}

/* ===================================================================
   MODAL DIALOGS
   =================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform var(--transition-smooth);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.modal-dialog > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.modal-dialog.modal-lg {
  max-width: 820px;
}

.modal-backdrop.show .modal-dialog {
  transform: scale(1);
}

.modal-header {
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-header h3 {
  color: #fff;
  font-size: 1.12rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--slate-400);
  font-size: 1.45rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.modal-footer {
  padding: 0.95rem 1.5rem;
  border-top: 3px solid var(--gold-400);
  box-shadow: inset 0 2px 0 var(--navy-900);
  background: var(--slate-50);
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ===================================================================
   INVOICE / FOLIO / BILLING STYLES
   =================================================================== */
.invoice-container {
  background: #ffffff;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  max-width: 800px;
  margin: 0 auto;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--navy-900);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.hotel-logo-text h2 {
  font-size: 1.5rem;
  color: var(--navy-950);
  margin-bottom: 0.25rem;
}

.hotel-logo-text p {
  font-size: 0.8rem;
  color: var(--slate-600);
}

.invoice-badge-title {
  text-align: right;
}

.invoice-badge-title h1 {
  font-size: 1.75rem;
  color: var(--navy-900);
  font-family: var(--font-heading);
}

.invoice-badge-title .inv-number {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--gold-500);
  font-weight: 700;
}

.invoice-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.invoice-meta-col h4 {
  font-size: 0.76rem;
  text-transform: uppercase;
  color: var(--slate-500);
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.invoice-meta-col p {
  font-size: 0.92rem;
  color: var(--slate-800);
  line-height: 1.4;
}

.invoice-summary-box {
  background: var(--slate-50);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  width: 320px;
  margin-left: auto;
  border: 1px solid var(--slate-200);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
  color: var(--slate-700);
}

.summary-row.total-row {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--navy-950);
  border-top: 2px solid var(--navy-900);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

/* ===================================================================
   TOAST NOTIFICATIONS
   =================================================================== */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--navy-900);
  color: #fff;
  padding: 0.9rem 1.35rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.88rem;
  min-width: 300px;
  max-width: 420px;
  border-left: 4px solid var(--gold-400);
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.success { border-color: var(--status-vacant); }
.toast.danger { border-color: var(--danger); }
.toast.info { border-color: var(--info); }

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

/* ===================================================================
   PRINT STYLES FOR INVOICES, FOLIOS & REPORTS
   =================================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 0mm !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 10pt;
    margin: 0 !important;
    padding: 12mm 14mm !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .app-sidebar,
  .app-header,
  .app-page-footer,
  .panel-header,
  .panel-toolbar,
  .filter-tabs,
  .btn,
  .modal-close,
  .no-print {
    display: none !important;
  }
  .app-main {
    margin-left: 0 !important;
    padding: 0 !important;
  }
  .page-body {
    padding: 0 !important;
  }
  .printable-area {
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0;
  }
}

@media (max-width: 1280px) {
  .header-datetime {
    display: none;
  }
  .header-user-panel .user-info .name {
    max-width: 6.5rem;
  }
}

@keyframes urgentFlash {
  0%, 100% { background: #b91c1c; }
  50% { background: #dc2626; }
}

@keyframes urgentPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.urgent-alarm-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1.1rem;
  color: #fff;
  border-radius: var(--radius-md);
  border: 1px solid #fecaca;
  animation: urgentFlash 1s ease-in-out infinite;
  box-shadow: 0 10px 28px rgba(185, 28, 28, 0.28);
}

.urgent-alarm-bar.show {
  display: flex;
}

.header-urgent-bell {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
  animation: urgentPulse 1s ease-in-out infinite;
}

.header-urgent-bell.show {
  display: inline-flex;
}

.nav-link.urgent-alert {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #fecaca !important;
}

.cmp-row-urgent td {
  background: #fef2f2;
}

.stat-card.complaints.urgent-kpi {
  border-color: #fecaca;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}
