/* ==========================================================================
   UI REFRESH LAYER
   Purely visual overrides loaded AFTER style.css / admin.css.
   - No markup, IDs, classes or JS behaviour are changed.
   - To roll back completely: remove the <link href="/refresh.css"> line from
     the HTML pages. Nothing else depends on this file.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bg: #f8f5f1;
  --border: #e8e0d7;
  --text: #1c1917;
  --text-muted: #6f665d;
  --text-light: #8f867c;
  --primary-light: #f7ede8;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.05), 0 4px 16px rgba(28, 25, 23, 0.05);
  --shadow-lg: 0 2px 6px rgba(28, 25, 23, 0.06), 0 14px 36px rgba(28, 25, 23, 0.12);
  --ring: 0 0 0 3px rgba(122, 37, 16, 0.18);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
html, body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(122, 37, 16, 0.18); }

button, a, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
button:not(:disabled):active { transform: translateY(0) scale(0.985); }
button:disabled { cursor: not-allowed; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Top bar ---------- */
.top-bar {
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(232, 224, 215, 0.9);
  padding: 12px 24px;
}
.top-bar-inner { gap: 16px; }
.brand-mini {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 700; letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-mini::before {
  content: '';
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
  background: linear-gradient(135deg, #9a3417 0%, #5a1a0a 100%);
  box-shadow: 0 2px 6px rgba(122, 37, 16, 0.3);
}
.view-tabs { background: #f1ebe4; padding: 4px; gap: 2px; }
.view-tab { padding: 7px 16px; transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.view-tab:hover:not(.active) { color: var(--text); }
.view-tab.active { box-shadow: 0 2px 8px rgba(122, 37, 16, 0.28); }
.my-bookings-btn, .logout-btn { transition: background 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.my-bookings-btn { padding: 9px 18px; box-shadow: 0 2px 8px rgba(122, 37, 16, 0.22); }
.my-bookings-btn:hover { box-shadow: 0 4px 12px rgba(122, 37, 16, 0.3); }
.logged-in-pill { border-color: #e4d2ca; }
.admin-link {
  display: inline-flex; align-items: center;
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  padding: 7px 12px; margin-left: 0; border-radius: 100px;
  transition: background 0.15s, color 0.15s;
}
.admin-link:hover { background: #f1ebe4; color: var(--text); text-decoration: none; }

/* ---------- Page layout ---------- */
.page-wrapper { padding: 32px 24px 64px; }
.layout { gap: 32px; }
.homes-wrapper { padding: 32px 24px 64px; }
.homes-title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.homes-subtitle { font-size: 15px; margin-top: 4px; }
.homes-header { margin-bottom: 28px; }

/* ---------- Venue hero ---------- */
.venue-photo { height: 260px; border-radius: 20px; box-shadow: var(--shadow-lg); }
.venue-photo img { border-radius: 20px; }
.venue-card { border-radius: var(--radius); background: linear-gradient(135deg, #8a3a1a 0%, #5a1a0a 100%); }
.venue-card.overlap { box-shadow: 0 14px 34px rgba(60, 20, 8, 0.28); }
.venue-name { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.venue-address { opacity: 0.9; }

/* ---------- Cards ---------- */
.section-card, .pricing-card {
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  border-color: var(--border);
}
.pricing-info-card { padding: 22px 24px; }
.section-heading, .pricing-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--text-muted); margin-bottom: 16px;
}
.price-row { padding: 14px 10px; }
.price-amount { font-size: 17px; letter-spacing: -0.01em; }
.price-main { font-size: 15px; }
.price-sub { font-size: 12px; }
.amenity-tile { border-radius: 12px; padding: 14px 10px; transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.amenity-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ---------- Segmented toggles ---------- */
.booking-toggle { gap: 6px; background: #f1ebe4; padding: 5px; border-radius: 100px; }
.toggle-btn {
  border: none; background: transparent; color: var(--text-muted);
  padding: 11px 16px; font-weight: 600;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.toggle-btn:hover:not(.active) { background: rgba(255, 255, 255, 0.7); color: var(--text); }
.toggle-btn.active { background: var(--primary); color: #fff; box-shadow: 0 3px 10px rgba(122, 37, 16, 0.3); }

/* ---------- Calendar & time pickers ---------- */
.cal-month-label { font-size: 17px; }
.cal-nav { width: 36px; height: 36px; }
.cal-day { border-radius: 10px; transition: background 0.15s var(--ease), transform 0.15s var(--ease); }
.cal-day:hover:not(.past):not(.empty):not(.full) { background: var(--primary-light); }
.availability-panel { border-radius: 14px; padding: 16px; background: #fffdfb; }
.avail-track { height: 30px; border-radius: 10px; }
.airbnb-fields { border-radius: 14px; }
.airbnb-field { min-height: 68px; }
.selected-date-pill { padding: 10px 16px; }

/* ---------- Form controls ---------- */
.combo-input, .text-input,
.form-group input:not([type="radio"]):not([type="checkbox"]),
.payment-form input:not([type="radio"]):not([type="checkbox"]),
.admin-compose-card select, .br-compose-card select, .br-compose-card textarea {
  min-height: 44px; border-radius: 10px; border-color: #ddd3c8;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
/* Native radios/checkboxes were inheriting full-width text-input styling. */
.form-group input[type="radio"], .form-group input[type="checkbox"],
.payment-form input[type="radio"], .payment-form input[type="checkbox"],
.apply-field input[type="radio"], .apply-field input[type="checkbox"] {
  width: 18px; height: 18px; min-height: 0; padding: 0; flex-shrink: 0;
  accent-color: var(--primary); cursor: pointer;
}
.combo-input:hover, .text-input:hover,
.form-group input:not([type="radio"]):not([type="checkbox"]):hover,
.payment-form input:not([type="radio"]):not([type="checkbox"]):hover { border-color: #c9bcae; }
.combo-input:focus, .text-input:focus,
.form-group input:not([type="radio"]):not([type="checkbox"]):focus,
.payment-form input:not([type="radio"]):not([type="checkbox"]):focus,
.admin-compose-card select:focus, .br-compose-card select:focus, .br-compose-card textarea:focus {
  border-color: var(--primary); box-shadow: var(--ring); outline: none;
}
.combo-input.error:focus, .text-input.error:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15); }
textarea.text-input, textarea.combo-input { min-height: 88px; }
.time-field label, .event-field label, .detail-field label,
.form-group label, .payment-form label { font-size: 13px; font-weight: 600; color: #4b443d; margin-bottom: 6px; }
.stepper { height: 44px; border-radius: 10px; border-color: #ddd3c8; }
.stepper:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.stepper-btn { width: 44px; font-size: 20px; }
.field-error { font-size: 12px; margin-top: 5px; }
.stay-unit-choice { border-radius: 14px; padding: 14px 16px; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.stay-unit-choice:hover { box-shadow: var(--shadow); }

/* ---------- Primary action buttons ---------- */
.book-btn {
  padding: 16px; font-size: 16px; border-radius: 14px;
  box-shadow: 0 6px 18px rgba(122, 37, 16, 0.26);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s;
}
.book-btn:disabled { opacity: 0.55; box-shadow: none; }
.pay-btn {
  padding: 15px; border-radius: 12px;
  box-shadow: 0 4px 14px rgba(28, 25, 23, 0.16);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s;
}
.pay-btn:hover:not(:disabled) { box-shadow: 0 8px 20px rgba(28, 25, 23, 0.22); }
.pay-btn:disabled { box-shadow: none; }
.cancel-pay-btn { padding: 12px; font-weight: 500; }
.cancel-pay-btn:hover { background: #f1ebe4; color: var(--text); }
.pulse-hint { font-size: 13px; }

/* ---------- Pricing summary ---------- */
.pricing-row { padding: 10px 0; }
.pricing-row.total { font-size: 17px; }
.pricing-row.pricing-due-today {
  border-radius: 12px; padding: 14px 16px; margin: 10px -16px 6px;
  background: linear-gradient(135deg, #8a2c14 0%, #6a1d0c 100%);
  box-shadow: 0 6px 16px rgba(122, 37, 16, 0.25);
}
.pricing-note.pricing-charge-now { border-radius: 12px; padding: 12px 14px; }

/* ---------- Chat ---------- */
.chat-card { border-radius: 20px; box-shadow: var(--shadow-lg); }
.chat-header { padding: 16px 20px; background: linear-gradient(180deg, #fff 0%, #fdfaf7 100%); }
.chat-title { font-size: 14px; font-weight: 700; }
.chat-messages { padding: 20px; gap: 14px; background: #fcfaf8; }
.message-bubble { padding: 11px 15px; font-size: 14.5px; }
.bot-message .message-bubble {
  border-color: #ece3d9; border-radius: 6px 16px 16px 16px;
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.05);
}
.user-message .message-bubble {
  border-radius: 16px 6px 16px 16px;
  box-shadow: 0 2px 8px rgba(122, 37, 16, 0.22);
}
.chip { padding: 9px 16px; transition: background 0.15s, transform 0.15s var(--ease), box-shadow 0.15s; }
.chip:hover { transform: translateX(2px); box-shadow: 0 2px 8px rgba(122, 37, 16, 0.12); }
.chat-summary-card, .booking-confirm-card { border-radius: 14px; box-shadow: var(--shadow); }
.csc-btn { padding: 11px 14px; border-radius: 10px; }
.chat-input-area { padding: 14px 16px; background: #fff; }
.chat-input { min-height: 44px; padding: 10px 16px; border-color: #ddd3c8; }
.chat-input:focus { box-shadow: var(--ring); }
.voice-btn, .send-btn { width: 44px; height: 44px; }
.send-btn { box-shadow: 0 3px 10px rgba(122, 37, 16, 0.3); }
.chat-messages::-webkit-scrollbar { width: 6px; }

/* ---------- Modals & login ---------- */
.modal-overlay {
  background: rgba(28, 25, 23, 0.52);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal-card { border-radius: 20px; padding: 32px; box-shadow: 0 24px 70px rgba(28, 25, 23, 0.28); }
.modal-title { font-size: 22px; letter-spacing: -0.02em; }
.modal-subtitle { font-size: 14px; line-height: 1.5; }
.login-tabs { background: #f1ebe4; }
.login-tab { padding: 10px 12px; }
.otp-box { width: 48px; height: 56px; border-radius: 10px; }
.otp-box:focus { box-shadow: var(--ring); }
.booking-summary { border-radius: 12px; background: #fbf9f6; }

/* ---------- Cabins & Homes ---------- */
.properties-grid { gap: 24px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.property-card {
  border-radius: 18px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.property-card-body { padding: 16px 18px 20px; }
.property-card-name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.property-card-price { font-size: 15px; margin-top: 10px; }
.property-type-chip { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); }
.discount-badge { box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35); }
.property-photo { border-radius: 20px; box-shadow: var(--shadow-lg); }
.property-thumb { border-radius: 10px; transition: transform 0.15s var(--ease), border-color 0.15s; }
.property-thumb:hover { transform: translateY(-2px); }
.amenity-chip { background: #f3ece5; padding: 7px 12px; }
.back-to-properties { padding-bottom: 20px; font-size: 14px; }
.back-to-properties:hover { text-decoration: underline; }

/* ---------- My Bookings panel ---------- */
.bookings-panel { box-shadow: 0 10px 30px rgba(28, 25, 23, 0.08); }
.bookings-panel-inner { padding: 24px; }
.bookings-panel-title { font-size: 20px; letter-spacing: -0.02em; }
.booking-history-card {
  border-radius: 14px; padding: 16px;
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.booking-history-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.bh-status-badge { padding: 4px 11px; }
.empty-bookings { padding: 56px 24px; }

/* ==========================================================================
   ADMIN
   ========================================================================== */
.admin-dashboard { max-width: 1240px; padding: 28px 24px 72px; }
.admin-dashboard-header { margin-bottom: 24px; }
.admin-dashboard-header h1, .admin-dashboard-header h2, .admin-dashboard-header h3 {
  font-size: 24px; font-weight: 700; letter-spacing: -0.02em;
}

/* Navigation: quick actions on top, scrollable underline tabs below */
.admin-tabs-row { gap: 12px; margin-bottom: 28px; align-items: center; }
.admin-tab-send, .admin-tab-apps {
  order: 1; padding: 10px 18px; border-radius: 12px; font-size: 13px;
  transition: transform 0.2s var(--ease), filter 0.2s, box-shadow 0.2s var(--ease);
}
.admin-tab-send { box-shadow: 0 3px 10px rgba(31, 77, 58, 0.22); }
.admin-tab-apps { box-shadow: 0 3px 10px rgba(122, 37, 16, 0.22); }
.admin-tab-send:hover, .admin-tab-apps:hover { transform: translateY(-1px); }
.admin-tabs {
  order: 2; flex: 1 1 100%; width: 100%;
  flex-wrap: wrap; gap: 2px;
  background: transparent; border-radius: 0; padding: 0;
  box-shadow: inset 0 -1px 0 var(--border);
}
.admin-tab {
  flex-shrink: 0; white-space: nowrap;
  padding: 12px 16px; font-size: 14px; border-radius: 10px 10px 0 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.admin-tab:hover:not(.active) { background: rgba(122, 37, 16, 0.05); color: var(--text); }
.admin-tab.active { background: transparent; color: var(--primary); border-bottom-color: var(--primary); }

/* Lists & rows */
.admin-bookings-list, .admin-properties-list { gap: 16px; }
.admin-booking-row, .admin-property-row {
  border-radius: 14px; padding: 18px 20px;
  transition: box-shadow 0.2s var(--ease), border-color 0.2s;
}
.admin-booking-row:hover, .admin-property-row:hover { box-shadow: var(--shadow-lg); border-color: #dccfc2; }
.admin-booking-id { font-size: 12px; color: var(--text-muted); letter-spacing: 0.02em; }
.admin-property-name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.admin-property-thumb { width: 80px; height: 80px; border-radius: 12px; }
.admin-icon-btn {
  min-height: 36px; padding: 8px 16px;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.15s var(--ease);
}
.admin-property-actions { align-items: center; }
.admin-icon-btn:hover { background: var(--primary-light); }
.admin-icon-btn.danger:hover { background: #fdecea; }
.admin-empty { padding: 56px 0; font-size: 15px; }
.admin-when-toggle { padding: 4px; background: #f1ebe4; border: none; }
.admin-when-btn { padding: 8px 14px; transition: background 0.15s, color 0.15s; }

/* Tables (billing, reconciliation) */
.admin-billing-table-wrap { border-radius: var(--radius); }
.admin-billing-table { border-collapse: separate; border-spacing: 0; overflow: hidden; border-radius: var(--radius); }
.admin-billing-table th {
  background: #faf7f4; padding: 12px 14px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  position: sticky; top: 0;
}
.admin-billing-table td { padding: 13px 14px; }
.admin-billing-table tbody tr { transition: background 0.12s; }
.admin-billing-table tbody tr:hover td { background: #fdfaf7; }
.admin-billing-table tbody tr:last-child td { border-bottom: none; }
.admin-billing-section { margin-bottom: 36px; }
.admin-billing-section-title { font-size: 17px; letter-spacing: -0.01em; margin-bottom: 14px; }
.admin-billing-filters input, .admin-billing-filters select {
  min-height: 40px; padding: 9px 12px; border-radius: 10px; border-color: #ddd3c8; background: #fff;
}
.admin-billing-filters input:focus, .admin-billing-filters select:focus {
  outline: none; border-color: var(--primary); box-shadow: var(--ring);
}
.admin-pay-pill, .admin-inactive-badge, .br-status-pill, .bh-status-badge { letter-spacing: 0.03em; }

/* Admin forms / compose */
.admin-form-card, .admin-pricing-card { padding: 28px; }
.br-compose-card { padding: 0; box-shadow: var(--shadow-lg); }
.br-card-head { border-radius: 16px 16px 0 0; padding: 26px 28px 24px; }
.br-card-title { font-size: 24px; }
.br-section { padding: 22px 28px 10px; }
.br-kind-toggle { margin: 22px 28px 10px; background: #f1ebe4; }
.br-section-send { padding-bottom: 28px; }
.br-quote { border-radius: 14px; padding: 16px 18px; }

/* Admin login */
.section-card.admin-login-card { padding: 40px 36px 32px; border-radius: 20px; box-shadow: var(--shadow-lg); }
@media (max-width: 480px) { .section-card.admin-login-card { padding: 28px 20px 22px; } }
.al-title { font-size: 30px; }

/* ==========================================================================
   ROUND 2: UX polish
   ========================================================================== */

/* Calendar: compact rows so a whole month fits without scrolling */
.calendar-grid { gap: 2px; }
.cal-day { aspect-ratio: auto; min-height: 46px; }
.calendar-dow span { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.cal-legend { gap: 8px 16px; }
.cal-legend-sample { width: 24px; height: 24px; }

/* Placeholders & disabled fields */
::placeholder { color: #a8a094; opacity: 1; }
input:disabled, select:disabled, textarea:disabled { background: #f4f0eb; color: var(--text-muted); cursor: not-allowed; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: #d8cfc4 transparent; }

/* Cabins & Homes */
.property-card-photo { background-image: linear-gradient(135deg, #f1e7de 0%, #e3d3c5 100%); }
.property-card-noimg { opacity: 0.7; }
.homes-terms-footer { text-align: left; margin-top: 32px; }
.properties-loading { padding: 64px 0; font-size: 15px; }
.property-card-address { font-size: 13px; }
.property-card-meta { font-size: 13px; margin-top: 6px; }
.price-off { font-weight: 700; }

/* Pricing summary: friendlier empty state */
.pricing-card .pricing-table:empty { display: none; }
.pricing-note { line-height: 1.5; }
.secure-note { line-height: 1.5; }

/* Text links inside cards/terms */
.terms-agree-row a, .homes-terms-footer a, .bh-billing-row a { text-underline-offset: 3px; }

/* Larger, easier tap targets for small controls */
.bh-cancel-btn { padding: 7px 14px; border-radius: 8px; }
.panel-close { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.resend-link { padding: 6px 4px; }

/* ==========================================================================
   PAYMENTS & BILLING (works with billing-ux.js; harmless without it)
   ========================================================================== */
#admin-view-billing .admin-dashboard-header { align-items: center; margin-bottom: 18px; }
#admin-view-billing .admin-dashboard-header .homes-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
/* Refresh is a secondary action, not the page's main call to action */
#admin-view-billing .admin-dashboard-header .pay-btn {
  width: auto; margin: 0; padding: 9px 18px; font-size: 13px; font-weight: 600;
  background: #fff; color: var(--primary); border: 1.5px solid var(--border); box-shadow: none; border-radius: 100px;
}
#admin-view-billing .admin-dashboard-header .pay-btn:hover { border-color: var(--primary); background: var(--primary-light); transform: none; box-shadow: none; }
.admin-live-banner { display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 12px 16px; }
.admin-live-banner::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #dc2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.18); flex-shrink: 0; }

/* Section switcher */
.billing-nav {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
}
.billing-nav-btn {
  display: inline-flex; align-items: center; gap: 8px; border: none; background: transparent;
  color: var(--text-muted); font: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 14px; border-radius: 11px; cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.billing-nav-btn:hover:not(.active) { background: #f6f1ec; color: var(--text); }
.billing-nav-btn.active { background: var(--primary); color: #fff; box-shadow: 0 3px 10px rgba(122, 37, 16, 0.28); }
.billing-badge {
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: 100px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; line-height: 1;
  background: #efe8e0; color: var(--text-muted);
}
.billing-badge[hidden] { display: none; }
.billing-badge.is-attn { background: #dc2626; color: #fff; }
.billing-nav-btn.active .billing-badge { background: rgba(255, 255, 255, 0.22); color: #fff; }
.billing-nav-btn.active .billing-badge.is-attn { background: #fff; color: #b91c1c; }

/* One section at a time */
.billing-tabbed .admin-billing-section { display: none; margin-bottom: 0; }
.billing-tabbed .admin-billing-section.is-active { display: block; animation: billing-in 0.2s ease; }
@keyframes billing-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.billing-tabbed .admin-billing-section-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.billing-desc { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--text-muted); max-width: 60ch; }

/* Filters sit in a tidy bar */
.admin-billing-filters { align-items: center; padding: 12px; background: #fff; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 16px; }
.admin-billing-filters input, .admin-billing-filters select { flex: 1 1 200px; margin: 0; }
.admin-billing-filters input[type="date"] { flex: 0 1 180px; }
.admin-billing-filters .admin-icon-btn { flex: 0 0 auto; background: var(--primary); color: #fff; border-color: var(--primary); }
.admin-billing-filters .admin-icon-btn:hover { background: var(--primary-dark); color: #fff; }

/* Friendlier empty states inside billing */
.admin-billing-section .admin-empty {
  background: #fff; border: 1px dashed #d8cfc4; border-radius: 14px; padding: 40px 20px; font-size: 14px;
}
.admin-billing-table td { font-size: 14px; line-height: 1.45; }
.admin-billing-table td .admin-booking-id { color: var(--text); font-size: 13px; margin-bottom: 4px; }
.admin-billing-table .admin-billing-mono { font-size: 11px; color: var(--text-muted); }
.admin-billing-table .admin-billing-mono a { color: var(--primary); }
.admin-billing-stale, .admin-billing-error { border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; }
.admin-billing-section .admin-booking-row { margin-bottom: 16px; align-items: center; }
.admin-billing-section .admin-booking-row .admin-booking-info code { background: #f4efe9; padding: 2px 6px; border-radius: 6px; font-size: 12px; }

@media (max-width: 640px) {
  .billing-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .billing-nav::-webkit-scrollbar { display: none; }
  .billing-nav-btn { flex-shrink: 0; white-space: nowrap; }
  #admin-view-billing .admin-dashboard-header { flex-wrap: nowrap; }
}

/* ==========================================================================
   SEND BOOKING REQUEST
   ========================================================================== */

/* Wide screens: form on the left, sent requests always visible on the right */
@media (min-width: 1180px) {
  .br-page {
    display: grid; grid-template-columns: minmax(0, 760px) minmax(340px, 1fr);
    gap: 28px; align-items: start;
  }
  .br-sent-panel {
    position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto;
    padding-right: 4px;
  }
}
.br-sent-panel .admin-dashboard-header { margin-bottom: 14px; }
.br-sent-panel .homes-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }

/* Numbered steps */
.br-compose-card { counter-reset: brstep; }
.br-section-title { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text); }
.br-section-title::before {
  counter-increment: brstep; content: counter(brstep);
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary); font-size: 12px; font-weight: 800;
}
.br-section { padding-bottom: 14px; }

/* Duration and kind toggles */
.br-duration-btn { min-height: 44px; transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.br-duration-btn.active { box-shadow: 0 3px 10px rgba(31, 77, 58, 0.28); }
.br-kind-btn { min-height: 40px; transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.br-kind-btn.active { box-shadow: 0 3px 10px rgba(31, 77, 58, 0.28); }

/* Price & send stays in view while the form is filled in (tall, wide screens only) */
@media (min-width: 900px) and (min-height: 780px) {
  .br-section-send {
    position: sticky; bottom: 0; z-index: 5;
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 -10px 24px rgba(28, 25, 23, 0.07);
    padding-top: 16px; padding-bottom: 20px;
  }
  .br-section-send .br-quote { max-height: 28vh; overflow-y: auto; margin-bottom: 12px; }
}
.br-quote { background: #f7faf8; border-color: #d6e6dc; }
.br-quote-due strong { font-size: 22px; letter-spacing: -0.02em; }
.br-send-btn { min-height: 52px; font-size: 16px; }
.br-send-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Clear success / error messages instead of bare text */
.br-section-send .login-ok:not(:empty) {
  background: #e7f6e7; border: 1px solid #c6e6c6; color: #1e6b2e; font-weight: 600;
  border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px;
}
.br-section-send .login-error:not(:empty) {
  background: #fdecea; border: 1px solid #f5c2c0; color: #9b1c1c; font-weight: 600;
  border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px;
}
.br-sent-link { padding: 10px; background: #f7faf8; border: 1px solid #d6e6dc; border-radius: 12px; }
.br-sent-link .text-input { background: #fff; font-size: 13px; }

/* Stay dates */
.stay-date-pills { gap: 10px; }
.br-compose-card .stay-calendar { border-radius: 14px; }

/* Sent requests: each row becomes a compact card instead of a 6-column table */
#br-request-table .admin-billing-table-wrap { overflow: visible; }
#br-request-table .admin-billing-table { display: block; border: none; box-shadow: none; background: transparent; border-radius: 0; }
#br-request-table .admin-billing-table thead { display: none; }
#br-request-table .admin-billing-table tbody { display: flex; flex-direction: column; gap: 12px; }
#br-request-table .admin-billing-table tbody tr {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center;
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px;
  box-shadow: var(--shadow); transition: box-shadow 0.2s var(--ease), border-color 0.2s;
}
#br-request-table .admin-billing-table tbody tr:hover { box-shadow: var(--shadow-lg); border-color: #dccfc2; }
#br-request-table .admin-billing-table tbody tr:hover td { background: transparent; }
#br-request-table .admin-billing-table td { display: block; padding: 0; border: none; font-size: 13px; }
#br-request-table .admin-billing-table td:nth-child(1) { grid-column: 1; grid-row: 1; font-weight: 600; font-size: 14px; }
#br-request-table .admin-billing-table td:nth-child(4) { grid-column: 2; grid-row: 1; justify-self: end; }
#br-request-table .admin-billing-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; color: var(--text); line-height: 1.4; }
#br-request-table .admin-billing-table td:nth-child(3) { grid-column: 1; grid-row: 3; font-weight: 700; color: var(--primary); font-size: 15px; }
#br-request-table .admin-billing-table td:nth-child(5) { grid-column: 2; grid-row: 3; justify-self: end; font-size: 12px; }
#br-request-table .admin-billing-table td:nth-child(6) {
  grid-column: 1 / -1; grid-row: 4; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border);
}
#br-request-table .admin-property-actions { justify-content: flex-end; flex-wrap: wrap; }
#br-request-table .admin-billing-table tbody tr.br-row-inactive { background: #fbf9f6; box-shadow: none; }
#br-request-table .admin-billing-table tbody tr.br-row-inactive td:nth-child(1),
#br-request-table .admin-billing-table tbody tr.br-row-inactive td:nth-child(2) { opacity: 0.7; }
#br-request-table .admin-billing-table tbody tr.br-row-inactive td:nth-child(3) { color: var(--text-light); }

/* ==========================================================================
   ROUND 3: account area, "Back to site", My Bookings panel
   ========================================================================== */

/* Logged-in pill: avatar + email + logout */
.logged-in-pill {
  gap: 6px; padding: 4px 4px 4px 6px; background: #fff; border: 1px solid var(--border);
  box-shadow: var(--shadow); color: var(--text);
}
.logged-in-label-btn {
  display: inline-flex; align-items: center; gap: 8px; max-width: 240px;
  font-size: 13px; font-weight: 600; color: var(--text); padding: 2px 6px 2px 2px; border-radius: 100px;
}
.logged-in-label-btn::before {
  content: attr(data-initial);
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #9a3417 0%, #5a1a0a 100%); color: #fff;
  font-size: 12px; font-weight: 700;
}
.logged-in-label-btn:hover { text-decoration: none; color: var(--primary); }
.logout-btn { padding: 7px 14px; font-size: 12px; background: #f1ebe4; color: var(--text); box-shadow: none; }
.logout-btn:hover { background: #e7ddd2; }

/* "← Back to site" and similar top-bar links read as buttons */
.top-bar-right .admin-link {
  border: 1px solid var(--border); background: #fff; padding: 8px 14px;
  font-weight: 600; color: var(--text); box-shadow: var(--shadow);
}
.top-bar-right .admin-link:hover { border-color: var(--primary); color: var(--primary); background: #fff; }

/* My Bookings panel: line up with the top bar and tidy the header */
.bookings-panel { padding: 0 24px; }
.bookings-panel-inner { padding: 24px 0 28px; }
.bookings-panel-header { margin-bottom: 18px; }
.panel-close {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: #fff;
  color: var(--text-muted); font-size: 16px; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.panel-close:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.bk-when-toggle { background: #f1ebe4; border: none; padding: 4px; }
.bk-apps-btn { border-color: var(--border); transition: background 0.15s, color 0.15s, border-color 0.15s; }
.bk-apps-btn:not(.active):hover { border-color: var(--primary); color: var(--primary); }

/* Empty state spans the full width instead of sitting in one grid column */
.bookings-list .empty-bookings, .bookings-list > .admin-empty {
  grid-column: 1 / -1; padding: 44px 20px; text-align: center;
  background: #fbf9f6; border: 1px dashed #d8cfc4; border-radius: 14px; color: var(--text-muted);
}

@media (max-width: 640px) {
  .bookings-panel { padding: 0 14px; }
  .logged-in-label-btn { max-width: 130px; }
  .logged-in-label-btn::before { width: 22px; height: 22px; font-size: 11px; }
  .top-bar-right .admin-link { padding: 7px 10px; }
}

/* ==========================================================================
   ROUND 4: hero, chat, stay page, empty states
   ========================================================================== */

/* Hero: show more of the photo, overlap the card a little less */
.venue-photo { height: 300px; }
.venue-photo-wrap { margin-bottom: -48px; }
.venue-card.overlap { padding: 26px 28px; }
.venue-stars { margin-top: 2px; }

/* Chat: suggestion chips sit side by side instead of three full-width bars */
.quick-chips { flex-direction: row; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip { text-align: center; padding: 9px 16px; font-size: 13px; font-weight: 600; background: #fff; }
.chip:hover { transform: translateY(-1px); }
.bot-message .message-bubble { font-size: 15px; line-height: 1.6; }
.chat-messages { background: radial-gradient(120% 60% at 50% 0%, #fffaf5 0%, #fcfaf8 60%); }
.chat-header { padding: 18px 22px; }
.chat-input-area { padding: 16px 20px; }

/* Empty "select a date" pricing state reads as a hint, not a dead card */
.pricing-table > .pricing-row.muted:only-child {
  justify-content: center; text-align: center; padding: 22px 16px; font-size: 14px;
  background: #fbf9f6; border: 1px dashed #d8cfc4; border-radius: 12px; color: var(--text-muted);
}
.pulse-hint:not(:empty) { font-weight: 500; }

/* Terms checkbox is a proper, tappable row */
.terms-agree-row {
  align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 14px;
  background: #fbf9f6; border: 1px solid var(--border); border-radius: 12px;
  font-size: 13px; line-height: 1.5; transition: border-color 0.15s, background 0.15s;
}
.terms-agree-row:hover { border-color: #d8cfc4; }
.terms-agree-row input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.terms-agree-row.error { border-color: var(--red); background: #fef2f2; }

/* Optional guest application: friendlier, less heavy */
.apply-promo-card { background: linear-gradient(180deg, #fff 0%, #fbf3ee 100%); }
.apply-promo-btn {
  border-radius: 12px; padding: 12px 16px; font-size: 14px;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.apply-promo-btn:hover { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(122, 37, 16, 0.25); }

/* Cabins & Homes detail: calmer calendar, nicer photo placeholder */
.stay-cal-grid { gap: 3px; }
.stay-cal-day { min-height: 46px; }
.stay-cal-tag { font-size: 8px; letter-spacing: 0.06em; }
.stay-cal-day.booked:not(.past) .stay-cal-tag { color: #b8b0a6; font-weight: 600; }
.stay-cal-day.booked:not(.past) { background-color: #f6f2ed; }
.stay-cal-month { font-size: 16px; }
.stay-range-summary { font-size: 14px; padding: 8px 12px; background: var(--primary-light); border-radius: 100px; }
.stay-clear-dates { font-size: 12px; }
.stay-date-pill { border-radius: 14px; padding: 12px 14px; transition: border-color 0.15s, background 0.15s; }
.property-photo { background-image: linear-gradient(135deg, #f1e7de 0%, #e3d3c5 100%); font-size: 64px; }
.property-description { font-size: 15px; line-height: 1.65; }
.property-meta { font-size: 13px; }
.back-to-properties {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; margin-bottom: 16px;
  border: 1px solid var(--border); border-radius: 100px; background: #fff; box-shadow: var(--shadow);
  transition: border-color 0.15s, background 0.15s;
}
.back-to-properties:hover { border-color: var(--primary); background: var(--primary-light); text-decoration: none; }

/* Amenity tiles */
.amenity-tile { font-size: 13px; font-weight: 500; color: var(--text); gap: 6px; }
.amenity-tile span:first-child { font-size: 24px; }

/* ==========================================================================
   AIRBNB-STYLE LAYER (pairs with airbnb-ux.js)
   ========================================================================== */

/* Listing cards */
.ab-card { overflow: hidden; background: #fff; border-radius: 18px; }
.ab-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.ab-card-media { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #f1e7de 0%, #e3d3c5 100%); overflow: hidden; }
.ab-card-strip { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.ab-card-strip::-webkit-scrollbar { display: none; }
.ab-card-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; }
.ab-card-slide img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.ab-card:hover .ab-card-slide img { transform: scale(1.04); }
.ab-noimg { display: flex; align-items: center; justify-content: center; font-size: 52px; }
.ab-chip {
  position: absolute; top: 12px; left: 12px; padding: 5px 11px; border-radius: 100px;
  background: rgba(255, 255, 255, 0.95); color: var(--text); font-size: 12px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.ab-save-badge {
  position: absolute; left: 12px; bottom: 12px; padding: 5px 11px; border-radius: 100px;
  background: #1c1917; color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.ab-heart {
  position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; border: none; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2;
  background: rgba(0, 0, 0, 0.22); color: #fff; transition: transform 0.15s var(--ease), background 0.15s;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.ab-heart:hover { transform: scale(1.1); background: rgba(0, 0, 0, 0.36); }
.ab-heart svg path { fill: rgba(0, 0, 0, 0.3); stroke: #fff; transition: fill 0.15s, stroke 0.15s; }
.ab-heart.is-saved svg path { fill: #e11d48; stroke: #e11d48; }
.ab-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; border: none;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2;
  background: rgba(255, 255, 255, 0.94); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  opacity: 0; transition: opacity 0.2s, transform 0.15s var(--ease);
}
.ab-arrow[hidden] { display: none; }
.ab-arrow:hover { transform: translateY(-50%) scale(1.08); }
.ab-prev { left: 10px; }
.ab-next { right: 10px; }
.ab-card:hover .ab-arrow, .ab-card:focus-within .ab-arrow { opacity: 1; }
@media (hover: none) { .ab-arrow { opacity: 1; } }
.ab-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.ab-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); transition: background 0.2s, transform 0.2s; }
.ab-dots i.on { background: #fff; transform: scale(1.25); }
.ab-card-body { padding: 14px 16px 18px; }
.ab-card .ab-save-badge ~ .ab-dots { bottom: 14px; }

/* Filters */
.ab-filter-bar { margin: 0 0 22px; }
.ab-filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ab-filter-row select, .ab-pill-btn {
  height: 42px; border: 1px solid var(--border); border-radius: 100px; background: #fff; padding: 0 16px;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; box-shadow: var(--shadow);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.ab-filter-row select:hover, .ab-pill-btn:hover { border-color: #c9bcae; }
.ab-filter-row select:focus, .ab-pill-btn:focus-visible { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.ab-pill-btn { display: inline-flex; align-items: center; gap: 8px; }
.ab-pill-btn svg { width: 16px; height: 16px; }
.ab-pill-btn svg path { fill: none; stroke: currentColor; }
.ab-pill-btn.on { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.ab-pill-btn.on svg path { fill: #e11d48; stroke: #e11d48; }
.ab-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 100px; background: var(--primary); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.ab-count[hidden] { display: none; }
.ab-sort { margin-left: auto; }
.ab-filter-meta { display: flex; align-items: center; gap: 14px; margin-top: 12px; font-size: 14px; color: var(--text-muted); }
.ab-link-btn { background: none; border: none; padding: 0; font: inherit; font-weight: 700; color: var(--primary); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Empty + skeleton states */
.ab-empty { grid-column: 1 / -1; text-align: center; padding: 56px 20px; background: #fff; border: 1px dashed #d8cfc4; border-radius: 18px; }
.ab-empty-icon { font-size: 36px; margin-bottom: 8px; }
.ab-empty-title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.ab-empty-copy { color: var(--text-muted); margin: 6px 0 16px; font-size: 14px; }
.ab-skel-card { display: flex; flex-direction: column; gap: 10px; }
.ab-skel {
  background: linear-gradient(90deg, #efe8e0 25%, #f8f3ee 37%, #efe8e0 63%); background-size: 400% 100%;
  animation: ab-shimmer 1.4s ease infinite; border-radius: 10px;
}
.ab-skel-img { aspect-ratio: 4 / 3; border-radius: 18px; }
.ab-skel-line { height: 14px; }
.ab-skel-line.w70 { width: 70%; } .ab-skel-line.w50 { width: 50%; } .ab-skel-line.w30 { width: 30%; }
@keyframes ab-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Detail page: photo mosaic */
.property-photo-wrap.has-mosaic .property-photo,
.property-photo-wrap.has-mosaic .property-photo-thumbs { display: none; }
.ab-mosaic {
  position: relative; display: grid; gap: 6px; height: 380px; border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-lg); background: #efe8e0;
}
.ab-m1 { grid-template-columns: 1fr; }
.ab-m2 { grid-template-columns: 1fr 1fr; }
.ab-m3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.ab-m3 .ab-m-tile:first-child { grid-row: 1 / 3; }
.ab-m4 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.ab-m4 .ab-m-tile:nth-child(1) { grid-row: 1 / 3; }
.ab-m4 .ab-m-tile:nth-child(4) { grid-column: 2 / 4; }
.ab-m5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.ab-m5 .ab-m-tile:first-child { grid-row: 1 / 3; }
.ab-m-tile { position: relative; border: none; padding: 0; margin: 0; overflow: hidden; cursor: zoom-in; background: #e6dcd1; min-width: 0; min-height: 0; }
.ab-m-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s var(--ease), filter 0.2s; }
.ab-m-tile:hover img { transform: scale(1.04); filter: brightness(0.94); }
.ab-m-tile:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.ab-more { display: none; }
.ab-show-all {
  /* sits above the title card that overlaps the bottom of the photos */
  position: absolute; right: 14px; bottom: 58px; padding: 9px 16px; border-radius: 10px; cursor: pointer;
  background: #fff; border: 1px solid #1c1917; color: #1c1917; font: inherit; font-size: 13px; font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); transition: background 0.15s, transform 0.15s var(--ease);
}
.ab-show-all:hover { background: #f6f1ec; transform: translateY(-1px); }

/* Save button inside the property header card */
.venue-card.overlap { position: relative; }
.ab-heart.ab-detail-save {
  position: absolute; top: 18px; right: 18px; width: auto; height: 38px; padding: 0 16px; gap: 8px;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.4); font: inherit; font-size: 13px; font-weight: 700;
}
.ab-heart.ab-detail-save:hover { background: rgba(255, 255, 255, 0.24); transform: none; }
.ab-heart.ab-detail-save svg { width: 18px; height: 18px; }
.ab-heart.ab-detail-save.is-saved svg path { fill: #fb7185; stroke: #fb7185; }

/* Full-screen photo viewer */
.ab-lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(12, 9, 7, 0.95); display: flex; align-items: center; justify-content: center; animation: fade-in 0.2s ease; }
.ab-lightbox[hidden] { display: none; }
.ab-lb-img { max-width: min(92vw, 1400px); max-height: 84vh; object-fit: contain; border-radius: 8px; user-select: none; }
.ab-lb-close, .ab-lb-nav {
  position: absolute; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.12); color: #fff; border-radius: 50%; transition: background 0.15s, transform 0.15s var(--ease);
}
.ab-lb-close:hover, .ab-lb-nav:hover { background: rgba(255, 255, 255, 0.24); }
.ab-lb-close { top: 18px; right: 18px; width: 44px; height: 44px; font-size: 18px; }
.ab-lb-nav { top: 50%; width: 48px; height: 48px; transform: translateY(-50%); }
.ab-lb-nav[hidden] { display: none; }
.ab-lb-nav svg { width: 22px; height: 22px; }
.ab-lb-prev { left: 18px; }
.ab-lb-next { right: 18px; }
.ab-lb-count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, 0.85); font-size: 14px; font-weight: 600; letter-spacing: 0.04em; }
body.ab-noscroll { overflow: hidden; }

/* Toast */
.ab-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 3500; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #1c1917; color: #fff; padding: 12px 20px; border-radius: 100px; font-size: 14px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28); transition: opacity 0.25s, transform 0.25s var(--ease); max-width: calc(100vw - 32px);
}
.ab-toast.show { opacity: 1; transform: translate(-50%, 0); }

.ab-cal-btn {
  display: inline-flex; align-items: center; justify-content: center; margin-top: 12px; padding: 10px 16px; border-radius: 10px;
  background: #fff; border: 1.5px solid #86efac; color: #166534; font-size: 13px; font-weight: 700; text-decoration: none;
  transition: background 0.15s, transform 0.15s var(--ease);
}
.ab-cal-btn:hover { background: #dcfce7; transform: translateY(-1px); }

/* ==========================================================================
   ADMIN OVERVIEW (pairs with admin-overview.js)
   ========================================================================== */
.ov-head { align-items: flex-end; }
.ov-sub { color: var(--text-muted); font-size: 14px; margin-top: 2px; }
.ov-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; transition: opacity 0.2s; }
.ov-kpis.is-loading { opacity: 0.55; }
.ov-kpi {
  display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; cursor: default;
  background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow);
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.2s;
}
button.ov-kpi { cursor: pointer; }
button.ov-kpi:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: #dccfc2; }
.ov-kpi-label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.ov-kpi-value { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; color: var(--text); }
.ov-kpi-hint { font-size: 13px; color: var(--text-muted); }
.ov-kpi.is-hot .ov-kpi-value { color: var(--primary); }
.ov-kpi.is-warn .ov-kpi-value { color: #b45309; }
.ov-kpi.is-bad .ov-kpi-value { color: #dc2626; }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ov-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.ov-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ov-card-head h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.ov-muted { font-size: 13px; color: var(--text-muted); }
.ov-day { margin: 16px 0 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.ov-day:first-child { margin-top: 0; }
.ov-day.is-today { color: var(--primary); }
.ov-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 14px; background: #fffdfb; }
.ov-item-main { flex: 1; min-width: 0; }
.ov-item-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-item-sub { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-item-id { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--text-light); }
.ov-badge { flex-shrink: 0; min-width: 78px; text-align: center; padding: 5px 10px; border-radius: 100px; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.ov-badge.lodge { background: #f7ede8; color: #7a2510; }
.ov-badge.in { background: #e7f6e7; color: #1e6b2e; }
.ov-badge.now { background: #fff4d6; color: #8a5a00; }
.ov-foot { margin: 16px 4px 0; font-size: 12px; color: var(--text-muted); }
.ov-badge.out { background: #eef2ff; color: #3730a3; }
.ov-empty { text-align: center; padding: 40px 16px; color: var(--text-muted); font-size: 14px; background: #fbf9f6; border: 1px dashed #d8cfc4; border-radius: 14px; }
.ov-empty-icon { font-size: 28px; margin-bottom: 6px; }
.ov-allclear { display: flex; align-items: center; gap: 10px; padding: 16px; border-radius: 14px; background: #e7f6e7; color: #1e6b2e; font-weight: 700; font-size: 14px; }
.ov-allclear span { width: 24px; height: 24px; border-radius: 50%; background: #1e6b2e; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.ov-attn-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; font-size: 14px; font-weight: 600; padding: 13px 14px; margin-bottom: 8px; border-radius: 14px; border: 1px solid var(--border); background: #fff; cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.15s var(--ease); }
.ov-attn-row:hover { transform: translateX(2px); border-color: #c9bcae; background: #fffdfb; }
.ov-attn-row.bad { border-left: 4px solid #dc2626; }
.ov-attn-row.warn { border-left: 4px solid #d97706; }
.ov-attn-row > span:nth-child(2) { flex: 1; }
.ov-attn-ico { width: 30px; height: 30px; border-radius: 50%; background: #f4efe9; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.ov-chev { color: var(--text-light); font-size: 20px; }
.ov-quick { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.ov-quick-title { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 2px; }
.ov-q { text-align: left; font: inherit; font-size: 14px; font-weight: 600; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: #fbf9f6; cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.ov-q:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
@media (max-width: 900px) { .ov-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .ov-kpis { grid-template-columns: 1fr 1fr; } .ov-kpi-value { font-size: 26px; } .ov-card { padding: 16px; } .ov-item-id { display: none; } .ov-badge { min-width: 70px; } }

/* Property detail was a fixed two-column grid even on phones: stack it */
@media (max-width: 900px) {
  .property-detail-layout { grid-template-columns: 1fr; gap: 20px; }
  .property-photo-wrap { margin-bottom: -40px; }
  .homes-wrapper { padding-bottom: 96px; }
}

/* ==========================================================================
   DROPDOWNS (pairs with dropdown-ux.js; the closed select also looks better
   on its own if the script is removed)
   ========================================================================== */
select:not([multiple]):not([size]) {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236f665d' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; background-size: 14px;
  text-overflow: ellipsis;
}
input[type="date"], input[type="datetime-local"], input[type="month"], input[type="time"] { cursor: pointer; }
/* No blue segment highlight when the field was opened with the mouse (see dropdown-ux.js) */
input.dp-clicked::-webkit-datetime-edit-day-field,
input.dp-clicked::-webkit-datetime-edit-month-field,
input.dp-clicked::-webkit-datetime-edit-year-field,
input.dp-clicked::-webkit-datetime-edit-hour-field,
input.dp-clicked::-webkit-datetime-edit-minute-field,
input.dp-clicked::-webkit-datetime-edit-second-field,
input.dp-clicked::-webkit-datetime-edit-ampm-field,
input.dp-clicked::-webkit-datetime-edit-week-field {
  background-color: transparent !important; color: inherit !important;
}
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.7; transition: opacity 0.15s; }
input[type="date"]:hover::-webkit-calendar-picker-indicator { opacity: 1; }
select:not([multiple]):not([size]):hover { border-color: #c9bcae; }
select:not([multiple]):not([size]):disabled { cursor: not-allowed; opacity: 0.6; }
select.dd-open, select.dd-open:focus {
  border-color: var(--primary); box-shadow: var(--ring); outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237a2510' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 15l6-6 6 6'/%3E%3C/svg%3E");
}

.dd-menu {
  position: fixed; z-index: 4000; overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 6px;
  box-shadow: 0 2px 6px rgba(28, 25, 23, 0.06), 0 18px 44px rgba(28, 25, 23, 0.16);
  font-family: inherit; scrollbar-width: thin;
  opacity: 0; transform: translateY(-4px) scale(0.98); transform-origin: top left;
  transition: opacity 0.12s ease, transform 0.16s var(--ease);
}
.dd-menu.is-up { transform: translateY(4px) scale(0.98); transform-origin: bottom left; }
.dd-menu.is-in { opacity: 1; transform: none; }
.dd-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; line-height: 1.3;
  color: var(--text); cursor: pointer; user-select: none;
}
.dd-opt + .dd-opt { margin-top: 1px; }
.dd-opt.is-active { background: #f6f1ec; }
.dd-opt.is-selected { color: var(--primary); font-weight: 700; }
.dd-opt.is-selected.is-active { background: var(--primary-light); }
.dd-opt.is-placeholder:not(.is-selected) { color: var(--text-muted); }
.dd-opt.is-disabled { opacity: 0.4; cursor: not-allowed; }
.dd-check { display: inline-flex; flex-shrink: 0; opacity: 0; color: var(--primary); }
.dd-opt.is-selected .dd-check { opacity: 1; }
.dd-group { padding: 12px 12px 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.dd-group:first-child { padding-top: 6px; }
@media (prefers-reduced-motion: reduce) { .dd-menu { transition: none; } }

/* ==========================================================================
   ADD / EDIT PROPERTY FORM (pairs with property-form-ux.js)
   ========================================================================== */
.modal-card.admin-form-card.pf-modal {
  max-width: 740px; padding: 0; display: flex; flex-direction: column; overflow: hidden;
  max-height: min(92vh, 940px); border-radius: 22px; text-align: left;
}
.pf-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 28px 18px; border-bottom: 1px solid var(--border); background: #fff; }
.pf-head .modal-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.pf-sub { margin-top: 4px; font-size: 14px; color: var(--text-muted); }
.pf-close {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--text-muted);
  cursor: pointer; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pf-close:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.pf-body { flex: 1 1 auto; overflow-y: auto; padding: 4px 28px 8px; overscroll-behavior: contain; scrollbar-width: thin; }
.pf-section { padding: 22px 0; border-bottom: 1px solid #efe8e0; }
.pf-section:last-child { border-bottom: none; }
.pf-section-title { margin: 0 0 14px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.pf-hint { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.pf-affix + .pf-hint, .pf-modal .form-group > .pf-hint { margin: 6px 0 0; }
.pf-modal .form-group { margin-bottom: 16px; }
.pf-modal .form-group:last-child { margin-bottom: 0; }
.pf-modal .form-group label { font-size: 13px; font-weight: 600; color: #4b443d; margin-bottom: 6px; }
.pf-modal select, .pf-modal textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid #ddd3c8; border-radius: 10px; background-color: #fff; font: inherit; font-size: 15px; color: var(--text);
}
.pf-modal select { min-height: 46px; }
.pf-modal textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.pf-modal textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.pf-modal input.error, .pf-modal select.error, .pf-modal textarea.error { border-color: var(--red); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12); }
.pf-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pf-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pf-grid-2 .form-group, .pf-grid-3 .form-group { margin-bottom: 0; }

/* $ and % inside number inputs */
.pf-affix { position: relative; }
.pf-affix > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--text-muted); pointer-events: none; }
.pf-affix input { padding-left: 30px; }
.pf-affix.is-suffix > span { left: auto; right: 14px; }
.pf-affix.is-suffix input { padding-left: 14px; padding-right: 34px; }
.pf-modal input[type="number"]::-webkit-outer-spin-button, .pf-modal input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pf-modal input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* Named cabins / homes */
.pf-units-list { display: flex; flex-direction: column; gap: 10px; margin: 0 0 12px; }
.pf-units-list:empty { display: none; }
.pf-unit-row { align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: #fbf9f6; }
.pf-unit-fields { flex-direction: row; gap: 10px; }
.pf-unit-fields input { flex: 1 1 0; min-width: 0; }
.pf-unit-row .admin-icon-btn { margin: 0; flex-shrink: 0; }
.pf-add-unit { width: 100%; justify-content: center; border: 1.5px dashed #cdbfb1; background: transparent; color: var(--primary); min-height: 46px; border-radius: 12px; font-size: 14px; font-weight: 700; }
.pf-add-unit::before { content: '+ '; font-weight: 800; margin-right: 4px; }
.pf-add-unit:hover { border-color: var(--primary); background: var(--primary-light); }

/* Photos */
.pf-drop { position: relative; border: 2px dashed #d3c6b8; border-radius: 16px; background: #fbf9f6; transition: border-color 0.15s, background 0.15s; }
.pf-drop:hover, .pf-drop.is-over { border-color: var(--primary); background: var(--primary-light); }
.pf-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; margin: 0; border: 0; opacity: 0; cursor: pointer; z-index: 2; }
.pf-drop-ui { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; text-align: center; pointer-events: none; }
.pf-drop.has-photos .pf-drop-ui { padding: 16px; flex-direction: row; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pf-drop-ico { font-size: 28px; line-height: 1; }
.pf-drop.has-photos .pf-drop-ico { font-size: 20px; }
.pf-drop-main { font-size: 15px; color: var(--text); }
.pf-drop-main u { color: var(--primary); text-underline-offset: 3px; font-weight: 600; }
.pf-drop-small { font-size: 12px; color: var(--text-muted); }
.pf-drop.has-photos .pf-drop-small { display: none; }
.pf-photo-note { min-height: 0; margin-top: 10px; font-size: 13px; color: var(--text-muted); }
.pf-photo-note:empty { display: none; }
.pf-photo-note.is-error { color: #b42318; font-weight: 600; }
.pf-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-top: 14px; }
.pf-photos.is-empty { display: none; }
.pf-photo-tile { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #efe8e0; }
.pf-photo-tile.is-new { border-color: #86efac; box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18); }
.pf-photos img.pf-img, .pf-photo-tile img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; border-radius: 0; margin: 0; }
.pf-badge { position: absolute; left: 6px; bottom: 6px; padding: 3px 9px; border-radius: 100px; background: #1c1917; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; }
.pf-badge.is-new { background: #16a34a; }
.pf-photo-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(28, 25, 23, 0.62); color: #fff; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background 0.15s, transform 0.15s var(--ease); }
.pf-photo-x:hover { background: #dc2626; transform: scale(1.1); }

/* Active switch */
.pf-switch-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: #fbf9f6; cursor: pointer; margin: 0; }
.pf-modal .pf-switch-row input.pf-switch {
  -webkit-appearance: none; appearance: none; flex-shrink: 0; position: relative; width: 46px; height: 26px; min-height: 0; padding: 0; margin: 0;
  border: none; border-radius: 100px; background: #d3c6b8; cursor: pointer; transition: background 0.2s; box-shadow: none;
}
.pf-modal .pf-switch-row input.pf-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.2s var(--ease); }
.pf-modal .pf-switch-row input.pf-switch:checked { background: var(--green); }
.pf-modal .pf-switch-row input.pf-switch:checked::after { transform: translateX(20px); }
.pf-modal .pf-switch-row input.pf-switch:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.pf-switch-text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.pf-switch-text small { font-size: 13px; color: var(--text-muted); }

/* Sticky footer */
.pf-footer { padding: 14px 28px 20px; border-top: 1px solid var(--border); background: #fff; box-shadow: 0 -8px 20px rgba(28, 25, 23, 0.05); }
.pf-footer .login-error:not(:empty) { margin: 0 0 12px; padding: 10px 14px; background: #fdecea; border: 1px solid #f5c2c0; border-radius: 10px; color: #9b1c1c; font-size: 13px; font-weight: 600; }
.pf-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.pf-actions .pay-btn { width: auto; min-width: 180px; margin: 0; }
.pf-actions .cancel-pay-btn { width: auto; padding: 0 22px; min-height: 48px; margin: 0; font-weight: 600; border: 1px solid var(--border); background: #fff; }

@media (max-width: 640px) {
  .modal-overlay:has(.pf-modal) { padding: 0; align-items: stretch; }
  .modal-card.admin-form-card.pf-modal { max-width: none; max-height: 100vh; width: 100%; border-radius: 0; }
  .pf-head, .pf-footer { padding-left: 18px; padding-right: 18px; }
  .pf-body { padding-left: 18px; padding-right: 18px; }
  .pf-grid-2 { grid-template-columns: 1fr; }
  .pf-grid-3 { grid-template-columns: 1fr 1fr; }
  .pf-unit-fields { flex-direction: column; }
  .pf-actions { flex-direction: column-reverse; align-items: stretch; }
  .pf-actions .pay-btn, .pf-actions .cancel-pay-btn { width: 100%; }
}

/* ==========================================================================
   PAYMENTS TABLE POLISH (pairs with the payments block in billing-ux.js)
   ========================================================================== */
.pay-kpis { margin: 4px 0 20px; }
.pay-kpis .ov-kpi { background: linear-gradient(180deg, #ffffff 0%, #fdfaf7 100%); }
.pay-kpis .ov-kpi-value { font-size: 28px; }

/* Search + status chips instead of a bare dropdown */
.admin-billing-filters.has-chips { padding: 0; background: none; border: none; box-shadow: none; margin: 0 0 12px; }
.admin-billing-filters.has-chips #admin-pay-status { display: none; }
#admin-pay-search {
  flex: 1 1 100%; min-height: 48px; border-radius: 14px; background-color: #fff; box-shadow: var(--shadow);
  padding-left: 44px; background-repeat: no-repeat; background-position: 16px center; background-size: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238f867c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
}
.pay-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.pay-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 14px; border: 1px solid var(--border); border-radius: 100px;
  background: #fff; color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.pay-chip:hover:not(.active) { border-color: #c9bcae; color: var(--text); }
.pay-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 3px 10px rgba(122, 37, 16, 0.25); }
.pay-chip-n { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 100px; background: #f1ebe4; color: var(--text-muted); font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.pay-chip.active .pay-chip-n { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* The table itself */
.pay-table { border-radius: 18px; box-shadow: var(--shadow); }
.pay-table th { background: #fbf9f6; padding: 14px 16px; font-size: 11px; letter-spacing: 0.08em; color: var(--text-muted); border-bottom: 1px solid #efe8e0; white-space: nowrap; }
.pay-table th:nth-child(4) { text-align: right; }
.pay-table td { padding: 16px; vertical-align: middle; border-bottom: 1px solid #f3ede6; font-size: 14px; }
.pay-table tbody tr:hover td { background: #fffcf9; }
.pay-table tbody tr:last-child td { border-bottom: none; }
.pay-table td:nth-child(1) { white-space: nowrap; }
.pay-table .admin-booking-id { font-size: 12.5px; font-weight: 700; letter-spacing: 0.01em; margin-bottom: 6px; }
.pay-table .admin-kind-badge { margin-left: 0; padding: 3px 9px; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; background: #7a2510; }
.pay-table .admin-kind-badge[data-kind="stay"] { background: #1f4d3a; }
.pay-table .admin-kind-badge[data-kind="monthly"] { background: #4338ca; }

.pay-guest { display: flex; align-items: center; gap: 12px; min-width: 190px; }
.pay-avatar { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f7e7df 0%, #efd3c6 100%); color: #7a2510; font-size: 14px; font-weight: 800; }
.pay-guest-text { min-width: 0; }
.pay-guest-text > div:first-child { font-weight: 600; }
.pay-guest-text .admin-billing-muted { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pay-desc { display: flex; flex-direction: column; gap: 2px; min-width: 210px; }
.pay-desc-kicker { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-light); }
.pay-desc-title { font-weight: 600; color: var(--text); line-height: 1.35; }
.pay-desc-detail { font-size: 12.5px; color: var(--text-muted); }

.pay-amount { text-align: right; white-space: nowrap; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.pay-amount .admin-billing-muted { font-weight: 500; letter-spacing: 0; }
.pay-table .admin-pay-pill { white-space: nowrap; padding: 5px 11px; font-size: 10.5px; letter-spacing: 0.05em; }
.pay-table .admin-pay-pill::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.pay-date { white-space: nowrap; color: var(--text-muted); font-size: 13px; }
.pay-stripe { white-space: nowrap; }
.pay-stripe a { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--text-muted); text-decoration: none; border-bottom: 1px dotted #c9bcae; }
.pay-stripe a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.pay-copy { margin-left: 8px; padding: 3px 9px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text-muted); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.pay-copy:hover { border-color: var(--primary); color: var(--primary); }
.pay-copy.is-done { color: #166534; border-color: #86efac; background: #f0fdf4; }
.pay-hidden { display: none; }
.pay-more { display: flex; justify-content: center; margin-top: 16px; }

/* ==========================================================================
   PAYMENTS PAGE v2: toolbar, tinted cards, two-column layout, drawer
   ========================================================================== */
.pay-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin: -4px 0 16px; flex-wrap: wrap; }
.pay-toolbar select { min-width: 190px; height: 46px; border-radius: 12px; background-color: #fff; font-weight: 600; box-shadow: var(--shadow); }
.pay-ghost {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border: 1px solid var(--border); border-radius: 12px; background: #fff;
  color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow);
  transition: border-color 0.15s, color 0.15s, transform 0.15s var(--ease);
}
.pay-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }

/* Tinted summary cards with icon and trend */
.pay-k { position: relative; padding: 20px 22px; border-color: transparent; }
.pay-k.k-green { background: linear-gradient(180deg, #f1faf4 0%, #fbfefc 100%); }
.pay-k.k-blue { background: linear-gradient(180deg, #eff6ff 0%, #fafcff 100%); }
.pay-k.k-purple { background: linear-gradient(180deg, #f3f0ff 0%, #fbfaff 100%); }
.pay-k.k-orange { background: linear-gradient(180deg, #fff4ea 0%, #fffaf5 100%); }
.pay-k-ico { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 10px; background: rgba(255, 255, 255, 0.85); box-shadow: 0 1px 4px rgba(28, 25, 23, 0.08); }
.pay-k .ov-kpi-label { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; color: #4b443d; }
.pay-k .ov-kpi-value { font-size: 30px; color: var(--text); }
.pay-k.is-link { cursor: pointer; }
.pay-trend { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 100px; font-size: 12px; font-weight: 800; margin-right: 6px; }
.pay-trend.up { background: #dcfce7; color: #166534; }
.pay-trend.down { background: #fee2e2; color: #991b1b; }

/* Main column + right-hand cards */
.pay-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
@media (min-width: 1100px) { .pay-layout { grid-template-columns: minmax(0, 1fr) 320px; } .pay-aside { position: sticky; top: 16px; } }
.pay-main { min-width: 0; }
.pay-filter-selects { display: flex; gap: 10px; flex: 0 0 auto; }
.pay-filter-selects select { min-width: 150px; height: 48px; border-radius: 14px; background-color: #fff; box-shadow: var(--shadow); font-weight: 600; font-size: 14px; }
.admin-billing-filters.has-chips #admin-pay-search { flex: 1 1 240px; }
.pay-aside { display: flex; flex-direction: column; gap: 16px; }
.pay-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }
.pay-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pay-card-head h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.pay-link { background: none; border: none; padding: 0; font: inherit; font-size: 13px; font-weight: 700; color: var(--primary); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pay-muted { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-muted); }
.pay-up-total { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 2px 0 10px; }
.pay-up-total span { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); letter-spacing: 0; }
.pay-up-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pay-up-list li { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: #faf7f3; font-size: 13px; }
.pay-up-date { font-weight: 800; color: var(--primary); white-space: nowrap; }
.pay-up-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-up-amt { font-weight: 800; font-variant-numeric: tabular-nums; }
.pay-btn-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 11px 18px; border-radius: 12px; background: #1f4d3a; color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; transition: background 0.15s, transform 0.15s var(--ease); }
.pay-btn-link:hover { background: #163828; transform: translateY(-1px); }
.pay-btn-link[hidden] { display: none; }
.pay-links { display: flex; flex-direction: column; }
.pay-links button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 4px; border: none; border-bottom: 1px solid #f1ebe4; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; transition: color 0.15s, padding 0.15s var(--ease); }
.pay-links button:last-child { border-bottom: none; }
.pay-links button:hover { color: var(--primary); padding-left: 8px; }
.pay-links button span { color: var(--text-light); font-size: 20px; }

/* Rows: date first, arrow last, clickable */
.pay-date-day { font-weight: 700; color: var(--text); font-size: 13.5px; white-space: nowrap; }
.pay-date-time { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.pay-table td.pay-date { padding-right: 8px; }
.pay-table .pay-th-action { width: 44px; }
.pay-action { width: 44px; text-align: right; }
.pay-open { width: 30px; height: 30px; border-radius: 50%; border: none; background: transparent; color: var(--text-light); font-size: 22px; line-height: 1; cursor: pointer; transition: background 0.15s, color 0.15s; }
.pay-row { cursor: pointer; }
.pay-row:hover .pay-open, .pay-row:focus-visible .pay-open { background: var(--primary-light); color: var(--primary); }
.pay-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.pay-refunded { color: #b42318; font-weight: 600; }

/* Details drawer */
body.pay-noscroll { overflow: hidden; }
.pay-drawer-wrap { position: fixed; inset: 0; z-index: 3200; }
.pay-drawer-backdrop { position: absolute; inset: 0; background: rgba(28, 25, 23, 0.4); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); opacity: 0; transition: opacity 0.2s; }
.pay-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: #fff; display: flex; flex-direction: column;
  box-shadow: -18px 0 50px rgba(28, 25, 23, 0.18); transform: translateX(24px); opacity: 0; transition: transform 0.25s var(--ease), opacity 0.2s;
}
.pay-drawer-wrap.is-in .pay-drawer-backdrop { opacity: 1; }
.pay-drawer-wrap.is-in .pay-drawer { transform: none; opacity: 1; }
.pay-drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 24px 16px; border-bottom: 1px solid var(--border); }
.pay-drawer-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.pay-drawer-head h3 { margin: 4px 0 0; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.pay-close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--text-muted); cursor: pointer; font-size: 14px; flex-shrink: 0; }
.pay-close:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.pay-drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.pay-drawer-amount { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding: 18px; border-radius: 16px; background: linear-gradient(180deg, #f1faf4 0%, #fbfefc 100%); }
.pay-d-amt { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pay-dl { margin: 0 0 18px; display: flex; flex-direction: column; }
.pay-dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f3ede6; font-size: 14px; }
.pay-dl > div[hidden] { display: none; }
.pay-dl dt { color: var(--text-muted); font-weight: 600; }
.pay-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; line-height: 1.45; }
.pay-d-email { color: var(--primary); font-size: 13px; }
.pay-d-booking, .pay-d-stripe { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.pay-break { padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: #fbf9f6; }
.pay-break > div { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.pay-break span { color: var(--text-muted); }
.pay-break b { font-variant-numeric: tabular-nums; }
.pay-break .pay-b-refund-row b { color: #b42318; }
.pay-break .pay-b-refund-row.is-zero b { color: var(--text-muted); }
.pay-break .pay-b-net { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 16px; }
.pay-break .pay-b-net span { color: var(--text); font-weight: 700; }
.pay-drawer-foot { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding: 16px 24px 20px; border-top: 1px solid var(--border); background: #fff; }
.pay-drawer-foot .pay-btn-link { margin: 0; }
/* Toolbar pair: same height, border, radius and shadow; calendar icon inside the period picker */
.pay-toolbar { gap: 10px; }
.pay-toolbar .pay-ghost, .pay-toolbar select#pay-period { height: 46px; border: 1px solid var(--border); border-radius: 12px; background-color: #fff; box-shadow: var(--shadow); font: inherit; font-size: 14px; font-weight: 600; color: var(--text); }
.pay-toolbar .pay-ghost { padding: 0 18px; gap: 9px; }
.pay-toolbar .pay-ghost svg { color: var(--primary); }
.pay-toolbar select#pay-period {
  min-width: 200px; padding: 0 42px 0 44px; cursor: pointer;
  background-repeat: no-repeat, no-repeat; background-position: 15px center, right 15px center; background-size: 18px, 14px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%237a2510' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236f665d' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
.pay-toolbar select#pay-period:hover, .pay-toolbar .pay-ghost:hover { border-color: #c9bcae; transform: none; color: var(--text); }
.pay-toolbar .pay-ghost:hover svg { color: var(--primary-dark); }
.pay-toolbar select#pay-period.dd-open, .pay-toolbar select#pay-period:focus {
  border-color: var(--primary); box-shadow: var(--ring); outline: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%237a2510' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237a2510' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 15l6-6 6 6'/%3E%3C/svg%3E");
}

/* Compact the table so it fits beside the right-hand cards without sideways scrolling */
@media (min-width: 1100px) { .pay-layout { grid-template-columns: minmax(0, 1fr) 296px; gap: 20px; } }
.pay-table th { padding: 13px 10px; }
.pay-table td { padding: 14px 10px; }
.pay-table th:first-child, .pay-table td:first-child { padding-left: 16px; }
.pay-table td:nth-child(2) { padding-right: 6px; }
.pay-guest { min-width: 0; gap: 10px; }
.pay-guest-text { max-width: 128px; }
.pay-guest-text > div:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-guest-text .admin-billing-muted { max-width: 128px; }
.pay-avatar { width: 32px; height: 32px; font-size: 13px; }
.pay-desc { min-width: 0; max-width: 176px; }
.pay-desc-title, .pay-desc-detail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-table td:nth-child(5) { padding-left: 4px; }
.pay-table .admin-pay-pill { padding: 4px 8px; font-size: 10px; letter-spacing: 0.03em; }
.pay-table td:nth-child(6) { white-space: nowrap; }
.pay-table th:first-child, .pay-table td:first-child { padding-left: 14px; }
.pay-table th:last-child, .pay-table td:last-child { padding-left: 2px; padding-right: 8px; }
.pay-action { width: 38px; }
.pay-table .pay-th-action { width: 38px; }
@media (max-width: 640px) { .pay-toolbar { justify-content: stretch; } .pay-toolbar > * { flex: 1 1 100%; } .pay-filter-selects { flex: 1 1 100%; } .pay-filter-selects select { flex: 1; min-width: 0; } }
@media (prefers-reduced-motion: reduce) { .pay-drawer, .pay-drawer-backdrop { transition: none; } }

/* ==========================================================================
   BILLING SECTION BAR (icons, soft active tab, sticky, keyboard friendly)
   ========================================================================== */
.billing-nav {
  position: sticky; top: 68px; z-index: 30; gap: 4px; padding: 6px; margin: 0 0 26px;
  border-radius: 18px; background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--border); box-shadow: 0 6px 22px rgba(28, 25, 23, 0.07);
  flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.billing-nav::-webkit-scrollbar { display: none; }
@media (max-width: 1100px) {
  .billing-nav-btn { padding: 10px 11px; gap: 7px; font-size: 13.5px; }
  .billing-nav-btn.active::after { left: 11px; right: 11px; }
}
.billing-nav-btn {
  position: relative; flex-shrink: 0; gap: 9px; padding: 11px 15px; border-radius: 12px;
  color: var(--text-muted); font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.billing-nav-ico { display: inline-flex; opacity: 0.7; transition: opacity 0.18s, color 0.18s; }
.billing-nav-btn:hover:not(.active) { background: #f7f2ec; color: var(--text); }
.billing-nav-btn:hover:not(.active) .billing-nav-ico { opacity: 1; }
.billing-nav-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* Active: soft tint + maroon text + an underline that sits on the bar's edge */
.billing-nav-btn.active { background: var(--primary-light); color: var(--primary); box-shadow: none; }
.billing-nav-btn.active .billing-nav-ico { opacity: 1; color: var(--primary); }
.billing-nav-btn.active::after {
  content: ''; position: absolute; left: 16px; right: 16px; bottom: -6px; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--primary);
}

/* Badges: quiet grey counts, red only when something needs you */
.billing-badge { min-width: 21px; height: 21px; padding: 0 7px; font-size: 11px; font-weight: 800; background: #efe8e0; color: #6f665d; }
.billing-nav-btn.active .billing-badge { background: rgba(122, 37, 16, 0.14); color: var(--primary); }
.billing-badge.is-attn, .billing-nav-btn.active .billing-badge.is-attn { background: #dc2626; color: #fff; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.16); }
.billing-nav-btn.needs-attention:not(.active) .billing-nav-ico { color: #dc2626; opacity: 1; }

@media (max-width: 640px) {
  .billing-nav { top: 60px; padding-right: 28px; border-radius: 16px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); }
  .billing-nav-btn { padding: 10px 13px; }
}
@media (prefers-reduced-motion: reduce) { .billing-nav-btn, .billing-nav-ico { transition: none; } }

/* Transactions table: columns are styled by name (these supersede the older position-based rules) */
.pay-table th.pay-c-date, .pay-table th.pay-c-booking, .pay-table th.pay-c-status, .pay-table th.pay-c-guest, .pay-table th.pay-c-desc { text-align: left; }
.pay-table th.pay-c-amount { text-align: right; }
.pay-table td.pay-c-date, .pay-table td.pay-c-booking, .pay-table td.pay-c-amount, .pay-table td.pay-c-status { white-space: nowrap; }
.pay-table td.pay-c-booking { padding-right: 12px; }
.pay-table td.pay-c-booking .admin-booking-id { white-space: nowrap; font-size: 12px; margin-bottom: 7px; }
.pay-table td.pay-c-amount { padding-left: 8px; padding-right: 14px; }
.pay-table td.pay-c-status { padding-left: 10px; }

/* Guest and description take the leftover width and only shorten (with …) when they truly must */
.pay-table th.pay-c-guest { width: 22%; }
.pay-table th.pay-c-desc { width: 28%; }
.pay-table td.pay-c-guest, .pay-table td.pay-c-desc { max-width: 0; overflow: hidden; }
.pay-table .pay-guest { min-width: 0; max-width: 100%; }
.pay-table .pay-guest-text { flex: 1 1 auto; min-width: 0; max-width: none; }
.pay-table .pay-guest-text > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-table .pay-guest-text .admin-billing-muted { max-width: none; }
.pay-table .pay-desc { min-width: 0; max-width: none; }
.pay-table .pay-guest-text > div.admin-billing-muted { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.3; margin-top: 2px; }
.pay-table .pay-desc-detail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Guest names wrap too; the email keeps a single line (full address on hover). When the table is tight, the avatar steps aside. */
.pay-table .pay-guest-text > div:first-child { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.pay-main { container-type: inline-size; container-name: paymain; }
@container paymain (max-width: 520px) {
  .pay-table .pay-avatar { display: none; }
  .pay-table .pay-guest { gap: 0; }
}
/* Names wrap onto a second line instead of being cut off */
.pay-table .pay-desc-title { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }

/* Slightly airier, calmer rows */
.pay-table td { padding-top: 15px; padding-bottom: 15px; }
.pay-table tbody tr { transition: background 0.12s; }
.pay-table tbody tr:hover td { background: #fffcf9; }

/* Simplified transactions table: guest + booking ID share a cell, type is colour-coded in the description */
.pay-table th.pay-c-guest { width: 28%; }
.pay-table th.pay-c-desc { width: 36%; }
.pay-table .pay-guest-name { font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.pay-table .pay-bid { margin-top: 3px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay-table .pay-desc-kicker { display: inline-flex; align-items: center; gap: 6px; }
.pay-table .pay-desc-kicker::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #7a2510; flex-shrink: 0; }
.pay-table .pay-desc[data-kind="stay"] .pay-desc-kicker { color: #1f4d3a; }
.pay-table .pay-desc[data-kind="stay"] .pay-desc-kicker::before { background: #1f4d3a; }
.pay-table .pay-desc[data-kind="monthly"] .pay-desc-kicker { color: #4338ca; }
.pay-table .pay-desc[data-kind="monthly"] .pay-desc-kicker::before { background: #4338ca; }
.pay-table .pay-desc[data-kind="lodge"] .pay-desc-kicker { color: #7a2510; }
.pay-table td { padding-top: 16px; padding-bottom: 16px; }

/* ==========================================================================
   BILLING SCHEDULE (pairs with the schedule block in billing-ux.js)
   ========================================================================== */
.sch-panel { margin: 0 0 24px; }
.sch-loading { padding: 26px; text-align: center; color: var(--text-muted); background: #fff; border: 1px dashed #d8cfc4; border-radius: 16px; }
.sch-kpis { margin: 4px 0 18px; }
.sch-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
.sch-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 18px 22px 14px; border-bottom: 1px solid #f1ebe4; background: linear-gradient(180deg, #fff 0%, #fdfaf7 100%); }
.sch-guest { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.sch-bid { margin-left: 8px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.sch-meta { margin-top: 4px; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.sch-left { text-align: right; flex-shrink: 0; }
.sch-left span { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.sch-left small { font-size: 12px; color: var(--text-muted); }
.sch-rows { padding: 6px 10px 10px; }
.sch-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) 120px minmax(0, 1.6fr); gap: 14px; align-items: center; padding: 13px 12px; border-radius: 12px; }
.sch-row + .sch-row { border-top: 1px solid #f6f1ec; }
.sch-row.is-future { background: #fbf8ff; }
.sch-row.st-due, .sch-row.st-failed { background: #fff6ee; }
.sch-period b { display: block; font-size: 14px; }
.sch-period small, .sch-state small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-muted); }
.sch-amt { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sch-adj { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 100px; background: #fff4d6; color: #8a6d00; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 2px; }
.sch-state { min-width: 0; }
.sch-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 100px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; border: 1px solid transparent; }
.sch-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sch-chip.ok { background: #e7f6e7; color: #1e7a32; border-color: #c6e6c6; }
.sch-chip.ext { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.sch-chip.sched { background: #f1ecff; color: #5b34c8; border-color: #ddd2fb; }
.sch-chip.hold { background: #eef6fb; color: #1d4e89; border-color: #b6d4ee; }
.sch-chip.warn { background: #fff4d6; color: #8a6d00; border-color: #f0d889; }
.sch-chip.bad { background: #fdecea; color: #9b1c1c; border-color: #f5c2c0; }
.sch-chip.muted { background: #f3f0ec; color: #7a7268; border-color: #e8e0d8; }
.sch-toggle { display: block; margin: 4px 12px 8px; padding: 0; border: none; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--primary); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sch-note { margin: 4px 4px 0; font-size: 12.5px; line-height: 1.55; color: var(--text-muted); }
#admin-billing-scheduler { margin-top: 8px; }
@media (max-width: 720px) {
  .sch-row { grid-template-columns: 1fr auto; row-gap: 6px; }
  .sch-state { grid-column: 1 / -1; }
  .sch-head { flex-direction: column; }
  .sch-left { text-align: left; }
}

/* Period note + one-click Stripe link in each row */
.pay-period-note { display: flex; align-items: center; gap: 10px; margin: -4px 0 14px; padding: 10px 14px; border-radius: 12px; background: #fffaf0; border: 1px solid #f0d889; color: #8a6d00; font-size: 13px; font-weight: 600; }
.pay-period-note .pay-link { color: #7a2510; }
.pay-ext { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-right: 2px; border-radius: 8px; color: var(--text-muted); font-size: 15px; font-weight: 700; text-decoration: none; transition: background 0.15s, color 0.15s; }
.pay-ext:hover { background: var(--primary-light); color: var(--primary); }
.pay-action { width: 74px; white-space: nowrap; }
.pay-table .pay-th-action { width: 74px; }

/* Polished empty states (wishlist / no filter matches) */
.ab-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 56px 24px 48px; border: 1px solid var(--border); border-style: solid; border-radius: 22px;
  background: radial-gradient(90% 120% at 50% 0%, #fff6f2 0%, #ffffff 62%); box-shadow: var(--shadow);
}
.ab-empty-art {
  position: relative; width: 96px; height: 96px; border-radius: 50%; margin-bottom: 22px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 40px;
  background: linear-gradient(135deg, #ffe4e9 0%, #fdd5dc 100%); color: #e11d48; box-shadow: 0 10px 28px rgba(225, 29, 72, 0.18);
}
.ab-empty-art svg { width: 42px; height: 42px; }
.ab-empty-art svg path { fill: #e11d48; stroke: #e11d48; }
.ab-empty-art-search { background: linear-gradient(135deg, #f1e7de 0%, #e6d8cb 100%); box-shadow: 0 10px 28px rgba(122, 37, 16, 0.14); }
.ab-empty-ring { position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(225, 29, 72, 0.22); animation: ab-ring 2.4s ease-out infinite; }
.ab-empty-art-search .ab-empty-ring { border-color: rgba(122, 37, 16, 0.2); }
@keyframes ab-ring { 0% { transform: scale(0.92); opacity: 0.9; } 100% { transform: scale(1.25); opacity: 0; } }
.ab-empty-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; }
.ab-empty-copy { max-width: 46ch; margin: 0 0 24px; font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.ab-inline-heart { display: inline-flex; vertical-align: -2px; }
.ab-inline-heart svg { width: 15px; height: 15px; }
.ab-inline-heart svg path { fill: #e11d48; stroke: #e11d48; }
.ab-empty-note { margin-top: 16px; font-size: 12px; color: var(--text-light); }
.ab-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; border: none; border-radius: 100px; cursor: pointer;
  background: linear-gradient(135deg, #9a3417 0%, #7a2510 100%); color: #fff; font: inherit; font-size: 15px; font-weight: 700;
  box-shadow: 0 6px 18px rgba(122, 37, 16, 0.28); transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.ab-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(122, 37, 16, 0.34); }
.ab-btn-primary:active { transform: scale(0.98); }
@media (prefers-reduced-motion: reduce) { .ab-empty-ring { animation: none; } }

/* Top-bar wishlist entry */
.ab-saved-nav {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 100px; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; box-shadow: var(--shadow);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.ab-saved-nav:hover { border-color: var(--primary); color: var(--primary); }
.ab-saved-nav svg { width: 16px; height: 16px; }
.ab-saved-nav svg path { fill: none; stroke: currentColor; }
.ab-saved-nav:has(.ab-count:not([hidden])) svg path { fill: #e11d48; stroke: #e11d48; }
@media (max-width: 640px) { .ab-saved-nav { padding: 0 10px; } .ab-saved-nav-label { display: none; } }

/* Mobile "Reserve" bar (phones only) */
.ab-reserve-bar { display: none; }
@media (max-width: 768px) {
  .ab-reserve-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgba(28, 25, 23, 0.1);
  }
  .ab-reserve-bar[hidden] { display: none; }
  .ab-rb-amt { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
  .ab-rb-amt s { color: var(--text-light); font-size: 14px; font-weight: 500; }
  .ab-rb-unit { font-size: 13px; color: var(--text-muted); }
  .ab-rb-btn {
    background: linear-gradient(135deg, #9a3417 0%, #7a2510 100%); color: #fff; border: none; border-radius: 12px; cursor: pointer;
    padding: 13px 28px; font: inherit; font-size: 15px; font-weight: 700; box-shadow: 0 4px 14px rgba(122, 37, 16, 0.3);
  }
}
@media (max-width: 640px) {
  .ab-mosaic { height: 260px; border-radius: 16px; grid-template-columns: 1fr !important; grid-template-rows: 1fr !important; }
  .ab-mosaic .ab-m-tile:not(:first-child) { display: none; }
  .ab-mosaic .ab-m-tile:first-child { grid-column: auto !important; grid-row: auto !important; }
  .ab-sort { margin-left: 0; }
  .ab-filter-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .ab-filter-row::-webkit-scrollbar { display: none; }
  .ab-filter-row > * { flex-shrink: 0; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .admin-dashboard { padding: 24px 20px 64px; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  .top-bar { padding: 10px 14px; }
  .top-bar-inner { flex-wrap: wrap; gap: 10px; }
  .view-tabs { order: 3; width: 100%; }
  .view-tab { flex: 1; text-align: center; padding: 9px 10px; }
  .brand-mini { font-size: 13px; gap: 8px; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .brand-mini::before { width: 20px; height: 20px; border-radius: 6px; }
  .top-bar-right { gap: 2px; flex-wrap: nowrap; justify-content: flex-end; flex-shrink: 0; }
  .my-bookings-btn { padding: 8px 12px; font-size: 12px; }
  .admin-link { padding: 6px 8px; font-size: 12px; }
  .logged-in-label-btn { max-width: 120px; }
  .page-wrapper, .homes-wrapper { padding: 18px 14px 48px; }
  .venue-photo { height: 190px; border-radius: 16px; }
  .venue-photo img { border-radius: 16px; }
  .venue-card.overlap { margin-left: 8px; margin-right: 8px; padding: 20px; }
  .venue-name { font-size: 22px; }
  .section-card, .pricing-card { padding: 18px; }
  .pricing-row.pricing-due-today { margin-left: -10px; margin-right: -10px; }
  .modal-card { padding: 24px 20px; }
  .homes-title { font-size: 24px; }
  .properties-grid { grid-template-columns: 1fr; }
  .chat-card { border-radius: 16px; }
  .chat-messages { padding: 14px; }

  .admin-dashboard { padding: 18px 14px 56px; }
  .admin-tabs-row { gap: 10px; }
  .admin-tabs {
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tab-send, .admin-tab-apps { flex: 1 1 auto; justify-content: center; }
  .admin-booking-row, .admin-property-row { flex-direction: column; align-items: stretch; padding: 16px; }
  .admin-property-actions { flex-wrap: wrap; }
  .br-card-head { flex-direction: column; padding: 20px; }
  .br-section { padding: 18px 18px 8px; }
  .br-kind-toggle { margin: 18px 18px 8px; width: calc(100% - 36px); }
  .admin-form-card, .admin-pricing-card { padding: 20px; }
}
