/* ==========================================================================
   Srinath Homestay - Natural, Professional Hospitality Operations System
   Clean, modern, uncluttered UI for high-speed front desk & mobile operations.
   ========================================================================== */

:root {
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --border-light: #e2e8f0;
  --border-focus: #3b82f6;

  --primary: #0f172a;
  --primary-hover: #1e293b;

  --brand-gold: #b45309;
  --brand-gold-subtle: #fefce8;
  --brand-gold-border: #fef08a;

  --status-avail: #166534;
  --status-avail-bg: #f0fdf4;
  --status-avail-border: #bbf7d0;

  --status-occ: #991b1b;
  --status-occ-bg: #fef2f2;
  --status-occ-border: #fecaca;

  --status-res: #92400e;
  --status-res-bg: #fffbeb;
  --status-res-border: #fde68a;

  --status-clean: #1e40af;
  --status-clean-bg: #eff6ff;
  --status-clean-border: #bfdbfe;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  --header-height: 64px;
  --bottom-nav-height: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);
  --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, a, select, input[type="checkbox"], input[type="radio"], label {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* App Container Layout - Natural Vertical Flow */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: var(--shadow-sm);
}

.header-left {
  display: flex;
  align-items: center;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #d97706;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.brand-badge {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

/* Desktop Navigation (Center/Header bar) */
.desktop-nav {
  display: none; /* Shown on desktop >=768px */
  align-items: center;
  gap: 4px;
}

.desktop-nav .nav-item {
  background: transparent;
  border: none;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.desktop-nav .nav-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.desktop-nav .nav-item.active {
  background: #0f172a;
  color: #ffffff;
  font-weight: 600;
}

.desktop-nav .nav-item.active .nav-icon {
  filter: grayscale(1) brightness(2);
}

/* Header Primary Action Button & User Widget */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-primary-header {
  background: linear-gradient(135deg, #104b40 0%, #082d26 100%);
  color: #ffffff;
  border: 1px solid #104b40;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(16, 75, 64, 0.2);
  transition: all 0.15s ease;
}

.btn-primary-header:hover {
  background: #06231e;
  transform: translateY(-1px);
}

.btn-primary-header:active {
  transform: translateY(1px);
}

.btn-header-text { display: inline; }
.btn-header-text-mobile { display: none; }

.mobile-only-badge { display: none; }
.desktop-only-badge { display: inline-block; }

.header-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 10px;
  background: #f1f5f3;
  border: 1px solid #d9e6e0;
  border-radius: 12px;
  flex-shrink: 0;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #104b40, #d4af37);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  margin-right: 4px;
}

.user-name {
  font-size: 12px;
  font-weight: 700;
  color: #104b40;
  white-space: nowrap;
}

.user-role {
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
}

.btn-header-logout {
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid #d5e2dc;
  color: #b91c1c;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-header-logout:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.btn-header-logout-mobile {
  display: none;
}

/* Mobile Bottom Navigation */
.bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
  z-index: 100;
  justify-content: space-around;
  align-items: center;
}

.bottom-nav .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  padding: 8px 0;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: color 0.15s ease;
}

.bottom-nav .nav-item .nav-icon {
  font-size: 18px;
  line-height: 1;
}

.bottom-nav .nav-item.active {
  color: #0f172a;
  font-weight: 700;
}

/* Mobile Floating Action Button */
.fab-center {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 14px);
  right: 18px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  z-index: 99;
  transition: transform 0.15s;
}

