/* ============================================================
   HOTEL PMS — MASTER STYLESHEET
   Design: Dark Luxury | Gold Accents | Glassmorphism
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

/* ─── CSS VARIABLES ──────────────────────────────────────── */
:root {
  color-scheme: dark;
  --bg-base:        #0f172a;
  --bg-surface:     rgba(30, 41, 59, 0.7);
  --bg-card:        rgba(30, 41, 59, 0.75);
  --bg-elevated:    rgba(30, 41, 59, 0.85);
  --sidebar-bg:     rgba(15, 23, 42, 0.65);
  --sidebar-width:  260px;

  --gold:           #F59E0B;
  --gold-light:     #FCD34D;
  --gold-dark:      #D97706;
  --gold-glow:      rgba(245, 158, 11, 0.2);

  --text-primary:   #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;

  --border:         rgba(255, 255, 255, 0.1);
  --border-gold:    rgba(245, 158, 11, 0.3);

  --green:          #10B981;
  --green-bg:       rgba(16,185,129,0.12);
  --red:            #EF4444;
  --red-bg:         rgba(239,68,68,0.12);
  --yellow:         #F59E0B;
  --yellow-bg:      rgba(245,158,11,0.12);
  --blue:           #3B82F6;
  --blue-bg:        rgba(59,130,246,0.12);
  --purple:         #8B5CF6;
  --purple-bg:      rgba(139,92,246,0.12);

  --radius:         12px;
  --radius-lg:      16px;
  --radius-xl:      20px;
  --shadow:         0 4px 24px rgba(0,0,0,0.4);
  --shadow-gold:    0 0 30px rgba(245,158,11,0.15);

  --transition:     all 0.25s cubic-bezier(0.4,0,0.2,1);
  --font:           'Inter', sans-serif;
  --font-display:   'Arial Black', 'Inter', sans-serif;
}

/* ─── RESET & BASE ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Prevent buttons from stretching in flex/grid containers */
.btn { align-self: flex-start; width: auto !important; max-width: fit-content; }
.btn.w-full, .btn.btn-block { width: 100% !important; max-width: 100%; align-self: stretch; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.4;
  overflow-x: hidden;
  min-height: 100vh;
  font-size: 13px;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }
select option { background-color: var(--bg-surface) !important; color: var(--text-primary) !important; }

/* ─── LOGIN PAGE ─────────────────────────────────────────── */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  position: relative;
  overflow: hidden;
}

#login-screen::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,0.08) 0%, transparent 70%);
  top: -200px; left: -200px;
  animation: pulse-slow 6s ease-in-out infinite;
}

#login-screen::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.06) 0%, transparent 70%);
  bottom: -150px; right: -150px;
  animation: pulse-slow 8s ease-in-out infinite reverse;
}

.login-card {
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 32px 24px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), 0 0 60px rgba(245,158,11,0.1);
  animation: slideUp 0.6s cubic-bezier(0.4,0,0.2,1);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .logo-icon {
  width: 64px; height: 64px;
  background: transparent;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
  box-shadow: none;
}

.login-logo h1 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.login-logo p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.login-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.form-group { margin-bottom: 8px; }

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  color: var(--text-primary);
  font-size: 12px;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-group select option { background: var(--bg-elevated); }
.form-group textarea { resize: vertical; min-height: 80px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #000;
  box-shadow: 0 4px 16px rgba(245,158,11,0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(245,158,11,0.4);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--bg-card); border-color: var(--gold); color: var(--gold); }

