/* Search Controls Layout */
/* html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
} */
/* === DESIGN TOKENS === */
:root {
  /* Agent search + results: indigo accent, dark-navy/serif identity text on
     a neutral sans UI (see body/.brand-serif below for the pairing). */
  --search-primary: #4f46e5;
  --search-primary-dark: #4338ca;
  --search-primary-soft: #eef2ff;
  --search-primary-soft-2: #e0e7ff;
  --search-primary-soft-border: #c7d2fe;
  --text-dark: #1a1f36;
  --text-muted: #6b7280;
  --card-bg: #ffffff;
  --border: #e5e7eb;

  --font-display: Georgia, 'Times New Roman', serif;
  --font-ui: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, 'Roboto Mono', monospace;

  /* Room/rate-plan card accent (dbook-room-*, dbook-rateplan-*, hotel-card,
     view-rooms-btn) -- shared by both portals. Fallback only; each portal
     sets its own values below via body[data-portal="..."] so Agent OTA and
     Hotel Portal can be recolored independently without touching the other
     or the shared component CSS itself. */
  --room-accent: #8b7cf6;
  --room-accent-hover: #6c58ff;
  --room-accent-soft-1: #f3effc;
  --room-accent-soft-2: #eee9fa;
  --room-accent-soft-border: #d7cdf2;
  --room-accent-soft-text: #9f87d1;
  --room-accent-bullet: #c9bdec;
}

/* Hotel Portal palette for the shared room/rate-plan component (purple) */
body[data-portal="hotel"] {
  --room-accent: #8b7cf6;
  --room-accent-hover: #6c58ff;
  --room-accent-soft-1: #f3effc;
  --room-accent-soft-2: #eee9fa;
  --room-accent-soft-border: #d7cdf2;
  --room-accent-soft-text: #9f87d1;
  --room-accent-bullet: #c9bdec;
}

/* Agent OTA palette for the shared room/rate-plan component -- indigo, matching
   the search panel/results redesign's --search-primary tokens above. */
body[data-portal="agent"] {
  --room-accent: #8b7cf6;
  --room-accent-hover: #6c58ff;
  --room-accent-soft-1: #f3effc;
  --room-accent-soft-2: #eee9fa;
  --room-accent-soft-border: #d7cdf2;
  --room-accent-soft-text: #9f87d1;
  --room-accent-bullet: #c9bdec;
}

body {
  margin: 0;
  font-family: var(--font-ui);
}

.search-controls {
  margin-bottom: 20px;
}

/* Search panel card wrapping the whole "Search Hotels" block */
.search-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 20px 24px;
}

.search-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.search-panel-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--search-primary-soft);
  color: var(--search-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-panel-icon svg {
  width: 18px;
  height: 18px;
}

.search-panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
}

.search-panel-subtitle {
  margin: 2px 0 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.search-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  position: relative;
}

.input-group {
  display: flex;
  flex-direction: column;
}

.input-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

/* Wraps an icon + input/select as one bordered pill; the input itself is
   borderless so it doesn't double up with this wrapper's border. */
.input-control {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 2px solid #ddd;
  border-radius: 4px;
  background-color: white;
  transition: border-color 0.2s;
}

.input-control:hover {
  border-color: var(--search-primary);
}

.input-icon {
  flex: 0 0 auto;
  display: flex;
  color: var(--text-muted);
}

.input-icon svg {
  width: 15px;
  height: 15px;
}

.input-control-chevron {
  flex: 0 0 auto;
  display: flex;
  color: var(--text-muted);
}

.input-control-chevron svg {
  width: 13px;
  height: 13px;
}

/* Date Inputs */
.date-input {
  width: 160px;
  padding: 10px 0;
  font-size: 14px;
  border: none;
  cursor: pointer;
  background-color: transparent;
  min-width: 0;
}

/* Guests Input */
.guests-input {
  width: 220px;
  padding: 10px 0;
  font-size: 14px;
  border: none;
  cursor: pointer;
  background-color: transparent;
  min-width: 0;
}

/* Guest Selector Popup */
#guest-selector-container {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  padding: 16px;
  z-index: 1000;
  min-width: 300px;
}

.guest-selector-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e0e0e0;
}

.guest-selector-row:last-child {
  border-bottom: none;
}

.guest-selector-label {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.guest-selector-label-sub {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

.guest-selector-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.guest-selector-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 50%;
  background-color: white;
  color: #333;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.guest-selector-btn:hover:not(:disabled) {
  border-color: #007bff;
  color: #007bff;
  background-color: #f0f8ff;
}

.guest-selector-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: #e0e0e0;
  color: #ccc;
}

.guest-selector-value {
  min-width: 30px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.guest-selector-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: flex-end;
}

.guest-selector-apply-btn {
  padding: 8px 24px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.guest-selector-apply-btn:hover {
  background-color: #0056b3;
}

/* Hotel Card Styles -- restyled to match the shared room/rate-plan card
   language (white card, rounded, subtle shadow) so it doesn't clash with
   the room groups rendered inside .rooms-container below it. */
.hotel-card {
  border: none;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s;
}

.hotel-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
}

.hotel-card-body {
  display: flex;
  align-items: stretch;
  gap: 20px;
}

/* Fixed size regardless of load state (placeholder or <img>) so the image
   never causes a layout shift once it finishes loading. */
.hotel-card-image-slot {
  position: relative;
  flex: 0 0 220px;
  width: 220px;
  height: 150px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--search-primary-soft) 0%, var(--search-primary-soft-2) 100%);
  border: 1px dashed var(--search-primary-soft-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--room-accent-soft-text);
}

.hotel-card-image-photo {
  border-style: solid;
  border-color: var(--border);
}

.hotel-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hotel-card-image-icon {
  font-size: 26px;
}

.hotel-card-image-icon svg {
  width: 28px;
  height: 28px;
}

.hotel-card-image-caption {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hotel-card-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(17, 17, 33, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.hotel-card-badge svg {
  width: 12px;
  height: 12px;
}

.hotel-card-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hotel-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--text-dark);
}

.hotel-location {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.hotel-location svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.hotel-amenity-icons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
}

.hotel-amenity-icons .hotel-amenity {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 12px;
}

.hotel-amenity-icons .hotel-amenity svg {
  width: 14px;
  height: 14px;
  color: #9ca3af;
}

.hotel-card-price-block {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  text-align: right;
  min-width: 160px;
}

.hotel-card-price-label {
  font-size: 12px;
  color: var(--text-muted);
}

.hotel-card-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
}

.hotel-card-price-caption {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.view-rooms-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background-color: var(--room-accent);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.2s;
}

.view-rooms-btn svg {
  width: 14px;
  height: 14px;
}

.view-rooms-btn:hover {
  background-color: var(--room-accent-hover);
}

/* Room Types Container */
.rooms-container {
  margin-top: 16px;
  padding-top: 4px;
  border-top: 1px solid #eceef5;
}

/* Calendar Styles */
#calendar-container {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  padding: 16px;
  z-index: 1000;
  min-width: 340px;
  max-width: 340px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.calendar-header h3 {
  margin: 0;
  font-size: 16px;
  color: #333;
  font-weight: 600;
}

.calendar-nav-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  color: #007bff;
  transition: background-color 0.2s;
  border-radius: 4px;
}

.calendar-nav-btn:hover {
  background-color: #f0f0f0;
}

.calendar-nav-btn:disabled {
  color: #ccc;
  cursor: not-allowed;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.calendar-weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  padding: 8px 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  border: 1px solid transparent;
}

.calendar-day:hover:not(.disabled):not(.empty) {
  background-color: #e3f2fd;
  border-color: #2196f3;
}

.calendar-day.empty {
  cursor: default;
}

.calendar-day.disabled {
  color: #ccc;
  cursor: not-allowed;
  text-decoration: line-through;
}

.calendar-day.check-in {
  background-color: #007bff;
  color: white;
  font-weight: 600;
  border-color: #0056b3;
}

.calendar-day.check-out {
  background-color: #007bff;
  color: white;
  font-weight: 600;
  border-color: #0056b3;
}

.calendar-day.in-range {
  background-color: #cfe2ff;
  color: #004085;
}

.calendar-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calendar-footer-text {
  font-size: 12px;
  color: #666;
}

.calendar-clear-btn {
  padding: 6px 12px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.calendar-clear-btn:hover {
  background-color: #545b62;
}

/* ============================================
   Portal Header
   ============================================ */
.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
  padding: 16px 24px 12px 24px;
  border-bottom: 2px solid #e0e0e0;
}

.portal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
}

.agent-selector-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #555;
}

#agent-selector {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  background-color: white;
}

/* ============================================
   Search Actions Row (now laid out inline at the end of .search-row,
   wrapping onto its own line on narrow viewports since .search-row wraps)
   ============================================ */
.search-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Search Hotels (primary CTA) */
#search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: var(--search-primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

#search-btn svg {
  width: 14px;
  height: 14px;
}

#search-btn:hover:not(:disabled) {
  background-color: var(--search-primary-dark);
}

#search-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* My Bookings (secondary action) */
#my-bookings-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background-color: transparent;
  color: var(--search-primary);
  border: 2px solid var(--search-primary);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

#my-bookings-btn svg {
  width: 14px;
  height: 14px;
}

