@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Smoobu Design System — Primary Blue */
  --primary: #0f62fe;
  --primary-dark: #0043ce;
  --primary-darker: #002d9c;
  --primary-light: #d0e2ff;
  --primary-lightest: #edf5ff;
  --secondary: #4589ff;
  --accent: #0f62fe;

  /* Neutrals - Light Theme */
  --bg-light: #ffffff;
  --bg-lighter: #f7f8fb;
  --bg-lightest: #f6faff;
  --surface: #ffffff;
  --surface-light: #f7f8fb;
  --surface-dark: #e4e7eb;
  --bg-primary: #ffffff;

  /* Text - Light Theme */
  --text-primary: #343a3f;
  --text-secondary: #697077;
  --text-muted: #9199a1;

  /* Status Colors */
  --success: #3bd02f;
  --success-light: #defcdd;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0f62fe;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.10);
  --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.12);

  /* Borders */
  --border-light: #e4e7eb;
  --border-medium: #c1c7cd;
  --border-dark: #878d96;

  /* Border Radius — Smoobu scale */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 40px;

  /* Calendar Variables */
  --calendar-bg: var(--surface);
  --calendar-border-light: var(--border-light);
  --calendar-border-dark: var(--border-medium);
  --calendar-fg-main: var(--primary);
  --calendar-fg-day: var(--text-secondary);
  --calendar-fg-light: var(--text-primary);
  --calendar-today: var(--primary);
  --calendar-today-light: #edf5ff;
  --days: 15;
}

/* ===== DARK MODE ===== */
body.dark-mode {
  background: #0f172a;
  color: #f1f5f9;
  --bg-light: #0f172a;
  --bg-lighter: #0f172a;
  --bg-lightest: #1e293b;
  --surface: #1e293b;
  --surface-light: #263348;
  --surface-dark: #334155;
  --bg-primary: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-light: #334155;
  --border-medium: #475569;
  --border-dark: #64748b;
  --calendar-bg: #1e293b;
  --calendar-border-light: #334155;
  --calendar-border-dark: #475569;
}

body.dark-mode .sidebar {
  background: #1e293b;
  border-right-color: #334155;
}

body.dark-mode .hotel-info {
  border-bottom-color: #334155;
}

body.dark-mode .admin-info {
  background: #263348;
}

body.dark-mode .admin-info:hover {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .header {
  background: transparent;
}

body.dark-mode .date-display {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

body.dark-mode .dashboard-card {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .stats-controls-bar {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .stats-period-btn {
  border-color: #334155;
  color: #94a3b8;
}

body.dark-mode .stats-period-btn:hover {
  background: #263348;
  color: #93c5fd;
}

body.dark-mode .stats-period-btn.active {
  background: var(--primary);
  color: #fff;
}

body.dark-mode .table-container {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode thead {
  background: #263348;
}

body.dark-mode th {
  border-bottom-color: #334155;
  color: #94a3b8;
}

body.dark-mode td {
  border-bottom-color: #334155;
  color: #f1f5f9;
}

body.dark-mode tbody tr:hover {
  background: #263348 !important;
}

body.dark-mode .modal-content {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .modal-close {
  background: #263348;
  color: #94a3b8;
}

body.dark-mode .form-control,
body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode input[type="number"],
body.dark-mode input[type="date"],
body.dark-mode input[type="time"],
body.dark-mode input[type="password"],
body.dark-mode select,
body.dark-mode textarea {
  background: #263348;
  border-color: #334155;
  color: #f1f5f9;
}

body.dark-mode .btn-secondary {
  background: #263348;
  color: #f1f5f9;
  border-color: #334155;
}

body.dark-mode .btn-secondary:hover {
  background: #334155;
  border-color: var(--primary);
}

body.dark-mode .btn-icon {
  background: #263348;
  border-color: #334155;
  color: #94a3b8;
}

body.dark-mode .notification-panel {
  background: #1e293b;
}

body.dark-mode .notification-header {
  background: #263348;
  border-bottom-color: #334155;
}

body.dark-mode .notification-item {
  border-bottom-color: #334155;
}

body.dark-mode .notification-item:hover {
  background: #263348;
}

body.dark-mode .calendar-container {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .cal-nav-btn {
  background: #263348;
  border-color: #334155;
  color: #f1f5f9;
}

body.dark-mode .dropdown-menu-fixed {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .dropdown-item-custom {
  color: #f1f5f9;
  border-bottom-color: #263348;
}

body.dark-mode .dropdown-item-custom:hover {
  background: #263348;
}

body.dark-mode .toast-notification {
  background: #1e293b;
}

body.dark-mode .toast-content {
  color: #f1f5f9;
}

body.dark-mode .reports-nav {
  background: #263348;
}

body.dark-mode .reports-nav button.active {
  background: #1e293b;
}

body.dark-mode #reportsTable tbody tr {
  background: #1e293b;
}

body.dark-mode #reportsTable tbody tr:hover {
  background: #263348;
}

body.dark-mode .availability-grid {
  background: var(--surface);
  border-color: var(--border-light);
}

body.dark-mode .availability-grid tbody tr:hover {
  background: rgba(15, 98, 254, 0.08);
}

body.dark-mode .room-type-cell {
  background: var(--surface-light) !important;
}

body.dark-mode .total-row td {
  background: rgba(15, 98, 254, 0.12) !important;
}

body.dark-mode .nav-item:hover {
  background: #263348;
  color: #f1f5f9;
}

body.dark-mode .new-booking-btn[style*="surface-light"] {
  background: #263348 !important;
  border-color: #334155 !important;
}

body.dark-mode .sidebar-toggle-btn {
  background: #263348;
  border-color: #334155;
  color: #94a3b8;
}

body.dark-mode .nav-section-label {
  color: #475569;
}

/* ===== DARK MODE — JS-generated component overrides ===== */

/* Booking list dropdown */
body.dark-mode .bklist-dropdown-menu {
  background: #1e293b !important;
  border-color: #334155 !important;
}
body.dark-mode .bklist-dropdown-menu a {
  color: #f1f5f9 !important;
}
body.dark-mode .bklist-dropdown-menu a:hover {
  background: #263348 !important;
}

/* Arrivals/Departures dropdown */
body.dark-mode .dropdown-menu-inline {
  background: #1e293b !important;
  border-color: #334155 !important;
}
body.dark-mode .dropdown-item-inline {
  color: #f1f5f9 !important;
}
body.dark-mode .dropdown-item-inline:hover {
  background: #263348 !important;
}

/* Audit log cards */
body.dark-mode .audit-card {
  border-color: #334155 !important;
}
body.dark-mode .audit-card > div[style*="background: white"],
body.dark-mode .audit-card > div[style*="background:white"] {
  background: #1e293b !important;
}
body.dark-mode .audit-card div[style*="background: white"] {
  background: #263348 !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

/* Settings email schedule cards */
body.dark-mode [style*="background: white"][style*="border-radius"],
body.dark-mode [style*="background:white"][style*="border-radius"] {
  background: #1e293b !important;
  border-color: #334155 !important;
}

/* Language dropdown */
body.dark-mode #languageDropdown {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
}
body.dark-mode .language-option {
  color: #f1f5f9 !important;
}
body.dark-mode .language-option:hover {
  background: #263348 !important;
}
body.dark-mode .language-option[style*="background: #f3f4f6"] {
  background: #263348 !important;
}

/* HK stat boxes */
body.dark-mode #housekeepingSection [style*="background: white"],
body.dark-mode #housekeepingSection [style*="background:white"] {
  background: #1e293b !important;
  border-color: #334155 !important;
}

/* Dashboard cards with inline backgrounds */
body.dark-mode .dashboard-card [style*="background: #f8fafc"],
body.dark-mode .dashboard-card [style*="background:#f8fafc"] {
  background: #263348 !important;
}

/* Info/note boxes in settings */
body.dark-mode [style*="background: #f0f9ff"],
body.dark-mode [style*="background:#f0f9ff"] {
  background: #1a2744 !important;
  border-color: #1e429f !important;
}
body.dark-mode [style*="background: #f8fafc"],
body.dark-mode [style*="background:#f8fafc"] {
  background: #263348 !important;
}
body.dark-mode [style*="background: #f1f5f9"],
body.dark-mode [style*="background:#f1f5f9"] {
  background: #1e293b !important;
}

/* Text color overrides for inline dark text */
body.dark-mode [style*="color: #1e293b"],
body.dark-mode [style*="color:#1e293b"] {
  color: #f1f5f9 !important;
}
body.dark-mode [style*="color: #64748b"],
body.dark-mode [style*="color:#64748b"] {
  color: #94a3b8 !important;
}
body.dark-mode [style*="color: #475569"],
body.dark-mode [style*="color:#475569"] {
  color: #94a3b8 !important;
}

/* Guest import / channel manager info boxes */
body.dark-mode [style*="background: white"][style*="padding"] {
  background: #1e293b !important;
  border-color: #334155 !important;
}

/* ===== SIDEBAR COLLAPSE ===== */
/* Transitions are added inline via the existing .sidebar and .main-content rules */

body.sidebar-collapsed .sidebar {
  width: 60px;
}

body.sidebar-collapsed .main-content {
  margin-left: 60px;
}

.sidebar-toggle-btn {
  position: absolute;
  top: 16px;
  right: -14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: white;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  z-index: 110;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.sidebar-toggle-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

body.sidebar-collapsed .sidebar-toggle-btn i {
  transform: rotate(180deg);
}

body.sidebar-collapsed .hotel-info,
body.sidebar-collapsed .nav-item span,
body.sidebar-collapsed .nav-section-label {
  display: none;
}

body.sidebar-collapsed .admin-info {
  justify-content: center;
  padding: 10px 0;
  gap: 0;
}

body.sidebar-collapsed .admin-details {
  display: none;
}

body.sidebar-collapsed .nav-menu {
  padding: 0 8px;
}

body.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 12px 8px;
}

body.sidebar-collapsed .nav-item i {
  margin-right: 0;
  font-size: 20px;
  width: auto;
}

/* ===== NAV SECTION LABELS ===== */
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 12px 12px 4px;
  margin-top: 2px;
}

/* Privacy Mask */
.privacy-mask {
  filter: blur(8px) !important;
  user-select: none !important;
  pointer-events: none !important;
  transition: filter 0.3s ease !important;
}

.privacy-mask-text {
  user-select: none !important;
  letter-spacing: 2px !important;
  color: var(--text-muted) !important;
  opacity: 0.7;
}

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

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-lighter);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== CALENDAR (ResCalendar / Gantt) ===== */
.wrapper {
  max-width: 100%;
  margin: 0 auto;
}

.gantt {
  display: grid;
  width: 100%;
  min-width: 900px;
  border: 0;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  background: var(--calendar-bg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.gantt input[type="date"] {
  border: 1px solid var(--calendar-border-light);
  border-radius: 10px;
  font-size: 12px;
  padding: 8px 10px;
  color: var(--text-primary);
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  background: var(--surface-light);
}

.gantt input[type="date"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.12);
}

.gantt__row {
  display: grid;
  grid-template-columns: 150px 1fr;
  grid-template-rows: 43px;
  border-top: 1px solid var(--calendar-border-dark);
}

.gantt__row--months {
  display: grid;
  grid-template-columns: 150px repeat(var(--days), 1fr);
}

.gantt__row--lines {
  position: absolute;
  bottom: 0;
  height: calc(100% - 43px);
  width: 100%;
  background-color: transparent;
  display: grid;
  grid-template-columns: 150px repeat(var(--days), 1fr);
  border-top: none;
  pointer-events: none;
}

.gantt__row--lines span {
  display: block;
  border-right: 1px solid var(--border-light);
}

.gantt__row--lines span.marker {
  background-color: rgba(15, 98, 254, 0.05);
}

.gantt__row--lines span.today {
  background-color: rgba(14, 165, 233, 0.06);
}

/* Today column overlay — drawn via JS for accurate pixel positioning */
.today-col-overlay {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(14, 165, 233, 0.07);
  border-left: 2px solid rgba(14, 165, 233, 0.85);
  pointer-events: none;
  z-index: 1;
  box-sizing: border-box;
}

/* Room rows need relative positioning so the drag-select overlay is scoped to that row */
.gantt__row--room {
  position: relative;
}

/* Drag-to-select range for blocking dates */
.drag-select-overlay {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(239, 68, 68, 0.12);
  border: 2px solid rgba(239, 68, 68, 0.55);
  pointer-events: none;
  z-index: 3;
  box-sizing: border-box;
  border-radius: 4px;
}

.heading {
  font-size: 16px;
  font-weight: 600;
  margin-left: 10px;
  color: var(--text-primary);
  text-transform: uppercase;
  align-self: center;
  font-family: 'Outfit', sans-serif;
}

.month-view {
  display: flex;
  overflow: hidden;
  align-self: stretch;
  align-items: center;
  gap: 2px;
}

.month-view .light {
  color: var(--text-muted);
}

.day-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px;
}

.day-container span {
  font-size: 10px;
  font-family: 'Outfit', sans-serif;
}

.day-container :first-child {
  font-weight: 600;
}

.day-container:hover {
  background: var(--primary);
  color: white;
  transition: 0.25s all ease-in-out;
}

.grantt__row--days .day-container[day-type="today"] {
  background: var(--calendar-today);
  color: white;
}

.grantt__row--available {
  background-color: var(--surface-light);
  grid-template-rows: 30px;
}

.grantt__row--available .day-container[day-type="today"] {
  background: var(--calendar-today);
  color: white;
}

.grantt__row--available .day-container[day-type="overbook"] {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.room-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 10px;
  overflow: hidden;
  min-width: 0;
}

.room-info label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}

.room-info i {
  font-size: 12px;
  font-weight: 600;
  font-style: normal;
  margin-left: 10px;
}

.room-info span {
  font-size: 10px;
  font-weight: 300;
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
}

.gantt__row-bars {
  list-style: none;
  display: grid;
  height: 43px;
  padding: 0;
  align-items: center;
  align-content: center;
  overflow: hidden;
  grid-template-columns: repeat(calc(var(--days) * 2), 1fr);
  z-index: 2;
}

/* ── Billing screen ── */
.btn-billing-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn-billing-action:hover { opacity: 0.88; transform: translateY(-1px); }

.billing-guest-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.12s;
}
.billing-guest-card:hover { background: var(--bg-lighter); }
.billing-guest-card.active {
  background: var(--primary-lightest);
  border-left: 3px solid var(--primary);
}
.billing-guest-card .bgc-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.billing-guest-card.active .bgc-avatar {
  background: var(--primary);
  color: #fff;
}
.billing-guest-card .bgc-name  { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.billing-guest-card .bgc-sub   { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

.billing-delete-btn {
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid #fecaca;
  background: #fff5f5;
  color: #dc2626;
  cursor: pointer;
  font-size: 12px;
  opacity: 0.6;
  transition: opacity 0.15s, background 0.15s;
}
.billing-delete-btn:hover {
  background: #fee2e2;
  opacity: 1;
  border-color: #dc2626;
}

/* ── Booking bars — Lodgify-style: solid colored bar ── */
.gantt__row-bars li {
  background-color: #3498db; /* overridden per-room via JS */
  color: #fff;
  position: relative;
  cursor: pointer;
  border-radius: 5px;
  height: 30px;
  padding: 0 10px;
  border-left: none;
  box-shadow: none;
  z-index: 5;
  overflow: hidden;
  transition: filter 0.15s, transform 0.12s;
}

.gantt__row-bars li:hover {
  filter: brightness(0.88);
  transform: translateY(-1px);
}

/* Inner layout */
.bar-inner {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 100%;
  overflow: hidden;
}

.bar-name {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  color: rgba(255,255,255,0.95);
}

.bar-nights {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Source icons */
.src-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
  display: block;
}

.src-icon-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  font-size: 7px;
  font-weight: 800;
  background: rgba(0,0,0,0.20);
  color: rgba(255,255,255,0.90);
  letter-spacing: -0.3px;
  flex-shrink: 0;
}

/* stayover-start = booking started before visible window: no left radius */
.gantt__row-bars li.stayover-start {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* stayover-end = booking ends after visible window: no right radius */
.gantt__row-bars li.stayover-end {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* Future bookings — slightly muted */
.gantt__row-bars li.future-booking {
  opacity: 0.82;
}

/* Drag & drop visual feedback */
.gantt__row-bars li.dragging {
  opacity: 0.5;
  cursor: grabbing;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.gantt__row-bars.drop-hover {
  background-color: rgba(52, 152, 219, 0.08);
  outline: 2px dashed rgba(52, 152, 219, 0.4);
  outline-offset: -2px;
  border-radius: 4px;
}

/* Resize handles */
.resize-handle {
  position: absolute;
  top: 0;
  width: 8px;
  height: 100%;
  cursor: ew-resize;
  z-index: 10;
}

.resize-handle.left  { left: 0; border-radius: 4px 0 0 4px; }
.resize-handle.right { right: 0; border-radius: 0 4px 4px 0; }
.resize-handle:hover { background-color: rgba(0, 0, 0, 0.15); }

.gantt__row--room:nth-child(odd) {
  background: var(--surface-light);
}

/* Room type section header rows — standalone, no gantt__row grid conflicts */
.gantt__type-header {
  display: flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--surface-light);
  border-top: 2px solid var(--border-light);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #000;
  min-height: 24px;
}

.gantt__row--nav {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  padding: 8px 10px;
  border-top: 1px solid var(--calendar-border-dark);
  border-bottom: 1px solid var(--calendar-border-dark);
  background: var(--surface-light);
}

.gantt__row--nav::before {
  content: "";
}

.gantt__row--nav .cal-nav-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cal-nav-btn {
  border: 1px solid var(--border-light);
  background: white;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-primary);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  font-family: 'Outfit', sans-serif;
}

.cal-nav-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-1px);
}

#calLabel {
  margin-left: auto;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
}

