@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('dashboard.css');
@import url('rooms.css');
@import url('auth.css');
@import url('orders.css');
@import url('landing.css');


:root {
  /* Color Palette - Premium Indigo/Slate Theme */
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  
  --secondary-color: #0ea5e9;
  --secondary-hover: #0284c7;
  
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #3b82f6;

  --bg-body: #f3f4f6;
  --bg-surface: #ffffff;
  --bg-sidebar: #111827;
  --bg-sidebar-hover: #1f2937;

  --text-main: #111827;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --text-white: #ffffff;

  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
  font-size: 15px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}

h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Cards */
.card, .stat-card, .login-card, .register-card, .order-panel, .checkout-summary, .booking-section {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition-normal);
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition-normal);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

@media print {
  @page {
    size: auto;
    margin: 0;
  }

  html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: white;
    font-family: 'Inter', sans-serif;
    color: #111827;
  }

  /* Hide everything except the summary */
  body * {
    visibility: hidden;
  }

  /* Remove layout wrappers */
  .sidebar, .mobile-header, .navbar, footer, .sidebar-overlay, .d-print-none, .no-print,
  .btn, .sidebar-brand {
    display: none !important;
  }

  /* Reset main containers */
  .main-content, .booking-form, .dashboard-container {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  /* The Receipt Container */
  #print-summary {
    box-sizing: border-box;
    visibility: visible !important;
    display: block !important;
    position: fixed;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px; /* Constrain width for better readability */
    height: 100%;
    z-index: 9999;
    background: white;
    padding: 2rem 3rem; 
    
    /* Remove default card styles */
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
  }

  #print-summary * {
    visibility: visible !important;
    height: auto !important;
  }
  
  /* Header Section */
  #print-summary .d-print-block.text-center.mb-4 {
    margin-bottom: 2rem !important;
    border-bottom: 2px solid #111827;
    padding-bottom: 1rem;
  }

  #print-summary h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    color: #111827;
    letter-spacing: -0.5px;
    text-transform: uppercase;
  }

  #print-summary p.text-muted {
    font-size: 0.9rem;
    color: #6b7280 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0;
  }

  /* Info Section (Invoice #, Date) */
  #print-summary .d-flex.justify-content-between {
    margin-bottom: 2rem !important;
  }

  #print-summary .d-print-block strong {
    font-weight: 600;
    color: #374151;
  }

  /* Customer & Details Boxes */
  #print-summary .row.g-3 {
    display: flex;
    gap: 2rem; /* Use gap for spacing */
    margin-bottom: 2rem !important;
    --bs-gutter-y: 0;
    --bs-gutter-x: 0;
  }

  #print-summary .col-6 {
    flex: 1;
    width: 48%; /* Explicit width for flex children in print */
    margin: 0;
  }

  #print-summary .p-3.bg-light {
    background-color: #f9fafb !important; /* Force light gray background */
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 1.25rem !important;
    height: 100%;
    -webkit-print-color-adjust: exact; /* Ensure background color prints */
    print-color-adjust: exact;
  }

  #print-summary small.text-uppercase {
    font-size: 0.7rem;
    font-weight: 700;
    color: #9ca3af !important;
    letter-spacing: 1px;
    margin-bottom: 0.5rem !important;
  }

  #print-summary h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
  }

  /* Table Styling */
  #print-summary .table-responsive {
    margin-bottom: 2rem !important;
    overflow: visible !important;
  }

  #print-summary .table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    border: none !important;
  }

  #print-summary .table thead th {
    background-color: #111827 !important;
    color: white !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 0.75rem 1rem;
    border: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  #print-summary .table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb !important;
    font-size: 0.9rem;
    vertical-align: middle;
  }

  #print-summary .table tbody tr:last-child td {
    border-bottom: 2px solid #111827 !important;
  }

  /* Totals Section */
  #print-summary .table tfoot td {
    padding: 1rem;
    background-color: transparent !important;
    border: none !important;
  }

  #print-summary .table tfoot td:first-child {
    text-align: right;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    padding-right: 2rem;
  }

  #print-summary .table tfoot td:last-child {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827 !important;
  }

  /* Footer */
  #print-summary .mt-5 {
    margin-top: 3rem !important;
  }

  #print-summary .text-center.mt-5 p {
    font-weight: 600;
    color: #111827;
    font-size: 1rem;
  }
}

.card:hover, .stat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: rgba(79, 70, 229, 0.2);
}

/* Buttons */
.btn {
  padding: 0.625rem 1.25rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn-primary, .login-button, .register-button {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}
.btn-primary:hover, .login-button:hover, .register-button:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
  box-shadow: 0 6px 8px -1px rgba(79, 70, 229, 0.3);
  transform: translateY(-1px);
}
.btn-success { background: var(--success-color); color: white; }
.btn-danger { background: var(--danger-color); color: white; }
.btn-warning { background: var(--warning-color); color: white; }
.btn-secondary { background: #e5e7eb; color: var(--text-main); }

/* Forms */
.form-control, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="tel"], select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: #f9fafb;
  color: var(--text-main);
  transition: var(--transition-fast);
  font-family: inherit;
  font-size: 0.95rem;
}