#my-bookings-btn:hover {
  background-color: var(--search-primary);
  color: white;
}

#my-tac-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background-color: transparent;
  color: var(--search-primary);
  border: 2px solid var(--search-primary);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

#my-tac-btn svg {
  width: 14px;
  height: 14px;
}

#my-tac-btn:hover {
  background-color: var(--search-primary);
  color: white;
}

/* Guests group needs relative positioning for its dropdown */
.guests-group {
  position: relative;
}

/* ============================================
   Results Header (Available Hotels + sort/view toggle)
   ============================================ */
.results-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px clamp(16px, 4vw, 48px) 16px;
}

.results-header-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
}

.results-header-subtitle {
  margin: 2px 0 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.results-header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-loading {
  margin: 0 clamp(16px, 4vw, 48px) 16px;
  padding: 12px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.sort-select-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sort-select-label {
  font-size: 11px;
  color: var(--text-muted);
}

#sort-select {
  padding: 7px 10px;
  font-size: 13px;
  border: 2px solid #ddd;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  color: var(--text-dark);
}

#sort-select:hover {
  border-color: var(--search-primary);
}

/* ============================================
   Trust Footer (static, below results)
   ============================================ */
.trust-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin: 32px 0 16px 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

.trust-footer-item {
  display: flex;
  align-items: center;
  gap: 7px;
}

.trust-footer-item svg {
  width: 15px;
  height: 15px;
  color: var(--search-primary);
}

/* ============================================
   Bookings View
   ============================================ */
#bookings-view,
#tac-view {
  box-sizing: border-box;
  padding: 28px clamp(16px, 4vw, 48px) 40px;
}

.bookings-nav {
  margin-bottom: 20px;
}

/* Back to Search button */
#back-to-search {
  padding: 10px 20px;
  background-color: transparent;
  color: #007bff;
  border: 2px solid #007bff;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

#back-to-search:hover {
  background-color: #007bff;
  color: white;
}

.bookings-title {
  margin: 0 0 20px 0;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
}

/* Bookings Table */
#bookings-list {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

#bookings-list > p {
  margin: 0;
  padding: 32px 24px;
  color: var(--text-muted);
  text-align: center;
}

.bookings-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.bookings-table thead tr {
  background-color: var(--search-primary-soft);
}

.bookings-table th,
.bookings-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.bookings-table th {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.bookings-table td {
  color: var(--text-dark);
  background-color: var(--card-bg);
}

.bookings-table tbody tr:hover {
  background-color: var(--search-primary-soft);
}

.bookings-table tbody tr:hover td {
  background-color: var(--search-primary-soft);
}

.bookings-table tbody tr:nth-child(even) {
  background-color: #fbfcff;
}

.bookings-table tbody tr:nth-child(even) td {
  background-color: #fbfcff;
}

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

.booking-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.booking-status-confirmed {
  background-color: #ecfdf3;
  color: #15803d;
}

.booking-status-cancelled {
  background-color: #fef2f2;
  color: #dc2626;
}

.booking-cancel-btn,
.bookings-page-btn {
  border: 1px solid var(--search-primary-soft-border);
  border-radius: 6px;
  background: white;
  color: var(--search-primary);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}

.booking-cancel-btn {
  padding: 7px 11px;
}

.booking-cancel-btn:hover:not(:disabled),
.bookings-page-btn:hover:not(:disabled) {
  background-color: var(--search-primary-soft);
  border-color: var(--search-primary);
}

.booking-cancel-btn:disabled,
.bookings-page-btn.is-disabled {
  color: #9ca3af;
  border-color: var(--border);
  background-color: #f9fafb;
  cursor: not-allowed;
}

.bookings-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

.bookings-page-btn {
  min-width: 34px;
  padding: 7px 10px;
}

.bookings-page-btn.is-active {
  background-color: var(--search-primary);
  border-color: var(--search-primary);
  color: white;
}

.bookings-page-btn.is-active:hover {
  background-color: var(--search-primary-dark);
  border-color: var(--search-primary-dark);
}

/* Error text */
.error-text {
  color: #dc3545;
}

/* ============================================
   My Hotel TAC View
   ============================================ */

/* Shared with the Bookings view's #back-to-search -- separate class so a
   second view can have its own back button without a duplicate element id */
.view-back-btn {
  padding: 10px 20px;
  background-color: transparent;
  color: #007bff;
  border: 2px solid #007bff;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.view-back-btn:hover {
  background-color: #007bff;
  color: white;
}

.tac-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.tac-view-header .bookings-title {
  margin: 0;
}

.tac-outline-btn {
  padding: 10px 18px;
  background-color: transparent;
  color: var(--search-primary);
  border: 2px solid var(--search-primary);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

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

#tac-relationships-list {
  overflow-x: auto;
}

/* Status badges (relationship state) */
.tac-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.tac-badge-pending {
  background-color: #fff3cd;
  color: #856404;
}

.tac-badge-approved {
  background-color: #d4edda;
  color: #1e7e34;
}

.tac-badge-neutral {
  background-color: #eef1f5;
  color: #55606b;
}

.tac-badge-revoked,
.tac-badge-rejected {
  background-color: #f8d7da;
  color: #dc3545;
}

/* Request TAC modal extras (container/header/body/footer/inputs are shared
   with .booking-form-* -- see index.html's #tac-request-overlay) */
.tac-hotel-results {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tac-hotel-result {
  text-align: left;
  padding: 8px 10px;
  border: 1px solid #dde1e7;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.15s;
}

.tac-hotel-result:hover {
  background-color: #f0f4ff;
}

.tac-selected-hotel {
  font-weight: 600;
  color: #1a1a2e;
  font-size: 14px;
}

.tac-hint-text {
  margin: 6px 0 0 0;
  font-size: 12px;
  color: #777;
}

.tac-error-text {
  color: #dc3545;
  font-size: 13px;
  min-height: 16px;
}

/* ============================================
   TAC Notification Bell
   ============================================ */

.tac-notif-wrapper {
  position: relative;
}

.tac-notif-bell-btn {
  position: relative;
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background-color 0.15s;
}

.tac-notif-bell-btn:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.tac-notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background-color: #e74c3c;
  color: white;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.tac-notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: white;
  border: 1px solid #dde1e7;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 1500;
}

.tac-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
  font-weight: 700;
  color: #1a1a2e;
  position: sticky;
  top: 0;
  background: white;
}

.tac-notif-mark-all {
  background: none;
  border: none;
  color: var(--search-primary, #007bff);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.tac-notif-item {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.15s;
}

.tac-notif-item:last-child {
  border-bottom: none;
}

.tac-notif-item:hover {
  background-color: #f7f8fa;
}

.tac-notif-item.unread {
  background-color: #f0f4ff;
}

.tac-notif-item-message {
  font-size: 13px;
  color: #1a1a2e;
  line-height: 1.4;
}

.tac-notif-item-meta {
  margin-top: 4px;
  font-size: 11px;
  color: #888;
}

.tac-notif-empty {
  padding: 20px 14px;
  text-align: center;
  font-size: 13px;
  color: #888;
}

/* ============================================
   Booking Form Modal
   ============================================ */

.booking-form-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  z-index: 1100;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease-out;
}

.booking-form-overlay.active {
  display: flex;
  background-color: rgba(0, 0, 0, 0.55);
}

.booking-form-container {
  background: white;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 520px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.booking-form-overlay.active .booking-form-container {
  opacity: 1;
  transform: scale(1);
}

/* Header */
.booking-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e0e0e0;
  background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
  border-radius: 10px 10px 0 0;
}

.booking-form-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
}

.booking-form-close {
  background: none;
  border: none;
  font-size: 16px;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.2s, background-color 0.2s;
}

.booking-form-close:hover {
  color: #333;
  background-color: #f0f0f0;
}

/* Body */
.booking-form-body {
  padding: 24px;
}

/* Read-only stay summary */
.booking-form-summary {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.booking-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 13px;
  color: #666;
  border-bottom: 1px solid #eee;
}

.booking-summary-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.booking-summary-row strong {
  color: #1a1a2e;
  font-weight: 600;
}

/* Form fields */
.booking-form-field {
  margin-bottom: 18px;
}

.booking-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.required-mark {
  color: #dc3545;
  margin-left: 2px;
}

.booking-form-input,
.booking-form-select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 2px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
  background-color: white;
  color: #333;
  transition: border-color 0.2s;
}

.booking-form-input:focus,
.booking-form-select:focus {
  outline: none;
  border-color: #007bff;
}

/* Price breakdown */
.booking-form-price-breakdown {
  background: linear-gradient(135deg, #f0f4ff 0%, #f8f9fa 100%);
  border: 2px solid #dee2f0;
  border-radius: 8px;
  padding: 14px 16px;
}

.price-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #555;
  padding: 5px 0;
}

.price-breakdown-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
  padding-top: 10px;
  margin-top: 6px;
  border-top: 2px solid #007bff;
}

.price-breakdown-total strong {
  font-size: 17px;
  color: #007bff;
}

/* Footer */
.booking-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e0e0e0;
}

.booking-form-cancel-btn {
  padding: 10px 24px;
  background-color: transparent;
  color: #6c757d;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.booking-form-cancel-btn:hover {
  background-color: #f8f9fa;
  border-color: #adb5bd;
}