.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover { background: var(--red); color: #fff; }

.btn-success { background: var(--green-bg); color: var(--green); border: 1px solid rgba(16,185,129,0.2); }
.btn-success:hover { background: var(--green); color: #fff; }

.btn-sm { padding: 4px 8px; font-size: 11px; }
.btn-icon { padding: 9px; border-radius: 8px; }

.login-creds {
  margin-top: 20px;
  padding: 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.login-creds p { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

.login-creds .cred-item {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 3px 0;
}

.login-creds .cred-item span { color: var(--gold); font-family: monospace; }

/* ─── APP SHELL ──────────────────────────────────────────── */
#app {
  display: none;
  min-height: 100vh;
  flex-direction: column; /* Changed: stack topnav → content → bottombar */
}

#app.active { display: flex; }

/* ─── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-logo {
  width: 26px; height: 26px;
  background: transparent;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: none;
  flex-shrink: 0;
}

.sidebar-brand h2 { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 0; }
.sidebar-brand p { font-size: 9px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 6px 8px; }

.nav-section-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 7px 6px 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 1px;
  position: relative;
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--gold-glow);
  color: var(--gold);
  border: 1px solid var(--border-gold);
}

.nav-item.active .nav-icon { color: var(--gold); }

.nav-icon {
  width: 18px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 8px;
  border-top: 1px solid var(--border);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 6px;
}

.user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 11px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 9px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }

.logout-btn-sidebar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  background: var(--red-bg);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius);
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.logout-btn-sidebar:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
  transform: translateY(-1px);
}

/* ─── MAIN CONTENT ───────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: 100vw;
  overflow-x: hidden;
  padding-bottom: 48px;     /* Space for fixed bottombar */
}

/* ─── TOP BAR ────────────────────────────────────────────── */
.topbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.topbar-left h3 { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.topbar-left p { font-size: 10px; color: var(--text-secondary); }

.topbar-right { display: flex; align-items: center; gap: 12px; }

.topbar-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  cursor: pointer;
}

.topbar-btn:hover { border-color: var(--gold); color: var(--gold); }

.topbar-date {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
}

/* ─── PAGE CONTENT ───────────────────────────────────────── */
.page-content { padding: 10px 14px; flex: 1; }

.page { display: none; animation: fadeIn 0.3s ease; }
.page.active { display: block; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.page-title h2 {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-primary);
}

.page-title p { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }

.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ─── STAT CARDS ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  opacity: 0.6;
}

.stat-card:hover { transform: translateY(-2px); border-color: var(--border-gold); box-shadow: var(--shadow-gold); }

.stat-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.stat-info { flex: 1; }
.stat-value { font-size: 18px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 10px; color: var(--text-secondary); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-change { font-size: 10px; margin-top: 4px; font-weight: 600; }
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--red); }

/* ─── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-body { padding: 10px 12px; }

/* ─── GRID LAYOUTS ───────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }

/* ─── TABLES ─────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table thead th {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.data-table tbody tr:hover { background: var(--bg-elevated); }
.data-table tbody tr:last-child { border-bottom: none; }

.data-table tbody td {
  padding: 8px 12px;
  color: var(--text-primary);
  vertical-align: middle;
}

.hk-compact-table th, 
.hk-compact-table td {
  padding: 6px 8px !important;
  font-size: 10px !important;
}

/* ─── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.badge-available    { background: var(--green-bg); color: var(--green); }
.badge-occupied     { background: var(--blue-bg); color: var(--blue); }
.badge-maintenance  { background: rgba(100, 116, 139, 0.15); color: #64748B; }
.badge-reserved     { background: var(--red-bg); color: var(--red); }
.badge-confirmed    { background: var(--green-bg); color: var(--green); }
.badge-pending      { background: var(--yellow-bg); color: var(--yellow); }
.badge-checked-in   { background: var(--blue-bg); color: var(--blue); }
.badge-checked-out  { background: var(--bg-elevated); color: var(--text-secondary); }
.badge-cancelled    { background: var(--red-bg); color: var(--red); }
.badge-paid         { background: var(--green-bg); color: var(--green); }
.badge-unpaid       { background: var(--red-bg); color: var(--red); }
.badge-partial      { background: var(--yellow-bg); color: var(--yellow); }
.badge-clean        { background: var(--green-bg); color: var(--green); }
.badge-dirty        { background: var(--red-bg); color: var(--red); }
.badge-in-progress  { background: var(--yellow-bg); color: var(--yellow); }
.badge-admin        { background: var(--purple-bg); color: var(--purple); }
.badge-receptionist { background: var(--blue-bg); color: var(--blue); }
.badge-housekeeper  { background: var(--green-bg); color: var(--green); }
.badge-superadmin   { background: rgba(245,158,11,0.15); color: var(--gold); }

/* ─── SEARCH & FILTERS ───────────────────────────────────── */
.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.search-box input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px 10px 36px;
  color: var(--text-primary);
  font-size: 13.5px;
  transition: var(--transition);
  outline: none;
}

.search-box input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }

.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.filter-select:focus { border-color: var(--gold); }

/* ─── MODAL ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s ease;
  box-shadow: var(--shadow);
}

.modal-overlay.active .modal { transform: scale(1) translateY(0); }

.modal-lg { max-width: 720px; }
.modal-xl { max-width: 900px; }

.modal-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.modal-body { padding: 24px; }

.modal-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-close {
  background: var(--bg-elevated);
  border: none;
  color: var(--text-secondary);
  width: 30px; height: 30px;
  border-radius: 8px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover { background: var(--red-bg); color: var(--red); }

/* ─── FORM STYLES ────────────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
#res-rooms-container p { grid-column: 1 / -1; margin: 8px 0; }

/* ─── DASHBOARD SPECIFIC ─────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-top: 0;
  margin-bottom: 16px;
}

.chart-container { position: relative; height: 220px; }

.activity-list { list-style: none; }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.activity-text { flex: 1; }
.activity-text strong { font-size: 13px; color: var(--text-primary); font-weight: 600; }
.activity-text p { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.activity-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.quick-action-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quick-action-btn .qa-icon { font-size: 22px; display: block; margin-bottom: 6px; }
.quick-action-btn:hover { background: var(--gold-glow); border-color: var(--border-gold); color: var(--gold); }

/* ─── ROOM GRID ──────────────────────────────────────────── */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.room-tile {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.room-tile:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: var(--shadow-gold); }
.room-tile.status-available { border-left: 3px solid var(--green); }
.room-tile.status-occupied { border-left: 3px solid var(--blue); }
.room-tile.status-maintenance { border-left: 3px solid #64748B; }
.room-tile.status-reserved { border-left: 3px solid var(--red); }

.room-number { font-size: 22px; font-weight: 800; color: var(--text-primary); }
.room-type-label { font-size: 11px; color: var(--text-secondary); margin: 4px 0; }
.room-floor { font-size: 10px; color: var(--text-muted); }

/* ─── BILLING ────────────────────────────────────────────── */
.invoice-preview {
  background: #fff;
  color: #000;
  border-radius: var(--radius);
  padding: 32px;
  font-size: 13px;
  line-height: 1.6;
}

.invoice-preview h1 { font-family: var(--font-display); font-size: 22px; color: #1a1a1a; }
.invoice-header { display: flex; justify-content: space-between; margin-bottom: 24px; }
.invoice-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.invoice-table th { background: #f5f5f5; padding: 8px 12px; text-align: left; font-size: 11px; text-transform: uppercase; }
.invoice-table td { padding: 8px 12px; border-bottom: 1px solid #eee; }
.invoice-total { text-align: right; font-size: 18px; font-weight: 700; color: #D97706; border-top: 2px solid #D97706; padding-top: 12px; }

/* ─── HOUSEKEEPING ───────────────────────────────────────── */
.hk-kanban { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }

.hk-column {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--border);
}

.hk-column-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hk-task-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 8px;
  transition: var(--transition);
  cursor: pointer;
}

.hk-task-card:hover { border-color: var(--gold); }

.hk-room-no { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.hk-task-info { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.hk-assignee { font-size: 11px; color: var(--gold); margin-top: 6px; font-weight: 600; }

/* ─── REPORTS ────────────────────────────────────────────── */
.report-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.report-kpi {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}

.report-kpi .value { font-size: 24px; font-weight: 800; color: var(--gold); }
.report-kpi .label { font-size: 11px; color: var(--text-secondary); margin-top: 4px; text-transform: uppercase; }

/* ─── TABS ───────────────────────────────────────────────── */
.tab-nav {
  display: flex;
  gap: 4px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  width: fit-content;
}

.tab-btn {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active { background: var(--gold); color: #000; }

/* ─── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ─── PROGRESS BAR ───────────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  transition: width 0.6s ease;
}

/* ─── TOAST ──────────────────────────────────────────────── */
.toast-container, #toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999999 !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  z-index: 9999999 !important;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  animation: slideIn 0.3s ease;
  font-size: 13.5px;
  color: var(--text-primary);
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--blue); }

.toast-icon { font-size: 18px; }

/* ─── PRINT STYLES ───────────────────────────────────────── */
@media print {
  .modal-overlay { display: none !important; }
  .main-content { margin-left: 0 !important; }
  body { background: #fff; color: #000; }
  .invoice-preview { box-shadow: none; padding: 0; }
  .page-header { display: none !important; }
  .hpms-sidebar { display: none !important; }
  .hpms-toolbar { display: none !important; }
  .hpms-reports-container { height: auto !important; }
  .hpms-content { padding: 0 !important; background: transparent !important; box-shadow: none !important; }
  #hpms-print-area { padding: 0 !important; background: #fff !important; }
  #hpms-document { box-shadow: none !important; min-height: auto !important; padding: 0 !important; }
}

.hpms-item-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  text-align: left;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 13px;
  transition: 0.2s;
}
.hpms-item-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}
.hpms-item-btn.active {
  background: rgba(59,130,246,0.15);
  color: var(--blue);
  font-weight: 600;
}
.hpms-category.collapsed .hpms-category-items {
  display: none !important;
}
.hpms-category.collapsed .hpms-toggle-icon {
  transform: rotate(-90deg);
}

/* ─── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-slow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.1); opacity: 0.7; }
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .hk-kanban { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }
  .sidebar { transform: translateX(-260px); width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .grid-2, .form-row { grid-template-columns: 1fr; }
  .hk-kanban { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── MISC UTILITIES ─────────────────────────────────────── */
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.fw-700 { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 10px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; gap: 8px; }
.gap-8 { gap: 8px; }
.w-full { width: 100%; }
.separator { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ─── VIEW TOGGLE ────────────────────────────────────────── */
.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}

.view-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}

.view-btn.active { background: var(--bg-card); color: var(--gold); }

/* ─── NUMBER INPUT SPINNER HIDE ──────────────────────────── */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
input[type=number] { -moz-appearance: textfield; }

/* ─── CHART LEGEND ───────────────────────────────────────── */
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.legend-dot { width: 10px; height: 10px; border-radius: 2px; }

/* ─── CHECKIN CARD ───────────────────────────────────────── */
.checkin-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.checkin-card:hover { border-color: var(--gold); }
.checkin-room { font-size: 22px; font-weight: 800; color: var(--gold); width: 60px; text-align: center; }
.checkin-info { flex: 1; }
.checkin-guest { font-size: 15px; font-weight: 600; }
.checkin-dates { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.checkin-actions { display: flex; gap: 8px; }

/* ─── ROOMPLAN GRID TABLE ────────────────────────────────── */
.roomplan-table {
  border-collapse: collapse;
  width: 100%;
}
.roomplan-table th,
.roomplan-table td {
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  padding: 8px;
  min-width: 50px;
}
.roomplan-table th {
  background: var(--bg-elevated);
  font-weight: 600;
}
.roomplan-table td {
  font-weight: 500;
}

/* Remove number input spinners */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
input[type=number] {
  -moz-appearance: textfield;
}

/* Mini Indicators */
.mini-indicators-row { display: flex; gap: 3px; margin-bottom: 4px; }
.btn-mini-indicator {
  font-size: 9.5px;
  padding: 1px 7px;
  height: 18px;
  line-height: 1.2;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 9999px;
  cursor: default;
}
.dark-mode .btn-mini-indicator { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.75); border-color: rgba(255, 255, 255, 0.16); }
.btn-mini-indicator.has-data,
.dark-mode .btn-mini-indicator.has-data,
.opt-btn.has-data {
  background: #38bdf8 !important;
  color: #0f172a !important;
  border-color: #7dd3fc !important;
  font-weight: 700 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6) !important;
}



/* =========================================
   FLOOR PLAN UI (Mabangis Edition)
   ========================================= */

.floor-tab {
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.floor-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.floor-tab.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.fp-room-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.fp-room-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 15px 30px rgba(0,0,0,0.4);
  z-index: 10;
}

.fp-room-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
}

.fp-room-number {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}

.fp-room-type {
  font-size: 12px;
  color: var(--text-secondary, #cbd5e1);
  margin-bottom: 4px;
}

.fp-room-guest {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
  min-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fp-room-details {
  width: 100%;
  font-size: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 8px;
  margin-top: auto;
}

.fp-detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.fp-detail-label { color: #94a3b8; }
.fp-detail-val { color: #fff; font-weight: bold; }

.fp-room-card.status-available { border-top: 3px solid #10B981; }
.fp-room-card.status-occupied { border-top: 3px solid #3B82F6; }
.fp-room-card.status-reserved { border-top: 3px solid #EF4444; }
.fp-room-card.status-dirty { border-top: 3px solid #F59E0B; }
.fp-room-card.status-ooo, .fp-room-card.status-maintenance { border-top: 3px solid #64748B; }

/* =========================================
   FLOOR MAP UI
   ========================================= */

.fm-draggable-room {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: grab;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}
.fm-draggable-room:active { cursor: grabbing; }

.fm-pin {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  color: #fff;
  transition: transform 0.2s;
}

.fm-pin:hover {
  transform: translate(-50%, -50%) scale(1.3);
  z-index: 20;
}

.fm-pin.status-available { background: #10B981; box-shadow: 0 0 15px #10B981; border-color: #059669; }
.fm-pin.status-occupied { background: #3B82F6; box-shadow: 0 0 15px #3B82F6; border-color: #2563EB; }
.fm-pin.status-dirty { background: #F59E0B; box-shadow: 0 0 15px #F59E0B; border-color: #D97706; }
.fm-pin.status-ooo, .fm-pin.status-maintenance { background: #64748B; box-shadow: 0 0 15px #64748B; border-color: #475569; }
.fm-pin.status-assigned, .fm-pin.status-reserved { background: #EF4444; box-shadow: 0 0 15px #EF4444; border-color: #DC2626; }

.fm-pin-tooltip {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.9);
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 11px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  text-align: center;
}

.fm-pin:hover .fm-pin-tooltip {
  opacity: 1;
}


/* ─── LIGHT MODE OVERRIDES ────────────────────────────────── */
:root.light-mode {
  color-scheme: dark;
  /* Make base background slightly darker so the white glass pops */
  --bg-base:        #0f172a; 
  --bg-surface:     rgba(255, 255, 255, 0.7);
  --bg-card:        rgba(255, 255, 255, 0.75);
  --bg-elevated:    rgba(255, 255, 255, 0.85);
  --sidebar-bg:     rgba(255, 255, 255, 0.65);

  --text-primary:   #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;

  /* Neon Lining */
  --system-neon:    var(--gold);
  --border:         var(--system-neon);
  --shadow:         0 8px 32px color-mix(in srgb, var(--system-neon) 25%, transparent);
}

:root.light-mode .card,
:root.light-mode .stat-card,
:root.light-mode .dashboard-card,
:root.light-mode .topbar {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--system-neon);
  /* Inner white highlight for 3D effect + Outer Neon Glow */
  box-shadow: 0 8px 24px color-mix(in srgb, var(--system-neon) 25%, transparent), inset 0 1px 2px rgba(255,255,255,0.9);
  transform: translateZ(0);
}

:root.light-mode .sidebar { 
  background: var(--sidebar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--system-neon); 
  box-shadow: 4px 0 24px color-mix(in srgb, var(--system-neon) 20%, transparent), inset 1px 0 2px rgba(255,255,255,0.9); 
}

/* ─── EXCLUDE LOGIN SCREENS FROM LIGHT MODE ────────────────────────────────── */
#login-screen, #ems-login-screen, #tms-login-screen, #pos-login-screen {
  color-scheme: dark !important;
  --bg-base:        #0f172a !important;
  --bg-surface:     #1e293b !important;
  --bg-card:        #1e293b !important;
  --bg-elevated:    #334155 !important;
  --text-primary:   #f8fafc !important;
  --text-secondary: #94a3b8 !important;
  --text-muted:     #64748b !important;
  --border:         rgba(255,255,255,0.06) !important;
  --system-neon:    transparent !important;
}

#login-screen .login-card, #ems-login-screen .login-card, #tms-login-screen .login-card, #pos-login-screen .login-card {
  border: 1px solid rgba(255,255,255,0.06) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4) !important;
}

/* ─── MOBILE RESPONSIVENESS ────────────────────────────────────────────── */
.mobile-toggle-btn {
  display: none;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  margin-right: 12px;
  padding: 6px 12px;
  line-height: 1;
  transition: all 0.2s ease;
}
.mobile-toggle-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(245,158,11,0.1);
}

@media (max-width: 900px) {
  .mobile-toggle-btn {
    display: inline-block;
  }
  
  .topbar-left {
    display: flex;
    align-items: center;
  }
  
  .topbar-left-text {
    display: flex;
    flex-direction: column;
  }

  /* Sidebar */
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
  }
  
  .main-content {
    margin-left: 0;
    max-width: 100vw;
  }

  /* Grid Layouts */
  .grid-2, .grid-3, .dashboard-grid {
    grid-template-columns: 1fr !important;
  }
  .form-row, .form-row.cols-3 {
    grid-template-columns: 1fr !important;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .mt-16[style*="display: grid"] {
    grid-template-columns: 1fr !important;
  }

  /* Cards and Modals */
  .card-body {
    padding: 12px;
  }
  .modal {
    max-width: 95%;
    margin: 10px auto;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .page-actions {
    width: 100%;
    justify-content: flex-start;
    margin-top: 10px;
  }
  .search-box {
    width: 100%;
  }
  
  /* Housekeeping specific */
  #view-hk-rooms > div[style*="display:flex; gap:16px;"] {
    flex-direction: column;
    height: auto !important;
  }
  #view-hk-rooms .card {
    width: 100% !important;
  }
}


@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
  .topbar-right .topbar-date {
    display: none !important;
  }
}

/* ════════════════════════════════════════════════════════════
   TOP NAV BAR  (replaces sidebar)
   Layout: sticky top, single row, never wraps
   ════════════════════════════════════════════════════════════ */

.topnav {
  position: sticky;
  top: 0;
  z-index: 99999 !important;
  height: 52px;
  min-height: 52px;
  max-height: 52px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  flex-wrap: nowrap;         /* NEVER wrap to second row */
  gap: 0;
  padding: 0 12px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: visible;         /* Dropdowns can overflow */
  flex-shrink: 0;
}

/* ── Brand ────────────────────────────────────────────────── */
.topnav-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-right: 12px;
  border-right: 1px solid var(--border);
  margin-right: 6px;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
}
.topnav-logo { font-size: 18px; flex-shrink: 0; }
.topnav-brand-text { display: flex; flex-direction: column; line-height: 1; }
.topnav-brand-name { font-size: 11px; font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.topnav-brand-sub  { font-size: 8px;  color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }

/* ── Module menu (scrollable, never wraps) ────────────────── */
.topnav-menu {
  display: flex;
  align-items: center;
  gap: 1px;
  flex: 1 1 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  height: 52px;
}
.topnav-menu::-webkit-scrollbar { display: none; }

/* ── Each module group ────────────────────────────────────── */
.topnav-group {
  position: relative;
  flex-shrink: 0;
  height: 52px;
  display: flex;
  align-items: center;
}

/* ── Module trigger button ────────────────────────────────── */
.topnav-group-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  height: 32px;
  background: none;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-family: var(--font);
}
.topnav-group-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border);
}
.topnav-group.tn-open > .topnav-group-btn {
  background: var(--gold-glow);
  color: var(--gold);
  border-color: var(--border-gold);
}
.topnav-caret {
  font-size: 7px;
  opacity: 0.55;
  transition: transform 0.18s ease;
  margin-top: 1px;
}
.topnav-group.tn-open .topnav-caret { transform: rotate(180deg); }

/* ── Dropdown panel ───────────────────────────────────────── */
.topnav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 215px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
  padding: 5px;
  z-index: 9999;
  animation: tnDropIn 0.15s ease;
}
.topnav-group.tn-open > .topnav-dropdown { display: block; }

@keyframes tnDropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.topnav-dropdown .nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}
.topnav-dropdown .nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.topnav-dropdown .nav-item.active {
  background: var(--gold-glow);
  color: var(--gold);
  border-color: var(--border-gold);
}

/* ── Right section: notif + user ─────────────────────────── */
.topnav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
  margin-left: 6px;
  flex-shrink: 0;
}

/* Notification bell wrapper (relative for panel positioning) */
.topnav-notif-wrap {
  position: relative;
}
.topnav-notif-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
}
.topnav-notif-btn:hover { background: rgba(255,255,255,0.12); color: var(--text-primary); }

