/* =========================================================
   HOTEL 1611 – StayDesk Design Exact Match + Design System Typography
   Matches StayDesk reference design precisely while keeping Switzer/Inter fonts
   ========================================================= */

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

:root {
  /* --- STAYDESK COLOR PALETTE --- */
  --color-yellow: #FDB71A;
  --color-dark-blue: #2D539D;
  --color-white: #FFFFFF;
  --color-light-bg: #F9F9F9;
  --color-light-gray: #F0F0F0;
  --color-border: #E5E5E5;
  --color-text: #000000;
  --color-text-secondary: #666666;
  --color-text-muted: #999999;

  /* --- EARLIER PALETTE ---
     Still used by Dashboard, Inventory, Reviews, Sales and Tasks; without
     these, their buttons and chips lose their background (white on white) */
  --color-forest: var(--color-dark-blue);
  --color-parchment: #EDE8D8;
  --color-sand: #D4C9A8;
  --color-gold: #C9A84C;
  --color-rust: #C0392B;
  --color-teal: #0D9488;
  --color-charcoal: #2C2C2C;
  --color-muted: #6B7280;
  --color-light: #9CA3AF;

  /* --- DESIGN SYSTEM TYPOGRAPHY --- */
  --font-heading: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-lg: 16px;
  --text-xl: 18px;
  --text-2xl: 20px;
  
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* --- DESIGN SYSTEM SPACING --- */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-base: 16px;
  --spacing-lg: 20px;
  --spacing-xl: 24px;
  --spacing-2xl: 32px;
  
  /* --- SIZING --- */
  --sidebar-width: 280px;
  --topbar-height: 56px;
  --max-content-width: 1400px;
  
  /* --- RADIUS --- */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  
  /* --- SHADOWS --- */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
  
  /* --- TRANSITIONS --- */
  --transition-base: 0.2s ease;
}

/* ---- Reset & Base ---- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { 
  font-size: 16px; 
  scroll-behavior: smooth; 
}

body {
  font-family: Inter, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  font-size: var(--text-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background: var(--color-light-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Headings ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: Switzer, 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

h1 { font-size: var(--text-2xl); font-weight: 700; margin-bottom: var(--spacing-base); }
h2 { font-size: var(--text-xl); margin-bottom: var(--spacing-md); }
h3 { font-size: var(--text-lg); margin-bottom: var(--spacing-md); }
h4 { font-size: var(--text-base); }

/* ---- App Shell ---- */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--color-light-bg);
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--color-light-bg);
  overflow: hidden;
}

.page-body {
  flex: 1;
  padding: var(--spacing-lg) var(--spacing-xl);
  background: var(--color-light-bg);
  overflow-y: auto;
}

/* ===== STAYDESK SIDEBAR ===== */
.sidebar {
  position: fixed;
  top: 0; 
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--color-border);
  /* No bottom padding: the footer's own padding centres the profile in its strip */
  padding: var(--spacing-lg) 0 0;
}

/* Sidebar brand/logo: gold logo on a navy strip across the top (pulled up
   over the sidebar's top padding), the same navy as the sign-in page. It is
   exactly as tall as the topbar so the two bottom edges line up. */