.booking-form-confirm-btn {
  padding: 10px 28px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s;
}

.booking-form-confirm-btn:hover:not(:disabled) {
  background-color: #218838;
}

.booking-form-confirm-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== HOTEL DASHBOARD ===== */

.dashboard-container {
  padding: 20px;
  font-family: Arial, sans-serif;
}

.inventory-container {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.inventory-card {
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 8px;
  min-width: 450px;
  width: 450px; 
  background: linear-gradient(135deg, #f0f7ff, #ffffff);
  box-shadow: 0 3px 6px rgba(0,0,0,0.08);
  transition: transform 0.2s ease;
}

/* .inventory-card:hover {
  transform: translateY(-3px);
} */

.inventory-card strong {
  font-size: 16px;
}

.inventory-card div {
  margin-top: 5px;
}

/* NEW: Inventory Carousel */
.inv-carousel-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 700px;
  margin: 0 auto;
}

.inv-carousel-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0;
}

.inv-nav-btn {
  padding: 10px 18px;
  background: #2c7be5;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
}

.inv-nav-btn:hover:not(:disabled) {
  background: #1e5cb8;
  box-shadow: 0 2px 8px rgba(44, 123, 229, 0.3);
}

.inv-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #a8c5e8;
}

.inv-carousel-counter {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  min-width: 80px;
  text-align: center;
}

.inv-carousel-container {
  display: flex;
  justify-content: center;
}
.inventory-card-modern {
  background: white;
  border: 1px solid #e0e3ed;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  width: 100%;
  max-width: 600px;
  transition: all 0.2s ease;
}

.inventory-card-modern:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-color: #d0d8e8;
}

.inv-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f2f7;
}

.inv-room-name {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
}

.inv-status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.inv-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
  background: #f8f9fc;
  padding: 12px;
  border-radius: 8px;
}

.inv-stat-item {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: #7a8fa3;
  font-weight: 500;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.stat-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
}

.inv-section {
  margin-bottom: 16px;
  padding: 12px;
  background: #fafbfd;
  border-radius: 8px;
  border-left: 3px solid #2c7be5;
}

.inv-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 12px;
}

.inv-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.inv-input-text {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d8dce6;
  border-radius: 6px;
  font-size: 13px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.inv-input-text:focus {
  outline: none;
  border-color: #2c7be5;
  box-shadow: 0 0 0 3px rgba(44, 123, 229, 0.1);
}

.inv-btn-primary {
  padding: 10px 16px;
  background: #2c7be5;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.inv-btn-primary:hover {
  background: #1e5cb8;
  box-shadow: 0 2px 8px rgba(44, 123, 229, 0.3);
}

.inv-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #a8c5e8;
}

.inv-btn-danger {
  padding: 8px 14px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.inv-btn-danger:hover {
  background: #c0392b;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.inv-btn-success {
  padding: 8px 14px;
  background: #27ae60;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.inv-btn-success:hover {
  background: #229954;
  box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.inv-btn-secondary {
  padding: 8px 14px;
  background: #95a5a6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.inv-btn-secondary:hover {
  background: #7f8c8d;
  box-shadow: 0 2px 8px rgba(149, 165, 166, 0.3);
}

.inv-toggle-btn:hover {
  opacity: 0.8;
}

.inv-restrictions-content {
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
  }
  to {
    opacity: 1;
    max-height: 1000px;
  }
}

/* ===== TABLE ===== */

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th {
  background-color: #f0f0f0;
  text-align: left;
}

th, td {
  padding: 10px;
  border: 1px solid #ddd;
}

tr:nth-child(even) {
  background-color: #fafafa;
}

/* ─── Hotel App Shell ──────────────────────────────────────────────────────── */

.app-shell {
  display: flex;
  height: 100vh;
  font-family: sans-serif;
  background: #f5f6fa;
}

/* Sidebar */
.sidebar {
  width: 220px;
  min-width: 220px;
  background: #181824;
  color: #27ae60;
  display: flex;
  flex-direction: column;
  padding-top: 0;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 20px 20px 16px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid #2e3452;
  letter-spacing: 0.5px;
}

.nav-item {
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: #000000;
  color: #fff;
}

.nav-item.active {
  background: #000000;
  color: #fff;
  border-left-color: #8070f8;
}

.nav-item.has-active-child {
  background: #101229;
  color: #fff;
  border-left-color: transparent;
}

.nav-item.nav-child.active {
  background: #000000;
  color: #fff;
  border-left-color: #8070f8;
}

/* Main wrapper */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Top header */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  min-height: 56px;
  background: #fff;
  border-bottom: 1px solid #e0e3ed;
  flex-shrink: 0;
}

.page-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1f36;
}

.hotel-name {
  font-size: 13px;
  color: #8992a9;
}

/* Content area */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

/* KPI row */
.kpi-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-box {
  flex: 1;
  background: #fff;
  border: 1px solid #e0e3ed;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: #1a1f36;
}

.kpi-label {
  font-size: 13px;
  color: #8992a9;
  margin-top: 4px;
}

/* Quick actions */
.quick-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.action-btn {
  padding: 10px 20px;
  background: #8070f8;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s;
}

.action-btn:hover {
  background: #8070f8;
}

/* Section placeholder */
.section-placeholder {
  background: #fff;
  border: 1px solid #e0e3ed;
  border-radius: 8px;
  padding: 40px;
  color: #8992a9;
}

.section-placeholder h3 {
  margin: 0 0 8px;
  color: #1a1f36;
  font-size: 16px;
}

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

.kpi-box {
  background: #ffffff;
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 5px;
}

.kpi-label {
  font-size: 13px;
  color: #777;
}

/* ==================== BOOKING LIST ==================== */

.blist-loading {
  padding: 40px;
  text-align: center;
  color: #8992a9;
}

.blist-subtitle {
  margin: -4px 0 16px;
  font-size: 13px;
  color: #6b7280;
}

.blist-top-card,
.blist-table-card {
  background: #fff;
  border: 1px solid #e0e3ed;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Filter bar */
.blist-filterbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.blist-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  min-width: 150px;
}

.blist-filter-search {
  flex: 1 1 220px;
  min-width: 220px;
}

.blist-filter-group-btn {
  min-width: auto;
}

.blist-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.blist-input,
.blist-select {
  height: 40px;
  border: 1px solid #dfe2ec;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  color: #1a1f36;
  background: #fff;
  box-sizing: border-box;
}

.blist-select {
  min-width: 150px;
  cursor: pointer;
}

.blist-input:focus,
.blist-select:focus {
  outline: none;
  border-color: #6f42c1;
}

.blist-search-input-wrap,
.blist-daterange-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.blist-search-input-wrap .blist-input {
  width: 100%;
  padding-left: 34px;
}

.blist-daterange-wrap .blist-input {
  width: 210px;
  padding-left: 34px;
  padding-right: 26px;
  cursor: pointer;
}

.blist-input-icon,
.blist-input-icon-svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: #8992a9;
  pointer-events: none;
}

.blist-input-icon-svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.blist-input-caret {
  position: absolute;
  right: 10px;
  font-size: 11px;
  color: #8992a9;
  pointer-events: none;
}

.blist-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.blist-btn-outline {
  background: #fff;
  border: 1px solid #dfe2ec;
  color: #4b3f8f;
}

.blist-btn-outline:hover {
  background: #f6f4fc;
}

.blist-btn-active {
  background: #efe9fb;
  border-color: #6f42c1;
  color: #6f42c1;
}

.blist-btn-icon {
  font-size: 12px;
}

.blist-extra-filters {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e5e7eb;
}

/* Stat cards */
.blist-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.blist-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #eceef5;
  border-radius: 10px;
  padding: 14px 16px;
}