/* User info chip */
.topnav-user-info {
  display: flex;
  align-items: center;
  gap: 7px;
}
.topnav-user-text { display: flex; flex-direction: column; line-height: 1; }
.topnav-user-text .user-name { font-size: 11px; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.topnav-user-text .user-role { font-size: 9px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

/* ── Mobile hamburger ─────────────────────────────────────── */
.topnav-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  flex-shrink: 0;
}
.topnav-hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ════════════════════════════════════════════════════════════
   BOTTOM STATUS BAR  (fixed at bottom)
   ════════════════════════════════════════════════════════════ */
.bottombar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  z-index: 150;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  gap: 12px;
}

/* LEFT: sign out + page info */
.bottombar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 0;
}
.bottombar-logout-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: var(--red-bg);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 6px;
  color: var(--red);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-family: var(--font);
  flex-shrink: 0;
}
.bottombar-logout-btn:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.bottombar-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}
.bottombar-page-info {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}
.bottombar-page-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.bottombar-sep {
  color: var(--text-muted);
  font-size: 11px;
}
.bottombar-page-sub {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* CENTER: date + time — side by side */
.bottombar-center {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.bottombar-date     { color: var(--gold); font-weight: 700; font-size: 11px; white-space: nowrap; }
.bottombar-date-sep { color: var(--text-muted); font-size: 11px; }
.bottombar-time     { font-size: 11px; color: var(--text-secondary); white-space: nowrap; }

/* RIGHT: print */
.bottombar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.bottombar-print-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: linear-gradient(135deg,rgba(245,158,11,0.15),rgba(245,158,11,0.08));
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 6px;
  color: var(--gold);
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-family: var(--font);
}
.bottombar-print-btn:hover {
  background: linear-gradient(135deg,rgba(245,158,11,0.28),rgba(245,158,11,0.18));
}

/* ── Hide old sidebar + topbar leftovers ──────────────────── */



/* ── Layout fixes ─────────────────────────────────────────── */



/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .topnav-hamburger { display: flex; }
  .topnav-menu {
    display: none;
    position: fixed;
    top: 52px; left: 0; right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    gap: 2px;
    max-height: calc(100vh - 52px - 40px);
    overflow-y: auto;
    z-index: 190;
    height: auto;
  }
  .topnav-menu.mobile-open { display: flex; }
  .topnav-group { height: auto; width: 100%; }
  .topnav-group-btn { width: 100%; justify-content: space-between; height: auto; padding: 8px 10px; }
  .topnav-dropdown {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 2px 0 6px 20px;
    background: transparent;
    animation: none;
  }
  .topnav-right  { display: none; }
  .bottombar-page-sub { display: none; }
}
@media (max-width: 480px) {
  .bottombar-page-info { display: none; }
}