/* ===== LAYOUT ===== */
.admin-container {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--border-light);
  padding: 0;
  position: fixed;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width 0.25s ease;
}

.hotel-info {
  padding: 20px 12px 16px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.sidebar-logo-container {
  display: block;
  width: 100%;
}

.sidebar-logo-container img,
.sidebar-logo-container #sidebarLogoPlaceholder,
.sidebar-logo-container #sidebarLogoPlaceholder img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 70px;
}

.hotel-info h1 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.hotel-info p {
  font-size: 11px;
  color: var(--text-muted);
}

.admin-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  flex-shrink: 0;
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  transition: background 0.15s ease;
  min-height: 56px;
}

.admin-info:hover {
  background: var(--surface-light);
}

.admin-avatar {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.admin-details {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.admin-details span:first-child {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-details span:last-child {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
  white-space: nowrap;
}

/* Navigation */
.nav-menu {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  margin: 1px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  color: var(--text-secondary);
  text-decoration: none;
  position: relative;
}

.nav-item:hover {
  background: var(--primary-lightest);
  color: var(--primary);
}

.nav-item.active {
  background: var(--primary-lightest);
  color: var(--primary);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.nav-item.active span {
  font-weight: 600;
}

.nav-item i {
  margin-right: 10px;
  width: 18px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}

.nav-item span {
  font-size: 13px;
  font-weight: 500;
}

.logout-btn {
  margin-top: auto;
  margin-bottom: 16px;
  color: var(--danger);
  font-weight: 500;
}

.logout-btn:hover {
  background: #fee2e2;
  color: var(--danger);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  margin-left: 240px;
  padding: 20px 24px;
  transition: margin-left 0.25s ease;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  min-width: 0;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 20px;
}

#mobileMenuBtn {
  display: none;
  border: none;
  background: transparent;
  font-size: 20px;
  color: var(--text-primary);
  margin-right: 10px;
}

.header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.date-display {
  background: white;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  font-weight: 500;
}

.new-booking-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 9px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
}

.new-booking-btn:hover {
  background: var(--primary-dark);
}

/* ===== NAV PROGRESS BAR ===== */
#navProgress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
#navProgress.active {
  opacity: 1;
}
#navProgressBar {
  height: 100%;
  width: 0%;
  background: var(--primary, #0f62fe);
  border-radius: 0 2px 2px 0;
  transition: width 0.25s ease, opacity 0.3s ease;
  box-shadow: 0 0 6px rgba(15, 98, 254, 0.5);
}

/* ===== TABS ===== */
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
  animation: tabFadeIn 0.22s ease;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.dashboard-card {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.dashboard-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  background: var(--primary);
}

.stat-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.stat-change {
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  margin-bottom: 4px;
}

.stat-change.negative,
.stat-change.down  { color: #dc2626; }
.stat-change.up    { color: #16a34a; }
.stat-change.neutral { color: #94a3b8; }

/* ===== STATISTICS TAB ===== */
.stats-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 20px;
}

.stats-period-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
}

.stats-period-btn:hover {
  background: var(--surface-light);
  border-color: var(--primary-light);
  color: var(--primary);
}

.stats-period-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stats-kpi-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px !important;
}

.stats-kpi-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-top: 2px;
}

.stats-kpi-body {
  min-width: 0;
}

.stats-kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.stats-kpi-value {
  font-size: 22px !important;
  letter-spacing: -0.5px;
  margin-bottom: 2px !important;
}

.stats-kpi-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ===== TABLES ===== */
.table-container {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow-x: auto;
  margin-bottom: 24px;
}

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

.table-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

thead {
  background: var(--surface-light);
  border-radius: 12px;
}

th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
}

td {
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 14px;
}

tr {
  transition: background 0.2s ease;
}

tbody tr:hover {
  background: var(--surface-light) !important;
  transition: background 0.15s ease;
}

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

table tbody td { font-size: 13px; }
table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ===== STATUS BADGES ===== */
.status-badge,
.status-confirmed,
.status-pending,
.status-checked-in,
.status-checked-out,
.status-cancelled {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  text-align: center;
}