.blist-stat-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.blist-stat-icon-purple { background: #f1e9fb; color: #6f42c1; }
.blist-stat-icon-green  { background: #e8f8ee; color: #28a745; }
.blist-stat-icon-orange { background: #fff4e5; color: #f59e0b; }
.blist-stat-icon-red    { background: #fdeaea; color: #dc3545; }
.blist-stat-icon-blue   { background: #e8f1fd; color: #2c7be5; }

.blist-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #1a1f36;
  line-height: 1.2;
}

.blist-stat-label {
  font-size: 12px;
  color: #8992a9;
  margin-top: 2px;
}

/* Table toolbar */
.blist-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.blist-count-label {
  font-size: 13px;
  color: #6b7280;
}

.blist-toolbar-actions {
  display: flex;
  gap: 10px;
  position: relative;
}

.blist-columns-wrap {
  position: relative;
}

.blist-columns-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid #e0e3ed;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 10px;
  min-width: 170px;
  z-index: 50;
}

.blist-column-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  font-size: 13px;
  color: #1a1f36;
  cursor: pointer;
}

/* Table */
.blist-table-scroll {
  overflow-x: auto;
}

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

.blist-table th {
  text-align: left;
  padding: 10px 14px;
  color: #6b7280;
  font-weight: 600;
  font-size: 12px;
  border-bottom: 1px solid #eceef5;
  white-space: nowrap;
}

.blist-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f2f3f8;
  color: #1a1f36;
  vertical-align: middle;
}

.blist-th-sortable {
  cursor: pointer;
  user-select: none;
}

.blist-sort-arrow {
  font-size: 10px;
  color: #c3c7d6;
  margin-left: 2px;
}

.blist-sort-arrow.blist-sort-active {
  color: #6f42c1;
}

.blist-empty-cell {
  text-align: center;
  padding: 32px 12px;
  color: #8992a9;
}

.blist-id-link {
  color: #2c7be5;
  font-weight: 600;
  cursor: pointer;
}

.blist-id-link:hover {
  text-decoration: underline;
}

.blist-date-weekday {
  font-size: 11px;
  color: #8992a9;
}

.blist-roomtype-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.blist-pill-icon {
  font-size: 11px;
}

.blist-pill-purple { background: #f1e9fb; color: #6f42c1; }
.blist-pill-green  { background: #e8f8ee; color: #1e7e34; }
.blist-pill-blue   { background: #e8f1fd; color: #1a56c4; }
.blist-pill-orange { background: #fff4e5; color: #b45309; }
.blist-pill-teal   { background: #e6f7f5; color: #0f766e; }

.blist-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.blist-status-confirmed  { background: #e8f8ee; color: #1e7e34; }
.blist-status-checked-in  { background: #e8f1fd; color: #2c7be5; }
.blist-status-checked-out { background: #eef0ff; color: #4338ca; }
.blist-status-cancelled { background: #fdeaea; color: #b02a37; }
.blist-status-pending   { background: #fff4e5; color: #b45309; }
.blist-status-no-show   { background: #f8d7da; color: #721c24; }

.blist-payment-status-paid     { background: #e8f8ee; color: #1e7e34; }
.blist-payment-status-partial  { background: #e8f1fd; color: #2c7be5; }
.blist-payment-status-pending  { background: #fff4e5; color: #b45309; }
.blist-payment-status-refunded { background: #eef0ff; color: #4338ca; }
.blist-payment-status-na       { background: #f1f2f4; color: #5f6570; }

.blist-actions-cell {
  white-space: nowrap;
  position: relative;
}

.blist-icon-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  color: #6b7280;
  padding: 4px 6px;
  border-radius: 6px;
}

.blist-icon-btn:hover {
  background: #f2f3f8;
  color: #1a1f36;
}

/* Row action dropdown (three-dot menu) */
.blist-row-action-menu {
  display: none;
  position: absolute;
  top: 34px;
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  z-index: 1100;
  padding: 8px 0;
  text-align: left;
}

.blist-row-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 10px 16px;
  color: #1f2937;
  cursor: pointer;
  font-size: 13px;
}

.blist-row-menu-item:hover {
  background: #f6f4fc;
}

.blist-row-menu-item-icon {
  font-size: 13px;
  width: 16px;
  text-align: center;
  color: #6b7280;
}

.blist-row-menu-item-danger,
.blist-row-menu-item-danger .blist-row-menu-item-icon {
  color: #b02a37;
}

.blist-row-menu-item-danger:hover {
  background: #fdeaea;
}

.blist-row-menu-divider {
  height: 1px;
  margin: 6px 0;
  background: #edf2f7;
}

/* Pagination */
.blist-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.blist-rows-per-page {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
}

.blist-rows-select {
  height: 32px;
  min-width: 64px;
  padding: 0 8px;
}

.blist-page-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.blist-page-btn {
  height: 32px;
  min-width: 32px;
  padding: 0 8px;
  border: 1px solid #e0e3ed;
  border-radius: 6px;
  background: #fff;
  color: #1a1f36;
  font-size: 13px;
  cursor: pointer;
}

.blist-page-btn:hover:not([disabled]) {
  background: #f6f4fc;
}

.blist-page-btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.blist-page-btn-active {
  background: #6f42c1;
  border-color: #6f42c1;
  color: #fff;
}

.blist-page-ellipsis {
  color: #8992a9;
  padding: 0 4px;
}

/* Airbnb-style two-month date range calendar */
.blist-cal-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #fff;
  border: 1px solid #e0e3ed;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  padding: 16px;
  z-index: 60;
  width: 560px;
}

.blist-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.blist-cal-header-spacer {
  flex: 1;
}

.blist-cal-nav-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #e0e3ed;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: #1a1f36;
}

.blist-cal-nav-btn:hover {
  background: #f6f4fc;
}

.blist-cal-months {
  display: flex;
  gap: 24px;
}

.blist-cal-month {
  flex: 1;
}

.blist-cal-month-title {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #1a1f36;
  margin-bottom: 8px;
}

.blist-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  color: #8992a9;
  margin-bottom: 4px;
}

.blist-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.blist-cal-day {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  font-size: 12px;
  color: #1a1f36;
  cursor: pointer;
  border-radius: 50%;
}

.blist-cal-day:hover:not(.blist-cal-day-disabled):not(.blist-cal-day-empty) {
  background: #f1e9fb;
}

.blist-cal-day-empty {
  cursor: default;
}

.blist-cal-day-disabled {
  color: #b4b8c8;
  opacity: 0.7;
  text-decoration: line-through;
  cursor: default; /* past days are still shown (struck through), but the pointer no longer turns into a blocked icon */
}

.blist-cal-day-in-range {
  background: #f1e9fb;
  border-radius: 0;
}

.blist-cal-day-start,
.blist-cal-day-end {
  background: #6f42c1;
  color: #fff;
  border-radius: 50%;
}

.blist-cal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eceef5;
}

.blist-cal-footer-text {
  font-size: 12px;
  color: #6b7280;
}

.blist-cal-clear-btn {
  border: none;
  background: transparent;
  color: #6f42c1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

@media (max-width: 700px) {
  .blist-cal-popover {
    width: 300px;
  }
  .blist-cal-months {
    flex-direction: column;
    gap: 12px;
  }
}

/* Booking details sidebar */
.blist-sidebar {
  display: none;
  position: fixed;
  top: 100px;
  right: 24px;
  width: 380px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.16);
  padding: 24px;
  z-index: 1200;
}

.blist-sidebar-notfound {
  padding: 24px;
  color: #333;
}

.blist-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.blist-sidebar-heading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.blist-sidebar-heading {
  margin: 0;
  font-size: 20px;
  color: #1a1f36;
}

.blist-sidebar-close-btn {
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.blist-sidebar-close-btn:hover {
  color: #1a1f36;
}

.blist-sidebar-section {
  border: 1px solid #eef2f6;
  border-radius: 16px;
  padding: 18px;
  margin-top: 16px;
}

.blist-sidebar-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #1a1f36;
  margin-bottom: 14px;
}

.blist-sidebar-section-icon {
  font-size: 14px;
  color: #6f42c1;
}

.blist-sidebar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.blist-sidebar-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blist-sidebar-field-label {
  font-size: 12px;
  color: #8992a9;
}

.blist-sidebar-field-value {
  font-size: 13px;
  font-weight: 600;
  color: #1a1f36;
}

.blist-sidebar-placeholder {
  font-size: 13px;
  color: #8992a9;
}

.blist-sidebar-guest-item {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid #eef2f6;
}

.blist-sidebar-guest-item:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.blist-sidebar-note-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e5e7eb;
  font-size: 12px;
  color: #6b7280;
}

.blist-sidebar-footer {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.blist-sidebar-footer-btn {
  flex: 1 1 auto;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  white-space: nowrap;
}

.blist-sidebar-footer-btn-edit    { border: 1px solid #bcd2f7; color: #1a56c4; }
.blist-sidebar-footer-btn-invoice { border: 1px solid #d9c8f2; color: #6f42c1; }
.blist-sidebar-footer-btn-voucher { border: 1px solid #b8e3d3; color: #1e7e34; }

.blist-sidebar-footer-btn-edit:hover    { background: #e8f1fd; }
.blist-sidebar-footer-btn-invoice:hover { background: #f1e9fb; }
.blist-sidebar-footer-btn-voucher:hover { background: #e8f8ee; }

.blist-sidebar-cancel-btn {
  width: 100%;
  height: 44px;
  margin-top: 12px;
  border: 1px solid #f3c6cb;
  border-radius: 10px;
  background: #fdeaea;
  color: #b02a37;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.blist-sidebar-cancel-btn:hover {
  background: #fbdcdc;
}

@media (max-width: 480px) {
  .blist-sidebar {
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
}

/* ==== DIRECT BOOKING MODAL (dbook-*) — extends the blist-* design tokens ==== */

.dbook-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 31, 54, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.dbook-modal-card {
  background: #fff;
  width: 100%;
  max-width: 660px;
  max-height: 90vh;
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dbook-modal-header {
  padding: 18px 24px;
  background: #f8f7fc;
  border-bottom: 1px solid #e0e3ed;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.dbook-modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1a1f36;
}

.dbook-modal-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.dbook-modal-close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #8992a9;
  cursor: pointer;
}

.dbook-modal-close:hover {
  color: #1a1f36;
}

.dbook-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.dbook-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e0e3ed;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* Front desk tables use compact, neutral surfaces so the three operational
   views share the same visual language as the newer Tailwind screens. */
#frontdesk-container table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 0.75rem !important;
  color: #475569;
}

#frontdesk-container thead tr {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0;
}

#frontdesk-container th {
  padding: 0.75rem !important;
  text-align: left;
  color: #64748b;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#frontdesk-container td {
  padding: 0.75rem !important;
  border-bottom: 1px solid #f1f5f9;
}

#frontdesk-container tbody tr:hover {
  background: #f8fafc;
}

#frontdesk-container td button {
  min-height: 2rem;
  border-radius: 0.5rem !important;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
}

#frontdesk-container td button[onclick^="fdCheckIn"] {
  background: #0f172a !important;
}

#frontdesk-container td button[onclick^="checkOutBooking"] {
  background: #b91c1c !important;
}

#frontdesk-container td button[onclick^="openFolioModal"] {
  border: 1px solid #cbd5e1 !important;
  background: #fff !important;
  color: #334155 !important;
}

/* Trip summary strip (signature element). A 5-column grid for the compact
   facts (check-in/out, nights, rooms, guests) with Room Type spanning the
   full width on its own row below, set off by a divider -- deliberate, so
   it reads as "here's the stay, and here's what was booked" rather than
   wrapping unpredictably based on how much horizontal space is left. */
.dbook-trip-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #f8f9fc;
  border: 1px solid #e0e3ed;
  border-radius: 10px;
  padding: 14px 0;
  margin-bottom: 22px;
}

.dbook-trip-pill {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 16px;
  border-right: 1px solid #e0e3ed;
}

.dbook-trip-summary > .dbook-trip-pill:nth-child(5) {
  border-right: none;
}

.dbook-trip-pill-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
  padding: 12px 16px 0;
  margin-top: 12px;
  border-right: none;
  border-top: 1px solid #e0e3ed;
}

.dbook-trip-pill-icon {
  font-size: 15px;
}

.dbook-trip-pill-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #8992a9;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.dbook-trip-pill-value {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1a1f36;
}

.dbook-trip-pill-value em {
  font-style: normal;
  font-weight: 400;
  color: #6b7280;
  margin-left: 4px;
}

/* Sections */
.dbook-section {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid #eceef5;
}

.dbook-section:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.dbook-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: #1a1f36;
}

.dbook-section-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.dbook-icon-blue   { background: #e8f1fd; color: #2c7be5; }
.dbook-icon-purple { background: #f1e9fb; color: #6f42c1; }
.dbook-icon-green  { background: #e8f8ee; color: #28a745; }
.dbook-icon-orange { background: #fff4e5; color: #f59e0b; }

.dbook-section-title-action {
  margin-left: auto;
}

/* Form grid */
.dbook-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.dbook-grid:last-child {
  margin-bottom: 0;
}

.dbook-grid-3 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.dbook-grid-4 { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.dbook-grid-2 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.dbook-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.dbook-field-hint {
  font-size: 11px;
  font-weight: 400;
  color: #8992a9;
  margin-top: -2px;
}

.dbook-required {
  color: #dc3545;
}

/* Keeps a field's label text and its "*" on one line -- without this, a
   label like "Payment Mode *" can wrap the asterisk onto its own row inside
   a narrow grid column, since label text + span are separate inline runs. */
.dbook-field-label-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* Stays in the DOM and keeps its layout space at all times; only opacity/
   visibility toggle via .is-required, so switching required state never
   shifts surrounding form controls. */
.dbook-required-conditional {
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease-in-out, visibility 180ms ease-in-out;
}

.dbook-required-conditional.is-required {
  opacity: 1;
  visibility: visible;
}

.dbook-input,
.dbook-select,
.dbook-textarea {
  height: 40px;
  border: 1px solid #dfe2ec;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 400;
  color: #1a1f36;
  background: #fff;
  box-sizing: border-box;
  font-family: inherit;
}

.dbook-select {
  cursor: pointer;
}

.dbook-textarea {
  height: auto;
  min-height: 72px;
  padding: 10px 12px;
  resize: vertical;
}

.dbook-input:focus,
.dbook-select:focus,
.dbook-textarea:focus {
  outline: none;
  border-color: #8b7cf6;
}

.dbook-input:disabled {
  background: #f4f5f9;
  color: #8992a9;
  cursor: not-allowed;
}

/* Additional guests table */
.dbook-guest-table-wrap {
  border: 1px solid #e0e3ed;
  border-radius: 10px;
  overflow: hidden;
}

.dbook-guest-table {
  width: 100%;
  border-collapse: collapse;
}

.dbook-guest-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #8992a9;
  padding: 10px 12px;
  background: #f8f9fc;
  border-bottom: 1px solid #e0e3ed;
}

.dbook-guest-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f0f1f6;
  vertical-align: middle;
}

.dbook-guest-table tr:last-child td {
  border-bottom: none;
}

.dbook-table-input,
.dbook-table-select {
  width: 100%;
  height: 34px;
  border: 1px solid #dfe2ec;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
  box-sizing: border-box;
}

.dbook-table-input-narrow {
  width: 64px;
}

.dbook-remove-guest-btn {
  border: none;
  background: transparent;
  color: #dc3545;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
}

.dbook-guest-table-empty {
  padding: 28px 16px;
  text-align: center;
}

.dbook-guest-table-empty p {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
}

.dbook-guest-table-empty-sub {
  font-size: 12px !important;
  color: #8992a9 !important;
  margin-top: 4px !important;
}

.dbook-add-guest-btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #dfe2ec;
  border-radius: 8px;
  background: #fff;
  color: #8b7cf6;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.dbook-add-guest-btn:hover {
  background: #f6f4fc;
}

.dbook-add-guest-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #fff;
}

.dbook-guest-required-label {
  font-size: 12px;
  font-weight: 500;
  color: #8992a9;
}

/* Stay details recap */
.dbook-stay-recap {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  background: #f8f9fc;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 14px;
  font-size: 12px;
  color: #6b7280;
}

.dbook-stay-recap strong {
  color: #1a1f36;
}

/* Payment details */
.dbook-payment-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  color: #374151;
}

.dbook-payment-row-discount {
  color: #28a745;
}

.dbook-payment-row-total {
  border-top: 1px solid #eceef5;
  margin-top: 4px;
  padding-top: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #28a745;
}

.dbook-balance-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: #f8f9fc;
  border-radius: 8px;
  height: 40px;
  justify-content: center;
  box-sizing: border-box;
}

.dbook-balance-label {
  font-size: 11px;
  font-weight: 600;
  color: #8992a9;
}

.dbook-balance-value {
  font-size: 14px;
  font-weight: 700;
  color: #1a1f36;
}

/* Footer buttons */
.dbook-btn-cancel {
  height: 40px;
  padding: 0 18px;
  border: 1px solid #dfe2ec;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.dbook-btn-cancel:hover {
  background: #f6f4fc;
}

.dbook-btn-confirm {
  height: 40px;
  padding: 0 20px;
  border: none;
  border-radius: 8px;
  background: #8b7cf6;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dbook-btn-confirm:hover {
  background: #6c58ff;
}

.dbook-btn-confirm:disabled {
  background: #d7d9e2;
  color: #4f5578;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .dbook-modal-card {
    max-height: 95vh;
  }
  .dbook-trip-summary {
    grid-template-columns: 1fr;
    padding: 6px 0;
  }
  .dbook-trip-pill {
    border-right: none;
    border-bottom: 1px solid #e0e3ed;
    padding: 8px 16px;
  }
  .dbook-trip-summary > .dbook-trip-pill:nth-child(5) {
    border-bottom: 1px solid #e0e3ed;
  }
  .dbook-trip-pill-wide {
    border-bottom: none;
  }
}

/* ==== DIRECT BOOKING SEARCH CARD (dbook-search-*) ==== */

.dbook-search-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
}

.dbook-search-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.dbook-search-header-icon {
  color: #8b7cf6;
  font-size: 15px;
}

.dbook-search-header-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1f36;
}

.dbook-search-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.dbook-search-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dbook-search-field-dates {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}

.dbook-search-label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.dbook-search-date-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.dbook-search-date-display {
  height: 40px;
  min-width: 150px;
  border: 1px solid #dfe2ec;
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: #1a1f36;
  background: #fff;
  box-sizing: border-box;
}

.dbook-search-date-box:hover .dbook-search-date-display {
  border-color: #8b7cf6;
}

.dbook-search-date-icon {
  color: #8b7cf6;
  font-size: 13px;
}

.dbook-stepper {
  height: 40px;
  display: flex;
  align-items: center;
  border: 1px solid #dfe2ec;
  border-radius: 8px;
  overflow: hidden;
  width: 120px;
  box-sizing: border-box;
}

.dbook-stepper-btn {
  width: 32px;
  height: 100%;
  flex-shrink: 0;
  border: none;
  background: #f8f9fc;
  color: #8b7cf6;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.dbook-stepper-btn:hover {
  background: #efe9fb;
}

.dbook-stepper-value {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 100%;
  border: none;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #1a1f36;
  box-sizing: border-box;
  appearance: textfield;
  -moz-appearance: textfield;
}

.dbook-stepper-value::-webkit-outer-spin-button,
.dbook-stepper-value::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.dbook-stepper-value:focus {
  outline: none;
}

.dbook-search-btn {
  height: 40px;
  padding: 0 20px;
  border: none;
  border-radius: 8px;
  background: #8b7cf6;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.dbook-search-btn:hover:not(:disabled) {
  background: #6c58ff;
}

.dbook-search-btn:disabled {
  background: #d7d9e2;
  color: #4f5578; /* the inherited white was 1.4:1 on this grey: the label disappeared */
  cursor: not-allowed;
}

@media (max-width: 700px) {
  .dbook-search-field-dates {
    flex-direction: column;
    width: 100%;
  }
  .dbook-search-row {
    flex-direction: column;
    align-items: stretch;
  }
  .dbook-search-date-display,
  .dbook-stepper,
  .dbook-search-btn {
    width: 100%;
  }
}

/* ==== DIRECT BOOKING SEARCH RESULTS (dbook-room-*, dbook-rateplan-*) ====
   OTA-style layout: one card per room type, sticky room info on the left,
   every rate plan for that room listed on the right, divider-separated. */

.dbook-results-header {
  margin: 4px 0 16px;
}

.dbook-results-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1a1f36;
}

.dbook-results-header p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.dbook-results-empty {
  background: #fff;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.dbook-results-empty h3 {
  margin: 0 0 6px;
  color: #1a1f36;
}

.dbook-results-empty p {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
}

.dbook-room-group {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 20px;
  margin-bottom: 20px;
}

/* Sticky within this group only: .content-area (overflow-y:auto) is the
   scrolling ancestor, and .dbook-room-group is this element's containing
   block, so it naturally un-sticks once the next room group begins. */
.dbook-room-left {
  position: sticky;
  top: 20px;
  width: 240px;
  flex: 0 0 240px;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dbook-room-image-slot {
  height: 140px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--room-accent-soft-1) 0%, var(--room-accent-soft-2) 100%);
  border: 1px dashed var(--room-accent-soft-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--room-accent-soft-text);
}

