/* ==========================================================================
   STAYMANAGER - MODERN MOBILE-FIRST CSS DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Color Palette - Light Mode */
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --bg-input: #f8fafc;
  --border-color: #e2e8f0;
  --border-focus: #0284c7;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --text-inverse: #ffffff;

  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --primary-text: #0369a1;

  --success: #10b981;
  --success-light: #d1fae5;
  --success-text: #065f46;

  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --warning-text: #92400e;

  --danger: #ef4444;
  --danger-light: #fee2e2;
  --danger-text: #991b1b;

  --whatsapp: #25d366;
  --whatsapp-hover: #20ba5a;
  --whatsapp-dark: #128c7e;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.06);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --bottom-nav-height: 64px;
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-top: env(safe-area-inset-top, 0px);
}

/* Dark Mode Palette */
body.theme-dark {
  --bg-app: #090d16;
  --bg-surface: #131b2e;
  --bg-surface-elevated: #1e293b;
  --bg-surface-subtle: #1e293b;
  --bg-input: #0f172a;
  --border-color: #334155;
  --border-focus: #38bdf8;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --text-inverse: #090d16;

  --primary: #38bdf8;
  --primary-hover: #0284c7;
  --primary-light: rgba(56, 189, 248, 0.15);
  --primary-text: #7dd3fc;

  --success: #34d399;
  --success-light: rgba(52, 211, 153, 0.15);
  --success-text: #6ee7b7;

  --warning: #fbbf24;
  --warning-light: rgba(251, 191, 36, 0.15);
  --warning-text: #fde68a;

  --danger: #f87171;
  --danger-light: rgba(248, 113, 113, 0.15);
  --danger-text: #fca5a5;

  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6);
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: #0b1120;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Desktop Centered Mobile App Frame Container */
.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

@media (min-width: 481px) {
  body {
    padding: 16px 0;
  }
  .app-container {
    min-height: calc(100vh - 32px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* ==========================================================================
   HEADER & PROPERTY SWITCHER
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: calc(12px + var(--safe-area-top)) 16px 12px 16px;
  box-shadow: var(--shadow-sm);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: transparent;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.brand-icon img,
.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.brand-title {
  font-size: 18.5px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.demo-pill-btn {
  width: auto;
  padding: 0 10px;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  border-color: rgba(2, 132, 199, 0.2);
}

.lang-toggle-btn {
  width: 36px;
  height: 36px;
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-light);
  border-color: rgba(2, 132, 199, 0.3);
  letter-spacing: 0.5px;
}

/* Property Switcher Pills */
.property-switcher-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.property-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
  flex: 1;
}

.property-switcher::-webkit-scrollbar {
  display: none;
}

.property-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-subtle);
  border: 1.5px solid transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.property-pill.active {
  background: var(--primary-light);
  color: var(--primary-text);
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.15);
}

.property-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
}

.add-property-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1.5px dashed var(--border-color);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-property-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ==========================================================================
   MAIN CONTENT & TABS
   ========================================================================== */

.app-main {
  flex: 1;
  padding: 16px 16px calc(var(--bottom-nav-height) + var(--safe-area-bottom) + 24px) 16px;
  overflow-y: auto;
}

.tab-view {
  display: none;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   CARDS & TYPOGRAPHY
   ========================================================================== */

.card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-title {
  font-size: 17.5px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

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

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 12px 0;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-action {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}

/* ==========================================================================
   DASHBOARD / TODAY TAB
   ========================================================================== */

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.highlight-blue .kpi-icon { background: var(--primary-light); color: var(--primary); }
.highlight-amber .kpi-icon { background: var(--warning-light); color: var(--warning); }
.highlight-emerald .kpi-icon { background: var(--success-light); color: var(--success); }
.highlight-rose .kpi-icon { background: var(--danger-light); color: var(--danger); }

.kpi-content {
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.kpi-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

/* Performance Mini Widget */
.performance-mini-card {
  background: linear-gradient(145deg, var(--bg-surface), var(--bg-surface-subtle));
}

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

.perf-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--success-text);
  background: var(--success-light);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--success));
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.perf-footer {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Action Feed Cards */
.action-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-left: 4px solid var(--primary);
}

.action-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.action-card-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.tag-checkin { background: var(--primary-light); color: var(--primary-text); }
.tag-checkout { background: var(--warning-light); color: var(--warning-text); }
.tag-cleaning { background: var(--danger-light); color: var(--danger-text); }