.status-confirmed {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-checked-in {
  background: rgba(14, 165, 233, 0.15);
  color: var(--info);
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.status-checked-out {
  background: rgba(15, 98, 254, 0.1);
  color: var(--primary);
  border: 1px solid rgba(15, 98, 254, 0.25);
}

.status-cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(15, 98, 254, 0.3);
}

.btn-primary:active {
  background: var(--primary-darker);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: var(--primary-lightest);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.btn-success {
  background: var(--success);
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-success:hover {
  background: #059669;
  box-shadow: 0 4px 12px rgba(59, 208, 47, 0.3);
}

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

.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: white;
}

.btn-outline-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-outline-danger:hover {
  background: var(--danger);
  color: white;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: white;
  color: var(--text-secondary);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-icon:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-icon.btn-delete {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-icon.btn-delete:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.btn-icon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== FORMS ===== */
.form-control,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Manrope', sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch; /* iOS momentum scroll */
  overscroll-behavior: contain;      /* don't scroll page behind modal */
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: scaleIn 0.2s ease;
}

.modal-content.large {
  max-width: 900px;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--surface-light);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  background: var(--danger);
  color: white;
}

/* ===== CALENDAR CONTAINER ===== */
.calendar-container {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

/* ===== CHARTS ===== */
.chart-container {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.chart-container h3 {
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 20px;
  font-weight: 700;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--surface-light);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
  border: 2px solid var(--surface-light);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet & Smaller Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }

  .main-content {
    margin-left: 240px;
    padding: 24px;
  }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {

  /* Sidebar Drawer */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    width: 85%;
    max-width: 320px;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  /* Overlay for Sidebar */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .sidebar-overlay.show {
    display: block;
    opacity: 1;
  }

  /* Main Content Adjustments */
  .main-content {
    margin-left: 0;
    padding: 16px;
    width: 100%;
  }

  /* Header layout — see grid rule in RESPONSIVE HARDENING section below */

  .header h2 {
    font-size: 24px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  /* #mobileMenuBtn — see canonical rule in RESPONSIVE HARDENING section */

  .header-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 12px;
  }

  .date-display {
    font-size: 12px;
    padding: 8px 14px;
    flex: 1;
  }

  .new-booking-btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 20px;
    justify-content: center;
  }

  /* Dashboard Grid - Single Column */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .dashboard-card {
    padding: 20px;
  }

  /* Tables - Better Scroll Experience */
  .table-container {
    padding: 16px;
    margin: 0 -16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  table {
    min-width: 650px;
  }

  th,
  td {
    padding: 14px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  th {
    position: sticky;
    top: 0;
    background: var(--surface-light);
    z-index: 1;
  }

  /* Forms - Stack Vertically */
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .form-actions {
    flex-direction: column-reverse;
    gap: 12px;
  }

  .form-actions .btn-primary,
  .form-actions .btn-secondary,
  .form-actions .btn-danger {
    width: 100%;
    padding: 14px;
  }

  /* Modals - Full Screen Feel */
  .modal-content {
    width: 100%;
    margin: 0;
    padding: 24px 20px;
    max-height: 100vh;
    border-radius: 0;
    border: none;
  }

  .modal-content.large {
    width: 100%;
  }

  .modal-close {
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
  }

  /* Calendar - Better Mobile Scroll */
  .calendar-container {
    padding: 12px;
    margin: 0 -16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .gantt {
    border-radius: 0;
  }

  /* Navigation - Bigger Touch Targets */
  .nav-item {
    padding: 16px 18px;
    margin: 6px 0;
  }

  .nav-item i {
    font-size: 20px;
    width: 24px;
  }

  .nav-item span {
    font-size: 15px;
  }

  /* Buttons - Touch Friendly */
  .btn-primary,
  .btn-secondary,
  .btn-danger {
    padding: 12px 24px;
    font-size: 14px;
    min-height: 44px;
  }

  .btn-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  /* Status Badges - Slightly Larger */
  .status-badge,
  .status-confirmed,
  .status-pending,
  .status-checked-in,
  .status-checked-out,
  .status-cancelled {
    padding: 6px 14px;
    font-size: 13px;
  }

  /* Card Icons - Adjust Size */
  .card-icon {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  /* Stat Values - Adjust Size */
  .stat-value {
    font-size: 32px;
  }
}

/* Very Small Screens (max-width: 480px) */
@media (max-width: 480px) {

  /* Even Smaller Text */
  .header h2 {
    font-size: 20px;
  }

  .stat-value {
    font-size: 28px;
  }

  /* Full Width Buttons */
  .btn-primary,
  .btn-secondary,
  .btn-danger {
    width: 100%;
    padding: 14px;
    font-size: 14px;
  }

  .new-booking-btn {
    width: 100%;
  }

  /* Compact Cards */
  .dashboard-card {
    padding: 16px;
  }

  .card-header h3 {
    font-size: 16px;
  }

  /* Smaller Inputs */
  .form-control,
  input,
  select,
  textarea {
    padding: 12px 14px;
    font-size: 15px;
  }

  /* Compact Table */
  th,
  td {
    padding: 10px 8px;
    font-size: 12px;
  }

  table {
    min-width: 580px;
  }

  /* Compact Modals */
  .modal-content {
    padding: 20px 16px;
  }

  /* Notification Panel */
  .notification-panel {
    width: 100%;
    right: -100%;
  }

  .notification-panel.open {
    right: 0;
  }

  /* Action Buttons Stack */
  .action-buttons {
    flex-direction: column;
    width: 100%;
  }

  .action-buttons .btn-icon {
    width: 100%;
    height: 44px;
    border-radius: 8px;
  }
}

/* ===== UTILITIES ===== */
.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mt-4 {
  margin-top: 32px;
}

.mb-1 {
  margin-bottom: 8px;
}

.mb-2 {
  margin-bottom: 16px;
}

.mb-3 {
  margin-bottom: 24px;
}

.mb-4 {
  margin-bottom: 32px;
}

.p-1 {
  padding: 8px;
}

.p-2 {
  padding: 16px;
}

.p-3 {
  padding: 24px;
}

.p-4 {
  padding: 32px;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 8px;
}

.gap-2 {
  gap: 16px;
}

.gap-3 {
  gap: 24px;
}

.rounded {
  border-radius: 12px;
}

.rounded-lg {
  border-radius: 16px;
}

.rounded-xl {
  border-radius: 20px;
}

.shadow {
  box-shadow: var(--shadow-md);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

.text-sm {
  font-size: 12px;
}

.text-base {
  font-size: 14px;
}

.text-lg {
  font-size: 16px;
}

.text-xl {
  font-size: 20px;
}

.text-2xl {
  font-size: 24px;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

/* ============================================================
   DESIGN SYSTEM — SHARED COMPONENT TOKENS
   Replaces scattered hardcoded values throughout JS/HTML
   ============================================================ */

/* ---- Section cards (consistent with dashboard-card) ---- */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

/* ---- Alert / status banners ---- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid transparent;
}

.alert-error   { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.alert-success { background: #dcfce7; color: #166534; border-color: #86efac; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #fcd34d; }
.alert-info    { background: var(--primary-lightest); color: var(--primary-dark); border-color: var(--primary-light); }

body.dark-mode .alert-error   { background: rgba(239,68,68,0.12);  color: #fca5a5; border-color: rgba(239,68,68,0.25); }
body.dark-mode .alert-success { background: rgba(34,197,94,0.12);  color: #86efac; border-color: rgba(34,197,94,0.25); }
body.dark-mode .alert-warning { background: rgba(245,158,11,0.12); color: #fcd34d; border-color: rgba(245,158,11,0.25); }
body.dark-mode .alert-info    { background: rgba(15,98,254,0.12);  color: #93c5fd; border-color: rgba(15,98,254,0.25); }

/* ---- Empty state (standardized) ---- */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 28px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.35;
}

.empty-state p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.empty-state .empty-sub {
  font-size: 12px;
  margin-top: 4px;
  opacity: 0.75;
}

/* ---- Loading state (standardized) ---- */
.loading-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.loading-state i {
  font-size: 22px;
  display: block;
  margin-bottom: 10px;
}

/* ---- Inner section headers (forms, modals, etc.) ---- */
.form-section-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* ---- Consistent inner panels (used inside modals/cards) ---- */
.inner-panel {
  background: var(--surface-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

/* ---- Typography scale (standardized) ---- */
.text-xs   { font-size: 11px; }
.text-sm   { font-size: 12px; }
.text-base { font-size: 14px; }
.text-md   { font-size: 15px; }
.text-lg   { font-size: 16px; }
.text-xl   { font-size: 20px; }

.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary  { color: var(--text-primary); }
.text-danger   { color: var(--danger); }
.text-success  { color: var(--success); }
.text-warning  { color: var(--warning); }

/* ---- Responsive uniform padding for all card-like containers ---- */
@media (max-width: 768px) {
  .dashboard-card,
  .table-container,
  .chart-container,
  .calendar-container,
  .section-card {
    padding: 16px !important;
    border-radius: var(--radius-lg) !important;
  }
}

@media (max-width: 480px) {
  .dashboard-card,
  .table-container,
  .chart-container,
  .calendar-container,
  .section-card {
    padding: 14px !important;
  }
}

/* ---- Uniform section heading size on mobile ---- */
@media (max-width: 768px) {
  .dashboard-card h3,
  .table-container h3,
  .section-card h3,
  .chart-container h3 {
    font-size: 15px !important;
  }

  .dashboard-card h4,
  .section-card h4 {
    font-size: 13px !important;
  }
}

/* ---- Uniform button sizing on mobile ---- */
@media (max-width: 768px) {
  .btn-primary,
  .btn-secondary,
  .btn-danger,
  .btn-success,
  .btn-outline-primary,
  .btn-outline-danger {
    font-size: 14px;
    padding: 10px 18px;
    min-height: 44px;
  }

  .btn-sm {
    font-size: 12px;
    padding: 8px 12px;
    min-height: 38px;
  }

  .btn-icon {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-notification {
  position: fixed;
  top: 24px;
  right: 24px;
  background: white;
  border-radius: 12px;
  padding: 16px 20px;
  min-width: 320px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-left: 5px solid var(--primary);
}

.toast-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-notification.success {
  border-left-color: var(--success);
}

.toast-notification.error {
  border-left-color: var(--danger);
}

.toast-notification.warning {
  border-left-color: var(--warning);
}

.toast-notification.info {
  border-left-color: var(--info);
}

.toast-content {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 14px;
}

.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.toast-close:hover {
  color: var(--text-primary);
}

/* ===== CUSTOM TOOLTIPS ===== */
.custom-tooltip {
  position: absolute;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.95);
  color: white;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  z-index: 10000;
  pointer-events: none;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(5px);
}

.custom-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.custom-tooltip::after {
  content: '';
  position: absolute;
  border-width: 6px;
  border-style: solid;
}

/* Position: Top */
.custom-tooltip.pos-top {
  margin-bottom: 8px;
}

.custom-tooltip.pos-top::after {
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-color: rgba(15, 23, 42, 0.95) transparent transparent transparent;
}

/* Position: Bottom */
.custom-tooltip.pos-bottom {
  margin-top: 8px;
}

.custom-tooltip.pos-bottom::after {
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-color: transparent transparent rgba(15, 23, 42, 0.95) transparent;
}

/* ===== CUSTOM DROPDOWN STYLING FOR IN-HOUSE OPTIONS ===== */
.dropdown-menu-fixed {
  display: none;
  position: fixed;
  background: white;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xl);
  z-index: 9999;
  min-width: 180px;
  max-width: 220px;
  border-radius: 12px;
  overflow: hidden;
  padding: 8px 0;
  animation: fadeIn 0.2s ease;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dropdown-menu-fixed[style*="display: block"] {
  opacity: 1;
}

.dropdown-item-custom {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--bg-lighter);
  transition: background 0.2s ease, color 0.2s ease;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.dropdown-item-custom:last-child {
  border-bottom: none;
}

.dropdown-item-custom:hover {
  background: var(--surface-light);
  color: var(--primary);
  padding-left: 20px;
}

.dropdown-item-custom i {
  width: 24px;
  margin-right: 12px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  font-size: 15px;
  text-align: center;
}

.dropdown-item-custom:hover i {
  color: var(--primary);
}

.dropdown-item-custom.danger-action {
  color: var(--text-primary);
}

.dropdown-item-custom.danger-action:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.dropdown-item-custom.danger-action:hover i {
  color: var(--danger);
}

/* Dropdown button styling */
.dropdown-toggle {
  position: relative;
}

.dropdown-toggle:after {
  margin-left: 4px;
}

/* Options Button Hover Effect */
.dropdown-toggle:hover {
  background: #f8fafc !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(15, 98, 254, 0.15);
}

.dropdown-toggle:active {
  transform: translateY(0);
}

/* ===== MODERN REPORT UI ENHANCEMENTS ===== */

/* Report Navigation */
.reports-nav {
  display: flex;
  gap: 4px;
  padding: 10px 20px;
  background: var(--surface-light);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0 !important;
  border-top: none !important;
  flex-wrap: wrap;
  overflow-x: auto;
}

.reports-nav button {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  transition: background 0.15s ease, color 0.15s ease;
  box-shadow: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.reports-nav button:hover {
  background: rgba(15, 98, 254, 0.08);
  color: var(--primary);
}

.reports-nav button.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.reports-nav button .badge {
  background: var(--text-secondary);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  transition: background 0.3s, color 0.3s;
}

.reports-nav button.active .badge {
  background: var(--primary);
}

/* Report Header Actions */
.report-actions button {
  background: white;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.report-actions button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Report Tables */
#reportsTable {
  border-collapse: separate;
  border-spacing: 0 8px;
  /* Spacing between rows */
  margin-top: 10px;
}

#reportsTable thead th {
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 1.2px;
  border-bottom: none;
  padding: 0 20px 10px 20px;
}

#reportsTable tbody tr {
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
  border-radius: 6px;
}

#reportsTable tbody tr:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: white;
  /* Ensure bg stays white on hover */
  z-index: 2;
  position: relative;
}

#reportsTable tbody td {
  border: 1px solid var(--border-light);
  border-width: 1px 0;
  padding: 20px;
  font-weight: 500;
}

#reportsTable tbody td:first-child {
  border-left: 1px solid var(--border-light);
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

#reportsTable tbody td:last-child {
  border-right: 1px solid var(--border-light);
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Flash Report Cards */
#flashReportView .report-header h3 {
  font-size: 22px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 5px;
}

#flashReportView .report-header p {
  color: var(--text-secondary);
  font-weight: 500;
}

#flashReportView .dashboard-card {
  border: none;
  background: white;
  /* gradient removed for clean look */
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  padding: 30px !important;
}

#flashReportView .dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
}

#flashReportView .dashboard-card h4 {
  font-size: 16px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 25px;
  font-weight: 700;
}

#flashReportView .dashboard-card p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 15px;
  color: var(--text-secondary);
  border-bottom: 1px dashed var(--border-light);
  padding-bottom: 12px;
}

#flashReportView .dashboard-card p:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

#flashReportView .dashboard-card strong {
  font-size: 18px;
  color: var(--text-primary);
  font-weight: 700;
}