.dbook-room-image-icon {
  font-size: 26px;
}

.dbook-room-image-caption {
  font-size: 11px;
  font-weight: 600;
  color: var(--room-accent-soft-text);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dbook-room-image-photo {
  position: relative;
  padding: 0;
  overflow: hidden;
  border-style: solid;
}

.dbook-room-image-slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dbook-room-image-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dbook-room-image-nav-prev {
  left: 6px;
}

.dbook-room-image-nav-next {
  right: 6px;
}

.dbook-room-name {
  font-size: 16px;
  font-weight: 700;
  color: #1a1f36;
}

.dbook-room-occupancy {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-top: -6px;
}

.dbook-room-amenity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dbook-room-amenity-list li {
  font-size: 12px;
  color: #4b5265;
  padding-left: 14px;
  position: relative;
}

.dbook-room-amenity-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--room-accent-bullet);
}

.dbook-room-amenity-empty {
  font-size: 12px;
  color: #9aa1b5;
  margin: 0;
  font-style: italic;
}

.dbook-room-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dbook-room-description {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #6b7280;
}

.dbook-room-more-link {
  align-self: flex-start;
  border: none;
  background: none;
  color: var(--room-accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.dbook-room-more-link:hover {
  color: var(--room-accent-hover);
  text-decoration: underline;
}

.dbook-room-plans {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dbook-rateplan-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid #eceef5;
  flex-wrap: wrap;
}

.dbook-rateplan-row:first-child {
  padding-top: 0;
  border-top: none;
}

.dbook-rateplan-info {
  flex: 1 1 260px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dbook-rateplan-name {
  font-size: 14px;
  font-weight: 700;
  color: #1a1f36;
}

.dbook-rateplan-detail {
  font-size: 12px;
  color: #4b5265;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.dbook-rateplan-detail-muted {
  color: #8992a9;
}

.dbook-rateplan-icon {
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}

.dbook-rateplan-price {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 150px;
}

.dbook-rateplan-total {
  font-size: 18px;
  font-weight: 700;
  color: #1a1f36;
}

.dbook-rateplan-tax {
  font-size: 11px;
  color: #8992a9;
}

.dbook-rateplan-book-btn {
  margin-top: 6px;
  height: 36px;
  padding: 0 18px;
  border: none;
  border-radius: 8px;
  background: var(--room-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.dbook-rateplan-book-btn:hover {
  background: var(--room-accent-hover);
}

@media (max-width: 860px) {
  .dbook-room-group {
    flex-direction: column;
  }
  .dbook-room-left {
    position: static;
    width: 100%;
    flex: none;
  }
  .dbook-rateplan-price {
    align-items: flex-start;
    width: 100%;
  }
  .dbook-rateplan-row {
    flex-direction: column;
  }
}

/* ==================== ACTIVITY LOG ====================
   Timeline rail (not a flat table) -- activity_log rows have real
   chronological/causal order, unlike bookings/inventory which are entities
   you manage. Reuses blist-* chrome (filter bar, table-card, pagination)
   for consistency; the rail + inline diff panel is this page's own thing. */

.alog-timeline {
  display: flex;
  flex-direction: column;
}

.alog-event {
  display: flex;
  gap: 14px;
}

.alog-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 16px;
  flex-shrink: 0;
}

.alog-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.alog-rail-line {
  flex: 1;
  width: 2px;
  background: var(--border);
  margin-top: 4px;
}

.alog-event:last-child .alog-rail-line {
  display: none;
}

.alog-event-main {
  flex: 1;
  min-width: 0;
  padding-bottom: 20px;
}

.alog-event-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.alog-event-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  min-width: 118px;
}

.alog-event-entity {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-dark);
  white-space: nowrap;
}

.alog-event-summary {
  flex: 1 1 200px;
  min-width: 180px;
  font-size: 13px;
  color: var(--text-dark);
}

.alog-event-actor {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.alog-ota-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--room-accent-soft-1);
  color: var(--room-accent);
  margin-left: 4px;
}

.alog-action-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.alog-pill-green  { background: #e8f8ee; color: #1e7e34; }
.alog-pill-red    { background: #fdeaea; color: #b02a37; }
.alog-pill-blue   { background: #e8f1fd; color: #1a56c4; }
.alog-pill-orange { background: #fff4e5; color: #b45309; }
.alog-pill-teal   { background: #e6f7f5; color: #0f766e; }
.alog-pill-purple { background: #f1e9fb; color: #6f42c1; }

.alog-dot-green  { background: #1e7e34; }
.alog-dot-red    { background: #b02a37; }
.alog-dot-blue   { background: #1a56c4; }
.alog-dot-orange { background: #b45309; }
.alog-dot-teal   { background: #0f766e; }
.alog-dot-purple { background: #6f42c1; }

.alog-diff-toggle {
  border: none;
  background: transparent;
  color: var(--room-accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.alog-diff-toggle:hover {
  text-decoration: underline;
}

.alog-diff-chevron {
  display: inline-block;
  transition: transform 0.15s ease;
}

.alog-diff-toggle[aria-expanded="true"] .alog-diff-chevron {
  transform: rotate(90deg);
}

.alog-diff-panel {
  margin-top: 0;
  background: #f8f8fb;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  border-width: 0;
  transition: max-height 0.2s ease, opacity 0.2s ease, padding 0.2s ease, margin-top 0.2s ease;
}

.alog-diff-panel.alog-diff-open {
  max-height: 600px;
  opacity: 1;
  padding: 10px 14px;
  margin-top: 10px;
  border-width: 1px;
}

.alog-diff-row {
  display: flex;
  gap: 8px;
  padding: 3px 0;
  align-items: baseline;
  flex-wrap: wrap;
}

.alog-diff-field {
  color: var(--text-muted);
  min-width: 140px;
  font-weight: 600;
}

.alog-diff-old {
  color: #b02a37;
  text-decoration: line-through;
  opacity: 0.8;
}

.alog-diff-arrow {
  color: var(--text-muted);
}

.alog-diff-new {
  color: #1e7e34;
  font-weight: 600;
}

.alog-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.alog-empty-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .alog-diff-panel,
  .alog-diff-chevron {
    transition: none;
  }
}

/* Admin details panel — horizontal tab toolbar */
.detail-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.detail-tab-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.detail-tab-btn:hover {
  color: #334155;
  background: #eef2f7;
}

.detail-tab-btn-active {
  background: #0f172a;
  color: #fff;
}

.detail-tab-btn-active:hover {
  background: #0f172a;
  color: #fff;
}

@media (max-width: 760px) {
  .alog-event-time {
    min-width: auto;
  }
  .alog-diff-field {
    min-width: 100px;
  }
}

/* ==== OTA MODIFICATIONS + RESCHEDULE (Phases 5-7, docs/OTA_BOOKING_MODIFICATION_PLAN.md) ==== */

.blist-status-superseded { background: #eef1f6; color: #55606e; }

/* Toolbar button count pill (blist-table-toolbar) */
.blist-ota-mods-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* Small flag next to a booking-id link when that booking has a pending
   OTA modification awaiting review -- opens the same review modal. */
.blist-ota-row-flag {
  margin-left: 6px;
  cursor: pointer;
  font-size: 13px;
}

.otamod-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted, #8992a9);
}

.otamod-card {
  border: 1px solid #e0e3ed;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: #fff;
}

.otamod-card:last-child {
  margin-bottom: 0;
}

.otamod-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.otamod-guest {
  font-size: 14px;
  font-weight: 700;
  color: #1a1f36;
}

.otamod-meta {
  font-size: 12px;
  color: #8992a9;
  margin-top: 2px;
}

.otamod-note {
  font-size: 12px;
  color: #6b7280;
  background: #f8f9fc;
  border: 1px solid #e0e3ed;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0 0 12px;
}

.otamod-room-row {
  border-top: 1px solid #f0f1f6;
  padding: 12px 0;
}

.otamod-room-row:first-of-type {
  border-top: none;
}

.otamod-room-label {
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 4px;
}

.otamod-diff {
  font-size: 13px;
  margin-bottom: 10px;
}

.otamod-room-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.otamod-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

/* ==== RESCHEDULE BOOKING MODAL (rescheduleBooking.js) ==== */

.reb-current-box {
  display: flex;
  gap: 24px;
  background: #f8f9fc;
  border: 1px solid #e0e3ed;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.reb-current-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.reb-current-label {
  font-size: 11px;
  font-weight: 600;
  color: #8992a9;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.reb-current-value {
  font-size: 13px;
  font-weight: 600;
  color: #1a1f36;
}

.reb-preview-box {
  border: 1px solid #e0e3ed;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 16px;
  background: #f8fdfb;
}

.reb-preview-box.reb-preview-error {
  background: #fdeaea;
  border-color: #f3c1c6;
  color: #b02a37;
  font-size: 13px;
}

/* ==================== AVAILABILITY GRID ==================== */

#availability-grid-container {
  width: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ag-shell {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,23,42,.07);
}

.ag-header {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  flex-wrap: wrap;
}

.ag-title-wrap {
  min-width: 170px;
}

.ag-title {
  font-size: 15px;
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
}

.ag-subtitle {
  margin-top: 3px;
  font-size: 11px;
  color: #94a3b8;
}

.ag-header-divider {
  width: 1px;
  height: 34px;
  background: #e5e7eb;
}

.ag-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}

.ag-toolbar select {
  height: 34px;
  min-width: 145px;
  padding: 0 30px 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  background: #ffffff;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.ag-toolbar select:hover {
  border-color: #9ca3af;
}

.ag-toolbar select:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148,163,184,.12);
}

.ag-btn {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  background: #ffffff;
  color: #374151;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.ag-btn:hover {
  background: #f8fafc;
  border-color: #9ca3af;
}

.ag-btn:active {
  background: #f1f5f9;
}

.ag-btn:disabled {
  color: #cbd5e1;
  background: #f8fafc;
  border-color: #e5e7eb;
  cursor: not-allowed;
}

#ag-save-btn:not(:disabled) {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

#ag-save-btn:not(:disabled):hover {
  background: #1f2937;
}

#ag-reset-btn:not(:disabled) {
  color: #475569;
}

.ag-spacer {
  flex: 1 1 auto;
}

.ag-view-dropdown {
  position: relative;
  display: inline-block;
}

#ag-view-btn {
  min-width: 185px;
  justify-content: space-between;
  text-align: left;
}

.ag-chevron {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1;
}

.ag-view-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 100;
  min-width: 235px;
  padding: 5px 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  box-shadow: 0 10px 25px rgba(15,23,42,.12);
  overflow: hidden;
}

.ag-view-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 6px 12px;
  color: #475569;
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
}

.ag-view-menu-item:hover {
  background: #f8fafc;
  color: #111827;
}

.ag-view-menu-item input {
  width: 14px;
  height: 14px;
}

.ag-view-menu-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  color: #2563eb;
  font-weight: 800;
}

.ag-view-menu-divider {
  height: 1px;
  margin: 5px 0;
  background: #e5e7eb;
}

.ag-navbar {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 54px;
  padding: 9px 14px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  flex-wrap: wrap;
}

.ag-month {
  min-width: 170px;
  padding: 0 5px;
  color: #334155;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.ag-date-jump {
  position: relative;
  display: inline-flex;
}

.ag-date-jump input {
  position: absolute;
  left: 0;
  top: 36px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ag-legend {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  flex-wrap: wrap;
}

.ag-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 999px;
  vertical-align: middle;
}

.ag-dot.open {
  background: #22c55e;
}

.ag-dot.closed {
  background: #ef4444;
}

.ag-scroll {
  max-height: calc(100vh - 260px);
  min-height: 350px;
  overflow: auto;
  background: #ffffff;
}

.ag-grid {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.ag-grid th,
.ag-grid td {
  border-right: 1px solid #eef2f7;
  border-bottom: 1px solid #f1f5f9;
}

.ag-grid thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  width: 72px;
  min-width: 72px;
  height: 55px;
  padding: 0;
  text-align: center;
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
}

.ag-grid thead th:hover {
  background: #f8fafc;
}

.ag-grid thead th:not(.ag-room-head) {
  vertical-align: middle;
}

.ag-dayname {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #94a3b8;
  text-transform: uppercase;
}

.ag-daynum {
  width: 24px;
  height: 24px;
  margin: 4px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.ag-head-today {
  background: #eff6ff !important;
}

.ag-head-today .ag-dayname {
  color: #2563eb;
}

.ag-head-today .ag-daynum {
  background: #2563eb;
  color: #ffffff;
}

.ag-grid th.ag-room-head,
.ag-grid td.ag-room-cell {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 215px;
  padding: 0 14px;
  text-align: left;
  background: #ffffff;
  box-shadow: 2px 0 4px rgba(15,23,42,.025);
}

.ag-grid thead th.ag-room-head {
  z-index: 8;
  background: #f8fafc;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.ag-room-cell {
  height: 38px;
}

.ag-room-name {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.ag-plan-name {
  color: #475569;
  font-size: 12px;
  font-weight: 650;
}

.ag-plan-name.muted {
  color: #94a3b8;
  font-style: normal;
  font-weight: 500;
}

.ag-occ-cell {
  width: 44px;
  min-width: 44px;
  padding: 0 5px;
  text-align: center;
  color: #94a3b8;
  font-size: 11px;
  background: #ffffff;
}

.ag-rowtype-cell {
  width: 52px;
  min-width: 52px;
  padding: 0 6px;
  text-align: left;
  color: #64748b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  background: #ffffff;
  text-transform: uppercase;
}

.ag-cell {
  position: relative;
  width: 72px;
  min-width: 72px;
  height: 38px;
  padding: 0 6px;
  text-align: center;
  color: #334155;
  background: #ffffff;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 550;
  transition: background .12s ease, box-shadow .12s ease;
}

.ag-cell.today {
  background: #f8fbff;
}

.ag-cell.past {
  color: #cbd5e1;
  background: #fafafa;
}

.ag-cell.closed {
  background: #fff7f7;
}

.ag-cell.ag-disabled {
  color: #cbd5e1;
  background: #fafafa;
}

.ag-cell[onclick] {
  cursor: pointer;
}

.ag-cell[onclick]:hover {
  background: #f1f5f9;
  box-shadow: inset 0 0 0 1px #cbd5e1;
}

.ag-cell.today[onclick]:hover {
  background: #eff6ff;
}

.ag-cell.ag-staged {
  background: #fffbeb;
  box-shadow: inset 0 0 0 1px #fbbf24;
}

.ag-price {
  color: #334155;
  font-weight: 750;
}

.ag-toggle {
  font-size: 14px;
  line-height: 1;
}

.ag-grid tbody tr:first-child td {
  border-top: 0;
}

.ag-grid tbody tr:hover .ag-room-cell,
.ag-grid tbody tr:hover .ag-occ-cell,
.ag-grid tbody tr:hover .ag-rowtype-cell {
  background: #fcfdff;
}

#ag-body {
  color: #94a3b8;
  font-size: 13px;
}

#ag-body > p {
  margin: 0;
  padding: 22px;
}

#availability-grid-override-modal {
  backdrop-filter: blur(2px);
}

.ag-modal-card {
  width: 440px;
  max-width: 92vw;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15,23,42,.28);
}

.ag-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.ag-modal-title {
  margin: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 800;
}

.ag-modal-subtitle {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 11px;
}

.ag-modal-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
}

.ag-modal-close:hover {
  background: #f1f5f9;
  color: #334155;
}

.ag-modal-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 18px 20px;
}