.action-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.action-card-detail {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-card-btns {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* Homestay Status Cards on Dashboard */
.property-overview-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prop-status-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prop-status-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.prop-status-info p {
  font-size: 11px;
  color: var(--text-muted);
}

.prop-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge-vacant { background: var(--success-light); color: var(--success-text); }
.badge-occupied { background: var(--primary-light); color: var(--primary-text); }
.badge-turnover { background: var(--warning-light); color: var(--warning-text); }

/* ==========================================================================
   CALENDAR TAB
   ========================================================================== */

.calendar-card {
  padding: 14px;
}

.calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.cal-month-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.cal-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
}

/* Calendar Mode Selector (Check-In vs Check-Out vs Stays) */
.cal-mode-selector {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  background: var(--bg-surface-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.cal-mode-pill {
  flex: 1;
  padding: 7px 8px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.cal-mode-pill:hover {
  color: var(--text-main);
  background: var(--bg-surface);
}

.cal-mode-pill.active {
  background: var(--bg-surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border-color: var(--border-color);
  font-weight: 800;
}

.cal-mode-pill[data-cal-filter="checkin"].active {
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.3);
}

.cal-mode-pill[data-cal-filter="checkout"].active {
  color: #ea580c;
  border-color: rgba(234, 88, 12, 0.3);
}

.cal-mode-pill[data-cal-filter="stays"].active {
  color: var(--primary);
  border-color: rgba(2, 132, 199, 0.3);
}

.cal-day-cell.has-checkin {
  background: rgba(34, 197, 94, 0.10);
  border-color: rgba(34, 197, 94, 0.35);
}

.cal-day-cell.has-checkin:hover {
  background: rgba(34, 197, 94, 0.20);
  border-color: #16a34a;
}

.cal-day-cell.has-checkout {
  background: rgba(249, 115, 22, 0.10);
  border-color: rgba(249, 115, 22, 0.35);
}

.cal-day-cell.has-checkout:hover {
  background: rgba(249, 115, 22, 0.20);
  border-color: #ea580c;
}

.cal-day-mode-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1.1;
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.cal-day-mode-badge.badge-checkin {
  background: rgba(34, 197, 94, 0.20);
  color: #15803d;
}

.cal-day-mode-badge.badge-checkout {
  background: rgba(249, 115, 22, 0.20);
  color: #c2410c;
}

/* Date Metrics Bar in Day Details */
.cal-date-metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.cal-metric-chip {
  background: var(--bg-surface-subtle);
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  text-align: center;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cal-metric-chip .metric-num {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.cal-metric-chip .metric-lbl {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 2px;
}

.cal-metric-chip.active-in {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.3);
}

.cal-metric-chip.active-in .metric-num {
  color: #16a34a;
}

.cal-metric-chip.active-out {
  background: rgba(249, 115, 22, 0.08);
  border-color: rgba(249, 115, 22, 0.3);
}

.cal-metric-chip.active-out .metric-num {
  color: #ea580c;
}

.cal-metric-chip.active-avail {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.3);
}

.cal-metric-chip.active-avail .metric-num {
  color: var(--primary);
}

.cal-vacating-alert-card {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.07), rgba(2, 132, 199, 0.07));
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.cal-vacating-alert-card .alert-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.18);
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.cal-vacating-alert-card .alert-content {
  flex: 1;
}

.cal-vacating-alert-card .alert-content strong {
  display: block;
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 3px;
}

.cal-vacating-alert-card .alert-content p {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.4;
}

.theme-dark .cal-mode-pill[data-cal-filter="checkin"].active { color: #4ade80; border-color: rgba(74, 222, 128, 0.4); }
.theme-dark .cal-mode-pill[data-cal-filter="checkout"].active { color: #fb923c; border-color: rgba(251, 146, 60, 0.4); }
.theme-dark .cal-day-cell.has-checkin { background: rgba(34, 197, 94, 0.18); border-color: rgba(34, 197, 94, 0.45); }
.theme-dark .cal-day-cell.has-checkout { background: rgba(249, 115, 22, 0.18); border-color: rgba(249, 115, 22, 0.45); }
.theme-dark .cal-day-mode-badge.badge-checkin { background: rgba(34, 197, 94, 0.28); color: #86efac; }
.theme-dark .cal-day-mode-badge.badge-checkout { background: rgba(249, 115, 22, 0.28); color: #fdba74; }
.theme-dark .cal-metric-chip.active-in .metric-num { color: #4ade80; }
.theme-dark .cal-metric-chip.active-out .metric-num { color: #fb923c; }
.theme-dark .cal-metric-chip.active-avail .metric-num { color: #38bdf8; }

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-subtle);
  margin-bottom: 8px;
}

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

.cal-day-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 2px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-subtle);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.cal-day-cell.other-month {
  opacity: 0.28;
}

.cal-day-cell:hover {
  background: var(--bg-surface);
  border-color: var(--border-color);
}

.cal-day-cell.has-booking {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.25);
}

.cal-day-cell.has-booking.is-confirmed-booked {
  background: rgba(2, 132, 199, 0.12);
  border-color: rgba(2, 132, 199, 0.38);
}

.cal-day-cell.has-booking:hover {
  background: rgba(2, 132, 199, 0.18);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.cal-day-cell.today {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}

.cal-day-cell.today.has-booking {
  background: var(--primary-light);
  border-color: var(--primary);
  box-shadow: 0 0 0 1.5px var(--primary);
}

.cal-day-cell.selected {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  background: rgba(2, 132, 199, 0.22);
}

.cal-day-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 2px;
}

.cal-day-cell.has-booking .cal-day-num {
  font-weight: 800;
}

.cal-day-cell.today .cal-day-num {
  color: var(--primary);
  font-weight: 800;
}

.cal-dots-container {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-top: 2px;
  max-width: 100%;
  min-height: 8px;
}

.cal-stay-dot,
.cal-booking-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
}

.cal-stay-dot.is-quotation {
  opacity: 0.65;
  border: 1px dashed rgba(255, 255, 255, 0.8);
}

.cal-day-cell:hover .cal-stay-dot {
  transform: scale(1.2);
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-muted);
}

.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Selected Day & Incoming Bookings Card */
.selected-day-card {
  margin-top: 14px;
}

.cal-listing-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.cal-tab-pill {
  flex: 1;
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.cal-tab-pill:hover {
  background: var(--bg-surface-subtle);
  color: var(--text-main);
}

.cal-tab-pill.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-text);
  font-weight: 700;
}

.day-details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.selected-day-bookings {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Proximity & Calendar Badges */
.cal-proximity-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.cal-prox-today {
  background: var(--success-light);
  color: var(--success-text);
  border: 1px solid var(--success);
}

.cal-prox-checkout {
  background: var(--danger-light);
  color: var(--danger-text);
  border: 1px solid var(--danger);
}

.cal-prox-tomorrow {
  background: var(--warning-light);
  color: var(--warning-text);
  border: 1px solid var(--warning);
}

.cal-prox-soon {
  background: rgba(2, 132, 199, 0.12);
  color: var(--primary);
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.cal-prox-future {
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.cal-prox-instay {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Status Badges */
.badge-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
}

.badge-confirmed {
  background: var(--success-light);
  color: var(--success-text);
}

.badge-booked {
  background: var(--warning-light);
  color: var(--warning-text);
}

.badge-inhouse {
  background: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
}

.badge-quotation {
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
}

.empty-hint {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 16px 0;
}

/* ==========================================================================
   BOOKINGS TAB (GUEST CRM)
   ========================================================================== */

.filter-controls {
  margin-bottom: 14px;
}

.search-box {
  position: relative;
  margin-bottom: 10px;
}

.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  font-size: 14px;
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
}

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

.filter-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.filter-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.bookings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.booking-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

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

.booking-prop-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.booking-channel-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.booking-guest-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 4px;
}

.booking-dates-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.booking-dates-row i {
  color: var(--primary);
}

.booking-financial-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface-subtle);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
}

.booking-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* ==========================================================================
   TURNOVERS TAB
   ========================================================================== */

.turnover-header-card {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-surface-subtle));
}