.fab-center:active {
  transform: scale(0.94);
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */

.app-main {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 16px calc(var(--bottom-nav-height) + 20px);
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: naturalFade 0.15s ease-out;
}

@keyframes naturalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Section Header */
.section-header {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.3px;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   KPI Cards Grid
   ========================================================================== */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #94a3b8;
}

.kpi-card.kpi-green::before { background: #16a34a; }
.kpi-card.kpi-red::before { background: #dc2626; }
.kpi-card.kpi-amber::before { background: #d97706; }

.kpi-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.kpi-val {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 4px;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   Room Status Matrix
   ========================================================================== */

.rooms-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.room-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.room-title-box {
  flex: 1;
}

.room-name {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.room-type {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.room-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  background-color: currentColor;
  flex-shrink: 0;
}

.status-available {
  background: var(--status-avail-bg);
  color: var(--status-avail);
  border: 1px solid var(--status-avail-border);
}

.status-occupied {
  background: var(--status-occ-bg);
  color: var(--status-occ);
  border: 1px solid var(--status-occ-border);
}

.status-reserved {
  background: var(--status-res-bg);
  color: var(--status-res);
  border: 1px solid var(--status-res-border);
}

.status-cleaning {
  background: var(--status-clean-bg);
  color: var(--status-clean);
  border: 1px solid var(--status-clean-border);
}

/* A room whose status the dashboard cannot act on: an unrecognised value, or
   occupied/reserved with no booking attached. */
.status-unknown {
  background: #fdf4ff;
  color: #86198f;
  border: 1px solid #f0abfc;
}

/* Explains a broken room state on the card itself instead of leaving the host
   to guess why the usual buttons are missing. */
.room-attention-banner {
  background: #fdf4ff;
  border: 1px solid #f0abfc;
  border-left: 3px solid #a21caf;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #701a75;
}

.room-attention-banner strong {
  display: block;
  font-size: 12.5px;
  margin-bottom: 2px;
}

.room-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

.room-info-item .lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.room-info-item .val {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
}

.room-guest-banner {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-left: 3px solid #0f172a;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.room-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Clean, standard action buttons */
.btn-action-sm {
  flex: 1;
  min-width: 90px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action-sm:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-action-sm:active {
  transform: translateY(1px);
}

.btn-action-gold {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.btn-action-gold:hover {
  background: #1e293b;
}

.btn-action-wa {
  background: #15803d;
  color: #ffffff;
  border-color: #15803d;
}

.btn-action-wa:hover {
  background: #166534;
}

.btn-action-pay {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
}

.btn-action-pay:hover {
  background: #115e59;
}

.btn-action-danger {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.35);
}

.btn-action-danger:hover {
  background: rgba(220, 38, 38, 0.2);
}

/* ==========================================================================
   Booking Form: inline notices, hints & locked fields
   ========================================================================== */

.form-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-muted);
}

.form-control.is-readonly {
  background: rgba(148, 163, 184, 0.12);
  cursor: not-allowed;
}

.booking-form-notice {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.5;
  border: 1px solid transparent;
}

.booking-form-notice.notice-warn {
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.4);
  color: #b45309;
}

.booking-form-notice.notice-error {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.4);
  color: #dc2626;
}

/* ==========================================================================
   Room Status Modal
   ========================================================================== */

.room-status-current {
  background: var(--bg-surface);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.room-status-current .rsc-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.room-status-current .rsc-value {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.room-status-current .rsc-guest {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

.room-status-current .rsc-muted {
  font-style: italic;
}

.room-status-current .rsc-warn {
  font-size: 11.5px;
  line-height: 1.45;
  color: #b45309;
  font-weight: 500;
}

.room-status-help {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 9px;
}

.room-status-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.room-status-options .btn-action-sm {
  justify-content: flex-start;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  text-align: left;
  width: 100%;
}

.room-status-options .status-dot {
  margin-top: 5px;
}

.room-status-options .rs-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.room-status-options .rs-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.room-status-options .rs-note {
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.35;
  opacity: 0.78;
  white-space: normal;
}

/* The status already in effect reads as state, not as an action. */
.room-status-options .btn-action-sm.is-current {
  opacity: 0.6;
  cursor: default;
  box-shadow: inset 0 0 0 2px currentColor;
}

.room-status-options .btn-action-sm:disabled {
  pointer-events: none;
}

/* ==========================================================================
   Payment Modal: folio summary & receipt history
   ========================================================================== */

.payment-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payment-summary-grid > div {
  background: var(--bg-surface);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payment-summary-grid span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.payment-summary-grid strong {
  font-size: 15px;
  font-weight: 700;
}

.payment-history {
  margin-top: 14px;
}

.payment-history h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.payment-history ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.payment-history li {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}

.payment-history .ph-date {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.payment-history .ph-amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.payment-history .ph-remove {
  background: none;
  border: none;
  color: #dc2626;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
}

.payment-history .ph-remove:hover,
.payment-history .ph-remove:focus-visible {
  background: rgba(220, 38, 38, 0.15);
}

.payment-empty {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .payment-summary-grid {
    grid-template-columns: 1fr;
  }

  .payment-history li {
    grid-template-columns: 1fr auto auto;
  }

  .payment-history .ph-mode {
    grid-column: 1 / -1;
    order: 3;
    color: var(--text-muted);
  }
}

/* ==========================================================================
   Bookings List & Filter Bar
   ========================================================================== */

.filter-scroll-wrapper {
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}

.filter-pills-row {
  display: flex;
  gap: 6px;
  width: max-content;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: #475569;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  background: #f8fafc;
}

.filter-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  font-weight: 600;
}

/* Search Box */
.search-bar-wrap {
  position: relative;
  margin-bottom: 16px;
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: #0f172a;
  font-size: 13.5px;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}

.search-input:focus {
  border-color: var(--border-focus);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

/* Booking Cards */
.bookings-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.booking-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.booking-item-card.has-due {
  border-left: 4px solid #dc2626;
}

.booking-item-card.is-settled {
  border-left: 4px solid #16a34a;
}

.booking-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.guest-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.booking-inv-badge {
  font-size: 11px;
  font-family: monospace;
  background: #f1f5f9;
  color: #334155;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  font-weight: 600;
}

.channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.channel-online {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.channel-offline {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.booking-card-dates {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.booking-financial-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.fin-total {
  font-weight: 700;
  color: #0f172a;
}

.fin-due {
  font-weight: 700;
  color: #dc2626;
}

.fin-paid {
  font-weight: 700;
  color: #16a34a;
}

/* ==========================================================================
   Modals & Dialogs
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1000;
  display: none;
  align-items: flex-end; /* Mobile bottom sheet */
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1;
  pointer-events: auto !important;
}

.modal-sheet {
  background: #ffffff;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  border: 1px solid var(--border-light);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-modal);
  transform: translateY(100%);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-overlay.active .modal-sheet {
  transform: translateY(0);
}

.modal-header {
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 17px;
  color: #0f172a;
  font-weight: 700;
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.btn-modal-close:hover {
  color: #0f172a;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-footer {
  padding: 14px 20px;
  background: #f8fafc;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Forms */
.form-group {
  margin-bottom: 14px;
}

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

.form-control {
  width: 100%;
  padding: 9px 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  color: #0f172a;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: var(--border-focus);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Channel Radio Switcher */
.channel-toggle-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 14px;
}

.channel-radio-btn {
  padding: 8px 12px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  color: #64748b;
  transition: all 0.15s ease;
}

.channel-radio-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Addon Picker */
.addon-picker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.addon-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  font-size: 13px;
}

.addon-picker-item label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
}

.addon-qty-input {
  width: 50px;
  padding: 3px 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #0f172a;
  text-align: center;
  font-size: 12.5px;
}

/* Live Calc Summary Box */
.live-calc-box {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 14px;
}

.live-calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 3px;
  color: var(--text-muted);
}

.live-calc-row.total-bold {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  border-top: 1px dashed var(--border-light);
  padding-top: 6px;
  margin-top: 6px;
}

.live-calc-row.due-alert {
  color: #dc2626;
  font-weight: 700;
}

/* Settings View UI */
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.settings-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
}

/* Switch UI */
.switch-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.switch-label {
  font-size: 13.5px;
  color: #0f172a;
  font-weight: 600;
}

.switch-subtext {
  font-size: 12px;
  color: var(--text-muted);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.15s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.15s;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

input:checked + .slider {
  background-color: #0f172a;
}

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

/* Toast */
.toast-container {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-modal);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Invoice Modal & Template Specifics
   ========================================================================== */

.invoice-modal-content {
  max-width: 780px;
  width: 100%;
}

.invoice-preview-container {
  background: #ffffff;
  color: #111827;
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  overflow-x: auto;
}

.invoice-wrapper {
  background: #ffffff;
  color: #1e293b;
  font-size: 13px;
  line-height: 1.45;
}

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

.inv-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}

/* Allows the long registration / category lines to wrap instead of forcing the
   header wider than the page. */
.inv-brand-info {
  min-width: 0;
}

.inv-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid #b45309;
  object-fit: cover;
}

.inv-brand-info .inv-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
}

.inv-brand-info .inv-tagline {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #b45309;
  margin-top: 2px;
}

.inv-brand-info .inv-subtitle {
  font-size: 10px;
  color: #64748b;
}

/* A plain block, not inline-flex: html2canvas mis-measures inline-flex boxes
   during PDF capture, which rendered this badge as an empty outlined rectangle. */
.inv-gov-badge {
  display: block;
  background: #fefce8;
  border: 1px solid #fef08a;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.35;
  color: #854d0e;
  margin: 4px 0 3px;
}

.inv-reg {
  font-size: 10.5px;
  line-height: 1.5;
  color: #475569;
}

.inv-meta {
  text-align: right;
  min-width: 150px;
  flex-shrink: 0;
}

.inv-badge-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11.5px;
  margin-bottom: 6px;
}

.inv-badge-status.paid {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.inv-badge-status.due {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.inv-meta-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  font-size: 11.5px;
  margin-bottom: 2px;
}

.inv-meta-row .label { color: #64748b; }
.inv-meta-row .value { font-weight: 600; color: #0f172a; }
.inv-meta-row .val-highlight { color: #b45309; font-weight: 700; font-family: monospace; font-size: 12.5px; }

.inv-divider-gold {
  height: 2px;
  background: #e2e8f0;
  margin: 14px 0;
}

.inv-parties-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.inv-party-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
}

.card-caption {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 3px;
  margin-bottom: 5px;
}

.guest-name { font-size: 13.5px; color: #0f172a; font-weight: 600; }
.guest-detail { font-size: 11px; color: #475569; margin-top: 1px; }

.stay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.stay-lbl { font-size: 10px; color: #64748b; display: block; }
.stay-val { font-size: 11.5px; color: #0f172a; font-weight: 500; }

.inv-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
  font-size: 12px;
}

.inv-table th {
  background: #f1f5f9;
  color: #334155;
  padding: 8px 10px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.3px;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

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

.inv-summary-section {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.inv-payment-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
}

.upi-header h4 {
  font-size: 10.5px;
  font-weight: 700;
  color: #0f172a;
}

.upi-header p {
  font-size: 9px;
  color: #64748b;
  margin-bottom: 6px;
}

.upi-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inv-qr-canvas {
  width: 100px;
  height: 100px;
  border: 1px solid #cbd5e1;
  background: #fff;
  padding: 2px;
  border-radius: 4px;
}

.upi-amount-tag {
  font-size: 9.5px;
  font-weight: 700;
  color: #dc2626;
  margin-top: 2px;
  text-align: center;
}

/* A zero balance is good news and must not be printed in alert red. */
.upi-amount-tag.is-settled {
  color: #15803d;
}

.total-row.balance-due.is-settled,
.total-row.balance-due.is-settled .val-bal {
  color: #15803d !important;
}

.upi-details {
  font-size: 11px;
  color: #334155;
}

.upi-id-copy {
  font-family: monospace;
  font-weight: 700;
  color: #0f172a;
  background: #e2e8f0;
  padding: 1px 4px;
  border-radius: 3px;
}

.btn-upi-mobile-pay {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 10px;
  background: #0284c7;
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
}

.paid-stamp {
  margin-top: 6px;
  color: #16a34a;
  font-weight: 700;
  font-size: 11px;
}

.inv-totals-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 3px;
  color: #475569;
}

.total-row.discount { color: #16a34a; }
.total-row.tax { font-size: 11px; color: #64748b; }

.total-row.grand-total {
  border-top: 1px solid #cbd5e1;
  padding-top: 5px;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.total-row.advance { color: #2563eb; }

.total-row.balance-due {
  border-top: 1.5px solid #0f172a;
  padding-top: 5px;
  font-size: 14.5px;
  font-weight: 800;
  color: #dc2626;
}

.inv-terms-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #64748b;
  padding: 8px 12px;
  font-size: 10px;
  color: #475569;
  margin-bottom: 12px;
  border-radius: 4px;
}

.inv-terms-box h4 {
  font-size: 10px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.inv-terms-box ol {
  padding-left: 14px;
}

.inv-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
  font-size: 10px;
  line-height: 1.5;
  color: #64748b;
}

.inv-footer .footer-left {
  min-width: 0;
  flex: 1 1 auto;
}

.blessing-text {
  font-style: italic;
  color: #b45309;
  margin-top: 3px;
  font-weight: 500;
}

/* Digital signature block (replaces the handwritten signature line) */
.inv-sign-area {
  text-align: right;
  flex-shrink: 0;
  max-width: 46%;
}

.digital-sign-box {
  display: table;
  margin-left: auto;
  border: 1px solid #86efac;
  border-radius: 6px;
  background: #f0fdf4;
  padding: 6px 10px;
  margin-bottom: 4px;
}

.digital-sign-box .ds-mark,
.digital-sign-box .ds-text {
  display: table-cell;
  vertical-align: middle;
}

.digital-sign-box .ds-mark {
  font-size: 15px;
  font-weight: 700;
  color: #15803d;
  padding-right: 8px;
  line-height: 1;
}

.digital-sign-box .ds-text {
  text-align: left;
}

.digital-sign-box .ds-title {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #14532d;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.digital-sign-box .ds-for {
  display: block;
  font-size: 9.5px;
  color: #166534;
  line-height: 1.3;
}

.sign-caption {
  font-size: 9px;
  color: #475569;
  font-weight: 600;
}

.sign-note {
  font-size: 8.5px;
  color: #94a3b8;
  font-style: italic;
  margin-top: 1px;
}

/* ==========================================================================
   Desktop Responsive Overrides (>= 768px)
   Eliminates all side columns, restores natural full-width layout!
   ========================================================================== */

@media screen and (min-width: 768px) {
  /* Show desktop top navigation in header */
  .desktop-nav {
    display: flex;
  }

  /* Hide mobile-specific chrome */
  .bottom-nav {
    display: none !important;
  }

  .fab-center {
    display: none !important;
  }

  /* Main container natural desktop padding */
  .app-main {
    padding: 24px 28px 40px;
  }

  /* Desktop KPI Grid */
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Desktop Room Grid */
  .rooms-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Desktop Modals become centered popups */
  .modal-overlay {
    align-items: center;
  }

  .modal-sheet {
    border-radius: 12px;
    max-height: 85vh;
  }
}


/* ======================================================================
   Hospitality Theme Upgrade — warm Varanasi-inspired operations console
   ====================================================================== */
:root {
  --bg-app: #f6f1e8;
  --bg-surface: #fffdf8;
  --bg-card: #fffdf9;
  --surface-muted: #f4ede1;
  --text-main: #1f2933;
  --text-muted: #6f6a61;
  --text-dim: #9b9286;
  --border-light: #e5dccc;
  --border-focus: #b56a31;
  --primary: #263a43;
  --primary-hover: #192d36;
  --brand-gold: #b56a31;
  --brand-gold-subtle: #fbefd9;
  --brand-gold-border: #e6c68d;
  --gold-light: #a95c27;
  --gold-border: #e6c68d;
  --accent-teal: #3f7772;
  --accent-teal-soft: #e6f1ee;
  --status-avail: #246a4d;
  --status-avail-bg: #edf7f0;
  --status-avail-border: #b7ddc2;
  --status-occ: #a44739;
  --status-occ-bg: #fff0eb;
  --status-occ-border: #efc4b9;
  --status-res: #9a6817;
  --status-res-bg: #fff7df;
  --status-res-border: #eed59b;
  --status-clean: #356a88;
  --status-clean-bg: #edf5f8;
  --status-clean-border: #bed8e5;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(78, 57, 31, 0.05);
  --shadow-card: 0 10px 30px rgba(78, 57, 31, 0.07);
  --shadow-modal: 0 24px 60px rgba(36, 45, 47, 0.25);
}

html, body {
  background:
    radial-gradient(circle at 6% -10%, rgba(230, 198, 141, 0.35), transparent 31rem),
    radial-gradient(circle at 96% 12%, rgba(119, 163, 153, 0.14), transparent 28rem),
    var(--bg-app);
}

:focus-visible { outline-color: var(--brand-gold); outline-offset: 3px; }

.app-header {
  background: rgba(255, 253, 248, 0.92);
  border-bottom-color: rgba(201, 177, 138, 0.56);
  box-shadow: 0 1px 0 rgba(255,255,255,.75), 0 8px 24px rgba(71, 53, 29, 0.06);
  backdrop-filter: blur(14px);
}
.app-header::after {
  content: '';
  position: absolute;
  right: 0; bottom: -1px; left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-gold), var(--accent-teal), transparent);
  opacity: .66;
}
.brand-logo-img {
  border: 2px solid var(--brand-gold);
  box-shadow: 0 4px 12px rgba(181, 106, 49, 0.2);
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--primary);
  letter-spacing: -0.45px;
}
.brand-badge { color: var(--brand-gold); font-size: 10px; letter-spacing: .04em; }
.desktop-nav { gap: 6px; }
.desktop-nav .nav-item {
  color: var(--text-muted);
  border-radius: var(--radius-full);
  padding: 8px 14px;
}
.desktop-nav .nav-item:hover { background: var(--brand-gold-subtle); color: var(--brand-gold); }
.desktop-nav .nav-item.active {
  color: var(--primary);
  background: var(--brand-gold-subtle);
  box-shadow: inset 0 -2px 0 var(--brand-gold);
}
.desktop-nav .nav-item.active .nav-icon { filter: none; color: var(--brand-gold); }
.btn-primary-header, .btn-action-gold {
  background: var(--primary);
  border-color: var(--primary);
  border-radius: var(--radius-full);
  box-shadow: 0 5px 12px rgba(38, 58, 67, .17);
}
.btn-primary-header:hover, .btn-action-gold:hover { background: var(--brand-gold); border-color: var(--brand-gold); }

.app-main { padding-top: 28px; }
.section-header { margin-bottom: 22px; }
.section-title {
  color: var(--primary);
  font-family: var(--font-serif);
  font-size: 25px;
  letter-spacing: -0.6px;
}
.section-subtitle { color: var(--text-muted); font-size: 13.5px; }
.section-title::after {
  content: '';
  display: block;
  width: 38px;
  height: 3px;
  margin-top: 8px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--brand-gold), var(--accent-teal));
}

.kpi-grid { gap: 16px; }
.kpi-card {
  min-height: 138px;
  padding: 19px;
  border: 1px solid rgba(207, 188, 156, .7);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(255,255,255,.92), var(--bg-card));
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, box-shadow .18s ease;
}
.kpi-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(78, 57, 31, .12); }
.kpi-card::before { width: 5px; background: var(--brand-gold); }
.kpi-card.kpi-green::before { background: var(--status-avail); }
.kpi-card.kpi-red::before { background: var(--status-occ); }
.kpi-card.kpi-amber::before { background: var(--status-res); }
.kpi-label { color: var(--text-muted); letter-spacing: .075em; }
.kpi-val { color: var(--primary); font-size: 30px; margin-top: 7px; }
.kpi-sub { margin-top: auto; color: var(--text-muted); }

.room-card, .booking-item-card, .settings-card {
  background: var(--bg-card);
  border-color: rgba(207, 188, 156, .72);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.room-card { padding: 20px; gap: 16px; transition: transform .18s ease, box-shadow .18s ease; }
.room-card:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(78,57,31,.1); }
.room-name, .guest-title, .settings-card-title, .modal-title { color: var(--primary); }
.room-name { font-size: 18px; }
.room-type { color: var(--text-muted); }
.room-info-grid, .booking-financial-row, .live-calc-box, .addon-picker-item {
  background: var(--surface-muted);
  border-color: #eadfce;
  border-radius: var(--radius-sm);
}
.room-guest-banner {
  background: #fff9ee;
  border-color: var(--brand-gold-border);
  border-left-color: var(--brand-gold);
  border-radius: var(--radius-sm);
}
.room-info-item .val, .fin-total { color: var(--primary); }
.room-actions { gap: 9px; }
.btn-action-sm {
  border-color: #dbcdb9;
  border-radius: var(--radius-full);
  background: #fffefa;
  color: var(--primary);
  min-height: 36px;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn-action-sm:hover { background: var(--brand-gold-subtle); border-color: var(--brand-gold-border); box-shadow: 0 3px 8px rgba(91,64,31,.08); }
.btn-action-sm:active { transform: translateY(1px) scale(.985); }
.btn-action-wa { background: #2e7b55; border-color: #2e7b55; }
.btn-action-wa:hover { background: #246a4d; border-color: #246a4d; }

.room-status-badge, .channel-chip { font-weight: 700; letter-spacing: .015em; }
.status-available { background: var(--status-avail-bg); color: var(--status-avail); border-color: var(--status-avail-border); }
.status-occupied { background: var(--status-occ-bg); color: var(--status-occ); border-color: var(--status-occ-border); }
.status-reserved { background: var(--status-res-bg); color: var(--status-res); border-color: var(--status-res-border); }
.status-cleaning { background: var(--status-clean-bg); color: var(--status-clean); border-color: var(--status-clean-border); }

.filter-scroll-wrapper { margin-bottom: 16px; }
.filter-pill {
  background: rgba(255,253,248,.8);
  color: var(--text-muted);
  border-color: #dfd1be;
  padding: 7px 15px;
}
.filter-pill:hover { background: var(--brand-gold-subtle); color: var(--brand-gold); }
.filter-pill.active { background: var(--primary); border-color: var(--primary); box-shadow: 0 4px 9px rgba(38,58,67,.15); }
.search-input, .form-control {
  background: rgba(255,254,250,.9);
  border-color: #d9cbb7;
  border-radius: var(--radius-sm);
  color: var(--primary);
}
.search-input { padding-top: 11px; padding-bottom: 11px; box-shadow: none; }
.search-input:focus, .form-control:focus { border-color: var(--brand-gold); box-shadow: 0 0 0 3px rgba(181,106,49,.14); }
.search-icon { color: var(--brand-gold); }
.booking-item-card { padding: 18px; }
.booking-item-card.has-due { border-left-color: var(--status-occ); }
.booking-item-card.is-settled { border-left-color: var(--status-avail); }
.booking-inv-badge { background: var(--brand-gold-subtle); color: var(--brand-gold); border-color: var(--brand-gold-border); }
.channel-online { background: var(--accent-teal-soft); color: var(--accent-teal); border-color: #b9d6d0; }
.channel-offline { background: var(--status-avail-bg); color: var(--status-avail); border-color: var(--status-avail-border); }
.fin-due { color: var(--status-occ); }
.fin-paid { color: var(--status-avail); }

.modal-overlay { background: rgba(25, 40, 43, .54); backdrop-filter: blur(5px); }
.modal-sheet {
  background: var(--bg-card);
  border-color: rgba(235, 220, 197, .85);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}
.modal-header { background: #fffdf8; border-bottom-color: #eadfce; }
.modal-title { font-family: var(--font-serif); font-size: 19px; }
.modal-footer { background: var(--surface-muted); border-top-color: #eadfce; }
.form-label { color: var(--primary); }
.channel-toggle-box { background: var(--surface-muted); border-color: #e5d9c8; border-radius: 12px; }
.channel-radio-btn.active { color: var(--brand-gold); background: #fffdf8; box-shadow: 0 2px 6px rgba(78,57,31,.1); }
.live-calc-row.total-bold { color: var(--primary); border-top-color: var(--brand-gold-border); }
.live-calc-row.due-alert { color: var(--status-occ); }
.settings-card { padding: 22px; }
.settings-card-title { font-family: var(--font-serif); border-bottom-color: #eadfce; }
.slider { background-color: #d9cbb7; }
input:checked + .slider { background-color: var(--brand-gold); }

.toast { background: var(--primary); border: 1px solid rgba(230,198,141,.45); }
.bottom-nav {
  height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255,253,248,.96);
  border-top-color: #e4d6c1;
  box-shadow: 0 -8px 24px rgba(78,57,31,.1);
  backdrop-filter: blur(14px);
}
.bottom-nav .nav-item { color: var(--text-muted); }
.bottom-nav .nav-item.active { color: var(--brand-gold); }
.fab-center {
  background: linear-gradient(135deg, var(--brand-gold), #915025);
  box-shadow: 0 8px 20px rgba(181,106,49,.34);
}

.invoice-preview-container { background: #fffdf8; border-color: #e5d8c5; }
.invoice-wrapper { color: var(--primary); }
.inv-logo { border-color: var(--brand-gold); }
.inv-brand-info .inv-title { color: var(--primary); }
.inv-brand-info .inv-tagline, .inv-meta-row .val-highlight, .blessing-text { color: var(--brand-gold); }
.inv-gov-badge { background: var(--brand-gold-subtle); border-color: var(--brand-gold-border); color: #87511d; }
.inv-divider-gold { background: linear-gradient(90deg, var(--brand-gold), var(--accent-teal), transparent); }
.inv-party-card, .inv-payment-box, .inv-totals-card, .inv-terms-box { background: #faf5eb; border-color: #e7d9c3; }
.inv-table th { background: #eee3d2; color: var(--primary); border-color: #dfcfb6; }
.inv-table td { border-bottom-color: #eee4d4; }
.inv-terms-box { border-left-color: var(--brand-gold); }
.total-row.grand-total { color: var(--primary); border-top-color: #d7c5a8; }
.total-row.balance-due { color: var(--status-occ); border-top-color: var(--brand-gold); }
.btn-upi-mobile-pay { background: var(--accent-teal); }

@media screen and (min-width: 768px) {
  .app-main { padding-top: 34px; }
  .modal-sheet { border-radius: var(--radius-lg); }
}

@media screen and (max-width: 480px) {
  .app-main { padding-top: 22px; }
  .section-title { font-size: 23px; }
  .kpi-card { min-height: 128px; padding: 15px; }
  .kpi-val { font-size: 26px; }
}


/* ======================================================================
   Premium usability refinement — screenshot-driven scale and hierarchy
   ====================================================================== */
:root {
  --text-muted: #625e57;
  --text-dim: #877f74;
}

/* Keep short room cards compact instead of stretching beside occupied rooms. */
.rooms-grid { align-items: start; }
.room-card { align-self: start; }

@media screen and (min-width: 768px) {
  html, body { font-size: 15px; }

  .app-header {
    height: 72px;
    padding: 0 28px;
  }
  .brand-logo-img { width: 44px; height: 44px; }
  .brand-name { font-size: 20px; }
  .brand-badge { font-size: 10.5px; }
  .desktop-nav .nav-item {
    min-height: 40px;
    padding: 9px 17px;
    font-size: 14px;
  }
  .btn-primary-header {
    min-height: 42px;
    padding: 10px 18px;
    font-size: 14px;
  }

  .app-main {
    max-width: 1280px;
    padding: 38px 36px 52px;
  }
  .section-header { margin-bottom: 26px; }
  .section-title { font-size: 29px; }
  .section-subtitle { font-size: 14.5px; margin-top: 5px; }
  .section-title::after { width: 46px; margin-top: 10px; }

  .kpi-grid { gap: 18px; margin-bottom: 30px; }
  .kpi-card { min-height: 156px; padding: 22px 21px; }
  .kpi-label { font-size: 12px; }
  .kpi-val { font-size: 34px; margin-top: 9px; }
  .kpi-sub { font-size: 13px; }

  .rooms-grid { gap: 20px; margin-bottom: 30px; }
  .room-card { padding: 22px; gap: 18px; }
  .room-name { font-size: 19px; }
  .room-type { font-size: 13.5px; margin-top: 4px; }
  .room-status-badge { font-size: 11.5px; padding: 5px 11px; }
  .room-info-grid { gap: 14px; padding: 13px 15px; }
  .room-info-item .lbl { font-size: 11.5px; }
  .room-info-item .val { font-size: 14.5px; margin-top: 2px; }
  .room-guest-banner { padding: 12px 14px; font-size: 13px; }
  .room-actions { gap: 10px; }
  .btn-action-sm {
    min-height: 42px;
    padding: 10px 17px;
    font-size: 13.5px;
  }

  .filter-pill { padding: 8px 16px; font-size: 13px; }
  .search-input { min-height: 44px; font-size: 14px; }
  .booking-item-card { padding: 21px; gap: 13px; }
  .guest-title { font-size: 17px; }
  .booking-card-dates, .booking-financial-row { font-size: 13.5px; }

  .settings-card { padding: 24px; margin-bottom: 20px; }
  .settings-card-title { font-size: 18px; padding-bottom: 11px; }
  .form-label { font-size: 13px; margin-bottom: 7px; }
  .form-control { min-height: 43px; padding: 10px 13px; font-size: 14px; }

  .modal-title { font-size: 21px; }
  .modal-header { padding: 19px 24px; }
  .modal-body { padding: 24px; }
  .modal-footer { padding: 17px 24px; }
}

@media screen and (max-width: 767px) {
  .section-title { font-size: 25px; }
  .section-subtitle { font-size: 14px; }
  .kpi-card { min-height: 136px; }
  .kpi-label { font-size: 11.5px; }
  .kpi-val { font-size: 29px; }
  .room-name { font-size: 18px; }
  .room-type { font-size: 13px; }
  .btn-action-sm { min-height: 40px; font-size: 13px; }
}


/* ======================================================================
   Reports custom date range
   ====================================================================== */
.reports-custom-range {
  display: flex;
  align-items: end;
  gap: 12px;
  margin: -2px 0 24px;
  padding: 15px 16px;
  background: linear-gradient(110deg, #fffaf1, var(--accent-teal-soft));
  border: 1px solid var(--brand-gold-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.reports-custom-range[hidden] { display: none; }
.report-range-heading {
  display: flex;
  flex: 1 1 180px;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 4px;
}
.report-range-title {
  color: var(--primary);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
}
.report-range-note { color: var(--text-muted); font-size: 12px; }
.report-range-field {
  display: flex;
  flex: 0 1 170px;
  flex-direction: column;
  gap: 5px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}
.report-range-field .form-control { min-height: 40px; }
#btn-apply-reports-range {
  flex: 0 0 auto;
  min-width: 122px;
  min-height: 40px;
}

@media screen and (max-width: 767px) {
  .reports-custom-range {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
  }
  .report-range-heading { padding-bottom: 3px; }
  .report-range-field { flex-basis: auto; }
  #btn-apply-reports-range { width: 100%; }
}


/* ======================================================================
   Premium hospitality dashboard — reference-led layout
   ====================================================================== */
:root {
  --dashboard-ink: #0c392f;
  --dashboard-ink-soft: #155346;
  --dashboard-canvas: #fbfaf6;
  --dashboard-line: #e7ede9;
  --dashboard-teal: #08775f;
  --dashboard-mint: #e5f7ef;
  --dashboard-red: #c63f3d;
  --dashboard-rose: #fff0f0;
  --dashboard-blue: #2777c8;
  --dashboard-sky: #edf6ff;
  --dashboard-gold: #a96817;
  --dashboard-sand: #fff7e8;
}

.app-sidebar { display: none; }

/* Strong contrast on every WhatsApp entry point. */
.btn-action-wa,
.btn-action-wa:hover,
.btn-action-wa:focus-visible {
  color: #ffffff !important;
  background: #16854b;
  border-color: #16854b;
}

.dashboard-welcome-row,
.dashboard-content-grid,
.dashboard-side-card,
.dashboard-kpis,
.dashboard-rooms-grid { min-width: 0; }
.dashboard-welcome-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 20px;
}
.dashboard-eyebrow {
  color: #5f766e;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}
.dashboard-title {
  color: var(--dashboard-ink);
  font-family: var(--font-serif);
  font-size: clamp(29px, 4vw, 39px);
  letter-spacing: -1px;
  line-height: 1.08;
}
.dashboard-welcome-copy .section-subtitle { margin-top: 7px; }
.dashboard-hero-card {
  position: relative;
  overflow: hidden;
  min-height: 126px;
  padding: 22px 24px;
  border-radius: 18px;
  color: #ffffff;
  background:
    linear-gradient(125deg, rgba(8, 41, 33, 0.94) 0%, rgba(16, 75, 64, 0.85) 60%, rgba(203, 161, 53, 0.4) 100%),
    url('../images/room_divine.jpg') center 40% / cover;
  box-shadow: 0 12px 30px rgba(12, 57, 47, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(203, 161, 53, 0.25);
}
.dashboard-hero-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 45%, rgba(255,255,255,.12));
  pointer-events: none;
}
.dashboard-hero-card > div { position: relative; z-index: 1; display: grid; gap: 4px; max-width: 200px; }
.dashboard-hero-card span { font-size: 12px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: #fde68a; }
.dashboard-hero-card strong { font-family: var(--font-serif); font-size: 23px; line-height: 1.15; color: #ffffff; }

.dashboard-kpis { gap: 14px; margin-bottom: 28px; }
.dashboard-kpis .kpi-card {
  min-height: 128px;
  padding: 18px 20px 16px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 18px rgba(16, 54, 44, 0.05);
  overflow: visible;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dashboard-kpis .kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(16, 54, 44, 0.09);
}
.dashboard-kpis .kpi-card::before { display: none; }
.dashboard-kpis .kpi-card.kpi-green {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border-color: #bbf7d0;
  color: #14532d;
}
.dashboard-kpis .kpi-card.kpi-red {
  background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
  border-color: #fecaca;
  color: #991b1b;
}
.dashboard-kpis .kpi-card.kpi-amber {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  border-color: #bae6fd;
  color: #075985;
}
.dashboard-kpis .kpi-card.kpi-due {
  background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
  border-color: #fde68a;
  color: #92400e;
}

.dashboard-kpi-icon {
  position: absolute;
  top: 18px;
  right: 18px;
  left: auto;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
  color: currentColor;
  background: rgba(255,255,255,.9);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.dashboard-kpis .kpi-label { color: currentColor; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; opacity: 0.85; }
.dashboard-kpis .kpi-val { color: currentColor; font-size: 32px; font-weight: 800; margin-top: 6px; letter-spacing: -0.5px; line-height: 1; }
.dashboard-kpis .kpi-sub { color: currentColor; opacity: .72; font-size: 11px; margin-top: 6px; }

.dashboard-content-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.dashboard-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 15px;
}
.dashboard-section-heading h3,
.dashboard-side-heading h3 { color: var(--dashboard-ink); font-family: var(--font-serif); font-size: 21px; letter-spacing: -.3px; }
.dashboard-section-heading p { color: #6e7f77; font-size: 12.5px; margin-top: 2px; }
.room-view-badge {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--dashboard-teal);
  background: #e8f6f0;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid rgba(16, 75, 64, 0.12);
}

.dashboard-rooms-grid { grid-template-columns: 1fr; gap: 20px; }
.dashboard-rooms-grid .room-card {
  overflow: hidden;
  padding: 0;
  border: 1px solid #e2ece7;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(16, 54, 44, .06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.dashboard-rooms-grid .room-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(16, 54, 44, .12); }

.room-card-media { position: relative; height: 195px; overflow: hidden; background: #0f172a; }
.room-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center !important;
  filter: brightness(0.96) contrast(1.03);
  transform: scale(1);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.room-card:hover .room-card-media img { transform: scale(1.05); }

.room-card-media .room-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, transparent 40%, rgba(4, 25, 20, 0.4) 100%);
  pointer-events: none;
}

.room-card-media .room-rate-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  background: rgba(10, 38, 31, 0.88);
  backdrop-filter: blur(8px);
  color: #fef08a;
  border: 1px solid rgba(254, 240, 138, 0.35);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.room-card-media .room-rate-badge small {
  font-size: 10px;
  font-weight: 400;
  color: #e2e8f0;
  margin-left: 2px;
}

.room-card-media .room-status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.room-card-media .room-status-badge.status-available { background: rgba(240, 253, 244, 0.95); color: #166534; border: 1px solid #86efac; }
.room-card-media .room-status-badge.status-occupied { background: rgba(254, 242, 242, 0.95); color: #991b1b; border: 1px solid #fca5a5; }
.room-card-media .room-status-badge.status-reserved { background: rgba(255, 251, 235, 0.95); color: #92400e; border: 1px solid #fcd34d; }
.room-card-media .room-status-badge.status-cleaning { background: rgba(239, 246, 255, 0.95); color: #1e40af; border: 1px solid #93c5fd; }

.room-card-body { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.dashboard-rooms-grid .room-name { color: var(--dashboard-ink); font-family: var(--font-serif); font-size: 20px; line-height: 1.15; font-weight: 700; }
.dashboard-rooms-grid .room-type { color: #5a6e65; font-size: 12px; line-height: 1.35; margin-top: 3px; display: flex; align-items: center; gap: 6px; }

.room-amenities-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.room-amenity-pill { font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: #f2f6f4; color: #355246; border: 1px solid #e1ece6; }

.dashboard-rooms-grid .room-guest-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  background: #fff8f6;
  border: 1px solid #fed7d7;
  border-left: 4px solid var(--dashboard-red);
  border-radius: 9px;
}
.room-guest-details { display: grid; gap: 2px; }
.room-guest-name { display: flex; align-items: center; gap: 6px; }
.room-guest-name strong { color: #2d3748; font-size: 12px; }
.channel-source-tag { font-size: 9.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: #edf2f7; color: #4a5568; }
.room-checkout-date { color: #718096; font-size: 10.5px; }
.room-payment-status { font-size: 11px; font-weight: 700; white-space: nowrap; }
.room-payment-status.has-due { color: #c53030; }
.room-payment-status.is-paid { color: #276749; }

.dashboard-rooms-grid .room-actions,
.room-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 4px;
  position: relative;
  z-index: 5;
}
.dashboard-rooms-grid .btn-action-sm,
.room-actions .btn-action-sm {
  min-width: 0;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  z-index: 6;
  pointer-events: auto !important;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.dashboard-rooms-grid .btn-action-sm *,
.room-actions .btn-action-sm * {
  pointer-events: none;
}
.room-card-primary-action { color: #ffffff !important; background: var(--dashboard-teal) !important; border: 1px solid var(--dashboard-teal) !important; }
.room-card-primary-action:hover { background: var(--dashboard-ink) !important; border-color: var(--dashboard-ink) !important; }
.room-card-secondary-action { color: #245245 !important; background: #f8faf9 !important; border: 1px solid #c7dad1 !important; }
.room-card-secondary-action:hover { background: #eef4f1 !important; }
.room-card-bill-action { color: #9b2c2c !important; background: #fff5f5 !important; border: 1px solid #feb2b2 !important; }
.room-card-bill-action:hover { background: #fed7d7 !important; }

.dashboard-aside { display: grid; grid-template-columns: 1fr; gap: 16px; }
.dashboard-side-card { padding: 17px; border: 1px solid #e8eeeb; border-radius: 15px; background: #ffffff; box-shadow: 0 8px 20px rgba(16,54,44,.05); }
.dashboard-side-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.dashboard-side-heading h3 { font-size: 17px; }
.side-card-kicker { color: #71847b; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.side-card-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: var(--dashboard-teal); background: #e9f6f0; font-weight: 800; }
.schedule-list { display: grid; gap: 9px; }
.schedule-item { display: grid; grid-template-columns: 58px 1fr; gap: 9px; padding: 10px; border-radius: 9px; background: #f8faf9; }
.schedule-time { color: var(--dashboard-teal); font-size: 11px; font-weight: 800; }
.schedule-item strong, .schedule-item span:not(.schedule-time) { display: block; }
.schedule-item strong { color: #163e33; font-size: 12px; }
.schedule-item span:not(.schedule-time) { color: #77857f; font-size: 10.5px; margin-top: 2px; }
.schedule-empty-state { display: grid; justify-items: center; gap: 5px; padding: 22px 12px; border: 1px dashed #dce6e1; border-radius: 10px; color: #74857e; text-align: center; }
.schedule-empty-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; color: #5e7369; background: #edf3f0; }
.schedule-empty-state strong { color: #456257; font-size: 11.5px; }
.schedule-empty-state span:last-child { font-size: 10px; line-height: 1.4; }
.revenue-card { background: linear-gradient(145deg, #ffffff, #f1faf6); }
.revenue-total { color: var(--dashboard-ink); font-family: var(--font-serif); font-size: 29px; font-weight: 700; letter-spacing: -.5px; }
#dashboard-revenue-summary > p { color: #6e8078; font-size: 11px; margin: 2px 0 13px; }
.revenue-meter { height: 8px; overflow: hidden; border-radius: 999px; background: #dfece5; }
.revenue-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #62c99e, var(--dashboard-teal)); }
.revenue-split { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; color: #6f8179; font-size: 10.5px; }
.revenue-split strong { display: block; color: #1d5042; font-size: 12px; margin-bottom: 2px; }

/* Invoice and guest-sharing controls use explicit visual hierarchy. */
.invoice-modal-content .no-print { gap: 10px !important; padding: 4px; border-radius: 13px; background: #f2f6f3; }
.invoice-modal-content .no-print .btn-action-sm { flex: 1 1 160px; min-height: 43px; border-radius: 10px; }
.invoice-modal-content .no-print .btn-action-wa { color: #ffffff !important; }
.invoice-preview-container { padding: 24px; border-radius: 15px; border-color: #dfe9e4; box-shadow: inset 0 0 0 1px rgba(255,255,255,.75); }
.inv-header { padding-bottom: 4px; }
.inv-brand-info .inv-title { color: var(--dashboard-ink); }
.inv-divider-gold { height: 3px; background: linear-gradient(90deg, var(--dashboard-teal), #d8b470, transparent); }
.inv-party-card, .inv-payment-box, .inv-totals-card { background: #f8fbf9; border-color: #dce8e2; border-radius: 10px; }
.inv-table th { color: #ffffff; background: var(--dashboard-ink); border-color: var(--dashboard-ink); }
.inv-terms-box { border-left-color: var(--dashboard-teal); }

/* Invoice Action Toolbar */
.inv-action-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.inv-action-toolbar .btn-action-sm {
  flex: 1 1 calc(25% - 8px);
  min-height: 40px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}

/* Responsive Table Wrapper for Invoice */
.inv-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.inv-table-wrap .inv-table {
  min-width: 500px;
  margin-bottom: 0;
}

/* PDF Render Mode (forces the desktop A4 layout during PDF capture)
   IMPORTANT: html2pdf clones the invoice into an overlay whose width is the
   page's printable width (A4 minus margins) and sets overflow:hidden on it.
   Any fixed pixel width wider than that gets silently CLIPPED, which is what
   used to cut off the whole right-hand column. The wrapper must therefore fill
   its container rather than declare a width of its own. Page margins are
   supplied by the html2pdf `margin` option, so no padding is added here. */
.invoice-wrapper.pdf-render-mode {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
  box-shadow: none !important;
  overflow: visible !important;
}
.invoice-wrapper.pdf-render-mode .inv-header {
  flex-direction: row !important;
  justify-content: space-between !important;
}
.invoice-wrapper.pdf-render-mode .inv-meta {
  text-align: right !important;
  border-top: none !important;
  padding-top: 0 !important;
  min-width: 160px !important;
}
.invoice-wrapper.pdf-render-mode .inv-meta-row {
  justify-content: flex-end !important;
}
.invoice-wrapper.pdf-render-mode .inv-parties-grid {
  grid-template-columns: 1fr 1fr !important;
  gap: 14px !important;
}
.invoice-wrapper.pdf-render-mode .inv-table-wrap {
  overflow-x: visible !important;
  border: none !important;
}
.invoice-wrapper.pdf-render-mode .inv-table {
  min-width: 100% !important;
  width: 100% !important;
}
.invoice-wrapper.pdf-render-mode .inv-summary-section {
  grid-template-columns: 1.1fr 1fr !important;
  gap: 14px !important;
}
.invoice-wrapper.pdf-render-mode .inv-footer {
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: flex-end !important;
  gap: 16px !important;
}
.invoice-wrapper.pdf-render-mode .inv-footer .inv-sign-area {
  align-self: flex-end !important;
}
/* Nothing inside the bill may scroll or stretch past the printable width. */
.invoice-wrapper.pdf-render-mode .inv-table-wrap .inv-table {
  min-width: 0 !important;
}
.invoice-wrapper.pdf-render-mode .upi-body {
  flex-direction: row !important;
}
.invoice-wrapper.pdf-render-mode * {
  overflow: visible !important;
  box-shadow: none !important;
}
/* html2canvas paints screen styles, so on-screen-only controls (such as the
   "Tap to Pay" deep link) would otherwise be baked into the PDF as a dead
   button image. The QR code beside it carries the same payment intent. */
.invoice-wrapper.pdf-render-mode .no-print {
  display: none !important;
}

/* Compact vertical rhythm for print/PDF so a normal bill lands on ONE A4 page.
   The printable height at the margins used by billing.js is 275mm (~1039px),
   and the default screen spacing pushed a fully-loaded invoice (multiple
   add-ons, GST rows and several receipts) onto a second page that held nothing
   but the house rules and the footer. */
.invoice-wrapper.pdf-render-mode {
  font-size: 12px !important;
  line-height: 1.38 !important;
}
.invoice-wrapper.pdf-render-mode .inv-logo {
  width: 54px !important;
  height: 54px !important;
}
.invoice-wrapper.pdf-render-mode .inv-brand-info .inv-title {
  font-size: 19px !important;
}
.invoice-wrapper.pdf-render-mode .inv-divider-gold {
  margin: 8px 0 !important;
}
.invoice-wrapper.pdf-render-mode .inv-parties-grid,
.invoice-wrapper.pdf-render-mode .inv-summary-section,
.invoice-wrapper.pdf-render-mode .inv-table-wrap {
  margin-bottom: 9px !important;
}
.invoice-wrapper.pdf-render-mode .inv-party-card,
.invoice-wrapper.pdf-render-mode .inv-totals-card,
.invoice-wrapper.pdf-render-mode .inv-payment-box {
  padding: 8px 10px !important;
}
.invoice-wrapper.pdf-render-mode .inv-table th {
  padding: 5px 8px !important;
}
.invoice-wrapper.pdf-render-mode .inv-table td {
  padding: 5px 8px !important;
}
.invoice-wrapper.pdf-render-mode .item-subdesc {
  line-height: 1.3 !important;
}
.invoice-wrapper.pdf-render-mode .inv-terms-box {
  padding: 7px 10px !important;
  margin-bottom: 8px !important;
  font-size: 9.5px !important;
}
.invoice-wrapper.pdf-render-mode .inv-terms-box li {
  line-height: 1.42 !important;
}
.invoice-wrapper.pdf-render-mode .inv-footer {
  padding-top: 8px !important;
  font-size: 9.5px !important;
}
.invoice-wrapper.pdf-render-mode .total-row {
  margin-bottom: 2px !important;
}
.invoice-wrapper.pdf-render-mode .inv-qr-canvas {
  width: 92px !important;
  height: 92px !important;
}

@media screen and (min-width: 1024px) {
  .app-container { display: block; min-height: 100vh; background: var(--dashboard-canvas); }
  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 210;
    display: flex;
    width: 224px;
    flex-direction: column;
    padding: 20px 12px 14px;
    color: #ffffff;
    background: linear-gradient(165deg, #104b40 0%, #07362f 70%, #062d27 100%);
    box-shadow: 7px 0 24px rgba(6, 45, 39, .14);
  }
  .sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 24px; color: #ffffff; text-decoration: none; }
  .sidebar-logo-img { width: 37px; height: 37px; border: 1px solid rgba(239,202,127,.7); border-radius: 50%; object-fit: cover; background: #071f1b; }
  .sidebar-brand-copy { display: grid; gap: 2px; }
  .sidebar-brand-copy strong { font-family: var(--font-serif); font-size: 18px; letter-spacing: -.35px; }
  .sidebar-brand-copy small { color: #bbd7ce; font-size: 10px; }
  .sidebar-nav { display: grid; gap: 6px; }
  .sidebar-nav .nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; color: #d8ebe4; background: transparent; font-family: var(--font-sans); font-size: 12px; font-weight: 600; text-align: left; }
  .sidebar-nav .nav-item:hover { color: #ffffff; background: rgba(255,255,255,.08); }
  .sidebar-nav .nav-item.active { color: #ffffff; border-color: rgba(154, 229, 197, .22); background: rgba(116, 201, 169, .2); box-shadow: none; }
  .sidebar-nav-icon { width: 16px; color: #c9e7da; font-size: 17px; text-align: center; }
  .sidebar-stay-promo {
    display: grid;
    gap: 7px;
    margin-top: auto;
    padding: 18px 14px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(6, 38, 31, 0.85) 0%, rgba(3, 20, 16, 0.96) 100%), url('../images/room_harmony.jpg') center / cover;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 8px 24px rgba(0,0,0,.3);
  }
  .sidebar-stay-promo strong { max-width: 140px; color: #ffffff; font-family: var(--font-serif); font-size: 18px; line-height: 1.12; }
  .sidebar-stay-promo span { color: #d2e8df; font-size: 10.5px; }
  .sidebar-promo-kicker { color: #fde68a !important; font-size: 9.5px !important; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

  .app-header {
    left: 224px;
    width: calc(100% - 224px);
    height: 64px;
    padding: 0 28px;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(16, 75, 64, 0.09);
    box-shadow: 0 2px 14px rgba(9,44,37,.04);
  }
  .app-header::after { display: none; }
  .app-header .header-left { display: none; }
  .desktop-nav { display: flex; margin-right: auto; gap: 2px; }
  .desktop-nav .nav-item { min-height: 38px; padding: 8px 14px; border-radius: 9px; color: #5d7168; font-size: 12.5px; font-weight: 600; }
  .desktop-nav .nav-item.active { color: var(--dashboard-ink); background: #eaf2ef; box-shadow: none; font-weight: 700; }
  .desktop-nav .nav-item.active .nav-icon { color: var(--dashboard-teal); }
  .header-actions { margin-left: 16px; display: flex; align-items: center; gap: 10px; }
  .btn-primary-header {
    min-height: 40px;
    padding: 9px 18px;
    background: linear-gradient(135deg, #104b40 0%, #082d26 100%);
    color: #ffffff;
    border: 1px solid #104b40;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 3px 10px rgba(16, 75, 64, 0.22);
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .btn-primary-header:hover {
    background: #06231e;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 75, 64, 0.32);
  }

  .app-main { width: calc(100% - 224px); max-width: none; min-height: 100vh; margin: 0 0 0 224px; padding: 94px 34px 48px; background: var(--dashboard-canvas); }
  #view-dashboard.active { max-width: 1280px; margin: 0 auto; }
  .dashboard-welcome-row { grid-template-columns: minmax(0, 1fr) 280px; align-items: center; margin-bottom: 20px; }
  .dashboard-hero-card { min-height: 116px; }
  .dashboard-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dashboard-kpis .kpi-card { min-height: 116px; }
  .dashboard-content-grid { grid-template-columns: minmax(0, 1fr) 285px; align-items: start; }
  .dashboard-rooms-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .room-card-media { height: 195px; }
  .dashboard-aside { position: sticky; top: 82px; }

  .view-section:not(#view-dashboard) { max-width: 1120px; margin: 0 auto; }
  .view-section:not(#view-dashboard) .section-title { color: var(--dashboard-ink); }
  .view-section:not(#view-dashboard) .settings-card,
  .view-section:not(#view-dashboard) .booking-item-card { border-color: #e3ebe7; box-shadow: 0 7px 18px rgba(16,54,44,.05); }
}

@media screen and (min-width: 1280px) {
  .app-main { padding-right: 48px; padding-left: 48px; }
  .dashboard-content-grid { grid-template-columns: minmax(0, 1fr) 305px; gap: 26px; }
  .room-card-media { height: 215px; }
}

@media screen and (max-width: 1023px) {
  .dashboard-hero-card { min-height: 145px; }
}

@media screen and (max-width: 767px) {
  .app-header {
    height: 56px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.98);
  }

  .header-left {
    min-width: 0;
    flex: 1 1 auto;
  }

  .header-brand {
    gap: 8px;
    max-width: 100%;
  }

  .brand-logo-img {
    width: 35px;
    height: 35px;
  }

  .brand-name {
    font-size: 14.5px;
  }

  .desktop-only-badge { display: none !important; }
  .mobile-only-badge {
    display: inline-block !important;
    font-size: 10px;
    color: #b45309;
    font-weight: 600;
  }

  .header-actions {
    gap: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }

  .btn-primary-header {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
    white-space: nowrap !important;
    gap: 4px;
  }

  .btn-header-text { display: none !important; }
  .btn-header-text-mobile { display: inline !important; font-weight: 700; }

  /* Mobile Dedicated Header Logout Button */
  .btn-header-logout-mobile {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 8px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #e11d48;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(225, 29, 72, 0.08);
  }
  .btn-header-logout-mobile:hover, .btn-header-logout-mobile:active {
    background: #ffe4e6;
    border-color: #fda4af;
    color: #be123c;
    transform: translateY(-1px);
  }
  .btn-header-logout-mobile svg {
    flex-shrink: 0;
  }

  /* Hide desktop user pill on mobile to prevent clutter */
  .header-user-pill {
    display: none !important;
  }

  /* Mobile KPI Grid - Perfectly Aligned 2x2 Layout */
  .dashboard-kpis {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
  }
  .dashboard-kpis .kpi-card {
    min-height: 112px !important;
    padding: 12px 12px 10px !important;
    border-radius: 14px !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: hidden !important;
  }
  .dashboard-kpis .dashboard-kpi-icon {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04) !important;
  }
  .dashboard-kpis .kpi-label {
    padding-right: 32px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    min-height: 27px !important;
    display: flex !important;
    align-items: flex-start !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
  }
  .dashboard-kpis .kpi-val {
    font-size: 24px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    margin-top: 4px !important;
    letter-spacing: -0.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .dashboard-kpis .kpi-sub {
    font-size: 10.5px !important;
    margin-top: 3px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    opacity: 0.75 !important;
  }

  /* Invoice Action Toolbar on Mobile: 2x2 Grid */
  .inv-action-toolbar .btn-action-sm {
    flex: 1 1 calc(50% - 6px);
    min-height: 38px;
    font-size: 11.5px;
    padding: 7px 10px;
  }
}

@media screen and (max-width: 640px) {
  .invoice-modal-content {
    max-height: 94vh;
  }
  .invoice-preview-container {
    padding: 16px 12px !important;
    border-radius: 12px !important;
  }
  .inv-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .inv-brand {
    gap: 10px !important;
  }
  .inv-logo {
    width: 52px !important;
    height: 52px !important;
  }
  .inv-brand-info .inv-title {
    font-size: 19px !important;
  }
  .inv-meta {
    text-align: left !important;
    min-width: 0 !important;
    padding-top: 10px !important;
    border-top: 1px dashed #e2e8f0 !important;
  }
  .inv-meta-row {
    justify-content: space-between !important;
    font-size: 11px !important;
  }
  .inv-badge-status {
    margin-bottom: 8px !important;
  }
  .inv-parties-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
  }
  .inv-summary-section {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
  }
  .upi-body {
    flex-direction: row !important;
    gap: 12px !important;
  }
  .inv-footer {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
  }
  .inv-footer .inv-sign-area {
    align-self: flex-end !important;
  }
}

@media screen and (max-width: 520px) {
  .dashboard-welcome-row { margin-bottom: 16px; }
  .dashboard-title { font-size: 29px; }
  .dashboard-hero-card { min-height: 112px; }
  .dashboard-section-heading { align-items: flex-start; }
  .dashboard-section-heading h3 { font-size: 19px; }
  .room-view-badge { padding: 6px 8px; font-size: 10px; }
  .room-card-media { height: 160px; }
}

@media screen and (max-width: 380px) {
  .app-header { padding: 0 8px; }
  .header-brand { gap: 6px; }
  .brand-logo-img { width: 30px; height: 30px; }
  .brand-name { font-size: 13.5px; }
  .mobile-only-badge { font-size: 9px; }
  .btn-primary-header { padding: 5px 9px; font-size: 11px; }

  .dashboard-kpis .kpi-card {
    padding: 10px 9px 8px !important;
    min-height: 106px !important;
  }
  .dashboard-kpis .kpi-val {
    font-size: 21px !important;
  }
  .dashboard-kpis .kpi-label {
    font-size: 10px !important;
    min-height: 25px !important;
    padding-right: 28px !important;
  }
  .dashboard-kpis .dashboard-kpi-icon {
    width: 24px !important;
    height: 24px !important;
    font-size: 11px !important;
    top: 8px !important;
  }
}

/* ==========================================================================
   Add-on Services & Amenities Manager Styles (Luxury Design)
   ========================================================================== */
.settings-card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.settings-card-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 240px;
  flex: 1;
}

.settings-card-icon-pill {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.16), rgba(184, 134, 11, 0.08));
  border: 1px solid rgba(212, 175, 55, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.08);
}

.settings-card-title-clean {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--primary, #0f231c);
  margin: 0;
  line-height: 1.25;
}

.settings-card-subtext {
  font-size: 12.5px;
  color: var(--text-muted, #64748b);
  margin: 3px 0 0 0;
  line-height: 1.4;
}

.btn-add-service {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #ffffff !important;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(184, 134, 11, 0.22);
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-add-service:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(184, 134, 11, 0.32);
  background: linear-gradient(135deg, #dfbc45, #c79210);
}

.settings-addons-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-addon-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-card, #ffffff);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(15, 35, 28, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.settings-addon-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, #d4af37, #b8860b);
  opacity: 0.75;
  border-radius: 12px 0 0 12px;
  transition: opacity 0.2s ease, width 0.2s ease;
}

.settings-addon-item:hover {
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 6px 18px rgba(184, 134, 11, 0.12);
  transform: translateY(-1.5px);
}

.settings-addon-item:hover::before {
  opacity: 1;
  width: 5px;
}

.addon-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.addon-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.addon-card-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.addon-item-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--dashboard-ink, #0f231c);
  letter-spacing: -0.2px;
  line-height: 1.3;
}

.addon-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.addon-pill-rate {
  font-size: 13px;
  font-weight: 800;
  color: #996515;
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid rgba(212, 175, 55, 0.32);
  padding: 2px 10px;
  border-radius: 20px;
  letter-spacing: 0.2px;
}

.addon-pill-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.addon-badge-perday {
  background: rgba(30, 144, 255, 0.1);
  color: #1565c0;
  border: 1px solid rgba(30, 144, 255, 0.24);
}

.addon-badge-flat {
  background: rgba(142, 36, 170, 0.1);
  color: #7b1fa2;
  border: 1px solid rgba(142, 36, 170, 0.24);
}

.addon-pill-qty {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  background: rgba(100, 116, 139, 0.08);
  border: 1px solid rgba(100, 116, 139, 0.16);
  padding: 3px 8px;
  border-radius: 6px;
}

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

.btn-addon-action {
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-addon-edit {
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.06);
  color: #996515;
}

.btn-addon-edit:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(184, 134, 11, 0.15));
  border-color: #b8860b;
  transform: translateY(-1px);
}

.btn-addon-delete {
  border: 1px solid rgba(229, 57, 53, 0.25);
  background: rgba(229, 57, 53, 0.05);
  color: #d32f2f;
}

.btn-addon-delete:hover {
  background: rgba(229, 57, 53, 0.12);
  border-color: #d32f2f;
  transform: translateY(-1px);
}

@media screen and (max-width: 680px) {
  .settings-card-header-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn-add-service {
    width: 100%;
    justify-content: center;
  }
  .settings-addon-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px;
  }
  .addon-card-left {
    width: 100%;
  }
  .addon-actions-wrap {
    width: 100%;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px dashed var(--border-light);
  }
}

/* ==========================================================================
   Bookings Pagination Styles
   ========================================================================== */
.bookings-pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.pagination-info {
  font-size: 13px;
  color: var(--text-muted, #64748b);
  font-weight: 500;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-page-nav, .btn-page-num {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-page-nav {
  gap: 5px;
}

.btn-page-nav:hover:not(:disabled),
.btn-page-num:hover:not(.active) {
  border-color: var(--gold-border, #d4af37);
  background: rgba(212, 175, 55, 0.08);
  color: var(--primary, #b8860b);
}

.btn-page-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-page-num.active {
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #ffffff;
  border-color: #b8860b;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(184, 134, 11, 0.25);
}

.pagination-ellipsis {
  padding: 0 4px;
  color: var(--text-muted);
  font-size: 13px;
  user-select: none;
}

.pagination-size-selector {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-select {
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.pagination-select:focus {
  outline: none;
  border-color: var(--gold-border, #d4af37);
}

@media screen and (max-width: 680px) {
  .bookings-pagination-wrapper {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }
  .pagination-controls {
    order: 1;
    flex-wrap: wrap;
    justify-content: center;
  }
  .pagination-info {
    order: 2;
  }
  .pagination-size-selector {
    order: 3;
  }
}