/* =========================================
   PS1 RETRO THEME GLOBAL
   ========================================= */
body, .main-content {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Titles and Headers */
h1, h2, h3, .stat-title, .topnav-brand-name {
  font-family: var(--font) !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
}

/* Global Buttons - Clear Frosted Glass */
.btn {
  border-radius: 9999px !important; /* Oval pill */
  font-family: var(--font) !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  color: #ffffff !important;
  padding: 5px 16px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.2s ease !important;
}

.btn:active, .btn:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

/* Primary Button */
.btn-primary {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #ffffff !important;
}
.btn-primary:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

/* Secondary Button */
.btn-secondary {
  background: rgba(0, 0, 0, 0.3) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Danger Button (Red) */
.btn-danger {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
}

/* Success Button (Green) */
.btn-success {
  background: rgba(16, 185, 129, 0.22) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
}

/* ─── SLIM OVAL TABLE & ACTION BUTTONS (CLEAR FROSTED GLASS) ─── */
.btn-sm,
.data-table .btn,
.btn-action {
  border-radius: 9999px !important; /* Oval pill */
  padding: 2px 10px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
  line-height: 1.2 !important;
  height: 22px !important;
  min-height: 22px !important;
  max-height: 22px !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  color: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  text-transform: uppercase !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.2s ease !important;
}

.btn-sm:hover,
.data-table .btn:hover,
.btn-action:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.38) !important;
  color: #ffffff !important;
}