.turnover-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.turnover-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--warning-light);
  color: var(--warning);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.turnover-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.turnover-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.turnover-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-surface-subtle);
  padding: 10px;
  border-radius: var(--radius-md);
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-main);
  cursor: pointer;
}

.checklist-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ==========================================================================
   FINANCES TAB
   ========================================================================== */

.finance-period-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

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

.stat-card {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-card.full-width {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--bg-surface), var(--primary-light));
  border-color: rgba(2, 132, 199, 0.3);
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.stat-revenue .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-expenses .stat-icon { background: var(--danger-light); color: var(--danger); }
.stat-profit .stat-icon { background: var(--success-light); color: var(--success); }

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.profit-highlight {
  font-size: 22px;
  color: var(--success-text);
}

.property-revenue-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.property-rev-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.property-rev-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.expense-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.expense-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
}

.expense-item-row:last-child {
  border-bottom: none;
}

/* ==========================================================================
   SETTINGS TAB
   ========================================================================== */

.settings-property-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.settings-prop-card {
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.settings-prop-details h4 {
  font-size: 14px;
  font-weight: 700;
}

.settings-prop-details p {
  font-size: 11px;
  color: var(--text-muted);
}

.settings-btn-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.pwa-guide-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--bg-surface), var(--primary-light));
  border-color: rgba(2, 132, 199, 0.3);
}

.pwa-guide-icon {
  font-size: 28px;
  color: var(--primary);
}

/* ==========================================================================
   BUTTONS & FORMS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 17px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-surface-subtle);
}

.btn-danger-outline {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #ffffff;
}

.btn-whatsapp:hover {
  background: var(--whatsapp-hover);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-xs {
  padding: 5px 9px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

.form-group {
  margin-bottom: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.form-label.required::after {
  content: ' *';
  color: var(--danger);
}

.form-control, .form-select {
  width: 100%;
  padding: 10px 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

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

.form-control:disabled, .form-select:disabled {
  background: var(--bg-surface-subtle) !important;
  color: var(--text-subtle) !important;
  border-color: var(--border-color) !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

.pricing-calc-box {
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inline-input {
  width: 95px;
  padding: 4px 8px;
  font-size: 13px;
}

.calc-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  border-top: 1px dashed var(--border-color);
}

.total-amount-badge {
  font-size: 16.5px;
  color: var(--primary);
  font-weight: 800;
}

/* Color swatch picker */
.color-picker-row {
  display: flex;
  gap: 8px;
  align-items: center;
  height: 40px;
}

.color-swatch input {
  display: none;
}

.color-swatch span {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s ease;
}

.color-swatch input:checked + span {
  transform: scale(1.15);
  border-color: var(--text-main);
}

/* ==========================================================================
   FLOATING ACTION BUTTON & BOTTOM NAV
   ========================================================================== */

.fab-btn {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom) + 16px);
  right: calc(50% - 220px);
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), #0369a1);
  color: #ffffff;
  border: none;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  z-index: 45;
  transition: transform 0.2s ease;
}

@media (max-width: 480px) {
  .fab-btn {
    right: 16px;
  }
}

.fab-btn:active {
  transform: scale(0.92);
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  height: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
  padding-bottom: var(--safe-area-bottom);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  transition: all 0.2s ease;
}

.nav-item i {
  font-size: 19px;
  transition: transform 0.2s ease;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active i {
  transform: translateY(-2px);
}

/* ==========================================================================
   MODALS & BOTTOM SHEETS
   ========================================================================== */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  justify-content: center;
  align-items: flex-end;
}

.modal-backdrop.active {
  display: flex;
  animation: fadeInBackdrop 0.2s ease;
}

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

.modal-backdrop#monthlyInvoicesModal {
  z-index: 1010;
}