.ag-modal-field label {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ag-modal-value {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.ag-modal-input,
.ag-modal-select {
  width: 100%;
  height: 38px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  outline: none;
}

.ag-modal-input:focus,
.ag-modal-select:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148,163,184,.12);
}

.ag-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ag-date-range span {
  color: #94a3b8;
  font-size: 12px;
}

.ag-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid #e5e7eb;
  background: #fafafa;
}

.ag-btn-primary {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ag-btn-primary:hover {
  background: #1f2937;
}

@media (max-width: 850px) {
  .ag-header-divider {
    display: none;
  }
  .ag-title-wrap {
    width: 100%;
  }
  .ag-toolbar {
    width: 100%;
  }
  .ag-navbar {
    gap: 6px;
  }
  .ag-legend {
    width: 100%;
    margin-left: 0;
    padding-top: 3px;
  }
}

/* =========================================================
   BOOKING CONFIRMATION MODAL
   Rendered by showBookingConfirmation() (ui/app/booking/checkout.js)
   inside the shared #modal-overlay; every rule is scoped via
   :has(.booking-confirmation) so other modals are untouched.
   ========================================================= */

/* The shared modal body uses white-space: pre-line for plain-text
   messages; the confirmation's indented template literal would
   otherwise render its newlines as blank lines. */
.modal-body-content:has(.booking-confirmation) {
  white-space: normal;
}

.modal-container:has(.booking-confirmation) .modal-header {
  padding: 22px 28px 18px;
}

.modal-container:has(.booking-confirmation) .modal-success-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 10px;
  font-size: 28px;
}