/* Success Button (IN / Check-in) */
.btn-sm.btn-success,
.data-table .btn-success {
  background: rgba(16, 185, 129, 0.22) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.5) !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25) !important;
}

.btn-sm.btn-success:hover,
.data-table .btn-success:hover {
  background: rgba(16, 185, 129, 0.38) !important;
  color: #ffffff !important;
  border-color: #34d399 !important;
}

/* Danger Button (NO SHOW / Cancel / Delete) */
.btn-sm.btn-danger,
.data-table .btn-danger {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25) !important;
}

.btn-sm.btn-danger:hover,
.data-table .btn-danger:hover {
  background: rgba(239, 68, 68, 0.38) !important;
  color: #ffffff !important;
  border-color: #f87171 !important;
}

/* Secondary Button & Options Button */
.btn-sm.btn-secondary,
.data-table .btn-secondary,
.data-table [onclick*="openGuestOptions"] {
  background: rgba(15, 23, 42, 0.65) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.btn-sm.btn-secondary:hover,
.data-table .btn-secondary:hover,
.data-table [onclick*="openGuestOptions"]:hover {
  background: rgba(30, 41, 59, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  color: #ffffff !important;
}

/* Compact spacing in table cells */
.data-table td .flex-center {
  gap: 4px !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
}

/* Slim & circular icon-only buttons in tables */
.btn-icon-only,
.data-table .btn-icon-only {
  width: 22px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  height: 22px !important;
  padding: 0 !important;
  border-radius: 50% !important; /* Round circle */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  line-height: 1 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.2s ease !important;
}

.btn-icon-only:hover,
.data-table .btn-icon-only:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  transform: scale(1.08) !important;
}

/* Slim Indicators */
.mini-indicators-row {
  display: flex !important;
  gap: 3px !important;
  margin-bottom: 4px !important;
}

.btn-mini-indicator,
.data-table button.btn-mini-indicator {
  font-size: 9.5px !important;
  padding: 1px 7px !important;
  line-height: 1.2 !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  border-radius: 9999px !important; /* Oval pill */
  background: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  box-shadow: none !important;
  cursor: default !important;
  text-transform: capitalize !important;
}

/* Active indicator & option button with data: Light Blue (#38bdf8) */
.btn-mini-indicator.has-data,
.data-table button.btn-mini-indicator.has-data,
.opt-btn.has-data,
#guest-options-modal .opt-btn.has-data {
  background: #38bdf8 !important;
  background-color: #38bdf8 !important;
  color: #0f172a !important;
  border: 1px solid #7dd3fc !important;
  border-color: #7dd3fc !important;
  font-weight: 700 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6) !important;
  text-shadow: none !important;
}