/* Report toolbar */
.report-toolbar {
  padding: 12px 20px;
  background: white;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.report-toolbar-left {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.report-toolbar label {
  margin: 0;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Cashier summary cards */
.rpt-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.rpt-summary-card {
  border-radius: 6px;
  padding: 14px 16px;
  text-align: center;
}

.rpt-summary-card.green { background: #dcfce7; }
.rpt-summary-card.red   { background: #fee2e2; }
.rpt-summary-card.blue  { background: #dbeafe; }
.rpt-summary-card.slate { background: #f1f5f9; }

.rpt-summary-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.rpt-summary-card.green .rpt-summary-label,
.rpt-summary-card.green .rpt-summary-value { color: #166534; }
.rpt-summary-card.red   .rpt-summary-label,
.rpt-summary-card.red   .rpt-summary-value { color: #991b1b; }
.rpt-summary-card.blue  .rpt-summary-label,
.rpt-summary-card.blue  .rpt-summary-value { color: #1e40af; }
.rpt-summary-card.slate .rpt-summary-label,
.rpt-summary-card.slate .rpt-summary-value { color: #475569; }

.rpt-summary-value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 2px;
}

/* By-method cards */
.rpt-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.rpt-method-card {
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rpt-method-name  { font-weight: 700; font-size: 13px; }
.rpt-method-count { font-size: 11px; opacity: 0.8; margin-top: 2px; }
.rpt-method-amount { font-weight: 700; font-size: 15px; }

/* Inline tables (cashier) */
.rpt-table-wrap {
  border: 1px solid var(--border-light);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 24px;
}

.rpt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.rpt-table th {
  padding: 8px 12px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-weight: 700;
  background: var(--surface-light);
}

.rpt-table th.right,
.rpt-table td.right { text-align: right; }

.rpt-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-primary);
}

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

.rpt-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px 0;
}

/* Expense summary */
.rpt-expense-summary {
  margin-top: 20px;
  padding: 16px;
  background: var(--surface-light);
  border-radius: 6px;
  border: 1px solid var(--border-light);
}

.rpt-expense-summary h4 {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: var(--text-primary);
}

.rpt-expense-summary ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
}

.rpt-expense-summary ul li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
  border-bottom: 1px solid var(--border-light);
}

.rpt-expense-summary ul li:last-child { border-bottom: none; }

.rpt-expense-total {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 8px 0 0;
}

/* Loading/error in report views */
.rpt-loading {
  padding: 30px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.rpt-error {
  padding: 20px;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

/* Dark mode */
body.dark-mode .report-toolbar { background: var(--surface-dark, #1e2332); border-color: var(--border-dark, #334155); }
body.dark-mode .rpt-table-wrap { border-color: var(--border-dark, #334155); }
body.dark-mode .rpt-table th { background: var(--surface-dark, #1e2332); border-color: var(--border-dark, #334155); }
body.dark-mode .rpt-table td { border-color: rgba(51,65,85,0.4); }
body.dark-mode .rpt-expense-summary { background: var(--surface-dark, #1e2332); border-color: var(--border-dark, #334155); }
body.dark-mode .rpt-expense-summary ul li { border-color: var(--border-dark, #334155); }
body.dark-mode .rpt-summary-card.slate { background: rgba(71,85,105,0.2); }

/* ===== MODAL TABS ===== */
.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.3s ease, border-bottom-color 0.3s ease, background 0.3s ease;
  font-family: 'Manrope', sans-serif;
}

.tab-btn:hover {
  color: var(--primary);
  background: rgba(15, 98, 254, 0.05);
  border-radius: 6px 6px 0 0;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  font-weight: 600;
}

.detail-tab-content {
  animation: fadeIn 0.3s ease;
}

/* ===== AVAILABILITY GRID STYLES (Clean & High Contrast) ===== */
.availability-grid {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.availability-grid thead th {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  text-transform: none;
  letter-spacing: 0.3px;
  padding: 11px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 20;
}

.availability-grid thead th.room-type-header {
  background: var(--primary-dark);
  text-align: left;
  padding-left: 15px;
}

.availability-grid tbody tr {
  transition: background 0.15s;
}

.availability-grid tbody tr:hover {
  background: var(--primary-lightest);
}

.availability-grid tbody td {
  padding: 11px 10px;
  text-align: center;
  border: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 16px;
  font-family: 'Manrope', sans-serif;
  color: var(--text-primary);
}

.room-type-cell {
  background: var(--surface-light) !important;
  text-align: left !important;
  padding-left: 15px !important;
  min-width: 180px;
  color: var(--text-primary) !important;
  font-weight: 600;
  font-size: 13px !important;
  border-right: 2px solid var(--border-light) !important;
  position: sticky;
  left: 0;
  z-index: 10;
}

/* Status Colors */
.available-0 {
  background-color: #fde8e8 !important;
  color: #c81e1e !important;
}

.available-low {
  background-color: #fef3c7 !important;
  color: #92400e !important;
}

.available-mid {
  background-color: #def7ec !important;
  color: #03543f !important;
}

.available-high {
  background-color: #def7ec !important;
  color: #03543f !important;
}

.booked-count {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.total-row td {
  background: var(--primary-lightest) !important;
  font-weight: 700;
  color: var(--primary) !important;
  border-top: 2px solid var(--primary-light) !important;
  font-size: 15px;
}

/* ===== GUEST SELECTION UI ===== */
.guest-search-container {
  position: relative;
  margin-bottom: 12px;
}

.guest-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.guest-search-item {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.2s;
}

.guest-search-item:last-child {
  border-bottom: none;
}

.guest-search-item:hover {
  background: var(--bg-lightest);
}

.guest-search-item .name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.guest-search-item .meta {
  font-size: 11px;
  color: var(--text-secondary);
}

.selected-guests-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.selected-guest-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-lightest);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
}

.selected-guest-tag .info {
  display: flex;
  flex-direction: column;
}

.selected-guest-tag .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.selected-guest-tag .primary-badge {
  font-size: 10px;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
}

.selected-guest-tag .remove-btn {
  color: var(--danger);
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
  transition: opacity 0.2s;
}

.selected-guest-tag .remove-btn:hover {
  opacity: 0.7;
}

.no-guests-placeholder {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  padding: 10px;
  text-align: center;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
}

/* ===== ROOM COLOR PICKER ===== */
.room-color-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.room-color-preview {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 2px solid rgba(0,0,0,0.12);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.room-color-preview:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.room-color-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.color-preset {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.12s, border-color 0.12s;
  display: inline-block;
}

.color-preset:hover {
  transform: scale(1.15);
}

.color-preset.active {
  border-color: #1e293b;
  transform: scale(1.15);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1e293b;
}

/* Guest slot search row — flex with wrap for small screens */
.slot-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
@media (max-width: 480px) {
  .slot-search-row {
    flex-wrap: wrap;
  }
  .slot-search-row .slot-search-input {
    flex: 1 1 100%;
  }
  .slot-search-row .slot-new-btn {
    width: 100%;
  }
  /* Booking dates row: compress to 2 columns on small screens */
  .booking-dates-row {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ===== SETTINGS CONFIG SIDEBAR ===== */

.config-container {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.config-sidebar {
  width: 200px;
  background: var(--surface);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  height: fit-content;
  flex-shrink: 0;
}

.config-content {
  flex: 1;
  background: var(--surface);
  padding: 25px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.config-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.config-nav li {
  margin-bottom: 2px;
}

.config-nav-group {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  padding: 12px 12px 4px;
  margin-top: 4px;
  list-style: none;
}

.config-link {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
}

.config-link i {
  margin-right: 10px;
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.config-link:hover {
  background: var(--primary-lightest);
  color: var(--primary);
}

.config-link.active {
  background: var(--primary-lightest);
  color: var(--primary);
  font-weight: 600;
}

.config-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

body.dark-mode .config-sidebar,
body.dark-mode .config-content {
  background: var(--surface);
  border-color: var(--border-light);
}

body.dark-mode .config-link:hover,
body.dark-mode .config-link.active {
  background: rgba(15, 98, 254, 0.15);
  color: #60a5fa;
}

body.dark-mode .config-link.active::before {
  background: #60a5fa;
}

/* ===== HOUSEKEEPING SECTION ===== */

/* Small Button Styles */
.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-sm:hover {
  background: var(--surface-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-sm:active {
  transform: translateY(0);
}

/* Housekeeping Room Card */
.hk-room-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border: 1px solid var(--border-light);
}

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

/* Housekeeping Status Buttons */
.hk-status-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.hk-status-btn.active {
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Housekeeping Statistics Cards */
#housekeeping .dashboard-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#housekeeping .dashboard-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Housekeeping Grid */
#housekeepingGrid {
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Empty State */
#housekeepingEmpty {
  animation: fadeIn 0.4s ease-in-out;
}

#housekeepingEmpty i {
  display: block;
  transition: transform 0.3s ease;
}

#housekeepingEmpty:hover i {
  transform: rotate(15deg) scale(1.1);
}

/* Filter Button Active State */
.btn-sm[id^="filter"] {
  min-width: 80px;
  justify-content: center;
}

/* Responsive Housekeeping */
@media (max-width: 768px) {
  #housekeepingGrid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
  }

  .hk-room-card {
    border-radius: 10px;
  }

  #housekeeping .dashboard-card {
    padding: 16px;
  }

  .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  #housekeepingGrid {
    grid-template-columns: 1fr;
  }

  .hk-status-btn {
    font-size: 10px !important;
    padding: 6px !important;
  }
}

/* ============================================
   RTL (Right-to-Left) Support
   For Arabic and other RTL languages
   ============================================ */

[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .sidebar {
  left: auto;
  right: 0;
  border-left: 1px solid var(--border-light);
  border-right: none;
}

[dir="rtl"] .main-content {
  margin-left: 0;
  margin-right: 240px;
}

[dir="rtl"] .nav-item {
  text-align: right;
}

[dir="rtl"] .nav-item i {
  margin-right: 0;
  margin-left: 15px;
}

[dir="rtl"] .header-content {
  flex-direction: row-reverse;
}

[dir="rtl"] .language-selector {
  margin-left: 0;
  margin-right: 15px;
}

[dir="rtl"] .language-dropdown {
  left: 0;
  right: auto;
}

[dir="rtl"] .card {
  text-align: right;
}

[dir="rtl"] .table {
  text-align: right;
}

[dir="rtl"] .btn-icon {
  margin-left: 0;
  margin-right: 5px;
}

[dir="rtl"] .fa-chevron-right {
  transform: rotate(180deg);
}

[dir="rtl"] .fa-chevron-left {
  transform: rotate(180deg);
}

/* RTL Mobile Support */
@media (max-width: 768px) {
  [dir="rtl"] .main-content {
    margin-right: 0;
  }

  [dir="rtl"] .sidebar.mobile-open {
    left: auto;
    right: 0;
  }
}

/* ===== RATE MANAGEMENT ===== */
.rm-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

.rm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.rm-table th {
  background: #f8fafc;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  font-size: 12px;
  white-space: nowrap;
  border-bottom: 2px solid #e2e8f0;
}
.rm-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.rm-table tbody tr:hover {
  background: #f8fafc;
}

.rm-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.rm-badge-green { background: #dcfce7; color: #166534; }
.rm-badge-grey  { background: #f1f5f9; color: #64748b; }

.rm-label {
  display: block;
  font-weight: 600;
  font-size: 12px;
  color: #374151;
  margin-bottom: 5px;
}

.rm-pane { min-height: 200px; }
/* ===== END RATE MANAGEMENT ===== */

/* ==========================================================
   LARGE SCREENS — 1600px+ (large desktop monitors)
   ========================================================== */
@media (min-width: 1600px) {
  .sidebar {
    width: 300px;
  }

  .main-content {
    margin-left: 300px;
    padding: 40px;
  }

  .header {
    padding: 28px 40px;
    margin-bottom: 36px;
  }

  .header h2 {
    font-size: 32px;
  }

  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
    margin-bottom: 36px;
  }

  .dashboard-card {
    padding: 32px;
  }

  .stat-value {
    font-size: 42px;
  }

  .card-icon {
    width: 58px;
    height: 58px;
    font-size: 24px;
  }

  .table-container {
    padding: 36px;
  }

  th, td {
    padding: 20px 18px;
    font-size: 15px;
  }

  .modal-content {
    max-width: 700px;
  }

  .modal-content.large {
    max-width: 1000px;
  }

  .nav-item {
    padding: 15px 18px;
  }

  .nav-item span {
    font-size: 15px;
  }

  .nav-item i {
    font-size: 19px;
  }

  .btn-primary,
  .btn-secondary {
    padding: 13px 26px;
    font-size: 14px;
  }

  .form-control {
    font-size: 15px;
  }

  .hotel-info h1 {
    font-size: 24px;
  }

  .admin-avatar {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }
}

/* ==========================================================
   27-INCH / ULTRA-WIDE — 2200px+ (2560×1440 and above)
   ========================================================== */
@media (min-width: 2200px) {
  .sidebar {
    width: 320px;
  }

  .main-content {
    margin-left: 320px;
    padding: 56px;
  }

  .header {
    padding: 32px 56px;
    margin-bottom: 40px;
    border-radius: 24px;
  }

  .header h2 {
    font-size: 38px;
  }

  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
  }

  .dashboard-card {
    padding: 40px;
    border-radius: 24px;
  }

  .stat-value {
    font-size: 52px;
  }

  .card-header h3 {
    font-size: 20px;
  }

  .card-icon {
    width: 68px;
    height: 68px;
    font-size: 28px;
    border-radius: 18px;
  }

  .table-container {
    padding: 44px;
    border-radius: 24px;
  }

  .table-header h3 {
    font-size: 20px;
  }

  th {
    font-size: 13px;
    padding: 18px 22px;
  }

  td {
    font-size: 15px;
    padding: 22px;
  }

  .modal-content {
    max-width: 820px;
    padding: 52px;
    border-radius: 28px;
  }

  .modal-content.large {
    max-width: 1200px;
  }

  .hotel-info h1 {
    font-size: 26px;
  }

  .nav-item {
    padding: 16px 22px;
    border-radius: 14px;
  }

  .nav-item span {
    font-size: 16px;
  }

  .nav-item i {
    font-size: 20px;
    margin-right: 14px;
  }

  .btn-primary,
  .btn-secondary,
  .btn-danger {
    padding: 14px 32px;
    font-size: 15px;
    border-radius: 14px;
  }

  .form-control {
    font-size: 16px;
    padding: 14px 18px;
  }

  .admin-avatar {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  .admin-details h3 {
    font-size: 16px;
  }

  .admin-details p {
    font-size: 13px;
  }

  .date-display {
    font-size: 16px;
    padding: 14px 24px;
  }
}

/* ==========================================================
   MOBILE IMPROVEMENTS — added on top of existing 768px rules
   ========================================================== */
@media (max-width: 768px) {
  /* Settings config panel: horizontal scroll tabs instead of sidebar */
  .config-container {
    flex-direction: column !important;
  }

  .config-sidebar {
    width: 100% !important;
    height: auto !important;
    margin-bottom: 16px;
    overflow-x: auto;
  }

  .config-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 4px 0 !important;
    margin: 0 !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .config-nav::-webkit-scrollbar {
    display: none;
  }

  .config-nav li {
    margin-bottom: 0 !important;
    flex-shrink: 0;
  }

  .config-link {
    padding: 8px 14px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 20px !important;
    display: inline-block !important;
  }

  .config-link.active {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
  }

  /* Touch-friendly minimum tap targets */
  .nav-item {
    min-height: 48px;
  }

  .btn-primary,
  .btn-secondary,
  .btn-danger {
    min-height: 44px;
  }

  .btn-icon {
    min-width: 40px;
    min-height: 40px;
  }

  /* Prevent iOS from zooming in on input focus (font-size must be >= 16px) */
  input.form-control,
  select.form-control,
  textarea.form-control {
    font-size: 16px !important;
  }

  /* Stat cards: 2 columns on tablet-width phones */
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Table header wraps and stacks */
  .table-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* Form actions wrap */
  .form-actions {
    flex-wrap: wrap;
    gap: 10px;
  }

  /* Modal slides up from bottom edge on small screens */
  .modal-overlay {
    align-items: flex-start;
    padding-top: 16px;
    padding-left: 8px;
    padding-right: 8px;
  }

  /* Admin info compact */
  .admin-info {
    padding: 10px 14px;
  }
}

/* ==========================================================
   VERY SMALL PHONES — 480px and below (additional fixes)
   ========================================================== */
@media (max-width: 480px) {
  /* Stat cards: single column on small phones */
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  /* Stack and full-width form action buttons */
  .form-actions {
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
    justify-content: center;
  }

  /* Compact modal */
  .modal-content {
    padding: 16px !important;
    border-radius: 16px;
    max-height: 92vh;
  }

  /* Compact config pill links */
  .config-link {
    font-size: 11px !important;
    padding: 6px 10px !important;
  }

  /* Compact table cells */
  th,
  td {
    padding: 10px 8px;
    font-size: 12px;
  }

  /* Header title */
  .header h2 {
    font-size: 16px;
  }

  /* Keep date visible but compact */
  .date-display {
    font-size: 11px;
    padding: 7px 10px;
  }

  /* Stat value smaller on tiny screens */
  .stat-value {
    font-size: 26px;
  }

  /* Sidebar full width when open */
  .sidebar {
    width: 100vw;
  }
}

/* ============================================================
   POS — Point of Sale
   ============================================================ */

.pos-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  height: calc(100vh - 100px);
  min-height: 600px;
}

/* --- Left: Menu panel --- */
.pos-menu-panel {
  background: var(--surface-light, #f8fafc);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

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

.pos-header-bar h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

/* Category tabs */
.pos-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pos-cat-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-light, #e2e8f0);
  background: white;
  color: var(--text-secondary, #64748b);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.pos-cat-pill:hover,
.pos-cat-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Item grid */
.pos-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.pos-item-card {
  background: white;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.pos-item-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(15, 98, 254, 0.15);
  transform: translateY(-2px);
}

.pos-item-icon {
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 8px;
}

.pos-item-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 3px;
  word-break: break-word;
}

.pos-item-cat {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 6px;
}

.pos-item-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.pos-item-add {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 16px;
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.2s;
}

.pos-item-card:hover .pos-item-add {
  opacity: 1;
}

.pos-loading,
.pos-empty-grid {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted, #94a3b8);
  font-size: 14px;
}

.pos-empty-grid i {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.4;
  display: block;
}

/* Management table */
.pos-mgmt-section {
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light, #e2e8f0);
}

.pos-mgmt-section h4 {
  font-size: 15px;
  color: var(--text-secondary, #64748b);
  margin: 0 0 10px;
}

/* --- Right: Cart panel --- */
.pos-cart-panel {
  background: white;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.pos-cart-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.pos-guest-selector label,
.pos-note-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Cart items */
.pos-cart-items {
  flex: 1;
  overflow-y: auto;
  min-height: 120px;
  max-height: 340px;
}

.pos-cart-empty {
  text-align: center;
  padding: 30px 10px;
  color: var(--text-muted, #94a3b8);
}

.pos-cart-empty i {
  font-size: 28px;
  margin-bottom: 8px;
  display: block;
  opacity: 0.4;
}

.pos-cart-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
}

.pos-cart-item-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.pos-cart-qty {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.pos-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-light, #e2e8f0);
  background: var(--surface-light, #f8fafc);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.pos-qty-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pos-cart-item-total {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  min-width: 70px;
  text-align: right;
}

.pos-cart-remove {
  background: none;
  border: none;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.pos-cart-remove:hover {
  color: #ef4444;
}

/* Totals */
.pos-cart-totals {
  border-top: 1px solid var(--border-light, #e2e8f0);
  padding-top: 12px;
}

.pos-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-secondary, #64748b);
  padding: 3px 0;
}

.pos-grand-total {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 6px;
}

/* Buttons */
.pos-checkout-btn {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.pos-checkout-btn:hover:not(:disabled) {
  background: var(--primary-dark);
}

.pos-checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pos-clear-btn {
  width: 100%;
  padding: 9px;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.pos-clear-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
}

/* Responsive */
@media (max-width: 900px) {
  .pos-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .pos-cart-items {
    max-height: 200px;
  }
}

/* ============================================================
   REVENUE MANAGEMENT DASHBOARD
   ============================================================ */
.rev-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rev-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rev-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.rev-kpi-card {
  background: var(--surface, #1e293b);
  border: 1px solid var(--border-light, #334155);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.rev-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--rev-kpi-color, var(--primary));
}

.rev-kpi-label {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.rev-kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary, #f1f5f9);
  line-height: 1;
}

.rev-kpi-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
}

.rev-kpi-change.positive { color: #10b981; }
.rev-kpi-change.negative { color: #ef4444; }
.rev-kpi-change.neutral  { color: #94a3b8; }

.rev-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.rev-chart-card {
  background: var(--surface, #1e293b);
  border: 1px solid var(--border-light, #334155);
  border-radius: 12px;
  padding: 20px;
}

.rev-chart-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #f1f5f9);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rev-chart-title i {
  color: var(--primary);
}

.rev-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  background: var(--surface, #1e293b);
  border: 1px solid var(--border-light, #334155);
  border-radius: 12px;
  padding: 16px;
}

.rev-summary-item {
  text-align: center;
}

.rev-summary-item .label {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rev-summary-item .value {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  margin-top: 4px;
}

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

/* ============================================================
   COMPETITOR RATE TRACKING + DISCOVER
   ============================================================ */
.discover-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 4px;
}

.discover-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-light, #f8fafc);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 10px;
  padding: 12px 16px;
  transition: border-color 0.2s;
}

.discover-card:hover { border-color: var(--primary); }

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

.discover-card-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary, #1e293b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discover-card-addr {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discover-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.comp-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.comp-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   AUDIT LOG VIEWER
   ============================================================ */
.al-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 4px;
}

.al-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.al-stat-card {
  background: var(--surface, #1e293b);
  border: 1px solid var(--border-light, #334155);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.al-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}

.al-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary, #f1f5f9);
  line-height: 1;
}

.al-stat-label {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

.al-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--surface, #1e293b);
  border: 1px solid var(--border-light, #334155);
  border-radius: 10px;
  padding: 12px 16px;
}

.al-row:hover td {
  background: rgba(15, 98, 254, 0.06);
}

.al-row-expanded td {
  background: rgba(15, 98, 254, 0.04);
}

.al-detail-panel {
  padding: 16px 20px;
  background: #0f172a;
  border-top: 1px solid #334155;
  border-bottom: 2px solid var(--primary);
}

.al-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 0;
}

@media (max-width: 640px) {
  .al-stats-row { grid-template-columns: 1fr 1fr; }
  .al-filters { flex-direction: column; align-items: stretch; }
}


/* ===== UX IMPROVEMENTS ===== */

/* Sticky table headers */
table thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

/* Responsive billing layout */
#billing > div[style*="grid-template-columns: 350px"] {
  display: grid;
  grid-template-columns: minmax(280px, 350px) 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 768px) {
  #billing > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

/* Confirm Modal overlay */
#confirmModal {
  background: rgba(0, 0, 0, 0.5);
}

/* Field-level error styling */
.field-error {
  color: #ef4444;
  font-size: 12px;
  display: block;
  margin-top: 2px;
}

/* ===== UX IMPROVEMENTS ===== */

/* Screen-reader only utility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Required field indicator */
.form-group label.required::after,
label.required::after {
  content: ' *';
  color: #ef4444;
}

/* Stronger focus ring for accessibility */
.form-control:focus,
input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.18);
}

/* Button disabled states */
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled,
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* Sticky table header shadow */
thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-secondary, #f8fafc);
  box-shadow: 0 1px 0 var(--border-light, #e2e8f0);
}

/* Empty state utility */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  gap: 12px;
  color: var(--text-muted, #94a3b8);
  text-align: center;
}

.empty-state i {
  font-size: 40px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 14px;
  margin: 0;
}

/* ===== INLINE DROPDOWN (arrivals/departures options menu) ===== */
.dropdown-menu-inline {
  background: var(--surface);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  min-width: 180px;
  z-index: 9999;
  position: fixed;
}

.dropdown-item-inline {
  display: block;
  padding: 10px 14px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
  background: transparent;
}

.dropdown-item-inline:hover {
  background: var(--bg-secondary, #f1f5f9);
}

.dropdown-item-inline.danger { color: #ef4444; }
.dropdown-item-inline.danger:hover { background: #fef2f2; }
.dropdown-item-inline.warning { color: #f59e0b; }
.dropdown-item-inline.warning:hover { background: #fffbeb; }

body.dark-mode .dropdown-menu-inline {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

body.dark-mode .dropdown-item-inline {
  color: #f1f5f9;
}

body.dark-mode .dropdown-item-inline:hover {
  background: #263348;
}

body.dark-mode .dropdown-item-inline.danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

body.dark-mode .dropdown-item-inline.warning:hover {
  background: rgba(245, 158, 11, 0.15);
}

/* ===== HOUSEKEEPING ===== */
#housekeepingGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.hk-room-card {
  border-radius: 8px;
  border: 1px solid var(--border-light);
  overflow: hidden;
  background: white;
  transition: box-shadow 0.2s ease;
  font-family: 'Manrope', sans-serif;
}

.hk-room-card:hover {
  box-shadow: var(--shadow-md);
}

.hk-card-header {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

.hk-card-header .hk-room-label {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.hk-card-header .hk-room-type {
  font-size: 11px;
  opacity: 0.88;
  margin-top: 2px;
}

.hk-card-header i {
  font-size: 22px;
  opacity: 0.9;
}

.hk-card-body {
  padding: 14px 16px;
  border-top: none;
}

.hk-status-row {
  margin-bottom: 10px;
}

.hk-status-row .hk-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.hk-status-row .hk-status-text {
  font-size: 13px;
  font-weight: 600;
}

.hk-alert {
  padding: 7px 10px;
  border-radius: 5px;
  font-size: 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hk-alert.occupied {
  background: #fef3c7;
  border-left: 3px solid #f59e0b;
  color: #92400e;
}

.hk-alert.arriving {
  background: #dbeafe;
  border-left: 3px solid #3b82f6;
  color: #1e40af;
}

.hk-alert .hk-depart-tag {
  color: #dc2626;
  font-weight: 600;
}

.hk-action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.hk-status-btn {
  padding: 7px 4px;
  font-size: 11px;
  border-radius: 5px;
  border: 1px solid var(--border-light);
  background: white;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-align: center;
  line-height: 1.3;
}

.hk-status-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-lightest);
}

.hk-status-btn.active-clean  { background: #d1fae5; color: #047857; border-color: #10b981; }
.hk-status-btn.active-dirty  { background: #fee2e2; color: #dc2626; border-color: #ef4444; }
.hk-status-btn.active-inspecting { background: #dbeafe; color: #1e40af; border-color: #3b82f6; }

.hk-last-cleaned {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Filter buttons — defer to primary .btn-sm definition above */

/* Dark mode */
body.dark-mode .hk-room-card {
  background: var(--surface-dark, #1e2332);
  border-color: var(--border-dark, #334155);
}

body.dark-mode .hk-card-body {
  background: var(--surface-dark, #1e2332);
}

body.dark-mode .hk-status-btn {
  background: var(--surface-dark, #1e2332);
  border-color: var(--border-dark, #334155);
  color: var(--text-secondary);
}

body.dark-mode .hk-status-btn:hover {
  background: rgba(15, 98, 254, 0.12);
  border-color: var(--primary);
  color: var(--primary);
}

body.dark-mode .hk-last-cleaned {
  border-top-color: var(--border-dark, #334155);
}

body.dark-mode .btn-sm {
  background: var(--surface-dark, #1e2332);
  border-color: var(--border-dark, #334155);
  color: var(--text-secondary);
}

body.dark-mode .hk-alert.occupied {
  background: rgba(245, 158, 11, 0.1);
}

body.dark-mode .hk-alert.arriving {
  background: rgba(59, 130, 246, 0.1);
}

/* ===== FEATURE TOGGLES (Settings > Features) ===== */
.feature-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: white;
  gap: 16px;
  transition: border-color 0.15s ease;
}

.feature-toggle-row:hover {
  border-color: var(--primary);
}

.feature-toggle-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.feature-toggle-info > i {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-lightest);
  color: var(--primary);
  border-radius: 6px;
  font-size: 15px;
  flex-shrink: 0;
}

.feature-toggle-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.feature-toggle-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.feature-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.feature-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.feature-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 24px;
  transition: background 0.2s ease;
}

.feature-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.feature-switch input:checked + .feature-slider {
  background: var(--primary);
}

.feature-switch input:checked + .feature-slider::before {
  transform: translateX(20px);
}

.feature-switch input:focus-visible + .feature-slider {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

body.dark-mode .feature-toggle-row {
  background: var(--surface-dark, #1e2332);
  border-color: var(--border-dark, #334155);
}

body.dark-mode .feature-toggle-row:hover {
  border-color: var(--primary);
}

body.dark-mode .feature-toggle-info > i {
  background: rgba(15, 98, 254, 0.15);
}

body.dark-mode .feature-slider {
  background: #475569;
}

/* Calendar resize handle affordance */
.fc-event-resizer {
  cursor: s-resize !important;
}

.fc-event-resizer::after {
  content: '';
  display: block;
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.6);
  margin: 0 auto;
  margin-top: 2px;
}

/* ==========================================================
   RESPONSIVE — COMPREHENSIVE FIXES
   ========================================================== */

/* ---- 768px: Tablet / Mobile ---- */
@media (max-width: 768px) {

  /* Header h2 and header-actions — see grid rule in RESPONSIVE HARDENING section */
  .header h2 {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Hide date display on mobile — too wide */
  .date-display { display: none !important; }

  /* Hide language and privacy buttons on mobile — not enough room */
  #languageBtn,
  #languageDropdown,
  #privacyBtn { display: none !important; }

  /* Icon-only utility buttons */
  #darkModeBtn span { display: none; }

  /* New Booking button — icon only on mobile */
  #newBookingBtn span { display: none; }
  #newBookingBtn {
    flex: none !important;
    min-width: unset !important;
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    border-radius: 8px;
  }

  .new-booking-btn {
    flex: none !important;
    min-width: unset !important;
    padding: 8px 10px;
  }

  /* Mobile menu button */
  #mobileMenuBtn {
    display: flex !important;
    width: 38px;
    height: 38px;
    background: var(--surface-light) !important;
  }

  /* Compact icon buttons in header */
  #darkModeBtn {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    flex: none !important;
    min-width: unset !important;
  }

  .notification-bell-container { margin-right: 0 !important; }

  /* Table toolbar: stack filters below heading */
  .table-header {
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px;
  }

  .table-header > div {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Search inputs full-width on mobile */
  .table-header input.form-control {
    width: 100% !important;
    flex: 1 1 140px;
  }

  /* Table scroll container */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Config: stack sidebar on top */
  .config-container {
    flex-direction: column !important;
  }

  .config-sidebar {
    width: 100% !important;
  }

  /* Config nav: horizontal pill scroll */
  .config-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
  }

  .config-nav li { flex-shrink: 0; }

  .config-link {
    padding: 7px 12px !important;
    font-size: 12px !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 20px !important;
    white-space: nowrap;
  }

  .config-link.active::before { display: none; }

  /* Housekeeping stats row */
  #housekeepingSection .hk-stats,
  .hk-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Reports nav: scrollable pills */
  .reports-nav {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  /* Bulk action buttons — smaller + wrap */
  .btn-success,
  .btn-outline-primary,
  .btn-outline-danger {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* Billing panel */
  #billing .billing-layout,
  #billing > div {
    grid-template-columns: 1fr !important;
  }

  /* Modals — bottom sheet feel */
  .modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .modal-content {
    border-radius: 16px 16px 0 0 !important;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px 16px !important;
  }

  /* Form rows — single column */
  .form-row,
  .form-row.two-col,
  .form-row.three-col {
    grid-template-columns: 1fr !important;
  }

  /* HK room grid */
  #housekeepingGrid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
  }
}

/* ---- 480px: Small phones ---- */
@media (max-width: 480px) {

  .main-content { padding: 12px; }

  /* Page title smaller */
  .header h2 { font-size: 16px; }

  /* Stat cards single column */
  .dashboard-grid { grid-template-columns: 1fr !important; }

  /* HK stats: 2-col stays */
  .hk-stats { grid-template-columns: repeat(2, 1fr) !important; }

  /* HK room cards: 1 column */
  #housekeepingGrid {
    grid-template-columns: 1fr !important;
  }

  /* Full-width only inside form actions */
  .form-actions .btn-primary,
  .form-actions .btn-danger,
  .form-actions .btn-success {
    width: 100%;
    justify-content: center;
  }

  /* Modals: full height */
  .modal-content {
    max-height: 95vh;
    border-radius: 16px 16px 0 0 !important;
  }

  /* Table header actions: stack */
  .table-header > div {
    flex-direction: column;
    align-items: stretch;
  }

  .table-header input.form-control,
  .table-header .btn-primary,
  .table-header .btn-secondary {
    width: 100% !important;
  }

  /* Inline date inputs in toolbar */
  #bkArrFrom, #bkArrTo, #bkDepFrom, #bkDepTo {
    width: 100% !important;
    flex: 1 1 100%;
  }
}

/* ============================================================
   MOBILE POLISH — additional fixes
   ============================================================ */

/* Prevent iOS from zooming on input focus (must be ≥16px) */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Stats tab: filter/toolbar buttons wrap cleanly */
@media (max-width: 768px) {
  .stats-toolbar,
  .reports-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .stats-toolbar > *,
  .reports-toolbar > * {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* POS: cart panel full-width below menu on mobile */
@media (max-width: 768px) {
  .pos-layout {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }

  .pos-cart-panel {
    max-height: 420px;
  }
}

/* Activities & billing: two-column grids → single column */
@media (max-width: 768px) {
  .activities-grid,
  .billing-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Gantt / calendar: ensure smooth horizontal scroll on touch */
@media (max-width: 768px) {
  .calendar-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Notification panel: full width on very small screens */
@media (max-width: 480px) {
  .notification-panel {
    width: 100vw !important;
    right: -100vw;
  }

  .notification-panel.open {
    right: 0;
  }
}

/* Dark mode: ensure mobileMenuBtn background visible */

/* ============================================================
   RESPONSIVE HARDENING
   Keeps inline desktop layouts usable on phones without
   rewriting every view template.
   ============================================================ */

html,
body {
  max-width: 100%;
}

/* Prevent horizontal scroll without breaking position:sticky */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }
}

img,
svg,
canvas {
  max-width: 100%;
}

.main-content,
.tab-content,
.dashboard-card,
.table-container,
.calendar-container,
.chart-container,
.modal-content {
  min-width: 0;
}

.header h2,
#pageTitle,
.table-header > div,
.card-header > div {
  min-width: 0;
}

@media (max-width: 768px) {
  .main-content {
    padding: 14px;
  }

  .header {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px 12px;
    padding: 10px 0 16px !important;
  }

  .header h2 {
    grid-column: 2;
    font-size: 20px !important;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #mobileMenuBtn {
    grid-column: 1;
    grid-row: 1;
    margin-right: 0 !important;
  }

  .header-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap !important;
    align-items: center;
    gap: 8px !important;
    width: 100%;
  }

  .header-actions > * {
    min-width: 0;
  }

  .notification-bell-container {
    margin-right: 0 !important;
  }

  .date-display {
    order: 10;
    width: 100%;
    display: none !important;
  }

  .new-booking-btn {
    min-height: 40px;
  }

  #newBookingBtn {
    width: auto;
    height: 40px;
    padding: 0 14px;
  }

  #newBookingBtn span {
    display: inline !important;
  }

  .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .dashboard-card,
  .table-container,
  .calendar-container,
  .chart-container {
    padding: 16px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 12px;
  }

  .table-container,
  .calendar-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 680px;
  }

  .table-header,
  .card-header,
  .form-actions {
    flex-wrap: wrap;
  }

  .table-header > div,
  .card-header > div {
    width: 100%;
  }

  .table-header input.form-control,
  .table-header select.form-control,
  .table-header .btn-primary,
  .table-header .btn-secondary {
    width: 100% !important;
  }

  .form-row,
  .form-row.two-col,
  .form-row.three-col {
    grid-template-columns: 1fr !important;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions > * {
    flex: 1 1 100%;
  }

  .modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .modal-content,
  .modal-content.large {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92vh;
    padding: 20px 16px !important;
    border-radius: 18px 18px 0 0 !important;
  }

  .notification-panel {
    width: min(100vw, 380px);
  }

  .tab-content [style*="grid-template-columns: 1fr 1fr"],
  .tab-content [style*="grid-template-columns:1fr 1fr"],
  .tab-content [style*="grid-template-columns: 1fr 1fr 1fr"],
  .tab-content [style*="grid-template-columns:1fr 1fr 1fr"],
  .modal-content [style*="grid-template-columns: 1fr 1fr"],
  .modal-content [style*="grid-template-columns:1fr 1fr"],
  .modal-content [style*="grid-template-columns: repeat(2, 1fr)"],
  .modal-content [style*="grid-template-columns:repeat(2, 1fr)"],
  .tab-content [style*="grid-template-columns: minmax(280px, 350px) 1fr"],
  .tab-content [style*="grid-template-columns: 280px 1fr"],
  .tab-content [style*="grid-template-columns:280px 1fr"],
  .tab-content [style*="grid-template-columns: 300px 1fr"],
  .tab-content [style*="grid-template-columns:300px 1fr"] {
    grid-template-columns: 1fr !important;
  }

  .tab-content [style*="width:220px"],
  .tab-content [style*="width: 220px"],
  .tab-content [style*="width:160px"],
  .tab-content [style*="width: 160px"],
  .tab-content [style*="width:155px"],
  .tab-content [style*="width: 155px"],
  .tab-content [style*="width:150px"],
  .tab-content [style*="width: 150px"] {
    width: 100% !important;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 12px;
  }

  .header {
    gap: 8px 10px;
  }

  .header h2 {
    font-size: 17px !important;
  }

  #newBookingBtn {
    width: 40px;
    padding: 0;
  }

  #newBookingBtn span {
    display: none !important;
  }

  /* Only form action buttons go full width — NOT header/filter/icon buttons */
  .form-actions .btn-primary,
  .form-actions .btn-secondary,
  .form-actions .btn-danger,
  .form-actions .btn-success {
    width: 100%;
    justify-content: center;
  }

  .table-container,
  .calendar-container,
  .chart-container,
  .dashboard-card {
    padding: 14px !important;
  }

  .notification-panel {
    width: 100vw !important;
    right: -100vw;
  }
}
@media (max-width: 768px) {
  body.dark-mode #mobileMenuBtn {
    background: var(--surface) !important;
    border: 1px solid var(--border-light);
  }
}

/* ============================================================
   MOBILE ENHANCEMENTS — Phase 2
   Targets the remaining pain points on small screens
   ============================================================ */

/* ---- Touch targets: minimum 44px on all interactive elements ---- */
@media (max-width: 768px) {
  button, .btn-primary, .btn-secondary, .btn-danger, .btn-success,
  .btn-icon, .nav-item, select.form-control, input.form-control,
  .modal-close {
    min-height: 44px;
  }

  /* Small icon-only buttons keep square shape */
  .btn-icon {
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .modal-close {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ---- Chart containers: reduce height on mobile ---- */
@media (max-width: 768px) {
  .chart-container {
    height: 200px !important;
    min-height: 160px;
  }
}

@media (max-width: 480px) {
  .chart-container {
    height: 170px !important;
  }
}

/* ---- Room rows in booking modal: stack on mobile ---- */
@media (max-width: 768px) {
  .room-row {
    flex-direction: column !important;
    gap: 8px !important;
    padding: 14px !important;
  }

  .room-row > div {
    flex: 1 1 100% !important;
    width: 100% !important;
  }

  .room-row .remove-room-btn {
    width: 100% !important;
    visibility: visible !important;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 8px;
    justify-content: center;
  }
}

/* ---- Revenue KPI grid: single column at 480px ---- */
@media (max-width: 480px) {
  .rev-kpi-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ---- Tables: tighter columns on mobile, better scroll UX ---- */
@media (max-width: 768px) {
  /* Scroll shadow indicators */
  .table-container {
    background:
      linear-gradient(to right, white 30%, rgba(255,255,255,0)),
      linear-gradient(to left, white 30%, rgba(255,255,255,0)) 100% 0,
      linear-gradient(to right, rgba(0,0,0,0.06), rgba(0,0,0,0)),
      linear-gradient(to left, rgba(0,0,0,0.06), rgba(0,0,0,0)) 100% 0;
    background-repeat: no-repeat;
    background-size: 48px 100%, 48px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
  }

  body.dark-mode .table-container {
    background:
      linear-gradient(to right, #1e293b 30%, rgba(30,41,59,0)),
      linear-gradient(to left, #1e293b 30%, rgba(30,41,59,0)) 100% 0,
      linear-gradient(to right, rgba(0,0,0,0.15), rgba(0,0,0,0)),
      linear-gradient(to left, rgba(0,0,0,0.15), rgba(0,0,0,0)) 100% 0;
    background-repeat: no-repeat;
    background-size: 48px 100%, 48px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
  }

  table {
    min-width: 600px;
  }

  /* Table cells: tighter padding, smaller font */
  th, td {
    padding: 10px 10px !important;
    font-size: 13px;
    white-space: nowrap;
  }

  /* Hide lower-priority columns on mobile */
  .col-hide-mobile {
    display: none !important;
  }
}

/* ---- Arrivals/Departures: action buttons bigger ---- */
@media (max-width: 768px) {
  .action-btn, .dropdown-btn {
    min-height: 40px;
    padding: 8px 12px !important;
    font-size: 13px !important;
  }
}

/* ---- Settings page: full-width selects & inputs ---- */
@media (max-width: 768px) {
  .settings-section input,
  .settings-section select,
  .settings-section textarea {
    width: 100% !important;
  }

  .settings-section .form-group {
    margin-bottom: 16px;
  }
}

/* ---- Guest search results in booking modal ---- */
@media (max-width: 768px) {
  .guest-search-results {
    max-height: 180px;
  }
}

/* ---- Report search bar: full width on mobile ---- */
@media (max-width: 768px) {
  #reportSearchWrap {
    width: 100% !important;
    max-width: 100% !important;
    order: 10;
    flex: 1 1 100%;
  }

  .report-toolbar {
    flex-wrap: wrap !important;
  }
}

/* ---- Horizontal scrollable tab bars (housekeeping status, etc.) ---- */
@media (max-width: 768px) {
  .tab-bar, .filter-bar, .status-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap !important;
    scrollbar-width: none;
  }

  .tab-bar::-webkit-scrollbar,
  .filter-bar::-webkit-scrollbar,
  .status-tabs::-webkit-scrollbar {
    display: none;
  }
}

/* ---- Booking list: action buttons wrap instead of overflow ---- */
@media (max-width: 480px) {
  .action-buttons {
    flex-wrap: wrap;
    gap: 6px;
  }

  .action-buttons .btn-primary,
  .action-buttons .btn-secondary,
  .action-buttons .btn-danger {
    flex: 1 1 auto;
    width: auto !important;
    min-width: 80px;
    max-width: none !important;
    font-size: 12px;
    padding: 8px 10px;
  }
}

/* ============================================================
   MODAL — MOBILE BOTTOM SHEET (full redesign)
   ============================================================ */

/* Slide-up animation for mobile bottom sheet */
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@media (max-width: 768px) {

  /* Overlay: align to bottom, no side padding */
  .modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
    /* Allow tapping overlay to close */
  }

  /* Bottom sheet container */
  .modal-content,
  .modal-content.large {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92vh !important;
    min-height: 30vh;
    border-radius: 20px 20px 0 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.28s cubic-bezier(0.32, 0.72, 0, 1) !important;
    overflow: hidden !important; /* children handle scroll */
  }

  /* Drag handle at top */
  .modal-content::before,
  .modal-content.large::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: #d1d5db;
    border-radius: 4px;
    margin: 12px auto 0;
    flex-shrink: 0;
  }

  body.dark-mode .modal-content::before,
  body.dark-mode .modal-content.large::before {
    background: #475569;
  }

  /* Sticky modal header (title + close button) */
  .modal-content > h3:first-of-type,
  .modal-content > .modal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--surface, white);
    padding: 14px 18px 12px !important;
    margin: 0 !important;
    border-bottom: 1px solid var(--border-light, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
  }

  /* Close button: top-right corner, always visible */
  .modal-close {
    position: absolute !important;
    top: 14px !important;
    right: 16px !important;
    z-index: 20;
    width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: var(--border-light, #e2e8f0) !important;
    border-radius: 50% !important;
    font-size: 16px;
    color: var(--text-secondary, #64748b);
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.dark-mode .modal-close {
    background: #334155 !important;
    color: #94a3b8;
  }

  /* Scrollable body area inside modal */
  .modal-content > *:not(h3):not(.modal-header):not(.form-actions):not(.modal-close) {
    flex: 1 1 auto;
  }

  /* All form content scrolls */
  .modal-content {
    overflow-y: auto !important;
  }

  /* Sticky footer (Save/Cancel buttons) */
  .modal-content .form-actions {
    position: sticky !important;
    bottom: 0;
    z-index: 10;
    background: var(--surface, white);
    padding: 12px 18px !important;
    margin: 0 !important;
    border-top: 1px solid var(--border-light, #e2e8f0);
    display: flex;
    gap: 10px;
    flex-shrink: 0;
  }

  body.dark-mode .modal-content .form-actions {
    background: #1e293b;
    border-color: #334155;
  }

  /* Form actions buttons side-by-side and equal width */
  .modal-content .form-actions .btn-primary,
  .modal-content .form-actions .btn-secondary,
  .modal-content .form-actions .btn-danger {
    flex: 1;
    width: auto !important;
    justify-content: center;
    min-height: 46px;
    font-size: 15px;
  }

  /* Padding for modal body content */
  .modal-content > .form-group,
  .modal-content > .form-row,
  .modal-content > div:not(.form-actions) {
    padding-left: 18px;
    padding-right: 18px;
  }

  /* Tighter form group spacing on mobile */
  .modal-content .form-group {
    margin-bottom: 14px !important;
  }

  .modal-content .form-group label {
    font-size: 13px;
    margin-bottom: 5px;
  }

  /* Larger inputs for easier tapping */
  .modal-content input.form-control,
  .modal-content select.form-control,
  .modal-content textarea.form-control {
    min-height: 46px;
    font-size: 16px; /* prevent iOS zoom */
    padding: 10px 12px;
  }

  /* Section headers inside modal */
  .modal-content h3,
  .modal-content h4 {
    font-size: 15px !important;
  }

  /* Confirmation modal: center on mobile (not bottom sheet) */
  #confirmModal.modal-overlay {
    align-items: center !important;
    padding: 20px !important;
  }

  #confirmModal .modal-content {
    border-radius: 16px !important;
    min-height: unset !important;
    max-height: 80vh !important;
    animation: scaleIn 0.2s ease !important;
    padding: 28px !important;
    display: block !important;
    overflow-y: auto !important;
  }

  #confirmModal .modal-content::before {
    display: none !important; /* no drag handle on confirm dialog */
  }

  /* Safe area padding at bottom for notched phones */
  .modal-content .form-actions {
    padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
  }
}

/* ---- Inline stat numbers: scale down gracefully ---- */
@media (max-width: 480px) {
  .stat-value, .kpi-value, .metric-value {
    font-size: clamp(18px, 5vw, 28px) !important;
  }

  .stat-label, .kpi-label, .metric-label {
    font-size: 11px;
  }
}

/* ---- Billing guest select: constrain height on mobile ---- */
@media (max-width: 768px) {
  #billingGuestSelect {
    height: auto !important;
    max-height: 180px !important;
    min-height: 80px;
  }
}

/* ---- AR invoice/folio layout ---- */
@media (max-width: 768px) {
  .ar-layout, .folio-layout, .billing-layout {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
}

/* ---- Prevent buttons row from overflowing in table headers ---- */
@media (max-width: 480px) {
  .table-header {
    gap: 8px;
  }

  .table-header .btn-primary,
  .table-header .btn-secondary {
    font-size: 12px;
    padding: 8px 10px;
  }
}

/* ---- Booking search + date filters: compact on mobile ---- */
@media (max-width: 768px) {
  #bkSearchName {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100%;
  }

  #bkArrFrom, #bkArrTo, #bkDepFrom, #bkDepTo {
    width: 120px !important;
    flex: 1 1 120px;
    min-width: 0;
    font-size: 12px !important;
    padding: 7px 8px !important;
    min-height: unset !important;
  }
}

@media (max-width: 480px) {
  #bkArrFrom, #bkArrTo, #bkDepFrom, #bkDepTo {
    width: 100px !important;
    flex: 1 1 100px;
    font-size: 11px !important;
    padding: 6px 6px !important;
  }
}

/* ---- Smooth momentum scrolling everywhere on iOS ---- */
.table-container,
.notification-list,
.modal-content,
.nav-menu,
.config-nav,
.guest-search-results {
  -webkit-overflow-scrolling: touch;
}

/* ---- Swipeable: add visible scroll hint for tables ---- */
@media (max-width: 768px) {
  .table-container::after {
    content: '';
    display: block;
    height: 0;
  }
}

/* ---- Safe area insets for notched phones (iPhone X+) ---- */
@supports (padding: max(0px)) {
  @media (max-width: 768px) {
    .sidebar {
      padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    .modal-content {
      padding-bottom: max(20px, env(safe-area-inset-bottom)) !important;
    }

    .header {
      padding-left: max(14px, env(safe-area-inset-left)) !important;
      padding-right: max(14px, env(safe-area-inset-right)) !important;
    }
  }
}

/* ================================================================
   BOOKING MODAL — MOBILE IMPROVEMENTS
   ================================================================ */

/* Full-screen sheet on mobile: slide up from bottom */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
    /* Prevent overlay itself from scrolling */
    overflow: hidden !important;
    touch-action: none;
  }

  .modal-content,
  .modal-content.large {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92vh !important;
    border-radius: 20px 20px 0 0 !important;
    padding: 20px 16px 24px !important;
    border: none !important;
    animation: slideUp 0.25s ease !important;
    /* Re-enable touch scroll on the content itself */
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
  }

  @keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }

  /* Drag handle visual cue */
  .modal-content::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px;
    margin: 0 auto 16px;
  }

  /* Close button — easier to tap */
  .modal-close {
    top: 14px !important;
    right: 14px !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 18px !important;
  }

  /* Modal title: smaller to save space */
  .modal-content h3 {
    font-size: 16px !important;
    margin-bottom: 12px !important;
    padding-right: 40px; /* don't overlap close btn */
  }

  /* Guest search row: stack search + new-guest button */
  .guest-search-row {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .guest-search-row input {
    width: 100% !important;
  }

  .guest-search-row button {
    width: 100% !important;
    height: 44px !important;
    justify-content: center;
  }

  /* Date/Nights/Adults/Children row: 2 columns then wrap */
  .booking-dates-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  /* Nights, Adults, Children — slightly smaller label */
  .booking-dates-row .form-group label {
    font-size: 12px;
  }

  /* Transport section time inputs: full width */
  .transport-row {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .transport-row .form-group {
    flex: 1 1 100% !important;
    width: 100% !important;
  }

  /* Reduce section padding inside modal */
  .modal-content .form-group[style*="background:#f8fafc"],
  .modal-content .form-group[style*="background: #f8fafc"] {
    padding: 12px !important;
  }

  /* Form rows inside modal: single column */
  .modal-content .form-row {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Inputs/selects: min height 44px for comfortable touch */
  .modal-content input,
  .modal-content select,
  .modal-content textarea {
    min-height: 44px;
    font-size: 16px !important; /* prevents iOS zoom */
  }

  /* Save/Cancel buttons: full width stacked */
  .modal-content .form-actions {
    flex-direction: column-reverse !important;
    gap: 10px !important;
    margin-top: 16px !important;
  }

  .modal-content .form-actions button {
    width: 100% !important;
    padding: 14px !important;
    font-size: 15px !important;
  }
}

@media (max-width: 480px) {
  .modal-content,
  .modal-content.large {
    max-height: 96vh !important;
    padding: 16px 12px 20px !important;
  }

  /* On very small phones: dates stacked single column */
  .booking-dates-row {
    grid-template-columns: 1fr !important;
  }
}

/* ================================================================
   APP-WIDE MOBILE LAYOUT — FINAL OVERRIDES
   Fixes header overflow, button sizing, layout on all phones
   ================================================================ */
@media (max-width: 768px) {

  /* ---- HEADER: single row — hamburger | title … | actions ---- */
  .header {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 0 12px !important;
  }

  #mobileMenuBtn {
    flex-shrink: 0;
    width: 40px !important;
    height: 40px !important;
    min-height: unset !important;
    padding: 0 !important;
    border-radius: 10px !important;
    font-size: 18px !important;
  }

  .header h2 {
    flex: 1 1 0;
    min-width: 0;
    font-size: 17px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 !important;
  }

  .header-actions {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    width: auto !important;
  }

  /* Hide non-essential header items on mobile */
  .date-display           { display: none !important; }
  #privacyBtn             { display: none !important; }
  #languageBtn            { display: none !important; }
  #languageDropdown       { display: none !important; }
  /* Hide keyboard shortcuts — not usable on touch */
  .header-actions button[onclick*="Cheatsheet"],
  .header-actions button[title*="shortcut"],
  .header-actions button[aria-label*="shortcut"],
  .header-actions button[aria-label*="Keyboard"] {
    display: none !important;
  }

  /* All header icon buttons: uniform 40x40 */
  .header-actions .new-booking-btn,
  .header-actions .btn-icon,
  #darkModeBtn,
  .notification-bell {
    width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 40px !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Notification bell container — remove inline margin */
  .notification-bell-container {
    margin: 0 !important;
  }

  /* New Booking button — icon + "New" label, compact */
  #newBookingBtn {
    width: auto !important;
    flex: 0 0 auto !important;
    padding: 0 12px !important;
    height: 40px !important;
    min-height: 40px !important;
    font-size: 13px !important;
    gap: 5px !important;
  }

  #newBookingBtn span {
    display: inline !important;
    content: "New";
  }

  /* ---- ADMIN CONTAINER: sidebar hidden, main fills screen ---- */
  .admin-container {
    display: flex !important;
    flex-direction: column !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    height: 100% !important;
    z-index: 1100 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  .main-content {
    width: 100% !important;
    min-height: 100vh;
    padding: 14px !important;
  }

  /* ---- Touch targets: 44px min only for form controls ---- */
  /* (Override the too-broad button rule that breaks header icons) */
  .header-actions button,
  .header-actions .btn-icon,
  .header-actions .new-booking-btn,
  .notification-bell,
  #mobileMenuBtn {
    min-height: 40px !important;
  }

  /* Form inputs/selects still 44px for thumb tap comfort */
  input.form-control,
  select.form-control,
  textarea.form-control {
    min-height: 44px !important;
    font-size: 16px !important;
  }

  /* ---- Table toolbar: stack heading / actions ---- */
  .table-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .table-header h3 { margin: 0; }

  .table-header > div,
  .table-header > form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .table-header input.form-control,
  .table-header select.form-control {
    flex: 1 1 140px;
    width: auto !important;
  }

  /* ---- Navigation sidebar items: bigger touch targets ---- */
  .nav-item {
    padding: 14px 20px !important;
    font-size: 15px !important;
  }

  /* ---- Stat/KPI cards: 2-column grid on tablet ---- */
  .dashboard-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
}

/* ---- 480px and below: phones ---- */
@media (max-width: 480px) {

  .header h2 { font-size: 15px !important; }

  /* New booking: icon only on very small phones */
  #newBookingBtn {
    width: 40px !important;
    padding: 0 !important;
  }
  #newBookingBtn span { display: none !important; }

  /* Stat cards: single column on small phones */
  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }

  /* Main content: tighter padding */
  .main-content { padding: 10px !important; }
}

/* ── Skeleton Loaders ───────────────────────────────────────────────── */
@keyframes skeletonShimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
.skeleton-line {
  display: inline-block;
  border-radius: 4px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 600px 100%;
  animation: skeletonShimmer 1.4s ease infinite;
  height: 13px;
}
.skeleton-line.sk-w100 { width: 100%; }
.skeleton-line.sk-w80  { width: 80%;  }
.skeleton-line.sk-w60  { width: 60%;  }
.skeleton-line.sk-w40  { width: 40%;  }
.skeleton-line.sk-w24  { width: 24px; height: 24px; border-radius: 50%; }
tr.skeleton-row td { padding: 14px 16px; }
tr.skeleton-row td > * { display: block; margin-bottom: 4px; }

/* Dark mode skeletons */
.dark-mode .skeleton-line {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 600px 100%;
}
/* ── End Skeleton Loaders ─────────────────────────────────────────── */