.modal-container:has(.booking-confirmation) .modal-title {
  font-size: 20px;
  letter-spacing: -0.01em;
}

.modal-body:has(.booking-confirmation) {
  padding: 22px 28px 20px;
  line-height: 1.4;
}

.modal-container:has(.booking-confirmation) .modal-footer {
  padding: 14px 28px;
}

.booking-confirmation {
  color: #0f172a;
}

/* Label style shared by every field caption */
.confirmation-code-label,
.booking-confirmation .booking-item .label,
.confirmation-price span {
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}


/* Confirmation code + status */

.confirmation-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.confirmation-code-label {
  margin-bottom: 4px;
}

.confirmation-code {
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #0f172a;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}


/* Booking facts */

.booking-confirmation .booking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 28px;
  padding: 18px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.booking-confirmation .booking-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.booking-confirmation .booking-item .value {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Price + receipt */

.confirmation-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.confirmation-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.confirmation-price strong {
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.confirmation-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease;
}

.confirmation-download-btn:hover {
  background: #1e293b;
}


/* Cancellation */

.confirmation-policy {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  line-height: 18px;
  color: #64748b;
}


/* Mobile */

@media (max-width: 640px) {
  .booking-confirmation .booking-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .confirmation-price strong {
    font-size: 20px;
    line-height: 26px;
  }
}


/* ==========================================================================
   Operation feedback (ui/shared/operationFeedback.js). Plain CSS on purpose:
   the script builds these class names, so Tailwind never has to see them.
   Colours come from the hotel portal theme tokens (ui/hotel/shared/theme.css, light and dark); the value after each
   comma is the fallback the agent and admin portals (which define no tokens) keep using.
   ========================================================================== */
.opfb-spin { animation: opfb-rotate 0.8s linear infinite; flex: none; }
@keyframes opfb-rotate { to { transform: rotate(360deg); } }
@keyframes opfb-pulse { 50% { opacity: 0.5; } }

[data-idle-html][aria-busy="true"] { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: progress; }

.opfb-section-busy { position: relative; }
.opfb-overlay {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px; text-align: center;
  background: color-mix(in srgb, var(--surface, #fff) 72%, transparent);
  color: var(--ink-2, #334155); font-size: 14px; line-height: 20px;
  cursor: progress;
}
.opfb-overlay-text { max-width: 28rem; }

.opfb-skeleton-bar { height: 16px; margin: 10px 0; border-radius: 6px; background: var(--line, #e2e8f0); animation: opfb-pulse 1.6s ease-in-out infinite; }
.opfb-skeleton-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.opfb-skeleton-cards .opfb-skeleton-bar { height: 96px; margin: 0; }
.opfb-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.opfb-error-state { padding: 20px; border: 1px solid color-mix(in srgb, var(--bad, #b91c1c) 35%, transparent); border-radius: 8px; background: var(--bad-bg, #fef2f2); color: var(--bad, #991b1b); font-size: 14px; }
.opfb-error-state p { margin: 0 0 10px; }

.opfb-btn { padding: 4px 10px; border: 1px solid currentColor; border-radius: 6px; background: transparent; color: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.opfb-btn:hover { background: color-mix(in srgb, currentColor 8%, transparent); }

/* z-index 9000: above .modal-overlay (1000), below dialog.js (10000) */
.opfb-toast-container {
  position: fixed; right: 16px; bottom: 16px; z-index: 9000;
  display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.opfb-toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid; border-radius: 10px;
  box-shadow: var(--shadow, 0 8px 24px rgba(15, 23, 42, 0.16));
  font-size: 14px; line-height: 20px;
}
.opfb-toast-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.opfb-toast-detail { font-size: 11px; opacity: 0.85; }
.opfb-toast-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.opfb-toast-close { border: 0; background: transparent; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.opfb-toast-success { background: var(--ok-bg, #ecfdf5); border-color: color-mix(in srgb, var(--ok, #065f46) 35%, transparent); color: var(--ok, #065f46); }
.opfb-toast-error   { background: var(--bad-bg, #fef2f2); border-color: color-mix(in srgb, var(--bad, #991b1b) 35%, transparent); color: var(--bad, #991b1b); }
.opfb-toast-warning { background: var(--warn-bg, #fffbeb); border-color: color-mix(in srgb, var(--warn, #92400e) 35%, transparent); color: var(--warn, #92400e); }
.opfb-toast-info    { background: color-mix(in srgb, var(--info, #075985) 10%, var(--surface, #fff)); border-color: color-mix(in srgb, var(--info, #075985) 35%, transparent); color: var(--info, #075985); }

/* Sticky notices (e.g. "Cancellation not confirmed") must stay visible without covering booking-list controls. The row
   action menus open at the right edge of the content, so on wide screens the notices dock at the bottom-LEFT, just past
   the 256px (16rem) hotel sidebar, found via #app-shell (:has() is a progressive enhancement: without it they simply stay at 16px from the left).
   Below 900px there is no room beside the table's actions, so the notices are full width along the bottom edge and the
   page gets bottom padding while any are showing (see .opfb-has-notices) so the last rows can still be scrolled clear. */
@media (min-width: 900px) {
  .opfb-toast-container { right: auto; left: 16px; width: min(380px, calc(100vw - 32px)); }
  body:has(#app-shell) .opfb-toast-container { left: 272px; width: min(380px, calc(100vw - 288px)); }
}
/* `not (min-width: 900px)` is the exact complement of the desktop rule above, so there is no width (fractional ones from
   browser zoom / display scaling included, e.g. 899.0000001px, which a fixed 899px upper bound misses) where neither
   applies. The shell gives #content-area an inline `padding: 2rem` (renderShell.js), which beats any normal stylesheet
   rule, so the extra bottom padding that lets the last rows scroll clear of a sticky notice has to be !important. */
@media not (min-width: 900px) {
  .opfb-toast-container { left: 8px; right: 8px; bottom: 8px; width: auto; }
  body.opfb-has-notices .content-area { padding-bottom: 160px !important; }
}
@media (max-width: 640px) {
  .opfb-toast-container { left: 8px; right: 8px; bottom: 8px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .opfb-spin, .opfb-skeleton-bar { animation: none; }
}

/* ─── Bulk direct booking: one guest, several rooms (ui/hotel/bookings/directBookingGroup.js) ─── */
.dbook-bulk-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
}

.dbook-bulk-qty {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 130px;
}

.dbook-bulk-basket {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #d9dcec;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(26, 31, 54, 0.12);
  font-size: 14px;
  color: #1a1f36;
}

.dbook-bulk-basket-empty {
  position: static;
  justify-content: center;
  box-shadow: none;
  color: #6b7280;
  font-size: 13px;
}

.dbook-bulk-sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 400;
  color: #8992a9;
}

.dbook-bulk-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0;
  font-size: 11px;
  color: #4b5265;
}

.dbook-bulk-total {
  white-space: nowrap;
  font-weight: 600;
}

/* The group form carries a rooms table and per-room price lines, so it gets a wider card than the single booking. */
.dbook-modal-card.dbook-modal-card-wide {
  max-width: 1120px;
  max-height: 94vh;
}

/* Fixed layout: every column keeps its width, so the Total cell switching between "—" and a price never shifts the table. */
.dbook-bulk-table {
  table-layout: fixed;
}

.dbook-bulk-col-num { width: 40px; }
.dbook-bulk-col-count { width: 84px; }
.dbook-bulk-col-rate { width: 200px; }
.dbook-bulk-col-total { width: 140px; }
.dbook-bulk-col-remove { width: 48px; }

.dbook-bulk-table .dbook-table-input-narrow {
  width: 100%;
}

.dbook-modal-card-wide .dbook-payment-row {
  gap: 24px;
}

.dbook-modal-card-wide .dbook-payment-row > span:last-child {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Group booking (one guest, several rooms): pill in the Booking List and the rooms table in its sidebar */
.blist-group-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
  white-space: nowrap;
}

.blist-group-rooms {
  margin-top: 10px;
}

.blist-group-title {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #1a1f36;
}

.blist-group-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.blist-group-table th {
  padding: 4px 6px;
  text-align: left;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8992a9;
  border-bottom: 1px solid #e5e7eb;
}

.blist-group-table td {
  padding: 5px 6px;
  border-bottom: 1px solid #f1f2f8;
}

.blist-group-table tfoot td {
  font-weight: 700;
  border-bottom: none;
}

.blist-group-num {
  text-align: right;
  white-space: nowrap;
}

.blist-group-current td {
  background: #f8f7ff;
  font-weight: 600;
}

/* Direct Booking: guests room by room and child ages (ui/hotel/bookings/directBookingGuests.js) */
.dbook-guests-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.dbook-guests-room { margin-top: 10px; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 10px; background: #f9fafb; }
.dbook-guests-rooms .dbook-guests-room { margin-top: 0; }
.dbook-guests-room-title { font-size: 12px; font-weight: 700; color: #374151; margin-bottom: 6px; }
.dbook-guests-row { display: flex; gap: 10px; flex-wrap: wrap; }
.dbook-guests-row label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: #4b5563; }
.dbook-guests-row .dbook-input { width: 72px; }
.dbook-guests-ages { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.dbook-guests-age { width: 92px; }
