/* HotelFlow PMS Custom Styles */
:root {
  --primary: #1e293b;
  --primary-hover: #0f172a;
  --accent: #d97706;
  --accent-hover: #b45309;
  --bg-dark: #0f172a;
  --card-bg: #1e293b;
  --border-color: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #0b0f19;
  color: var(--text-main);
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- COMPREHENSIVE LIGHT MODE OVERRIDES --- */
html.light-mode,
html.light-mode body,
body.light-mode,
html:not(.dark),
html:not(.dark) body {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

html.light-mode header,
html.light-mode footer,
html.light-mode nav,
html.light-mode aside,
html.light-mode main,
html:not(.dark) header,
html:not(.dark) footer,
html:not(.dark) nav,
html:not(.dark) aside,
html:not(.dark) main,
body.light-mode header,
body.light-mode footer,
body.light-mode nav,
body.light-mode aside,
body.light-mode main {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html.light-mode section,
html:not(.dark) section,
body.light-mode section {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

/* Light mode card containers, panels & KPI boxes (strictly excludes fixed overlays and backdrops) */
html.light-mode [class*="bg-slate-950"]:not(.fixed):not(.modal-overlay):not([id*="backdrop"]):not([id$="-modal"]),
html.light-mode [class*="bg-slate-900"]:not(.fixed):not(.modal-overlay):not([id*="backdrop"]):not([id$="-modal"]),
html.light-mode [class*="bg-slate-850"]:not(.fixed):not(.modal-overlay):not([id*="backdrop"]):not([id$="-modal"]),
html.light-mode .bg-slate-950:not(.fixed):not(.modal-overlay):not([id*="backdrop"]):not([id$="-modal"]),
html.light-mode .bg-slate-900:not(.fixed):not(.modal-overlay):not([id*="backdrop"]):not([id$="-modal"]),
html.light-mode .modal-card,
html:not(.dark) [class*="bg-slate-950"]:not(.fixed):not(.modal-overlay):not([id*="backdrop"]):not([id$="-modal"]),
html:not(.dark) [class*="bg-slate-900"]:not(.fixed):not(.modal-overlay):not([id*="backdrop"]):not([id$="-modal"]),
html:not(.dark) .bg-slate-950:not(.fixed):not(.modal-overlay):not([id*="backdrop"]):not([id$="-modal"]),
html:not(.dark) .bg-slate-900:not(.fixed):not(.modal-overlay):not([id*="backdrop"]):not([id$="-modal"]),
html:not(.dark) .modal-card,
body.light-mode [class*="bg-slate-950"]:not(.fixed):not(.modal-overlay):not([id*="backdrop"]):not([id$="-modal"]),
body.light-mode [class*="bg-slate-900"]:not(.fixed):not(.modal-overlay):not([id*="backdrop"]):not([id$="-modal"]),
body.light-mode [class*="bg-slate-850"]:not(.fixed):not(.modal-overlay):not([id*="backdrop"]):not([id$="-modal"]),
body.light-mode .bg-slate-950:not(.fixed):not(.modal-overlay):not([id*="backdrop"]):not([id$="-modal"]),
body.light-mode .bg-slate-900:not(.fixed):not(.modal-overlay):not([id*="backdrop"]):not([id$="-modal"]),
body.light-mode .modal-card {
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05) !important;
  color: #0f172a !important;
}

/* Scrim Backdrops & Modal Overlays - MUST ALWAYS remain semi-transparent dark scrims in ALL modes */
#vertical-nav-backdrop,
.modal-overlay,
[id*="backdrop"],
div.fixed.inset-0[class*="bg-slate-950"],
div.fixed.inset-0[class*="bg-slate-900"],
[id$="-modal"].fixed.inset-0,
[class*="backdrop-blur"]:is(.fixed) {
  background-color: rgba(15, 23, 42, 0.78) !important;
  background-image: none !important;
  box-shadow: none !important;
}

html.light-mode [class*="bg-slate-800"],
html.light-mode .bg-slate-800,
html:not(.dark) [class*="bg-slate-800"],
html:not(.dark) .bg-slate-800,
body.light-mode [class*="bg-slate-800"],
body.light-mode .bg-slate-800 {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

html.light-mode [class*="bg-slate-800"]:hover,
html.light-mode .bg-slate-800:hover,
html:not(.dark) .bg-slate-800:hover,
body.light-mode [class*="bg-slate-800"]:hover,
body.light-mode .bg-slate-800:hover {
  background-color: #e2e8f0 !important;
}

/* Gradient controller card in light mode (applied to container cards, not action buttons) */
html.light-mode div.bg-gradient-to-br,
html.light-mode div.bg-gradient-to-r,
html:not(.dark) div.bg-gradient-to-br,
html:not(.dark) div.bg-gradient-to-r,
body.light-mode div.bg-gradient-to-br,
body.light-mode div.bg-gradient-to-r {
  background: #ffffff !important;
  border-color: #f59e0b !important;
}

/* Primary Amber Brand Action Buttons in Light Mode */
html.light-mode button.bg-gradient-to-r,
body.light-mode button.bg-gradient-to-r,
html.light-mode .btn-sidebar-walkin,
body.light-mode .btn-sidebar-walkin {
  background: linear-gradient(to right, #d97706, #f59e0b) !important;
  color: #ffffff !important;
  border: 1px solid #d97706 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

html.light-mode button.bg-gradient-to-r:hover,
body.light-mode button.bg-gradient-to-r:hover,
html.light-mode .btn-sidebar-walkin:hover,
body.light-mode .btn-sidebar-walkin:hover {
  background: linear-gradient(to right, #b45309, #d97706) !important;
  color: #ffffff !important;
}

html.light-mode button.bg-gradient-to-r *,
body.light-mode button.bg-gradient-to-r *,
html.light-mode .btn-sidebar-walkin *,
body.light-mode .btn-sidebar-walkin * {
  color: #ffffff !important;
}

/* Text typography in light mode */
html.light-mode .text-white,
html.light-mode .text-slate-100,
html:not(.dark) .text-white,
html:not(.dark) .text-slate-100,
body.light-mode .text-white,
body.light-mode .text-slate-100 {
  color: #0f172a !important;
}

html.light-mode .text-slate-200,
html.light-mode .text-slate-300,
html:not(.dark) .text-slate-200,
html:not(.dark) .text-slate-300,
body.light-mode .text-slate-200,
body.light-mode .text-slate-300 {
  color: #1e293b !important;
}

html.light-mode .text-slate-400,
html:not(.dark) .text-slate-400,
body.light-mode .text-slate-400 {
  color: #475569 !important;
}

html.light-mode .text-slate-500,
html:not(.dark) .text-slate-500,
body.light-mode .text-slate-500 {
  color: #64748b !important;
}

html.light-mode .border-slate-800,
html.light-mode .border-slate-700,
html.light-mode .border-slate-600,
html.light-mode [class*="border-slate-800"],
html.light-mode [class*="border-slate-700"],
html:not(.dark) .border-slate-800,
html:not(.dark) .border-slate-700,
html:not(.dark) .border-slate-600,
body.light-mode .border-slate-800,
body.light-mode .border-slate-700,
body.light-mode .border-slate-600,
body.light-mode [class*="border-slate-800"],
body.light-mode [class*="border-slate-700"] {
  border-color: #cbd5e1 !important;
}

/* Light mode brand identity for callout and notification boxes (replaces dark gray boxes) */
html.light-mode [class*="bg-sky-950"],
html:not(.dark) [class*="bg-sky-950"],
body.light-mode [class*="bg-sky-950"] {
  background-color: #fffbeb !important;
  border-color: #fcd34d !important;
  color: #1e293b !important;
}

html.light-mode [class*="bg-sky-950"] .text-sky-300,
html:not(.dark) [class*="bg-sky-950"] .text-sky-300,
body.light-mode [class*="bg-sky-950"] .text-sky-300 {
  color: #0f172a !important;
  font-weight: 800 !important;
}

html.light-mode [class*="bg-amber-950"],
html:not(.dark) [class*="bg-amber-950"],
body.light-mode [class*="bg-amber-950"] {
  background-color: #fef3c7 !important;
  border-color: #f59e0b !important;
  color: #78350f !important;
}

html.light-mode [class*="bg-emerald-950"],
html:not(.dark) [class*="bg-emerald-950"],
body.light-mode [class*="bg-emerald-950"] {
  background-color: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #064e3b !important;
}

html.light-mode table,
body.light-mode table {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

html.light-mode thead,
html.light-mode thead tr,
html.light-mode th,
body.light-mode thead,
body.light-mode thead tr,
body.light-mode th {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
}

html.light-mode tbody tr,
body.light-mode tbody tr {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
}

html.light-mode tbody tr:hover,
body.light-mode tbody tr:hover {
  background-color: #f8fafc !important;
}

html.light-mode td,
body.light-mode td {
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

/* Amber / Gold in light mode */
body.light-mode .text-amber-400,
body.light-mode .text-amber-300,
body.light-mode .text-amber-500 {
  color: #b45309 !important;
}

body.light-mode .bg-amber-400,
body.light-mode .bg-amber-500 {
  background-color: #f59e0b !important;
  color: #0f172a !important;
}

body.light-mode .bg-amber-500\/10,
body.light-mode .bg-amber-500\/15,
body.light-mode .bg-amber-500\/20,
body.light-mode .bg-amber-500\/30 {
  background-color: #fef3c7 !important;
  border-color: #f59e0b !important;
  color: #92400e !important;
}

/* Emerald green in light mode */
body.light-mode .text-emerald-400,
body.light-mode .text-emerald-300 {
  color: #047857 !important;
}

body.light-mode .bg-emerald-500\/10,
body.light-mode .bg-emerald-500\/20 {
  background-color: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
}

/* Footer High-Contrast Action Buttons (Guaranteed Visibility in Light & Dark Mode) */
.footer-sms-btn {
  background-color: #fef3c7 !important;
  border: 1.5px solid #f59e0b !important;
  color: #78350f !important;
  text-decoration: none !important;
}
.footer-sms-btn .action-title {
  color: #78350f !important;
  font-weight: 800 !important;
  font-size: 13px !important;
}
.footer-sms-btn .action-sub {
  color: #92400e !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  opacity: 1 !important;
}

.footer-wa-btn {
  background-color: #ecfdf5 !important;
  border: 1.5px solid #10b981 !important;
  color: #064e3b !important;
  text-decoration: none !important;
}
.footer-wa-btn .action-title {
  color: #064e3b !important;
  font-weight: 800 !important;
  font-size: 13px !important;
}
.footer-wa-btn .action-sub {
  color: #047857 !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  opacity: 1 !important;
}

.footer-email-btn {
  background-color: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #0f172a !important;
  text-decoration: none !important;
}
.footer-email-btn .action-title {
  color: #0f172a !important;
  font-weight: 800 !important;
  font-size: 13px !important;
}
.footer-email-btn .action-sub {
  color: #475569 !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  opacity: 1 !important;
}

/* Rose / red in light mode */
body.light-mode .text-rose-400,
body.light-mode .text-rose-300 {
  color: #b91c1c !important;
}

body.light-mode .bg-rose-950\/60,
body.light-mode .bg-rose-500\/20 {
  background-color: #fef2f2 !important;
  border-color: #fca5a5 !important;
  color: #991b1b !important;
}

/* Indigo / Violet in light mode */
body.light-mode .text-indigo-400,
body.light-mode .text-indigo-300,
body.light-mode .text-indigo-200 {
  color: #3730a3 !important;
}
body.light-mode .bg-indigo-500\/10,
body.light-mode .bg-indigo-600\/20,
body.light-mode .bg-indigo-500\/20,
body.light-mode .bg-indigo-950\/40,
body.light-mode .bg-indigo-950\/60,
body.light-mode .bg-indigo-950\/80 {
  background-color: #e0e7ff !important;
  border-color: #818cf8 !important;
  color: #312e81 !important;
}

/* Blue in light mode */
body.light-mode .text-blue-400,
body.light-mode .text-blue-300,
body.light-mode .text-blue-200 {
  color: #1d4ed8 !important;
}
body.light-mode .bg-blue-600\/20,
body.light-mode .bg-blue-500\/20,
body.light-mode .bg-blue-950\/30,
body.light-mode .bg-blue-950\/60 {
  background-color: #dbeafe !important;
  border-color: #93c5fd !important;
  color: #1e40af !important;
}

/* Purple in light mode */
body.light-mode .text-purple-400,
body.light-mode .text-purple-300,
body.light-mode .text-purple-200 {
  color: #6b21a8 !important;
}
body.light-mode .bg-purple-600\/20,
body.light-mode .bg-purple-500\/20,
body.light-mode .bg-purple-950\/30,
body.light-mode .bg-purple-950\/60,
body.light-mode .bg-purple-950\/80 {
  background-color: #f3e8ff !important;
  border-color: #c084fc !important;
  color: #581c87 !important;
}

/* Sky in light mode */
body.light-mode .text-sky-400,
body.light-mode .text-sky-300,
body.light-mode .text-sky-200 {
  color: #0369a1 !important;
}
body.light-mode .bg-sky-600\/20,
body.light-mode .bg-sky-500\/20,
body.light-mode .bg-sky-950\/80 {
  background-color: #e0f2fe !important;
  border-color: #7dd3fc !important;
  color: #075985 !important;
}

/* Inputs, dropdowns, and room discount cards */
body.light-mode input,
body.light-mode select,
body.light-mode textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

body.light-mode input::placeholder,
body.light-mode textarea::placeholder {
  color: #94a3b8 !important;
}

body.light-mode input:focus,
body.light-mode select:focus,
body.light-mode textarea:focus {
  border-color: #d97706 !important;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2) !important;
}

body.light-mode .room-discount-row {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

body.light-mode .room-discount-row.bg-amber-500\/10 {
  background-color: #fef3c7 !important;
  border-color: #f59e0b !important;
}

body.light-mode .room-discount-input {
  background-color: #ffffff !important;
  color: #b45309 !important;
  border-color: #cbd5e1 !important;
}

body.light-mode .room-calc-preview {
  color: #047857 !important;
}

/* Booking Screen Room Card in Light Mode */
body.light-mode .room-booking-card {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08) !important;
}

body.light-mode .modal-card {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2) !important;
  color: #0f172a !important;
}

body.light-mode .matrix-container {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
}

body.light-mode .matrix-table th {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
  border-color: #e2e8f0 !important;
}

body.light-mode .matrix-table td {
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

body.light-mode .file-dropzone {
  border-color: #cbd5e1 !important;
  background-color: #f8fafc !important;
}

body.light-mode .file-dropzone:hover {
  border-color: #d97706 !important;
  background-color: #fffbeb !important;
}

/* Toast Container */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999999 !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 14px 18px;
  border-radius: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 5px solid transparent;
  z-index: 9999999 !important;
}

.toast-success { background: #064e3b; border-color: #10b981; color: #ecfdf5; }
.toast-error { background: #7f1d1d; border-color: #ef4444; color: #fef2f2; }
.toast-warning { background: #78350f; border-color: #f59e0b; color: #fffbeb; }
.toast-info { background: #1e3a8a; border-color: #3b82f6; color: #eff6ff; }

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

/* Modal Overlay - Modern Mobile & Multi-Device Viewport */
.modal-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 12px;
  box-sizing: border-box;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  width: 100%;
  max-width: 620px;
  margin: auto;
  max-height: none;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 20px 14px;
  position: relative;
  box-sizing: border-box;
  color: #0f172a;
}

@media (min-width: 640px) {
  .modal-overlay {
    padding: 32px 16px;
    align-items: center;
  }
  .modal-card {
    padding: 28px;
    border-radius: 20px;
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* Modal Open Body Scroll Lock */
body.modal-open {
  overflow: hidden !important;
}

/* Occupancy Matrix Grid & Sticky Headers */
.matrix-container {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 560px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #0f172a;
  position: relative;
}

.matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.matrix-table th, .matrix-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #1e293b;
  border-right: 1px solid #1e293b;
  text-align: center;
}

.matrix-table th {
  background: #1e293b;
  color: #94a3b8;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Sticky First Column (Room & Taxonomy) */
.matrix-table th:first-child,
.matrix-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 20;
  background-color: #0f172a;
  border-right: 2px solid #334155;
}

.matrix-table th:first-child {
  z-index: 30;
  background-color: #1e293b;
}

body.light-mode .matrix-table th:first-child,
body.light-mode .matrix-table td:first-child {
  background-color: #ffffff !important;
  border-right: 2px solid #cbd5e1 !important;
}

body.light-mode .matrix-table th:first-child {
  background-color: #f1f5f9 !important;
}

.badge-occ {
  background: #dc2626 !important;
  color: #ffffff !important;
  border: 1px solid #b91c1c !important;
  padding: 3px 7px !important;
  border-radius: 5px !important;
  font-weight: 800 !important;
  font-size: 10px !important;
  letter-spacing: 0.3px !important;
  line-height: 1.2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
  transition: transform 0.15s ease, filter 0.15s ease !important;
}

.badge-vac {
  background: #16a34a !important;
  color: #ffffff !important;
  border: 1px solid #15803d !important;
  padding: 3px 7px !important;
  border-radius: 5px !important;
  font-weight: 800 !important;
  font-size: 10px !important;
  letter-spacing: 0.3px !important;
  line-height: 1.2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
  transition: transform 0.15s ease, filter 0.15s ease !important;
}

.badge-ooo {
  background: #334155 !important;
  color: #fde68a !important;
  border: 1px solid #f59e0b !important;
  padding: 3px 7px !important;
  border-radius: 5px !important;
  font-weight: 800 !important;
  font-size: 10px !important;
  letter-spacing: 0.3px !important;
  line-height: 1.2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}

.badge-vac-dirty {
  background: #e11d48 !important;
  color: #ffffff !important;
  border: 1px solid #be123c !important;
  padding: 3px 7px !important;
  border-radius: 5px !important;
  font-weight: 800 !important;
  font-size: 10px !important;
  letter-spacing: 0.3px !important;
  line-height: 1.2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
  white-space: nowrap !important;
}

.badge-checkout {
  background: #7c3aed !important;
  color: #ffffff !important;
  border: 1px solid #6d28d9 !important;
  padding: 3px 7px !important;
  border-radius: 5px !important;
  font-weight: 800 !important;
  font-size: 10px !important;
  letter-spacing: 0.3px !important;
  line-height: 1.2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, filter 0.15s ease !important;
}

.badge-dueout {
  background: #ea580c !important;
  color: #ffffff !important;
  border: 1px solid #c2410c !important;
  padding: 3px 7px !important;
  border-radius: 5px !important;
  font-weight: 800 !important;
  font-size: 10px !important;
  letter-spacing: 0.3px !important;
  line-height: 1.2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, filter 0.15s ease !important;
}

.badge-cleaning {
  background: #d97706 !important;
  color: #ffffff !important;
  border: 1px solid #b45309 !important;
  padding: 3px 7px !important;
  border-radius: 5px !important;
  font-weight: 800 !important;
  font-size: 10px !important;
  letter-spacing: 0.3px !important;
  line-height: 1.2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
  white-space: nowrap !important;
}

.badge-occ:hover, .badge-checkout:hover, .badge-dueout:hover, .badge-vac:hover {
  filter: brightness(1.1) !important;
  transform: translateY(-1px) !important;
}

/* Matrix Status Legend Chips */
.matrix-legend-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 2px 7px 2px 3px !important;
  border-radius: 6px !important;
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  transition: background-color 0.15s ease !important;
}
.matrix-legend-chip:hover {
  background-color: #f1f5f9 !important;
}
html.dark .matrix-legend-chip,
body:not(.light-mode) .matrix-legend-chip {
  background-color: rgba(30, 41, 59, 0.7) !important;
  border-color: #334155 !important;
}
html.dark .matrix-legend-chip:hover,
body:not(.light-mode) .matrix-legend-chip:hover {
  background-color: rgba(51, 65, 85, 0.8) !important;
}

.matrix-legend-label {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  white-space: nowrap !important;
}
html.dark .matrix-legend-label,
body:not(.light-mode) .matrix-legend-label {
  color: #cbd5e1 !important;
}

/* Rate Category Chips & Presets in Light Mode */
.rate-cat-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 5px 10px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  transition: all 0.15s ease !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}
body.light-mode .rate-cat-chip:not(.active) {
  background-color: #ffffff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}
body.light-mode .rate-cat-chip:not(.active):hover {
  background-color: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}
body.light-mode .rate-cat-chip.active {
  background: linear-gradient(to right, #d97706, #f59e0b) !important;
  color: #ffffff !important;
  border: 1px solid #d97706 !important;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.3) !important;
  font-weight: 800 !important;
}

/* Custom Drag and Drop Area */
.file-dropzone {
  border: 2px dashed #475569;
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.file-dropzone:hover, .file-dropzone.dragover {
  border-color: #d97706;
  background: rgba(217, 119, 6, 0.05);
}

/* Chat Widget Floating Container & Toggle Button Guaranteed High Z-Index & Visibility */
#chat-widget-container {
  position: fixed !important;
  bottom: 1.5rem !important;
  right: 1.5rem !important;
  z-index: 99999 !important;
  display: block !important;
}

#chat-widget-toggle {
  width: 3.5rem !important;
  height: 3.5rem !important;
  background-color: #d97706 !important;
  color: #ffffff !important;
  border-radius: 9999px !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3) !important;
  border: 2px solid rgba(251, 191, 36, 0.8) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 1.5rem !important;
  transition: transform 0.2s ease, background-color 0.2s ease !important;
}

#chat-widget-toggle:hover {
  background-color: #f59e0b !important;
  transform: scale(1.08) !important;
}

body.light-mode #chat-widget-toggle {
  background-color: #d97706 !important;
  color: #ffffff !important;
}

/* Chat Widget Window Active State */
#chat-widget-window.active {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

/* Hide scrollbar utility for suggestion pills */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Mobile Viewport 100dvh & Full-Screen Responsive Floating Chat Widget */
@media (max-width: 640px) {
  #chat-widget-window {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    z-index: 99999 !important;
  }
}

.chat-whatsapp-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.chat-whatsapp-card:hover {
  transform: translateY(-2px);
}

/* ==========================================================================
   UNIVERSAL CROSS-DEVICE RESPONSIVE DESIGN SYSTEM
   Optimized for: iPhone, Android Phones, iPad, Tablets, Laptops & Desktops
   ========================================================================== */

/* 1. Mobile Touch Screen Optimizations (< 768px) */
@media (max-width: 767px) {
  html, body {
    overflow-x: clip;
    touch-action: manipulation;
  }

  /* Tap targets for primary touchscreen controls (exempt compact table buttons & badges) */
  .touch-target,
  .form-control-touch,
  .mobile-bottom-nav-item,
  .btn-primary-touch {
    min-height: 42px;
  }

  /* Modal responsive behavior for small phone screens */
  .modal-container-scroll {
    max-height: 90vh !important;
    width: 95vw !important;
    margin: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Responsive table scroll wrapper */
  .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
}

/* 2. Tablet & iPad Portrait / Landscape Optimizations (768px to 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .max-w-7xl {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }

  .tablet-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* 3. Mobile Landscape Orientation Shifts (< 500px height) */
@media (max-height: 500px) and (orientation: landscape) {
  #chat-widget-window {
    height: 100vh !important;
  }
}

/* 4. Safe Area Insets for Modern iPhone Notches & Dynamic Island */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #chat-widget-window {
    padding-bottom: env(safe-area-inset-bottom);
  }
  footer {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

/* ==========================================================================
   ISOLATED PRINT STYLESHEET (Rule P3 Compliance — Dark Mode & Color Inversion Elimination)
   ========================================================================== */
@media print {
  *, *:before, *:after {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    border-color: #cbd5e1 !important;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
    line-height: 1.4;
    margin: 0 !important;
    padding: 0 !important;
  }

  header, nav, aside, footer, .no-print, button, .modal-overlay, #toast-container, #chat-widget-container, #chat-widget-bubble, .touch-btn {
    display: none !important;
  }

  img, svg {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  table {
    border-collapse: collapse !important;
    width: 100% !important;
    page-break-inside: auto;
  }

  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  th, td {
    border: 1px solid #cbd5e1 !important;
    padding: 6px 8px !important;
    color: #000000 !important;
    background: #ffffff !important;
    font-size: 10pt;
  }
}

/* ==========================================================================
   EXECUTIVE HOUSEKEEPING STATUS BADGES & BRAND HARMONY
   Prevents text wrapping, circular distortion, and enforces brand cohesion
   ========================================================================== */
.hk-status-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
}

.hk-status-badge .dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

/* 1. Clean & Ready */
.hk-badge-clean {
  background-color: #ecfdf5 !important;
  color: #065f46 !important;
  border: 1px solid #a7f3d0 !important;
}
.hk-badge-clean .dot {
  background-color: #10b981 !important;
}
html.dark .hk-badge-clean,
body:not(.light-mode) .hk-badge-clean {
  background-color: rgba(6, 78, 59, 0.45) !important;
  color: #6ee7b7 !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

/* 2. Needs Cleaning (Dirty) */
.hk-badge-dirty {
  background-color: #fff1f2 !important;
  color: #9f1239 !important;
  border: 1px solid #fecdd3 !important;
}
.hk-badge-dirty .dot {
  background-color: #f43f5e !important;
}
html.dark .hk-badge-dirty,
body:not(.light-mode) .hk-badge-dirty {
  background-color: rgba(136, 19, 55, 0.45) !important;
  color: #fda4af !important;
  border: 1px solid rgba(244, 63, 94, 0.4) !important;
}

/* 3. In Progress */
.hk-badge-cleaning {
  background-color: #fffbeb !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
}
.hk-badge-cleaning .dot {
  background-color: #f59e0b !important;
}
html.dark .hk-badge-cleaning,
body:not(.light-mode) .hk-badge-cleaning {
  background-color: rgba(120, 53, 15, 0.45) !important;
  color: #fcd34d !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

/* 4. Inspected */
.hk-badge-inspected {
  background-color: #f8fafc !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}
.hk-badge-inspected .dot {
  background-color: #64748b !important;
}
html.dark .hk-badge-inspected,
body:not(.light-mode) .hk-badge-inspected {
  background-color: rgba(30, 41, 59, 0.6) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(100, 116, 139, 0.4) !important;
}

/* 5. Out of Order */
.hk-badge-ooo {
  background-color: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca !important;
}
.hk-badge-ooo .dot {
  background-color: #ef4444 !important;
}
html.dark .hk-badge-ooo,
body:not(.light-mode) .hk-badge-ooo {
  background-color: rgba(127, 29, 29, 0.45) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

/* ==========================================================================
   HOTELFLOW PMS BRAND TABLE ACTION BUTTONS (EXECUTIVE PALETTE)
   Eliminates rainbow pastel clutter & guarantees high contrast
   ========================================================================== */

/* Standard Action Button (Switch, Edit, SMS, Out-SMS, Folio, E-Sign) */
.btn-table-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.25rem !important;
  padding: 0.25rem 0.5rem !important;
  border-radius: 0.375rem !important;
  font-size: 0.75rem !important;
  line-height: 1rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: all 0.15s ease-in-out !important;
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
  text-decoration: none !important;
}
.btn-table-action:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}
html.dark .btn-table-action,
body:not(.light-mode) .btn-table-action {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border: 1px solid #334155 !important;
}
html.dark .btn-table-action:hover,
body:not(.light-mode) .btn-table-action:hover {
  background-color: #334155 !important;
  color: #ffffff !important;
  border-color: #475569 !important;
}

/* Primary HotelFlow POS Brand Button (Signature Amber) */
.btn-table-pos {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.25rem !important;
  padding: 0.25rem 0.6rem !important;
  border-radius: 0.375rem !important;
  font-size: 0.75rem !important;
  line-height: 1rem !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: all 0.15s ease-in-out !important;
  background-color: #f59e0b !important;
  color: #0f172a !important;
  border: 1px solid #d97706 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}
.btn-table-pos:hover {
  background-color: #d97706 !important;
  color: #ffffff !important;
  border-color: #b45309 !important;
}

/* Verified Signed Badge / Button */
.btn-table-signed {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.25rem !important;
  padding: 0.25rem 0.5rem !important;
  border-radius: 0.375rem !important;
  font-size: 0.75rem !important;
  line-height: 1rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: all 0.15s ease-in-out !important;
  background-color: #ecfdf5 !important;
  color: #065f46 !important;
  border: 1px solid #a7f3d0 !important;
}
.btn-table-signed:hover {
  background-color: #d1fae5 !important;
  color: #064e3b !important;
  border-color: #6ee7b7 !important;
}
html.dark .btn-table-signed,
body:not(.light-mode) .btn-table-signed {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #6ee7b7 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
}
html.dark .btn-table-signed:hover,
body:not(.light-mode) .btn-table-signed:hover {
  background-color: rgba(16, 185, 129, 0.3) !important;
  color: #ffffff !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
}

/* Destructive / Delete Button */
.btn-table-danger {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.25rem !important;
  padding: 0.25rem 0.5rem !important;
  border-radius: 0.375rem !important;
  font-size: 0.75rem !important;
  line-height: 1rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: all 0.15s ease-in-out !important;
  background-color: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca !important;
}
.btn-table-danger:hover {
  background-color: #fee2e2 !important;
  color: #7f1d1d !important;
  border-color: #f87171 !important;
}
html.dark .btn-table-danger,
body:not(.light-mode) .btn-table-danger {
  background-color: rgba(225, 29, 72, 0.15) !important;
  color: #fda4af !important;
  border: 1px solid rgba(225, 29, 72, 0.3) !important;
}
html.dark .btn-table-danger:hover,
body:not(.light-mode) .btn-table-danger:hover {
  background-color: rgba(225, 29, 72, 0.3) !important;
  color: #ffffff !important;
  border-color: rgba(225, 29, 72, 0.5) !important;
}

/* Sub-Tab Filter Pills */
.booking-pill-btn {
  border-radius: 0.5rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  transition: all 0.15s ease-in-out !important;
  cursor: pointer !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #f8fafc !important;
  color: #334155 !important;
}
.booking-pill-btn:hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}
.booking-pill-btn.active {
  background-color: #f59e0b !important;
  color: #0f172a !important;
  border-color: #d97706 !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}
html.dark .booking-pill-btn,
body:not(.light-mode) .booking-pill-btn {
  background-color: #1e293b !important;
  color: #94a3b8 !important;
  border: 1px solid #334155 !important;
}
html.dark .booking-pill-btn:hover,
body:not(.light-mode) .booking-pill-btn:hover {
  background-color: #334155 !important;
  color: #ffffff !important;
  border-color: #475569 !important;
}
html.dark .booking-pill-btn.active,
body:not(.light-mode) .booking-pill-btn.active {
  background-color: #f59e0b !important;
  color: #0f172a !important;
  border-color: #f59e0b !important;
}

/* ==========================================================================
   MOBILE APP DUAL NAVIGATION DOCK & FIXED HEADER
   ========================================================================== */

#admin-mobile-header {
  padding-top: max(0.6rem, env(safe-area-inset-top, 0px));
}

#admin-mobile-bottom-nav {
  height: calc(58px + env(safe-area-inset-bottom, 0px));
  padding-bottom: max(0.35rem, env(safe-area-inset-bottom, 0px));
}

.mobile-bottom-nav-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  color: #94a3b8;
  transition: all 0.15s ease-in-out;
  border-radius: 0.5rem;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.mobile-bottom-nav-item:active {
  transform: scale(0.92);
}

.mobile-bottom-nav-item.active {
  color: #f59e0b !important;
}

body.light-mode #admin-mobile-header {
  background-color: rgba(255, 255, 255, 0.96) !important;
  border-bottom-color: #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

body.light-mode #admin-mobile-header h1 {
  color: #0f172a !important;
}

body.light-mode #admin-mobile-bottom-nav {
  background-color: rgba(255, 255, 255, 0.96) !important;
  border-top-color: #cbd5e1 !important;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05) !important;
}

body.light-mode .mobile-bottom-nav-item {
  color: #64748b !important;
}

body.light-mode .mobile-bottom-nav-item.active {
  color: #b45309 !important;
}

/* ==========================================================================
   ADMIN DASHBOARD SIDEBAR SCROLLBAR & SLEEK LAYOUT
   ========================================================================== */
.custom-admin-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #f1f5f9;
}

.custom-admin-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-admin-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 9999px;
}

.custom-admin-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.custom-admin-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

html.dark .custom-admin-scrollbar,
body:not(.light-mode) .custom-admin-scrollbar {
  scrollbar-color: #334155 #0f172a;
}

html.dark .custom-admin-scrollbar::-webkit-scrollbar-track,
body:not(.light-mode) .custom-admin-scrollbar::-webkit-scrollbar-track {
  background: #0f172a;
}

html.dark .custom-admin-scrollbar::-webkit-scrollbar-thumb,
body:not(.light-mode) .custom-admin-scrollbar::-webkit-scrollbar-thumb {
  background: #334155;
}

html.dark .custom-admin-scrollbar::-webkit-scrollbar-thumb:hover,
body:not(.light-mode) .custom-admin-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Light Mode Admin Sidebar Theme hardener */
body.light-mode #vertical-nav-drawer {
  background-color: #ffffff !important;
  border-right-color: #e2e8f0 !important;
}

body.light-mode #vertical-nav-drawer > div {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}