.modal-backdrop#whatsappModal {
  z-index: 1050;
}

.modal-backdrop#tenantChatImportModal {
  z-index: 10001 !important;
}

.modal-backdrop#tenantChatImportModal.active {
  display: flex !important;
}

.bottom-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: var(--bg-surface);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  padding: 16px 20px calc(20px + var(--safe-area-bottom)) 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  animation: slideUpSheet 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet-handle {
  width: 38px;
  height: 4px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  align-self: center;
  margin-bottom: 12px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.modal-title {
  font-size: 18.5px;
  font-weight: 800;
  color: var(--text-main);
}

.modal-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
}

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

.modal-body {
  display: flex;
  flex-direction: column;
}

.modal-footer {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  justify-content: flex-end;
}

/* ==========================================================================
   WHATSAPP PREVIEW & TEMPLATE TABS
   ========================================================================== */

.wa-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wa-icon-brand {
  font-size: 28px;
  color: var(--whatsapp);
}

.wa-template-selector {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 12px;
}

.wa-template-selector::-webkit-scrollbar {
  display: none;
}

.wa-tab-btn {
  padding: 7px 13px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.wa-tab-btn.active {
  background: var(--whatsapp-dark);
  color: #ffffff;
  border-color: var(--whatsapp-dark);
}

.wa-preview-card {
  background: #e5ddd5;
  background-image: radial-gradient(#d1c7bc 1px, transparent 1px);
  background-size: 16px 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

body.theme-dark .wa-preview-card {
  background: #0b141a;
  background-image: radial-gradient(#1f2c34 1px, transparent 1px);
}

.wa-bubble {
  background: #ffffff;
  padding: 13px;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  font-size: 14.5px;
  line-height: 1.45;
  color: #111b21;
  position: relative;
  word-break: break-word;
  white-space: pre-line;
}

body.theme-dark .wa-bubble {
  background: #202c33;
  color: #e9edef;
}

.wa-time-stamp {
  display: block;
  text-align: right;
  font-size: 11px;
  color: #667781;
  margin-top: 4px;
}

/* ==========================================================================
   DIGITAL GUEST GUIDE STYLING
   ========================================================================== */

.guest-guide-hero {
  text-align: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 14px;
}

.qr-code-box {
  width: 160px;
  height: 160px;
  margin: 12px auto;
  padding: 8px;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-code-box img {
  width: 100%;
  height: 100%;
}

.guide-info-card {
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
}

.guide-info-card h4 {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.guide-info-card p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 90%;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  background: #1e293b;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideDownToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

@keyframes slideDownToast {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   DEMO SALES BANNER & LICENSE MODAL
   ========================================================================== */

.demo-sales-banner {
  margin-top: 10px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  animation: pulseSubtle 3s infinite ease-in-out;
}

body.theme-dark .demo-sales-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.15));
  border-color: rgba(245, 158, 11, 0.4);
}

@keyframes pulseSubtle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.01); }
}

.hidden,
.demo-sales-banner.hidden {
  display: none !important;
}

.banner-content {
  display: flex;
  flex-direction: column;
}

.banner-badge {
  font-size: 10px;
  font-weight: 800;
  color: #92400e;
  letter-spacing: 0.5px;
}

body.theme-dark .banner-badge {
  color: #fde68a;
}

.banner-text {
  font-size: 12px;
  font-weight: 700;
  color: #78350f;
  line-height: 1.2;
}

body.theme-dark .banner-text {
  color: #fef3c7;
}

.banner-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-warning {
  background: #f59e0b;
  color: #ffffff;
  font-weight: 800;
  border: none;
}

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

.license-benefits-card {
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.license-benefits-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.license-benefits-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-main);
}

.license-buy-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

/* Segmented Control for Rental Types */
.segmented-control {
  display: flex;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 4px;
}

.segment-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.segment-btn.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   APP UPDATE BANNER & VERSION MANAGEMENT STYLES
   ========================================================================== */
.app-update-banner {
  display: none;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff;
  padding: 10px 14px;
  border-bottom: 2px solid #f59e0b;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  animation: slideDownUpdate 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.app-update-banner.active {
  display: flex;
}