.sidebar-brand {
  flex-shrink: 0;
  box-sizing: border-box;
  height: 72px;
  margin-top: calc(-1 * var(--spacing-lg));
  padding: 0 var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  background: #1F3D6F;
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

/* The PNG has empty space around the drawing; the negative margin lines
   the drawn logo up with the menu text below */
.brand-logo {
  display: block;
  height: 50px;
  width: auto;
  max-width: 100%;
  margin-left: -4px;
}

/* Hotel info box */
.sidebar-hotel-info {
  padding: var(--spacing-md) var(--spacing-lg);
  margin: 0 var(--spacing-lg) var(--spacing-lg);
  background: var(--color-light-gray);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.hotel-info-name {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--color-text);
}

.hotel-info-details {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

/* Navigation */
.sidebar-nav { 
  flex: 1; 
  padding: 0; 
  overflow-y: auto; 
}

.nav-section { 
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
}

.nav-section:last-of-type {
  border-bottom: none;
}

.nav-section-header {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-lg);
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-section-header:hover { 
  color: var(--color-text);
}

.toggle-icon {
  font-size: 16px;
  transition: transform var(--transition-base);
}

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

.nav-item {
  margin: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: 10px var(--spacing-lg);
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 400;
  transition: all var(--transition-base);
  border-left: 3px solid transparent;
  position: relative;
}

.nav-link:hover { 
  background: var(--color-light-gray);
}

.nav-link.active {
  background: var(--color-yellow);
  color: var(--color-text);
  border-left-color: var(--color-yellow);
  font-weight: 600;
}

/* Front Desk is the staff's main workspace, so its icon stands apart: a navy
   tile, a colour used nowhere else in the menu. The negative margins keep its
   label lined up with the plain 16px icons above and below. */
.nav-icon-front-desk {
  width: 24px;
  height: 24px;
  margin: 0 -4px;
  border-radius: 6px;
  background: #1E3A8A;
  color: #FFFFFF;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(30, 58, 138, 0.35);
}

.nav-link:hover .nav-icon-front-desk { background: #172E6E; }

/* Badge in sidebar */
.nav-badge {
  background: var(--color-yellow);
  color: var(--color-text);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
}

.sidebar-footer {
  padding: var(--spacing-lg);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
  background: var(--color-white);
}

.sidebar-user { 
  display: flex; 
  align-items: center; 
  gap: var(--spacing-base); 
}

.user-avatar {
  width: 32px; 
  height: 32px;
  border-radius: 50%;
  background: var(--color-yellow);
  color: var(--color-text);
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

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

.user-name {
  font-size: var(--text-xs); 
  font-weight: 600; 
  color: var(--color-text);
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px; 
  color: var(--color-text-secondary);
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis;
}

.sidebar-logout {
  margin-left: auto; 
  flex-shrink: 0;
  background: none; 
  border: none; 
  cursor: pointer;
  color: var(--color-text-secondary);
  display: flex; 
  align-items: center; 
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.sidebar-logout:hover { 
  color: var(--color-text);
}

/* ===== TOPBAR ===== */
.topbar {
  position: sticky; 
  top: 0; 
  z-index: 50;
  background: var(--color-white);
  border-bottom: 1px solid #EAECF0;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  padding: 14px var(--spacing-2xl);
  /* min-height, not height: a taller title grows the bar instead of being cut
     off. 72px matches the sidebar's logo strip (.sidebar-brand). */
  min-height: 72px;
  box-sizing: border-box;
  gap: var(--spacing-xl);
}

.topbar-left { 
  display: flex; 
  flex-direction: column; 
  justify-content: center;
  gap: 3px; 
  min-width: 0;
}

/* margin: 0 drops Bootstrap's spacing under h1 and p, which pushed the
   title out of the top of the bar */
.topbar-title {
  margin: 0;
  font-family: Switzer, 'Switzer', sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.2px;
  color: #101828;
}

.topbar-subtitle {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #667085;
}

.topbar-right { 
  display: flex; 
  align-items: center; 
  gap: var(--spacing-md); 
  flex-shrink: 0; 
}

/* Soft filled field that turns white with a blue ring on focus */
.topbar-search {
  display: flex; 
  align-items: center; 
  gap: 10px;
  height: 40px;
  width: 280px;
  margin: 0;
  padding: 0 14px;
  background: #F9FAFB;
  border: 1px solid #EAECF0;
  border-radius: var(--radius-lg);
  cursor: text;
  transition: all var(--transition-base);
}

.topbar-search i {
  color: #98A2B3;
  font-size: 14px;
}

.topbar-search:hover {
  border-color: #D0D5DD;
}

.topbar-search:focus-within {
  background: var(--color-white);
  border-color: var(--color-dark-blue);
  box-shadow: 0 0 0 3px rgba(45, 83, 157, 0.12);
}

.topbar-search input {
  border: none; 
  outline: none;
  font-family: var(--font-body); 
  font-size: 14px;
  background: transparent; 
  color: #101828; 
  width: 100%;
}

.topbar-search input::placeholder {
  color: #98A2B3;
}

.topbar-icon-btn {
  position: relative; 
  width: 40px; 
  height: 40px;
  border-radius: var(--radius-lg);
  background: var(--color-white);
  border: 1px solid #EAECF0;
  display: flex; 
  align-items: center; 
  justify-content: center;
  color: #475467; 
  font-size: 17px;
  cursor: pointer; 
  transition: all var(--transition-base);
}

.topbar-icon-btn:hover { 
  background: #F9FAFB;
  border-color: #D0D5DD;
  color: #101828;
}

.topbar-icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 83, 157, 0.12);
}

/* White ring separates the badge from the button edge */
.notif-badge {
  position: absolute; 
  top: -5px; 
  right: -5px;
  min-width: 18px; 
  height: 18px; 
  padding: 0 5px;
  border-radius: 9px;
  background: #D92D20; 
  color: #FFFFFF;
  box-shadow: 0 0 0 2px var(--color-white);
  font-size: 10px; 
  font-weight: 600;
  line-height: 1;
  display: flex; 
  align-items: center; 
  justify-content: center;
}

/* Date sits after a thin divider, with a calendar icon */
.topbar-date { 
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: var(--spacing-xs);
  padding-left: var(--spacing-base);
  border-left: 1px solid #EAECF0;
  height: 28px;
  font-size: 13px; 
  font-weight: 500;
  color: #344054; 
  white-space: nowrap; 
}

.topbar-date i {
  color: var(--color-dark-blue);
  font-size: 14px;
}

/* Search results and notifications drop down from the topbar */
.topbar-search-wrap,
.topbar-notif {
  position: relative;
}

.topbar-search input::-webkit-search-cancel-button { cursor: pointer; }

.topbar-kbd {
  padding: 1px 6px;
  border: 1px solid #EAECF0;
  border-radius: 5px;
  background: var(--color-white);
  color: #98A2B3;
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 16px;
  box-shadow: none;
}

.topbar-search:focus-within .topbar-kbd { display: none; }

.topbar-panel {
  position: absolute;
  top: calc(100% + 8px);
  z-index: 1050;
  background: var(--color-white);
  border: 1px solid #EAECF0;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.12), 0 2px 6px rgba(16, 24, 40, 0.06);
  overflow-y: auto;
}

.topbar-results {
  left: 0;
  width: 380px;
  max-height: 70vh;
  padding: 6px;
}

.topbar-notif-panel {
  right: 0;
  width: 360px;
  max-height: 70vh;
}

.topbar-panel__head {
  display: flex;
  flex-direction: column;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #F2F4F7;
  font-size: 14px;
  font-weight: 600;
  color: #101828;
}

.topbar-panel__sub {
  font-size: 12px;
  font-weight: 400;
  color: #667085;
}

.topbar-panel__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 16px;
  font-size: 13px;
  color: #667085;
  text-align: center;
}

.topbar-panel__empty i { font-size: 22px; color: #98A2B3; }

.topbar-results__label {
  padding: 10px 10px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #98A2B3;
}

.topbar-result,
.topbar-notif-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: #101828;
  text-decoration: none;
}

.topbar-result:hover,
.topbar-result.is-active,
.topbar-notif-item:hover {
  background: #F2F4F7;
  color: #101828;
}

.topbar-result__icon,
.topbar-notif-item__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #EEF2F8;
  color: var(--color-dark-blue);
  font-size: 15px;
}

.topbar-result__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar-result__title {
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-result__sub {
  font-size: 12px;
  color: #667085;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-notif-list { padding: 6px; }

.topbar-notif-item { position: relative; padding: 10px; }

/* Notifications are short sentences: wrap them rather than cut them off */
.topbar-notif-item .topbar-result__title,
.topbar-notif-item .topbar-result__sub { white-space: normal; }

/* A blue dot marks what came in since the bell was last opened */
.topbar-notif-item.is-new::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--color-dark-blue);
}

.topbar-notif-item.is-new { padding-right: 28px; }
.topbar-notif-item.is-new .topbar-result__title { font-weight: 600; }

.tone-warning .topbar-notif-item__icon { background: #FFF4DB; color: #B54708; }
.tone-danger  .topbar-notif-item__icon { background: #FEE4E2; color: #B42318; }
.tone-success .topbar-notif-item__icon { background: #DCFAE6; color: #067647; }
.tone-info    .topbar-notif-item__icon { background: #EEF2F8; color: var(--color-dark-blue); }

@media (max-width: 1100px) {
  .topbar-search { width: 200px; }
  .topbar-results { width: 340px; }
}

@media (max-width: 768px) {
  .topbar-notif-panel { width: min(360px, calc(100vw - 32px)); }
}

@media (max-width: 768px) {
  .topbar { padding: 12px var(--spacing-base); }
  .topbar-search,
  .topbar-date { display: none; }
}

/* ===== CARDS & COMPONENTS ===== */
.card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

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

/* Stat Cards */
.stat-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  text-align: center;
  min-width: 150px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  position: relative;
  overflow: hidden;
}

/* Top border for stat cards */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-yellow);
}

.stat-card.primary::before { background: var(--color-dark-blue); }
.stat-card.success::before { background: #45AC4F; }
.stat-card.warning::before { background: var(--color-yellow); }
.stat-card.error::before { background: #DC3545; }

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text);
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--color-text-secondary);
}

/* Stat cards in a row (Reservations, Attendance): the label may wrap to two
   lines, so the label fills the space above and every number sits on the
   same line at the bottom, whatever the label length. */
.stat-card .card-body {
  display: flex;
  flex-direction: column;
}

.stat-card .card-body .stat-label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card .card-body .stat-value {
  margin-top: var(--spacing-sm);
}

/* ===== BUTTONS ===== */
.btn {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.btn-primary {
  background: var(--color-dark-blue);
  border: none;
  color: #FFFFFF;
}

/* Bootstrap 5.3 colours a hovered or pressed button from its --bs-btn-*
   variables, not from these rules. Its defaults are a bright blue fill and,
   for .btn-secondary, white text, which on our pale hover fill made the label
   vanish. The variables are set here so every state uses the hotel palette. */
.btn-primary {
  --bs-btn-hover-color: #FFFFFF;
  --bs-btn-hover-bg: #1F3D6F;
  --bs-btn-hover-border-color: #1F3D6F;
  --bs-btn-active-color: #FFFFFF;
  --bs-btn-active-bg: #183160;
  --bs-btn-active-border-color: #183160;
}

.btn-primary:hover {
  background: #1F3D6F;
  color: #FFFFFF;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  --bs-btn-hover-color: var(--color-dark-blue);
  --bs-btn-hover-bg: #E8EFF7;
  --bs-btn-hover-border-color: var(--color-dark-blue);
  --bs-btn-active-color: var(--color-dark-blue);
  --bs-btn-active-bg: #D6E1F0;
  --bs-btn-active-border-color: var(--color-dark-blue);
}

.btn-secondary:hover {
  background: #E8EFF7;
  border-color: var(--color-dark-blue);
  color: var(--color-dark-blue);
}

.btn-outline-primary {
  --bs-btn-color: var(--color-dark-blue);
  --bs-btn-border-color: var(--color-dark-blue);
  --bs-btn-hover-color: #FFFFFF;
  --bs-btn-hover-bg: var(--color-dark-blue);
  --bs-btn-hover-border-color: var(--color-dark-blue);
  --bs-btn-active-color: #FFFFFF;
  --bs-btn-active-bg: #1F3D6F;
  --bs-btn-active-border-color: #1F3D6F;
}

.btn-outline-secondary {
  --bs-btn-hover-color: #FFFFFF;
  --bs-btn-hover-bg: #4B5563;
  --bs-btn-hover-border-color: #4B5563;
  --bs-btn-active-color: #FFFFFF;
  --bs-btn-active-bg: #374151;
  --bs-btn-active-border-color: #374151;
}

.btn-warning {
  background: var(--color-yellow);
  border: none;
  color: var(--color-text);
}

.btn-warning:hover {
  background: #E6A600;
}

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: #D4EDDA; color: #155724; }
.badge-warning { background: #FFF3CD; color: #856404; }
.badge-danger { background: #F8D7DA; color: #721C24; }
.badge-info { background: #D1ECF1; color: #0C5460; }

/* ===== TABLES ===== */
.table {
  font-size: var(--text-sm);
  border-collapse: collapse;
}

.table thead th {
  background: var(--color-light-gray);
  color: var(--color-text);
  font-weight: 600;
  padding: var(--spacing-base) var(--spacing-lg);
  border: 1px solid var(--color-border);
  text-transform: uppercase;
  font-size: 11px;
}

.table tbody td {
  padding: var(--spacing-base) var(--spacing-lg);
  border: 1px solid var(--color-border);
}

/* Bootstrap paints each cell white over the row, so the hover colour has to
   go on the cells for it to show. */
.table tbody tr:hover > td {
  background-color: #EEF2F8;
}

/* ===== ALERTS ===== */
.alert {
  padding: var(--spacing-base);
  border-radius: var(--radius-md);
  border-left: 3px solid;
  font-size: var(--text-sm);
}

.alert-success { background: #D4EDDA; border-color: #45AC4F; color: #155724; }
.alert-warning { background: #FFF3CD; border-color: var(--color-yellow); color: #856404; }
.alert-danger { background: #F8D7DA; border-color: #DC3545; color: #721C24; }

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -100%;
    width: var(--sidebar-width);
    height: 100vh;
    z-index: 200;
    transition: left var(--transition-base);
  }
  
  .sidebar.open {
    left: 0;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .page-body {
    padding: var(--spacing-base);
  }
}

/* ===== Components used by Sales, Food & Equipment, Guest Reviews, Task Management
   and the reservation approval flow (carried over from the previous stylesheet,
   restyled with this palette) ===== */
.card-hotel {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  padding: 20px 24px;
}

.btn-gold { background: var(--color-yellow); color: var(--color-text); border: none; }
.btn-gold:hover { background: #e9a50f; color: var(--color-text); }

.badge-amber { background: #FEF3C7; color: #92400E; }
.badge-confirmed { background: #15803D; color: #FFFFFF; }   /* solid, so an upcoming stay stands apart from the pale Completed */
.badge-teal  { background: #CCFBF1; color: #065F46; }
.badge-green { background: #D1FAE5; color: #065F46; }
.badge-red   { background: #FEE2E2; color: #991B1B; }
.badge-blue  { background: #DBEAFE; color: #1E40AF; }
.badge-gray  { background: #F3F4F6; color: #374151; }
.badge-gold  { background: #FEF9C3; color: #78350F; }

.table-hotel thead th {
  background: var(--color-light-gray);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  border: none;
}
.table-hotel tbody tr:hover > td { background-color: #EEF2F8; }
.table-hotel td { font-size: var(--text-sm); vertical-align: middle; }

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

.sub-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 24px;
}
.sub-tab {
  padding: 8px 20px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  text-decoration: none;
  transition: color var(--transition-base);
}
.sub-tab:hover { color: var(--color-dark-blue); }
.sub-tab.active {
  color: var(--color-dark-blue);
  border-bottom-color: var(--color-dark-blue);
  font-weight: 600;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 7px 12px;
  width: 240px;
}
.search-bar input {
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  background: transparent;
  color: var(--color-text);
  width: 100%;
}


/* Reservation approval flow (Reservation Detail) */
.approval-flow { display: flex; gap: 0; margin: 20px 0; overflow-x: auto; }
.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 90px;
  position: relative;
}
.flow-step::after {
  content: '';
  position: absolute;
  top: 14px;
  right: -50%;
  width: 100%;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}
.flow-step:last-child::after { display: none; }
.flow-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  z-index: 1;
}
.flow-step.done .flow-dot, .flow-dot.done { background: #0D9488; border-color: #0D9488; color: white; }
.flow-step.active .flow-dot, .flow-dot.active { background: var(--color-dark-blue); border-color: var(--color-dark-blue); color: white; }
.flow-step.rejected .flow-dot, .flow-dot.rejected { background: #C0392B; border-color: #C0392B; color: white; }
.flow-label {
  font-size: 0.65rem;
  color: var(--color-text-secondary);
  text-align: center;
  margin-top: 4px;
  white-space: nowrap;
}

/* ===== CONFIRM / ALERT DIALOGS (static/js/confirm-dialog.js) =====
   SweetAlert2 restyled to match the admin pages: a white card with a tinted
   icon beside the text and right-aligned buttons. Selectors carry .swal2-popup
   so they outrank SweetAlert's own stylesheet, which it injects at runtime. */
.swal-1611-backdrop.swal2-backdrop-show {
  background: rgba(15, 23, 42, 0.5);
}

/* Icon in the first column, title and text in the second, buttons across both */
.swal2-popup.swal-1611 {
  grid-template-columns: 2.5rem minmax(0, 1fr);
  column-gap: 1rem;
  width: min(30rem, calc(100vw - 2rem));
  padding: 2rem;
  border: 0;
  border-radius: var(--radius-xl);
  background-color: #FFFFFF;
  box-shadow: var(--shadow-xl);
  font-family: var(--font-body);
  text-align: left;
}

.swal2-popup.swal-1611 .swal-1611__icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  border: 0;
  border-radius: 50%;
  font-size: 1.125rem;
  animation: none;
}

.swal2-popup.swal-1611 .swal-1611__icon .swal2-icon-content {
  font-size: inherit;
  animation: none;
}

.swal2-popup.swal-1611 .swal2-icon.swal2-question,
.swal2-popup.swal-1611 .swal2-icon.swal2-info {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.swal2-popup.swal-1611 .swal2-icon.swal2-warning {
  background: var(--color-warning-light);
  color: var(--color-warning-dark);
}

.swal2-popup.swal-1611 .swal2-icon.swal2-error {
  background: var(--color-error-light);
  color: var(--color-error-dark);
}

.swal2-popup.swal-1611 .swal2-icon.swal2-success {
  background: var(--color-success-light);
  color: var(--color-success-dark);
}

.swal2-popup.swal-1611 .swal-1611__title {
  grid-column: 2;
  min-height: 2.5rem;
  margin: 0;
  padding: 0.5rem 0 0;   /* lines the first row up with the icon's centre */
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  color: var(--color-text);
}

.swal2-popup.swal-1611 .swal-1611__body {
  grid-column: 2;
  margin: 0;
  padding: 0;
  font-size: var(--text-sm);
  line-height: 1.5;
  text-align: left;
  color: var(--color-text-secondary);
  overflow-wrap: anywhere;
}

.swal2-popup.swal-1611 .swal-1611__actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  flex-wrap: nowrap;
  width: 100%;
  margin: 1.5rem 0 0;
  padding: 0;
  gap: 0.5rem;
}

.swal2-popup.swal-1611 .swal-1611__actions .btn {
  min-width: 5.5rem;
  margin: 0;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  box-shadow: none;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}

.swal2-popup.swal-1611 .swal-1611__actions .btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.swal2-popup.swal-1611 .swal-1611__actions .btn-primary {
  background: var(--color-primary);
  color: #FFFFFF;
}

.swal2-popup.swal-1611 .swal-1611__actions .btn-primary:hover {
  background: var(--color-primary-dark);
  color: #FFFFFF;
}

.swal2-popup.swal-1611 .swal-1611__actions .btn-danger {
  background: var(--color-error);
  color: #FFFFFF;
}

.swal2-popup.swal-1611 .swal-1611__actions .btn-danger:hover {
  background: var(--color-error-dark);
  color: #FFFFFF;
}

.swal2-popup.swal-1611 .swal-1611__actions .btn-secondary {
  background: #FFFFFF;
  border-color: var(--color-border-dark);
  color: var(--color-text);
}

.swal2-popup.swal-1611 .swal-1611__actions .btn-secondary:hover {
  background: var(--color-bg-primary);
  color: var(--color-text);
}

/* Phones: stack the buttons full width, confirm on top */
@media (max-width: 575.98px) {
  .swal2-popup.swal-1611 {
    padding: 1.5rem;
  }
  .swal2-popup.swal-1611 .swal-1611__actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .swal2-popup.swal-1611 .swal-1611__actions .btn {
    width: 100%;
    white-space: normal;
  }
}

/* ── Month picker (Sales, Food & Equipment) ───────────────────────────────
 * month-picker.js swaps the month <select> for a button that opens this
 * panel: year with arrows on top, the twelve months in a grid below. Same
 * look as the rest of the admin: grey borders, Inter, the primary blue. */
.mp {
  position: relative;
}

.mp-trigger {
  width: auto;
  min-width: 190px;
  height: 34px;
  padding-top: 0;
  padding-bottom: 0;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.mp.is-open .mp-trigger {
  border-color: var(--color-forest);
  box-shadow: 0 0 0 3px rgba(45, 83, 157, 0.15);
}

.mp-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1060;
  width: 272px;
  padding: 12px;
  border: 1px solid #E0E3E8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.12);
  font-family: var(--font-body);
}

.mp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mp-year {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-charcoal);
  font-variant-numeric: tabular-nums;
}

.mp-year-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #E0E3E8;
  border-radius: 6px;
  background: #fff;
  color: var(--color-charcoal);
}

.mp-year-btn:hover:not(:disabled) {
  border-color: var(--color-forest);
  background: #E8EFF7;
  color: var(--color-forest);
}

.mp-year-btn:disabled {
  background: #F5F7FA;
  color: #C5CDD2;
  cursor: not-allowed;
}

.mp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.mp-month {
  height: 36px;
  padding: 0;
  border: 1px solid #E0E3E8;
  border-radius: 6px;
  background: #F5F7FA;
  color: var(--color-charcoal);
  font-size: 0.8125rem;
  font-weight: 600;
}

.mp-month:hover:not(:disabled) {
  border-color: var(--color-forest);
  background: #E8EFF7;
  color: var(--color-forest);
}

/* No records that month */
.mp-month:disabled {
  border-color: transparent;
  background: transparent;
  color: #C5CDD2;
  font-weight: 500;
  cursor: not-allowed;
}

/* This month: outlined in blue (it stays recognisable when another is chosen) */
.mp-month.is-current {
  border-color: var(--color-forest);
  background: #fff;
  color: var(--color-forest);
}

.mp-month.is-selected,
.mp-month.is-selected:hover {
  border-color: var(--color-forest);
  background: var(--color-forest);
  color: #fff;
}

.mp-month:focus-visible,
.mp-year-btn:focus-visible,
.mp-foot-btn:focus-visible {
  outline: 2px solid var(--color-forest);
  outline-offset: 2px;
}

.mp-foot {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #E0E3E8;
}

.mp-foot-btn {
  flex: 1 1 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #E0E3E8;
  border-radius: 6px;
  background: #fff;
  color: var(--color-charcoal);
  font-size: 0.8125rem;
  font-weight: 600;
}

.mp-foot-btn:hover {
  border-color: var(--color-forest);
  background: #E8EFF7;
  color: var(--color-forest);
}

.mp-foot-btn.is-selected {
  border-color: var(--color-forest);
  background: var(--color-forest);
  color: #fff;
}

@media (max-width: 575.98px) {
  .mp-trigger { min-width: 0; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; }
  .mp-panel { width: min(272px, calc(100vw - 16px)); }   /* month-picker.js keeps it on screen */
}

/* ── Add Reservation: dates calendar (res-calendar.js) ─────────────────── */
.res-cal {
  padding: 12px;
  border: 1px solid var(--color-sand);
  border-radius: 10px;
  background: #fff;
}

.res-cal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.res-cal__summary {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-charcoal);
}

.res-cal__clear {
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-forest);
  text-decoration: underline;
}

.res-cal__months {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 0 4px;
}

.res-cal__nav {
  position: absolute;
  top: -2px;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--color-sand);
  border-radius: 6px;
  background: #fff;
  color: var(--color-charcoal);
}

.res-cal__nav--prev { left: 0; }
.res-cal__nav--next { right: 0; }
.res-cal__nav:hover:not(:disabled) { border-color: var(--color-forest); color: var(--color-forest); }
.res-cal__nav:disabled { opacity: 0.35; }

.res-cal__title {
  margin-bottom: 8px;
  text-align: center;
  font-weight: 700;
  line-height: 26px;
  color: var(--color-charcoal);
}

.res-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.res-cal__wd {
  padding-bottom: 4px;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-muted);
}

.res-cal__day {
  position: relative;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #F7F5EF;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-charcoal);
  font-variant-numeric: tabular-nums;
}

.res-cal__day:hover:not(:disabled) {
  border-color: var(--color-forest);
  background: #fff;
}

.res-cal__day.is-today { box-shadow: inset 0 0 0 1px var(--color-forest); }

.res-cal__day.is-past {
  background: transparent;
  color: #C4C4C4;
  font-weight: 500;
}

/* Booked: soft red, struck through, the reservation code on hover */
.res-cal__day.is-booked {
  background: #FDECEC;
  color: #9B1C1C;
  text-decoration: line-through;
}

/* Closed by the hotel: grey hatching */
.res-cal__day.is-closed {
  background: repeating-linear-gradient(135deg, #EEEEEE 0 4px, #F8F8F8 4px 8px);
  color: #8A8A8A;
}

/* A booked day can still be the check-out day: show it as clickable */
.res-cal__day.is-booked:not(:disabled) { text-decoration: none; }

.res-cal__day.is-range {
  border-color: transparent;
  background: #DCE6F5;
  color: var(--color-forest);
}

.res-cal__day.is-end,
.res-cal__day.is-end:hover {
  border-color: var(--color-forest);
  background: var(--color-forest);
  color: #fff;
  text-decoration: none;
}

.res-cal__day:disabled { cursor: not-allowed; }
.res-cal__day:focus-visible { outline: 2px solid var(--color-forest); outline-offset: 2px; }

.res-cal__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 12px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--color-parchment);
  list-style: none;
  font-size: 0.75rem;
  color: var(--color-muted);
}

.res-cal__legend li { display: inline-flex; align-items: center; gap: 6px; }

.res-cal__swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--color-sand);
}

.res-cal__swatch--free { background: #F7F5EF; }
.res-cal__swatch--booked { background: #FDECEC; border-color: #F3B5B5; }
.res-cal__swatch--closed { background: repeating-linear-gradient(135deg, #E2E2E2 0 3px, #F8F8F8 3px 6px); }
.res-cal__swatch--selected { background: var(--color-forest); border-color: var(--color-forest); }

.res-cal__error {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: #FDECEC;
  font-size: 0.8125rem;
  color: #9B1C1C;
}

/* Nights: filled in from the dates, not typed */
.res-readonly,
.res-readonly:focus {
  background: #F7F5EF;
  box-shadow: none;
  cursor: default;
}

@media (max-width: 767.98px) {
  .res-cal__months { grid-template-columns: 1fr; gap: 16px; }
}

/* ── Room Setup > Amenities ────────────────────────────────────────────────
 * Same look as the rest of the admin: white cards with a header strip,
 * Switzer headings, Inter text, the primary blue for actions and icons. */
.am-intro {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--color-muted);
}

.am-intro .bi { margin-top: 1px; color: var(--color-muted); }
.am-intro strong { color: var(--color-charcoal); font-weight: 600; }

.am-group {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.am-group__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  background: #FAFBFC;
}

/* A plain icon beside the heading, like the other admin card titles */
.am-group__icon {
  flex: none;
  font-size: 1rem;
  line-height: 1;
  color: var(--color-muted);
}

.am-group__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-charcoal);
}

.am-group__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 4px 16px 14px;
}

.am-list {
  flex: 1;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

/* Every row the height of a two-line name, so one- and two-line items
 * take the same space and the rows line up across the four groups */
.am-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
}

.am-item:last-child { border-bottom: 0; }

.am-item__name {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--color-charcoal);
  overflow-wrap: anywhere;
}

/* Up and down as one joined pair of outlined buttons, then Remove on its own */
.am-item__actions {
  display: flex;
  align-items: center;
  flex: none;
}

.am-item__actions form { margin: 0; }
.am-item__actions form:nth-child(2) { margin-left: -1px; }   /* share the border between up and down */
.am-item__actions form:nth-child(3) { margin-left: 6px; }

.am-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
  color: var(--color-charcoal);
  font-size: 0.8125rem;
  line-height: 1;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.am-item__actions form:nth-child(1) .am-btn { border-radius: 6px 0 0 6px; }
.am-item__actions form:nth-child(2) .am-btn { border-radius: 0 6px 6px 0; }

.am-btn:hover:not(:disabled) {
  z-index: 1;
  border-color: var(--color-forest);
  background: #E8EFF7;
  color: var(--color-forest);
}

.am-btn:disabled {
  background: #F5F7FA;
  color: #C5CDD2;
  cursor: not-allowed;
}

.am-btn--remove { color: #B91C1C; }

.am-btn--remove:hover:not(:disabled) {
  border-color: #DC3545;
  background: #FEF2F2;
  color: #B91C1C;
}

.am-btn:focus-visible { z-index: 2; outline: 2px solid var(--color-forest); outline-offset: 1px; }

.am-empty {
  padding: 10px 0;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.am-add {
  display: flex;
  gap: 6px;
}


.am-add .btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
}

.am-full {
  margin: 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: #F3F4F6;
  font-size: 0.75rem;
  color: var(--color-muted);
}


/* The one paid extra: an ordinary admin card, set apart by its amber badge */
.am-extra {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  align-items: center;
  gap: 14px 20px;
  padding: 16px 20px;
}


.am-extra__title {
  margin: 6px 0 2px;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-charcoal);
}

.am-extra__lead {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--color-muted);
}

.am-extra__lead strong { color: var(--color-charcoal); font-weight: 600; }

.am-extra__form { margin: 0; }

.am-extra__label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}


@media (max-width: 767.98px) {
  .am-extra { grid-template-columns: 1fr; }
  .am-extra__form { grid-column: 1 / -1; }
}

/* The price field at the admin's usual 40px input height */
.am-extra .input-group > .input-group-text,
.am-extra .input-group > .btn {
  min-height: 40px;
  font-size: var(--text-sm);
}