/* Cards & Modals - Plastic Emboss Effect */
.card, .stat-card, .dashboard-card, .modal {
  border: 2px solid #8e918e !important;
  box-shadow: 
    inset 2px 2px 0px #e0e2e0,
    inset -2px -2px 0px #7a7c7a,
    0 10px 30px rgba(0,0,0,0.15) !important;
}

/* Inputs */
input, select, textarea {
  background: #c3c5c3 !important;
  color: #111 !important;
  border: 2px solid #7a7c7a !important;
  border-right-color: #e0e2e0 !important;
  border-bottom-color: #e0e2e0 !important;
  box-shadow: inset 2px 2px 4px rgba(0,0,0,0.1) !important;
  border-radius: 4px !important;
}

input:focus, select:focus {
  border-color: #0d9488 !important;
  outline: none !important;
}



.topnav-group-btn:hover, .nav-item:hover, .nav-item.active {
  color: #0d9488 !important; /* Teal hover */
}

/* Fix Utility Colors for Light Theme */
.text-green { color: #15803d !important; font-weight: bold; } /* Dark Green */
.text-red { color: #b91c1c !important; font-weight: bold; }   /* Dark Red */
.text-gold, .text-cyan { color: #0f766e !important; font-weight: bold; }  /* Dark Teal */

/* Stat Card Subtexts */
.stat-card .text-sm {
  font-weight: 700 !important;
}

/* Weather Widget Tweaks for Contrast */
.ww_current, .ww_forecast {
  color: #000 !important;
  font-weight: 700 !important;
}



/* Ensure small inline styles using var(--gold) also get readable */

/* Maxcloud Official Brand Colors */
.brand-max {
  color: #0F2D52 !important;
  font-weight: 900 !important;
}
.brand-cloud {
  color: #3B96EC !important;
  font-weight: 900 !important;
}