.form-control:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: white;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-label, label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  font-size: 0.9rem;
}

/* Tables */
.table {
  width: 100%;
  margin-bottom: 1rem;
  vertical-align: top;
  border-color: var(--border-color);
}
.table thead th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem;
}
.table tbody td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}
.table-hover tbody tr:hover {
  background-color: #f9fafb;
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: 500;
}
.alert-danger { background-color: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-success { background-color: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.alert-warning { background-color: #fffbeb; color: #92400e; border-color: #fde68a; }
.alert-info { background-color: #eff6ff; color: #1e40af; border-color: #bfdbfe; }

/* ========================================================================================== */
/* Sidebar Layout */
/* ========================================================================================== */

.d-flex {
  display: flex;
}

.sidebar {
  width: 260px;
  height: 100dvh; /* Use dynamic viewport height for mobile browsers */
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0; /* Ensure it stretches to bottom */
  background-color: var(--bg-sidebar);
  color: var(--text-white);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform var(--transition-normal);
  box-shadow: 4px 0 24px rgba(0,0,0,0.1);
}

/* Sidebar Branding */
.sidebar-brand {
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sidebar-brand h4 {
  color: white;
  margin: 0;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sidebar-brand i { color: var(--secondary-color); }

/* Sidebar User */
.sidebar-user {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sidebar-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.sidebar-username {
  font-weight: 500;
  color: var(--text-white);
  font-size: 0.95rem;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 1.5rem 1rem;
  overflow-y: auto;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  color: #9ca3af !important; /* Force override bootstrap */
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
  font-weight: 500;
  text-decoration: none;
}
.nav-link i {
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}
.nav-link:hover {
  background-color: rgba(255,255,255,0.05);
  color: white !important;
  transform: translateX(5px);
}
.nav-link:hover i {
  color: var(--secondary-color);
}
.nav-link.active {
  background: rgba(79, 70, 229, 0.15);
  color: var(--primary-light) !important;
  border: 1px solid rgba(79, 70, 229, 0.3);
}
.nav-link.active i {
  color: var(--primary-color);
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* Main Content Area */
.main-content, .d-flex > .p-4 {
  margin-left: 260px;
  padding: 2rem !important;
  width: calc(100% - 260px);
  min-height: 100vh;
  transition: margin-left var(--transition-normal), width var(--transition-normal);
}

/* Settings Page Checkboxes */
.settings-checkbox-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  background: white;
  transition: all 0.2s ease;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.settings-checkbox-card:hover {
  background-color: #f9fafb;
}

/* Use a class to trigger style updates via JS if :has() fails or for robust support */
.settings-checkbox-card.checked {
  background-color: #eef2ff;
  border-color: var(--primary-color);
}

.settings-checkbox-card label {
  margin-bottom: 0;
  cursor: pointer;
  flex: 1;
}
/* Public Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: white;
  border-top: 1px solid var(--border-color);
}

.custom-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.custom-popup {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 400px;
  width: 90%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-popup-overlay.active .custom-popup {
  transform: scale(1);
}

.custom-popup-icon {
  margin-bottom: 1rem;
}

.custom-popup-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.custom-popup-message {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.custom-popup-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* ========================================================================================== */
/* Mobile Responsive */
/* ========================================================================================== */

/* Main Content Area */
.main-content, .d-flex > .p-4 {
  margin-left: 260px;
  padding: 2rem !important;
  width: calc(100% - 260px);
  min-height: 100vh;
  transition: margin-left var(--transition-normal), width var(--transition-normal);
}

.dashboard-container {
  width: 100%;
  margin: 0;
  padding: 0;
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
    z-index: 1050;
    height: 100dvh; /* Use dynamic height */
    display: flex;
    flex-direction: column;
    bottom: 0;
  }
  
  .sidebar.sidebar-mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
  }
  
  /* Prevent background scrolling when sidebar is open */
  body.sidebar-open {
    overflow: hidden;
  }
  
  .sidebar-nav {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-content, .d-flex > .p-4 {
    margin-left: 0;
    width: 100%;
    padding: 1rem !important;
  }
  
  .mobile-header {
    background: var(--bg-sidebar);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
    margin-bottom: 20px;
  }
  
  .sidebar-overlay-visible {
    display: block;
    background: rgba(0,0,0,0.5);
    position: fixed;
    inset: 0;
    z-index: 1040;
  }

  .stat-card {
    margin-bottom: 1rem;
  }

  .home-page .home-header {
    padding: 1rem 1rem;
  }

  .home-page .home-brand-logo {
    width: 44px;
    height: 44px;
  }

  .home-page .home-brand-text {
    font-size: 1.5rem;
  }
}

@media (min-width: 993px) {
  .mobile-header {
    display: none;
  }
}


/* Responsive Tables */
@media screen and (max-width: 768px) {
  .table-responsive-stack tr {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1rem;
    background: white;
    padding: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }
  
  .table-responsive-stack td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    padding: 0.5rem 0;
    font-size: 0.95rem;
  }

  .table-responsive-stack td:before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 1rem;
  }

  .table-responsive-stack thead {
    display: none;
  }
}