@keyframes slideDownUpdate {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.update-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.update-banner-icon {
  width: 32px;
  height: 32px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f59e0b;
  font-size: 14px;
  flex-shrink: 0;
}

.update-banner-info h4 {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1px;
}

.update-banner-info p {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.2;
}

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

.btn-update-now {
  background: #f59e0b;
  color: #0f172a;
  font-weight: 800;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.btn-update-now:hover {
  background: #d97706;
  color: #ffffff;
}

.btn-dismiss-update {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.btn-dismiss-update:hover {
  color: #ffffff;
}

/* ==========================================================================
   IN-APP USER GUIDE MODAL & ACCORDION STYLES
   ========================================================================== */

.user-guide-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.guide-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
}

.guide-card.active {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.guide-card-header {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: var(--bg-surface-subtle);
  user-select: none;
}

.guide-card-header:hover {
  background: var(--bg-surface-hover);
}

.guide-card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.guide-card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.guide-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.guide-card-chevron {
  color: var(--text-muted);
  font-size: 13px;
  transition: transform 0.2s ease;
}

.guide-card.active .guide-card-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.guide-card-body {
  padding: 14px;
  font-size: 12.5px;
  color: var(--text-main);
  line-height: 1.6;
  border-top: 1px solid var(--border-color);
  display: none;
}

.guide-card.active .guide-card-body {
  display: block;
}

.guide-step {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.guide-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.guide-step-text {
  flex: 1;
}

.guide-callout {
  background: var(--bg-surface-subtle);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 11.5px;
  margin: 10px 0;
  color: var(--text-main);
}

.guide-callout.success {
  border-left-color: var(--success);
}

.guide-callout.warning {
  border-left-color: var(--warning);
}

/* Dark Mode Overrides for Calendar & Listing */
body.theme-dark .cal-day-cell.has-booking {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}

body.theme-dark .cal-day-cell.has-booking.is-confirmed-booked {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
}

body.theme-dark .cal-tab-pill {
  background: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-muted);
}

body.theme-dark .cal-tab-pill.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-text);
}

/* ==========================================================================
   MAINTENANCE CONTACTS & DISPATCH MODAL
   ========================================================================== */

.settings-contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.contact-card:hover {
  border-color: var(--primary);
}

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

.contact-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.contact-category-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.badge-cleaner { background: #e0f2fe; color: #0369a1; }
.badge-aircond { background: #e0f2fe; color: #0284c7; }
.badge-plumber { background: #e0e7ff; color: #3730a3; }
.badge-electrician { background: #fef3c7; color: #92400e; }
.badge-handyman { background: #fee2e2; color: #991b1b; }
.badge-linen_supplier { background: #f3e8ff; color: #6b21a8; }
.badge-gas_supplier { background: #ffedd5; color: #9a3412; }
.badge-locksmith { background: #ecfdf5; color: #065f46; }
.badge-tenant, .cat-tenant { background: #dcfce7; color: #15803d; }
.badge-other { background: #f1f5f9; color: #475569; }

body.theme-dark .badge-cleaner { background: rgba(3, 105, 161, 0.25); color: #38bdf8; }
body.theme-dark .badge-aircond { background: rgba(2, 132, 199, 0.25); color: #38bdf8; }
body.theme-dark .badge-plumber { background: rgba(55, 48, 163, 0.25); color: #818cf8; }
body.theme-dark .badge-electrician { background: rgba(146, 64, 14, 0.25); color: #fde047; }
body.theme-dark .badge-handyman { background: rgba(153, 27, 27, 0.25); color: #f87171; }
body.theme-dark .badge-linen_supplier { background: rgba(107, 33, 168, 0.25); color: #c084fc; }
body.theme-dark .badge-gas_supplier { background: rgba(154, 52, 18, 0.25); color: #fb923c; }
body.theme-dark .badge-locksmith { background: rgba(6, 95, 70, 0.25); color: #34d399; }
body.theme-dark .badge-tenant, body.theme-dark .cat-tenant { background: rgba(22, 163, 74, 0.25); color: #4ade80; }
body.theme-dark .badge-other { background: rgba(71, 85, 105, 0.25); color: #94a3b8; }

.contact-phone-link {
  font-size: 13px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 500;
}

.contact-phone-link:hover {
  color: var(--primary);
}

.contact-notes-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

.contact-actions-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
  align-items: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   DIGITAL PAYMENT RECEIPTS & PROOFS
   ========================================================================== */

.bank-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.bank-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.bank-pill:hover {
  border-color: var(--primary);
  color: var(--text-main);
  background: var(--bg-surface);
}

.bank-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.25);
}

.receipt-upload-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.receipt-upload-dropzone:hover {
  border-color: var(--primary);
  background: rgba(2, 132, 199, 0.04);
}

.receipt-upload-dropzone.dragover {
  border-color: var(--primary);
  background: rgba(2, 132, 199, 0.08);
}

.receipt-preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.receipt-preview-thumbnail {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: #f1f5f9;
  flex-shrink: 0;
  cursor: pointer;
}

.receipt-preview-info {
  flex: 1;
  min-width: 0;
}

.badge-receipts {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.badge-receipts:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: #059669;
}

.badge-receipts-none {
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  border-color: var(--border-color);
}

.badge-receipts-none:hover {
  color: var(--text-main);
  background: var(--bg-surface);
}

.receipt-record-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: all 0.15s ease;
}

.receipt-record-card:hover {
  border-color: var(--primary);
}

.receipt-record-card.type-deposit { border-left: 4px solid var(--warning); }
.receipt-record-card.type-balance,
.receipt-record-card.type-full { border-left: 4px solid var(--success); }
.receipt-record-card.type-monthly_rent { border-left: 4px solid var(--primary); }
.receipt-record-card.type-security_deposit { border-left: 4px solid #8b5cf6; }

.receipt-record-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

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

.receipt-record-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.receipt-record-thumb:hover {
  transform: scale(1.05);
}

.receipt-ref-pill {
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-surface-subtle);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.receipt-actions-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-color);
  flex-wrap: wrap;
}

/* Dark mode for receipts */
body.theme-dark .bank-pill.active {
  background: var(--primary);
  color: #ffffff;
}

body.theme-dark .badge-receipts {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

body.theme-dark .receipt-upload-dropzone {
  background: rgba(255, 255, 255, 0.03);
}

body.theme-dark .receipt-upload-dropzone:hover {
  background: rgba(2, 132, 199, 0.1);
}

/* ==========================================================================
   OCR RECEIPT & UTILITY BILL SCANNER STYLES
   ========================================================================== */

.ocr-tab-bar {
  display: flex;
  gap: 6px;
  background: var(--bg-surface-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.ocr-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ocr-tab-btn.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

body.theme-dark .ocr-tab-btn.active {
  background: var(--bg-surface);
  color: var(--primary);
}

.ocr-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 6px;
  transition: all 0.3s ease;
}

/* ==========================================================================
   14. PROMOTIONAL MEDIA & MARKETING HUB STYLES
   ========================================================================== */

.promo-controls-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}

.promo-category-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.promo-category-pills::-webkit-scrollbar {
  display: none;
}

.promo-media-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (min-width: 580px) {
  .promo-media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .promo-media-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.promo-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.promo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.promo-thumb-container {
  position: relative;
  width: 100%;
  height: 140px;
  background: var(--bg-surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.promo-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.promo-thumb-container:hover .promo-thumb-img {
  transform: scale(1.05);
}

.promo-thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
}

.promo-badge-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.promo-cat-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.promo-cat-badge.cat-photo { background: #0284c7; }
.promo-cat-badge.cat-poster { background: #8b5cf6; }
.promo-cat-badge.cat-video_tour { background: #e11d48; }
.promo-cat-badge.cat-copywriting { background: #f59e0b; }

.promo-prop-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.promo-card-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.promo-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  line-height: 1.25;
}

.promo-card-caption-preview {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  background: var(--bg-surface-subtle);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.promo-card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.btn-promo-wa {
  background: #25D366 !important;
  border-color: #25D366 !important;
  color: #ffffff !important;
  font-weight: 700;
  flex: 1;
}

.btn-promo-wa:hover {
  background: #20b858 !important;
  border-color: #20b858 !important;
}

.btn-promo-share {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
}

.promo-menu-btn {
  color: var(--text-muted);
  padding: 4px 6px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.promo-menu-btn:hover {
  color: var(--danger);
}

body.theme-dark .promo-card {
  background: var(--bg-surface);
  border-color: var(--border-color);
}

body.theme-dark .promo-card-caption-preview {
  background: rgba(255, 255, 255, 0.03);
}

.promo-media-sheet {
  max-width: 820px;
}

/* ==========================================================================
   OVERLAP PREVENTION & CHANGE HOMESTAY MODAL STYLES (v2.6.3)
   ========================================================================== */

.booking-overlap-alert {
  background: #fef2f2;
  border: 1px solid #f87171;
  border-left: 4px solid #ef4444;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: fadeInBackdrop 0.25s ease;
}

body.theme-dark .booking-overlap-alert {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  border-left-color: #ef4444;
}

.overlap-alert-icon {
  font-size: 18px;
  color: #ef4444;
  line-height: 1;
  margin-top: 1px;
}

.overlap-alert-content {
  flex: 1;
}

.overlap-alert-content strong {
  font-size: 13px;
  color: #b91c1c;
  display: block;
}

body.theme-dark .overlap-alert-content strong {
  color: #fca5a5;
}

.overlap-conflict-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid #ef4444;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.overlap-conflict-guest {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.overlap-conflict-dates {
  font-size: 11.5px;
  color: var(--text-muted);
}

.avail-prop-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s ease;
  cursor: pointer;
}

.avail-prop-item:hover {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.05);
}

.avail-prop-name {
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.avail-prop-rate {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   19. CORPORATE PDF DOCUMENT HUB & PRINT STYLING (v2.6.4)
   ========================================================================== */

#pdfDocModal {
  z-index: 9999 !important;
}

.pdf-modal-container {
  max-width: 900px !important;
  max-height: 94vh !important;
  display: flex;
  flex-direction: column;
}

.pdf-modal-container .modal-body {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(94vh - 140px);
}

.pdf-toolbar-panel {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.pdf-type-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.pdf-type-btn {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pdf-type-btn:hover {
  background: var(--bg-surface-subtle);
}

.pdf-type-btn.active[data-doc="quotation"] {
  background: rgba(2, 132, 199, 0.12);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.15);
}

.pdf-type-btn.active[data-doc="invoice"] {
  background: rgba(99, 102, 241, 0.12);
  border-color: #6366f1;
  color: #4f46e5;
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.15);
}

.pdf-type-btn.active[data-doc="receipt"] {
  background: rgba(16, 185, 129, 0.12);
  border-color: #10b981;
  color: #059669;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.15);
}

.pdf-validity-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.pdf-validity-preset {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s;
}

.pdf-validity-preset.active,
.pdf-validity-preset:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Printable A4 Paper Container */
.pdf-doc-sheet {
  background: #ffffff;
  color: #1e293b;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  padding: 28px;
  position: relative;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  margin: 0 auto;
  max-width: 820px;
}

.pdf-watermark-paid {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  font-size: 58px;
  font-weight: 900;
  letter-spacing: 8px;
  color: rgba(16, 185, 129, 0.14);
  border: 6px solid rgba(16, 185, 129, 0.22);
  padding: 8px 30px;
  border-radius: 14px;
  pointer-events: none;
  text-transform: uppercase;
  z-index: 10;
  white-space: nowrap;
}

/* Snapshot mode applied temporarily during html2pdf snapshot */
.pdf-rendering-mode {
  padding: 12px 22px !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  width: 794px !important;
  min-width: 794px !important;
  max-width: 794px !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
}

.pdf-rendering-mode #pdfDocTitle {
  font-size: 24px !important;
  margin-bottom: 2px !important;
}

.pdf-rendering-mode #pdfHostBizName {
  font-size: 18px !important;
}

.pdf-rendering-mode table th,
.pdf-rendering-mode table td {
  padding-top: 2.5px !important;
  padding-bottom: 2.5px !important;
  font-size: 10px !important;
}

.pdf-rendering-mode #pdfTermsList {
  line-height: 1.2 !important;
  font-size: 8.5px !important;
}

.pdf-rendering-mode #pdfTermsList li {
  margin-bottom: 1px !important;
}

.pdf-rendering-mode #pdfTotalAmountInWords {
  font-size: 9.5px !important;
}

.pdf-rendering-mode > div:last-child {
  margin-top: 6px !important;
  padding-top: 4px !important;
}

/* Print CSS: Isolates the printable A4 sheet */
@media print {
  body {
    background: #ffffff !important;
    color: #0f172a !important;
    padding: 0 !important;
    margin: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .app-container,
  .toast-container,
  .bottom-nav,
  .bottom-sheet-handle,
  .modal-close,
  .no-print {
    display: none !important;
  }

  /* Make modal wrappers transparent and fullscreen for printing */
  .modal-backdrop#pdfDocModal,
  .modal-backdrop#agreementGeneratorModal {
    display: block !important;
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 99999 !important;
  }

  .modal-backdrop#pdfDocModal .bottom-sheet,
  .modal-backdrop#agreementGeneratorModal .bottom-sheet {
    max-width: 100% !important;
    width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    transform: none !important;
  }

  .modal-backdrop#pdfDocModal .modal-header,
  .modal-backdrop#pdfDocModal .sheet-handle,
  .modal-backdrop#pdfDocModal .pdf-toolbar-panel,
  .modal-backdrop#pdfDocModal .modal-footer,
  .modal-backdrop#agreementGeneratorModal .modal-header,
  .modal-backdrop#agreementGeneratorModal .sheet-handle,
  .modal-backdrop#agreementGeneratorModal .agr-nav-tabs,
  .modal-backdrop#agreementGeneratorModal .agr-toolbar-panel,
  .modal-backdrop#agreementGeneratorModal .modal-footer {
    display: none !important;
  }

  .modal-backdrop#pdfDocModal .modal-body,
  .modal-backdrop#agreementGeneratorModal .modal-body {
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    max-height: none !important;
  }

  #printablePdfSheet {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 6mm 10mm !important;
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #0f172a !important;
    page-break-after: avoid;
    break-after: avoid;
  }

  #printablePdfSheet table,
  #printablePdfSheet tr,
  #printablePdfSheet td,
  #printablePdfSheet th,
  #printablePdfSheet .pdf-totals-section,
  #printablePdfSheet .pdf-bank-section,
  #printablePdfSheet .pdf-signature-section,
  #printablePdfSheet .pdf-terms-section,
  #printablePdfSheet .pdf-doc-sheet > div {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  #printableAgreementSheet {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 4mm 6mm !important;
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #0f172a !important;
  }

  .agr-schedule-table,
  .agr-inventory-schedule-table,
  .agr-clause-block,
  .agr-signatures,
  .agr-stamp-panel {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  @page {
    size: A4 portrait;
    margin: 10mm;
  }
}

/* ==========================================================================
   19. TENANCY AGREEMENT GENERATOR MODULE (v2.7.0)
   ========================================================================== */

.modal-backdrop#agreementGeneratorModal.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 99999 !important;
  position: fixed !important;
  inset: 0 !important;
}

.agr-modal-container {
  max-width: 960px !important;
  max-height: 94vh !important;
  display: flex;
  flex-direction: column;
}

.agr-modal-container .modal-body {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(94vh - 130px);
}

.agr-nav-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.agr-nav-tab {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.agr-nav-tab:hover {
  background: var(--bg-surface-subtle);
  color: var(--text-main);
}

.agr-nav-tab.active {
  border-color: var(--primary);
  background: rgba(2, 132, 199, 0.08);
  color: var(--primary);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.12);
}

.agr-select-card {
  background: var(--bg-surface-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.agr-form-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.agr-section-header {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.agr-two-col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.agr-subcard {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.agr-subcard-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Muslim-Friendly House Card Highlights */
.agr-muslim-card {
  border: 1.5px solid #059669 !important;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.01) 100%) !important;
}

.agr-hub-callout {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.07), rgba(14, 165, 233, 0.03));
  border: 1.5px solid #bae6fd;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.agr-hub-callout:hover {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(14, 165, 233, 0.06));
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.12);
}

.agr-hub-callout-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(2, 132, 199, 0.15);
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.agr-toolbar-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.agr-inventory-input-table th,
.agr-inventory-input-table td {
  border-bottom: 1px solid var(--border-color);
}

.agr-inventory-input-table input[type="text"],
.agr-inventory-input-table input[type="number"] {
  width: 100%;
  font-size: 11.5px;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  box-sizing: border-box;
}

/* ==========================================================================
   FORMAL LEGAL RESIDENTIAL TENANCY AGREEMENT DOCUMENT SHEET (A4)
   ========================================================================== */

.agreement-doc-sheet {
  background: #ffffff;
  color: #0f172a;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 38px 44px;
  position: relative;
  font-family: 'Times New Roman', Times, Georgia, serif;
  font-size: 11pt;
  line-height: 1.55;
  margin: 0 auto;
  max-width: 820px;
  box-sizing: border-box;
}

.agr-doc-title {
  text-align: center;
  font-size: 15.5pt;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 4px 0;
  color: #000000;
}

.agr-doc-subtitle {
  text-align: center;
  font-size: 11pt;
  font-weight: bold;
  font-style: italic;
  margin-bottom: 18px;
  color: #334155;
}

.agr-preamble {
  margin-bottom: 20px;
  text-align: justify;
  text-justify: inter-word;
  font-size: 11pt;
}

.agr-schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px 0;
  font-size: 10.5pt;
  page-break-inside: avoid;
  break-inside: avoid;
}

.agr-schedule-table th,
.agr-schedule-table td {
  border: 1px solid #1e293b;
  padding: 6px 10px;
  vertical-align: top;
}

.agr-schedule-table th {
  background: #f1f5f9;
  font-weight: bold;
  text-align: left;
}

.agr-schedule-item-num {
  width: 32px;
  text-align: center;
  font-weight: bold;
}

.agr-schedule-item-title {
  width: 35%;
  font-weight: bold;
  background: #f8fafc;
}

.agr-clause-block {
  margin-bottom: 18px;
  page-break-inside: avoid;
  break-inside: avoid;
  text-align: justify;
  text-justify: inter-word;
}

.agr-clause-title {
  font-size: 11.5pt;
  font-weight: bold;
  text-transform: uppercase;
  margin: 0 0 8px 0;
  border-bottom: 1.5px solid #0f172a;
  padding-bottom: 3px;
  letter-spacing: 0.3px;
}

.agr-clause-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agr-muslim-highlight-box {
  background: #f0fdf4;
  border-left: 4px solid #16a34a;
  border-right: 1px solid #bbf7d0;
  border-top: 1px solid #bbf7d0;
  border-bottom: 1px solid #bbf7d0;
  padding: 12px 14px;
  margin: 12px 0;
  border-radius: 0 6px 6px 0;
}

.agr-inventory-schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px 0;
  font-size: 10pt;
  page-break-inside: avoid;
  break-inside: avoid;
}

.agr-inventory-schedule-table th,
.agr-inventory-schedule-table td {
  border: 1px solid #1e293b;
  padding: 5px 8px;
}

.agr-inventory-schedule-table th {
  background: #f1f5f9;
  font-weight: bold;
  text-align: left;
}

.agr-signatures {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #94a3b8;
  page-break-inside: avoid;
  break-inside: avoid;
}

.agr-sig-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.agr-sig-card {
  border: 1px solid #cbd5e1;
  padding: 12px 14px;
  background: #fcfcfc;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
}

.agr-stamp-panel {
  border: 2px solid #0f172a;
  padding: 10px 14px;
  text-align: center;
  font-size: 10pt;
  margin-top: 20px;
  page-break-inside: avoid;
  break-inside: avoid;
}

.agr-type-toggle {
  display: inline-flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.04);
  padding: 2px;
  border-radius: 6px;
}

.agr-type-toggle .btn {
  transition: all 0.15s ease;
  font-weight: 600;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}

.agr-type-toggle .btn.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.3) !important;
}

/* Multi-page snapshot mode applied during html2pdf */
.agr-rendering-mode {
  padding: 24px 28px !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  width: 794px !important;
  min-width: 794px !important;
  max-width: 794px !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
}

/* Accessibility & Layout Enhancements (v2.7.11) */
.icon-btn, .lang-toggle-btn, .demo-pill-btn {
  min-height: 44px;
}
.cal-nav-btn {
  min-width: 44px;
  min-height: 44px;
}
.btn {
  min-height: 44px;
}
.btn-sm {
  min-height: 38px;
}
.btn-xs {
  min-height: 34px;
}
.nav-item {
  min-height: 44px;
}

/* Document & Text Wrapping Safeguards */
.pdf-doc-sheet, .agreement-doc-sheet, .pdf-modal-container, .agr-modal-container {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Smart WhatsApp Chat Import Badges & Result Styles */
.tenant-chat-confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.tenant-chat-confidence-badge.high {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}
.tenant-chat-confidence-badge.medium {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}
.tenant-chat-confidence-badge.low {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}
body.theme-dark .tenant-chat-confidence-badge.high {
  background: rgba(22, 101, 52, 0.35);
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.4);
}
body.theme-dark .tenant-chat-confidence-badge.medium {
  background: rgba(133, 77, 14, 0.35);
  color: #fde047;
  border-color: rgba(253, 224, 71, 0.4);
}
body.theme-dark .tenant-chat-confidence-badge.low {
  background: rgba(153, 27, 27, 0.35);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
}

/* ==========================================================================
   TENANT LIFECYCLE & REPEAT GUEST RECOGNITION STYLES
   ========================================================================== */
.badge-status-active {
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-status-completed {
  background: #f1f5f9;
  color: #64748b;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-status-prospect {
  background: #fef3c7;
  color: #b45309;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-status-blacklisted {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

body.theme-dark .badge-status-active {
  background: rgba(22, 101, 52, 0.35);
  color: #4ade80;
}
body.theme-dark .badge-status-completed {
  background: rgba(100, 116, 139, 0.3);
  color: #94a3b8;
}
body.theme-dark .badge-status-prospect {
  background: rgba(180, 83, 9, 0.35);
  color: #fde047;
}
body.theme-dark .badge-status-blacklisted {
  background: rgba(185, 28, 28, 0.35);
  color: #f87171;
}

.tenant-lifecycle-metrics {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 5px;
  font-size: 11px;
}
.tenant-metric-pill {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
}
.tenant-metric-pill strong {
  color: var(--text-main);
}


