/* ========================================================
   BenayaSoft Guest Portal — Modern Responsive Design System
   Matches Flutter Mobile App UI/UX & Responsive Web Layouts
   (Mobile <640px | Tablet 640px-1024px | Desktop ≥1024px)
   ======================================================== */

:root {
  --g-primary: #1F2937;
  --g-primary-dark: #111827;
  --g-primary-light: #9CA3AF;
  --g-primary-lighter: #F3F4F6;
  --g-bg: #FFFFFF;
  --g-bg-card: #FFFFFF;
  --g-bg-alt: #F8F9FB;
  --g-bg-hover: #F3F4F6;
  --g-border: #E5E7EB;
  --g-border-light: #F0F0F0;
  --g-text: #111827;
  --g-text-secondary: #6B7280;
  --g-text-muted: #9CA3AF;
  --g-success: #16A34A;
  --g-success-light: #F0FDF4;
  --g-success-border: #BBF7D0;
  --g-danger: #DC2626;
  --g-danger-light: #FEF2F2;
  --g-danger-border: #FECACA;
  --g-warning: #D97706;
  --g-warning-light: #FFFBEB;
  --g-warning-border: #FDE68A;
  --g-info: #0EA5E9;
  --g-info-light: #F0F9FF;
  --g-info-border: #BAE6FD;
  --g-radius-sm: 6px;
  --g-radius-md: 14px;
  --g-radius-lg: 24px;
  --g-radius-full: 9999px;
  --g-shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.04);
  --g-shadow-md: 0 6px 20px rgba(0, 0, 0, 0.06);
  --g-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* ----------------------------------------------------
   App Shell & Viewport Scrolling Configuration
   Ensures smooth native window scrolling on all devices (mobile, tablet, desktop)
   ---------------------------------------------------- */
html.guest-mode,
body.guest-mode,
html:has(.guest-app),
body:has(.guest-app) {
  overflow-x: clip !important;
  overflow-y: visible !important;
  height: auto !important;
  min-height: 100% !important;
  -webkit-overflow-scrolling: touch;
}

.guest-mode #app,
#app:has(.guest-app) {
  min-height: 100vh;
  height: auto !important;
  overflow-x: clip;
  overflow-y: visible !important;
}

.guest-app {
  display: flex;
  min-height: 100vh;
  height: auto;
  background-color: var(--g-bg);
  color: var(--g-text);
  font-family: inherit;
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
  width: 100%;
}

/* Desktop & Tablet Top-Right Sandwich Dropdown Menu (Always physical top-right in LTR & RTL) */
.guest-top-menu-wrap {
  display: none;
  position: fixed;
  top: 18px;
  right: 24px;
  left: auto !important;
  z-index: 950;
}

.guest-sandwich-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--g-border);
  background: var(--g-bg-card);
  color: var(--g-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--g-shadow-md);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}

.guest-sandwich-btn:hover,
.guest-sandwich-btn.active {
  background: var(--g-bg-hover);
  box-shadow: var(--g-shadow-lg);
}

.guest-sandwich-btn:active {
  transform: scale(0.95);
}

.guest-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto !important;
  width: 250px;
  background: var(--g-bg-card);
  border: 1px solid var(--g-border);
  border-radius: 16px;
  padding: 16px 12px;
  box-sizing: border-box;
  box-shadow: var(--g-shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s;
}

.guest-dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

@media (min-width: 640px) {
  .guest-top-menu-wrap {
    display: block;
  }
  .guest-nav {
    display: none !important;
  }
  .guest-main {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
}

.guest-rail-brand {
  display: flex;
  align-items: center;
  padding: 2px 10px 14px 10px;
  border-bottom: 1px solid var(--g-border-light);
  margin-bottom: 10px;
}

.guest-rail-brand .sidebar-logo,
.guest-mobile-header .sidebar-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary, #111827);
  letter-spacing: -0.5px;
}

.guest-rail-brand .sidebar-logo span,
.guest-mobile-header .sidebar-logo span {
  color: var(--accent, #7c3aed);
}

.guest-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--g-bg-card, #ffffff);
  border-bottom: 1px solid var(--g-border, #e5e7eb);
  position: sticky;
  top: 0;
  z-index: 90;
}

@media (min-width: 820px) {
  .guest-mobile-header {
    display: none !important;
  }
}


.guest-rail-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guest-rail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--g-radius-md);
  border: none;
  background: transparent;
  color: var(--g-text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-align: start;
  user-select: none;
}

.guest-rail-item:hover {
  background: var(--g-bg-hover);
  color: var(--g-text);
}

.guest-rail-item:active {
  transform: scale(0.96);
}

.guest-rail-item svg {
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), stroke 0.2s ease, stroke-width 0.2s ease;
}

.guest-rail-item.active {
  background: var(--g-primary-lighter);
  color: var(--g-primary-dark);
  font-weight: 700;
}

.guest-rail-item.active span {
  font-weight: 700;
}

.guest-rail-item.active svg {
  stroke: var(--g-primary-dark);
  stroke-width: 2.6px;
  transform: scale(1.06);
}

/* Main Content Area */
.guest-main {
  flex: 1;
  min-height: 100vh;
  height: auto;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: var(--g-bg);
  overflow-x: clip;
  overflow-y: visible;
}

.guest-content {
  flex: 1;
  padding-bottom: 84px; /* Clearance for fixed mobile nav */
  width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
  overflow-y: visible;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .guest-content {
    padding-bottom: 48px;
    max-width: 1400px;
    margin: 0 auto;
  }
}

/* Persistent Tab Panels & Animations */
.guest-tab-panel {
  display: none;
  width: 100%;
  animation: guestFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.guest-tab-panel.active {
  display: block;
}

.guest-subpage-panel {
  display: none;
  width: 100%;
  animation: guestSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.guest-subpage-panel.active {
  display: block;
}

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

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

.bookings-list-animated {
  animation: guestFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Responsive Universal Page Container */
.guest-page-container {
  padding: 16px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 380px) {
  .guest-page-container {
    padding: 12px;
  }
}

@media (min-width: 640px) {
  .guest-page-container {
    padding: 24px 84px 24px 28px;
  }
}

@media (min-width: 1024px) {
  .guest-page-container {
    padding: 32px 88px 32px 40px;
    max-width: 1360px;
    margin: 0 auto;
  }
}

@media (min-width: 1520px) {
  .guest-page-container {
    padding: 32px 40px;
  }
}

/* Mobile Bottom Navigation Bar (Matches Flutter NavigationBar) */
.guest-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: var(--g-bg-card);
  border-top: 1px solid var(--g-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  z-index: 999;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
  direction: ltr !important; /* Matches mobile Directionality(TextDirection.ltr) */
}

@media (max-width: 380px) {
  .guest-nav {
    height: 62px;
    padding: 0 4px;
  }
}

.guest-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  height: 100%;
  cursor: pointer;
  color: var(--g-text-secondary);
  font-size: 11px;
  font-weight: 500;
  transition: all 0.2s ease;
  user-select: none;
  border-radius: 12px;
}

@media (max-width: 380px) {
  .guest-nav-item {
    font-size: 10px;
    gap: 2px;
  }
  .guest-nav-item svg {
    width: 20px;
    height: 20px;
  }
}

.guest-nav-item svg {
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), stroke 0.2s ease, stroke-width 0.2s ease, fill 0.2s ease;
}

.guest-nav-item:active {
  transform: scale(0.92);
}

.guest-nav-item.active {
  color: var(--g-primary-dark);
  font-weight: 700;
}

.guest-nav-item.active span {
  font-weight: 700;
}

.guest-nav-item.active svg {
  stroke: var(--g-primary-dark);
  stroke-width: 2.6px;
  transform: translateY(-1px) scale(1.06);
}

/* ----------------------------------------------------
   Header & Action Bars
   ---------------------------------------------------- */
.page-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.filter-pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* ----------------------------------------------------
   Home Screen & Airbnb-Style Search Card
   ---------------------------------------------------- */
.home-container {
  padding: 16px;
}

@media (max-width: 380px) {
  .home-container {
    padding: 12px;
  }
}

@media (min-width: 640px) {
  .home-container {
    padding: 24px 84px 24px 28px;
  }
}

@media (min-width: 1024px) {
  .home-container {
    padding: 32px 88px 32px 40px;
    max-width: 1360px;
    margin: 0 auto;
  }
}

@media (min-width: 1520px) {
  .home-container {
    padding: 32px 40px;
  }
}

.home-greeting-box {
  margin-bottom: 20px;
}

.home-greeting {
  font-size: 24px;
  font-weight: 800;
  color: var(--g-text);
  margin: 0 0 4px 0;
  letter-spacing: -0.4px;
}

@media (min-width: 640px) {
  .home-greeting {
    font-size: 28px;
  }
}

.home-subtitle {
  font-size: 14px;
  color: var(--g-text-secondary);
  margin: 0;
}

/* Home Search Card (Matches Flutter HomeSearchCard) */
.home-search-card {
  background: #F7F7F7;
  border-radius: var(--g-radius-lg);
  padding: 20px;
  box-shadow: var(--g-shadow-md);
  margin-bottom: 28px;
  border: 1px solid var(--g-border-light);
}

@media (max-width: 380px) {
  .home-search-card {
    padding: 16px;
    border-radius: 18px;
  }
}

@media (min-width: 640px) {
  .home-search-card {
    padding: 28px;
    margin-bottom: 36px;
  }
}

.home-search-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--g-text);
  letter-spacing: -0.5px;
  margin: 0 0 18px 0;
}

@media (min-width: 640px) {
  .home-search-title {
    font-size: 26px;
    margin-bottom: 22px;
  }
}

/* Responsive Grid for Destination & Dates */
.home-search-fields-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 640px) {
  .home-search-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

.search-field-group {
  margin-bottom: 16px;
  position: relative;
}

.search-field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #52525B;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.search-input-card {
  background: #FFFFFF;
  border-radius: var(--g-radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  border: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 48px;
  box-sizing: border-box;
}

.search-input-card:focus-within {
  border-color: var(--g-primary-dark);
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.06);
}

.search-input-card input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 15px;
  color: var(--g-text);
  font-weight: 500;
  padding: 0;
  min-width: 0;
}

.search-input-card input::placeholder {
  color: var(--g-text-muted);
}

.search-input-card .clear-btn {
  background: transparent;
  border: none;
  color: var(--g-text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.search-input-card .clear-btn:hover {
  color: var(--g-text);
  background: var(--g-bg-hover);
}

.explore-search-bar {
  margin-bottom: 24px;
  border: 1px solid var(--g-border);
  max-width: 600px;
}

/* City Autocomplete Dropdown */
.city-suggestions {
  margin-top: 4px;
  background: #FFFFFF;
  border-radius: var(--g-radius-md);
  box-shadow: var(--g-shadow-lg);
  border: 1px solid var(--g-border-light);
  overflow: hidden;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
}

.city-suggestion-item {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: var(--g-text);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s ease;
}

.city-suggestion-item:hover {
  background: var(--g-bg-hover);
}

/* Date Range Pill Display */
.search-date-display {
  font-size: 14px;
  color: var(--g-text);
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.search-date-display.empty {
  color: var(--g-text-muted);
}

/* Unit Type Horizontal Filter Chips */
.unit-type-scroll {
  display: flex;
  align-items: center;
  justify-content: safe center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.unit-type-scroll::-webkit-scrollbar {
  height: 4px;
}

.unit-type-scroll::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 4px;
}

.unit-type-chip {
  flex: 0 0 auto;
  background: #FFFFFF;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  color: var(--g-text);
  min-width: 64px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.unit-type-chip:first-child {
  margin-inline-start: auto;
}

.unit-type-chip:last-child {
  margin-inline-end: auto;
}

.unit-type-chip * {
  pointer-events: none;
}

.unit-type-chip svg {
  color: #4B5563;
  stroke: #4B5563;
  transition: all 0.2s ease;
}

.unit-type-chip span {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.unit-type-chip:hover {
  background: var(--g-bg-hover);
}

.unit-type-chip.selected {
  background: var(--g-text) !important;
  color: #FFFFFF !important;
  border-color: var(--g-text);
}

.unit-type-chip.selected svg {
  color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}

.unit-type-chip.selected span {
  color: #FFFFFF !important;
  font-weight: 700;
}

/* Find Stays Action Button */
.btn-find-stays {
  width: 100%;
  height: 48px;
  background: var(--g-text);
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
  margin-top: 20px;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.2);
}

.home-search-card .btn-find-stays {
  width: 100%;
  max-width: 240px;
  height: 46px;
  padding: 0 28px;
  font-size: 15px;
  border-radius: 12px;
  margin: 20px auto 0;
}

@media (max-width: 480px) {
  .home-search-card .btn-find-stays {
    max-width: 220px;
    height: 44px;
    font-size: 14px;
    margin-top: 16px;
  }
}

.btn-find-stays:hover {
  opacity: 0.92;
}

.btn-find-stays:active {
  transform: scale(0.98);
}

/* ----------------------------------------------------
   Section Header & Responsive Units Grid
   ---------------------------------------------------- */
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--g-text);
  margin: 0;
}

.btn-text-link {
  background: transparent;
  border: none;
  color: var(--g-primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px;
}

.btn-text-link:hover {
  text-decoration: underline;
}

/* Responsive Units Grid (Mobile 1-col | Tablet 2-col | Desktop 3-col | Wide 4-col) */
.units-feed {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .units-feed {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1080px) {
  .units-feed {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

@media (min-width: 1500px) {
  .units-feed {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

/* Unit Result Card Container */
.unit-card {
  background: #FFFFFF;
  border-radius: var(--g-radius-lg);
  box-shadow: var(--g-shadow-sm);
  margin-bottom: 0; /* Handled by CSS grid gap */
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--g-border-light);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.unit-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--g-shadow-md);
}

.unit-card-media {
  position: relative;
  width: 100%;
  height: 175px;
  background: var(--g-bg-hover);
  overflow: hidden;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .unit-card-media {
    height: 190px;
  }
}

.unit-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.unit-card:hover .unit-card-media img {
  transform: scale(1.04);
}

.unit-card-media .media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g-text-muted);
}

.unit-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px;
  border-radius: var(--g-radius-sm);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--g-danger);
  z-index: 2;
}

[dir="rtl"] .unit-card-badge {
  left: auto;
  right: 12px;
}

.unit-card-fav {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  z-index: 2;
  transition: transform 0.15s ease;
}

[dir="rtl"] .unit-card-fav {
  right: auto;
  left: 12px;
}

.unit-card-fav:hover {
  transform: scale(1.12);
}

.unit-card-fav svg {
  color: var(--g-text-secondary);
  stroke: var(--g-text-secondary);
}

.unit-card-fav.active svg {
  color: var(--g-danger);
  fill: var(--g-danger);
  stroke: var(--g-danger);
}

@keyframes favPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.32); }
  100% { transform: scale(1); }
}

.unit-card-fav.pop,
.detail-fav-btn.pop {
  animation: favPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.unit-card.removing {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  opacity: 0 !important;
  transform: scale(0.92) translateY(12px) !important;
  max-height: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.unit-card.just-added {
  animation: favCardEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes favCardEnter {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.unit-card-body {
  padding: 16px 18px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.unit-card-bldg-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--g-text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.unit-card-code {
  font-size: 14px;
  font-weight: 700;
  color: var(--g-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.unit-card-meta {
  font-size: 13px;
  color: var(--g-text-secondary);
  margin: 0 0 16px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pricing Row (pricing_row.dart) */
.pricing-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

@media (max-width: 340px) {
  .pricing-row {
    flex-direction: column;
  }
}

.price-chip {
  flex: 1;
  padding: 10px 8px;
  background: var(--g-bg-hover);
  border-radius: var(--g-radius-sm);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid transparent;
  min-width: 0;
}

.price-chip.highlight {
  background: rgba(31, 41, 55, 0.08);
  border-color: rgba(31, 41, 55, 0.3);
}

.price-chip-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--g-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-chip.highlight .price-chip-val {
  color: var(--g-primary);
}

.price-chip-label {
  font-size: 11px;
  color: var(--g-text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ----------------------------------------------------
   Unit Detail & Booking Flow (unit_booking_view.dart)
   Responsive 2-column layout on Desktop, 1-column on Mobile
   ---------------------------------------------------- */
.detail-view {
  background: var(--g-bg);
  min-height: 100vh;
  box-sizing: border-box;
}

@media (min-width: 880px) {
  .detail-view {
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 32px 48px 32px;
  }
}

/* Image Carousel */
.detail-carousel-wrap {
  width: 100%;
}

@media (min-width: 880px) {
  .detail-carousel-wrap {
    margin-bottom: 24px;
  }
}

.detail-carousel {
  position: relative;
  width: 100%;
  height: 280px;
  background: var(--g-primary);
  overflow: hidden;
}

@media (min-width: 640px) {
  .detail-carousel {
    height: 340px;
  }
}

@media (min-width: 880px) {
  .detail-carousel {
    height: 420px;
    border-radius: var(--g-radius-lg);
    box-shadow: var(--g-shadow-md);
  }
}

.detail-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease-out;
}

.detail-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.detail-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-carousel-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  pointer-events: none;
}

.detail-carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 5;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.45);
  transition: all 0.25s ease;
  cursor: pointer;
}

.carousel-dot.active {
  width: 20px;
  background: #FFFFFF;
}

.detail-carousel-counter {
  position: absolute;
  top: 16px;
  right: 64px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--g-radius-sm);
  font-size: 12px;
  font-weight: 700;
  z-index: 5;
  backdrop-filter: blur(4px);
}

[dir="rtl"] .detail-carousel-counter {
  right: auto;
  left: 64px;
}

.detail-back-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s ease;
  backdrop-filter: blur(4px);
}

[dir="rtl"] .detail-back-btn {
  left: auto;
  right: 16px;
}

.detail-back-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.detail-fav-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(4px);
}

[dir="rtl"] .detail-fav-btn {
  right: auto;
  left: 16px;
}

.detail-fav-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}

.detail-fav-btn.active {
  background: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.detail-fav-btn svg {
  color: #FFFFFF;
  stroke: #FFFFFF;
}

.detail-fav-btn.active svg {
  color: var(--g-danger);
  fill: var(--g-danger);
  stroke: var(--g-danger);
}

/* Detail Cards Container & Responsive Two-Column Layout */
.detail-content-cards {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

/* On mobile (<880px): detail-col-main and detail-col-sidebar become transparent
   so the items order identically to Flutter mobile: Info -> Dates -> Price -> Location -> Book */
@media (max-width: 879px) {
  .detail-col-main,
  .detail-col-sidebar {
    display: contents;
  }
  .card-unit-info { order: 1; }
  .card-date-selection { order: 2; }
  .card-price-summary { order: 3; }
  .card-location { order: 4; }
  .card-book-action { order: 5; }
}

/* On desktop (≥880px): 2 columns with sticky sidebar booking widget */
@media (min-width: 880px) {
  .detail-content-cards {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 28px;
    align-items: start;
    padding: 0;
  }
  .detail-col-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .detail-col-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 24px;
    z-index: 10;
  }
  .card-unit-info,
  .card-location,
  .card-date-selection,
  .card-price-summary,
  .card-book-action {
    order: 0 !important;
  }
}

/* Guest Generic Card Style */
.guest-card {
  background: #FFFFFF;
  border-radius: var(--g-radius-lg);
  padding: 20px;
  border: 1px solid var(--g-border);
  box-shadow: var(--g-shadow-sm);
  box-sizing: border-box;
}

@media (max-width: 380px) {
  .guest-card {
    padding: 16px;
    border-radius: 18px;
  }
}

.guest-card.border-danger {
  border: 2px solid rgba(220, 38, 38, 0.5);
}

/* Unit Info Card (unit_info_card.dart) */
.unit-info-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.unit-info-icon-box {
  padding: 10px;
  background: rgba(31, 41, 55, 0.1);
  border-radius: var(--g-radius-md);
  color: var(--g-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.unit-info-title-box {
  flex: 1;
  min-width: 0;
}

.unit-info-title-box h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--g-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unit-info-title-box p {
  margin: 2px 0 0 0;
  font-size: 13px;
  color: var(--g-text-secondary);
}

.contact-action-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--g-radius-md);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  flex-shrink: 0;
  text-decoration: none;
}

.contact-action-btn:hover {
  opacity: 0.85;
  transform: scale(1.05);
}

.contact-action-btn.tel {
  background: rgba(31, 41, 55, 0.1);
  color: var(--g-primary);
}

.contact-action-btn.wa {
  background: rgba(37, 211, 102, 0.15);
  color: #25D366;
}

.unit-info-address {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--g-text-secondary);
  font-size: 13px;
  margin-bottom: 16px;
}

.card-divider {
  border: none;
  border-top: 1px solid var(--g-border);
  margin: 16px 0;
}

.card-subheading {
  font-size: 11px;
  font-weight: 700;
  color: var(--g-text-secondary);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin: 0 0 12px 0;
}

/* Custom Price Applied Tag */
.custom-price-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--g-radius-sm);
  color: #D97706;
  font-size: 11px;
  font-weight: 600;
  margin-top: 10px;
}

/* Date Selection Card (date_selection_card.dart) */
.date-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 8px;
}

.date-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--g-text);
}

.status-chip {
  padding: 4px 8px;
  border-radius: var(--g-radius-sm);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.status-chip.available {
  background: var(--g-success-light);
  color: var(--g-success);
}

.status-chip.unavailable {
  background: var(--g-danger-light);
  color: var(--g-danger);
}

.status-chip.checking {
  background: var(--g-bg-hover);
  color: var(--g-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-trigger-box {
  padding: 14px;
  background: var(--g-bg);
  border-radius: var(--g-radius-md);
  border: 1px solid var(--g-border);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.2s;
  min-height: 48px;
  box-sizing: border-box;
}

.date-trigger-box:hover {
  border-color: var(--g-primary);
}

.date-trigger-text {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--g-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.date-nights-info {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--g-primary);
}

/* Price Summary Card (price_summary_card.dart) */
.price-summary-card {
  padding: 18px 20px;
  background: var(--g-success-light);
  border-radius: var(--g-radius-lg);
  border: 1px solid var(--g-success-border);
  display: flex;
  align-items: center;
  gap: 14px;
  box-sizing: border-box;
}

@media (max-width: 380px) {
  .price-summary-card {
    padding: 14px 16px;
    gap: 10px;
  }
}

.price-summary-left {
  flex: 1;
  min-width: 0;
}

.price-summary-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--g-success);
  margin: 0 0 2px 0;
}

.price-summary-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--g-success);
  margin: 0;
}

@media (max-width: 380px) {
  .price-summary-val {
    font-size: 20px;
  }
}

.price-summary-right {
  text-align: end;
  flex-shrink: 0;
}

.price-summary-right-label {
  font-size: 11px;
  color: var(--g-text-secondary);
  margin: 0;
}

.price-summary-right-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--g-text);
  margin: 2px 0 0 0;
}

/* Location Card (location_card.dart) */
.btn-outline-maps {
  width: 100%;
  padding: 12px;
  border-radius: var(--g-radius-md);
  border: 1px solid var(--g-primary);
  background: transparent;
  color: var(--g-primary);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 14px;
}

.btn-outline-maps:hover {
  background: rgba(31, 41, 55, 0.05);
}

/* Confirm Reservation Button (book_button.dart) */
.card-book-action {
  width: 100%;
}

.btn-book-confirm {
  width: 100%;
  height: 54px;
  border-radius: var(--g-radius-md);
  background: var(--g-primary);
  color: #FFFFFF;
  border: none;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s, transform 0.1s;
  box-shadow: 0 4px 14px rgba(31, 41, 55, 0.2);
}

.btn-book-confirm:hover:not(:disabled) {
  opacity: 0.92;
}

.btn-book-confirm:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-book-confirm:disabled {
  background: var(--g-text-muted);
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: none;
}

/* ----------------------------------------------------
   My Bookings View & Cards (my_bookings_view.dart)
   ---------------------------------------------------- */
.bookings-page-header {
  padding: 4px 0 0 0;
}

.my-bookings-phone-pill { max-width: 440px; }
.bookings-tabs-header {
  background: var(--g-bg-card);
  border-bottom: 1px solid var(--g-border);
  display: flex;
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
}

@media (min-width: 820px) {
  .bookings-tabs-header {
    top: 16px;
    border-radius: var(--g-radius-md);
    background: var(--g-bg-hover);
    padding: 4px;
    border: 1px solid var(--g-border);
    max-width: 440px;
    margin-bottom: 8px;
  }
}

.bookings-tab-btn {
  flex: 1;
  padding: 14px 10px;
  text-align: center;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--g-text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.bookings-tab-btn.active {
  color: var(--g-primary);
  font-weight: 700;
  border-bottom-color: var(--g-primary);
}

@media (min-width: 820px) {
  .bookings-tab-btn {
    border-bottom: none;
    border-radius: 10px;
    padding: 10px;
  }
  .bookings-tab-btn.active {
    background: #FFFFFF;
    color: var(--g-text);
    box-shadow: var(--g-shadow-sm);
  }
}

.bookings-list {
  padding: 20px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 680px) {
  .bookings-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1200px) {
  .bookings-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

/* Guest Booking Card (Owner-inspired .bk-card design) */
.guest-bk-card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.guest-bk-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #fff;
}

.guest-bk-status-pill .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

.guest-bk-status-pill.current {
  background: #10b981;
}

.guest-bk-status-pill.upcoming {
  background: #1f2937;
}

.guest-bk-status-pill.past {
  background: #64748b;
}

.guest-bk-upper {
  border-radius: 16px;
  transition: background-color 0.2s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.guest-bk-upper.clickable {
  cursor: pointer;
}

.guest-bk-upper .bk-user-name {
  display: inline-block;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.guest-bk-upper.clickable:hover .bk-user-name {
  transform: translateY(-1.5px);
}

[dir="rtl"] .guest-bk-card .bk-user-actions {
  border-left: none;
  padding-left: 0;
  border-right: 1px solid #e2e8f0;
  padding-right: 16px;
}

.guest-maint-btn {
  width: auto !important;
  min-width: 190px;
  padding: 10px 20px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 22px auto 0 !important;
}

/* ----------------------------------------------------
   Scan View & QR Search (scan_view.dart)
   ---------------------------------------------------- */
.scan-view-box {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  box-sizing: border-box;
}

#guest-panel-scan.active {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.scan-viewfinder {
  width: 100%;
  max-width: 340px;
  height: 280px;
  background: #000000;
  border-radius: var(--g-radius-lg);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

#qr-video-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

@media (min-width: 640px) {
  .scan-viewfinder {
    max-width: 380px;
    height: 300px;
  }
}

.scan-viewfinder-target {
  width: 180px;
  height: 180px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.48);
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.scan-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: #3b82f6;
  border-style: solid;
  pointer-events: none;
}

.scan-corner-tl { top: -2px; left: -2px; border-width: 3.5px 0 0 3.5px; border-top-left-radius: 8px; }
.scan-corner-tr { top: -2px; right: -2px; border-width: 3.5px 3.5px 0 0; border-top-right-radius: 8px; }
.scan-corner-bl { bottom: -2px; left: -2px; border-width: 0 0 3.5px 3.5px; border-bottom-left-radius: 8px; }
.scan-corner-br { bottom: -2px; right: -2px; border-width: 0 3.5px 3.5px 0; border-bottom-right-radius: 8px; }

.scan-laser-line {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #3b82f6, #60a5fa, #3b82f6, transparent);
  box-shadow: 0 0 10px #3b82f6, 0 0 4px #60a5fa;
  animation: scanLaser 2.2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes scanLaser {
  0% { top: 6%; opacity: 0.3; }
  50% { top: 92%; opacity: 1; }
  100% { top: 6%; opacity: 0.3; }
}

.scan-viewfinder-target.detected {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.48), 0 0 28px rgba(16, 185, 129, 0.7) !important;
  animation: detectedPulse 0.35s ease-out;
}

.scan-viewfinder-target.detected .scan-corner {
  border-color: #10b981 !important;
}

@keyframes detectedPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.scan-camera-badge {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--g-radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #FFFFFF;
  z-index: 5;
  border: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

.scan-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: scanDotPulse 1.8s infinite ease-in-out;
}

@keyframes scanDotPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.35); opacity: 1; }
}

.scan-badge-dot.off {
  background: #9CA3AF;
  box-shadow: none;
  animation: none;
}

.scan-badge-toggle {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  margin-inline-start: 4px;
  transition: background 0.2s;
}

.scan-badge-toggle:hover {
  background: rgba(255, 255, 255, 0.32);
}

.scan-fallback-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  z-index: 4;
}

.scan-retry-btn {
  background: #3B82F6;
  color: #FFFFFF;
  border: none;
  padding: 8px 20px;
  border-radius: var(--g-radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.scan-retry-btn:hover {
  background: #2563EB;
}

.btn-outline-scan {
  width: 100%;
  height: 50px;
  border-radius: var(--g-radius-md);
  border: 1.5px solid var(--g-primary);
  background: transparent;
  color: var(--g-primary);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline-scan:hover {
  background: rgba(31, 41, 55, 0.05);
}

/* Benaya Units View Banner (benaya_units_view.dart) */
.benaya-banner {
  background: linear-gradient(135deg, #1F2937, #374151);
  border-radius: var(--g-radius-lg);
  padding: 20px;
  color: #FFFFFF;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.25);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 640px) {
  .benaya-banner {
    padding: 24px 28px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.benaya-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.benaya-banner-icon {
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  flex-shrink: 0;
}

.benaya-banner-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 4px 0;
}

.benaya-banner-code {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--g-radius-sm);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.benaya-banner-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ----------------------------------------------------
   Profile View & Settings (profile_view.dart)
   ---------------------------------------------------- */
.profile-view-body {
  padding: 16px;
  width: 100%;
  box-sizing: border-box;
}

.profile-inner-wrap {
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.profile-card {
  background: var(--g-bg-card);
  border-radius: var(--g-radius-md);
  padding: 20px;
  box-shadow: var(--g-shadow-sm);
  border: 1px solid var(--g-border);
  margin-bottom: 24px;
}

.profile-card-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--g-primary-lighter);
}

.profile-avatar-camera {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--g-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

[dir="rtl"] .profile-avatar-camera {
  right: auto;
  left: 0;
}

.profile-menu-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px;
  border-radius: var(--g-radius-md);
  cursor: pointer;
  transition: background 0.15s;
}

.profile-menu-item:hover {
  background: var(--g-bg-hover);
}

.profile-menu-item.destructive {
  color: var(--g-danger);
}

.profile-menu-item.destructive svg {
  stroke: var(--g-danger);
}

/* ----------------------------------------------------
   Modals & Sheets (Receipts, Edit Profile, Date Picker)
   ---------------------------------------------------- */
.guest-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.2s ease-out;
}

@media (min-width: 640px) {
  .guest-modal-overlay {
    align-items: center;
    padding: 20px;
  }
  .guest-modal-sheet {
    border-radius: var(--g-radius-lg) !important;
    max-height: 85vh !important;
  }
}

.guest-modal-sheet {
  background: var(--g-bg-card);
  width: 100%;
  max-width: 520px;
  border-radius: 24px 24px 0 0;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-sizing: border-box;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 380px) {
  .guest-modal-sheet {
    padding: 18px 16px;
  }
}

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

.modal-header-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--g-text);
  margin: 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--g-text-secondary);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s;
}

.modal-close-btn:hover {
  background: var(--g-bg-hover);
  color: var(--g-text);
}

/* Modern Date Range Calendar — Fixed Width & Fixed 6-Row Height */
#calendar-render-box {
  width: 320px;
  max-width: 100%;
  margin: 0 auto;
}

.date-picker-calendar {
  width: 320px;
  max-width: 100%;
  margin: 8px auto;
  box-sizing: border-box;
}

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

.calendar-month-label {
  font-weight: 700;
  font-size: 15px;
  min-width: 150px;
  text-align: center;
  user-select: none;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: 28px repeat(6, 40px);
  gap: 4px;
  text-align: center;
}

.calendar-day-header {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--g-text-muted);
  height: 28px;
}

.calendar-day-cell {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease;
  color: var(--g-text);
  min-width: 0;
}

.calendar-day-cell.empty {
  pointer-events: none;
}

@media (max-width: 360px) {
  .calendar-day-cell {
    font-size: 11px;
  }
}

.calendar-day-cell:hover:not(.disabled) {
  background: var(--g-bg-hover);
}

.calendar-day-cell.selected {
  background: var(--g-text) !important;
  color: #fff !important;
}

.calendar-day-cell.in-range {
  background: rgba(31, 41, 55, 0.1);
  border-radius: 0;
}

.calendar-day-cell.disabled {
  color: var(--g-border);
  cursor: not-allowed;
}

/* OTP Verification Digits */
.otp-box {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  border: 1px solid var(--g-border);
  border-radius: 12px;
  background: var(--g-bg-hover);
  box-sizing: border-box;
}

@media (max-width: 380px) {
  .otp-box {
    width: 40px;
    height: 50px;
    font-size: 18px;
    border-radius: 10px;
  }
}

/* Success Confirmation Dialog */
.success-dialog-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--g-success-light);
  color: var(--g-success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
}

.success-dialog-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--g-text);
  margin: 0 0 8px 0;
}

.success-dialog-desc {
  font-size: 13px;
  color: var(--g-text-secondary);
  line-height: 1.5;
  margin: 0 0 24px 0;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Empty State Helper */
.guest-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--g-text-secondary);
}

.units-feed > .guest-empty {
  grid-column: 1 / -1;
}

#guest-panel-favorites.active:has(.guest-empty) {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#guest-panel-favorites.active:has(.guest-empty) .guest-page-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#guest-panel-favorites.active:has(.guest-empty) .units-feed {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guest-empty svg {
  color: var(--g-text-muted);
  margin-bottom: 16px;
}

.guest-empty h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--g-text);
  margin: 0 0 8px 0;
}

.guest-empty p {
  font-size: 14px;
  color: var(--g-text-secondary);
  margin: 0;
}

/* Loading Spinner */
.guest-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.guest-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--g-border);
  border-top-color: var(--g-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ----------------------------------------------------
   Airbnb-style Profile & Floating Switcher
   ---------------------------------------------------- */
.airbnb-profile-wrap {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  padding: 16px 16px 136px;
  box-sizing: border-box;
}

.airbnb-hero-card {
  background: var(--g-bg-card, #fff);
  border: 1px solid var(--g-border, #e5e7eb);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  margin-bottom: 24px;
}

.airbnb-avatar {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 8px 16px -4px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
  cursor: pointer;
}

.airbnb-avatar-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--g-primary, #111827);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

[dir="rtl"] .airbnb-avatar-badge {
  right: auto;
  left: 0;
}

.airbnb-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--g-text-secondary, #6b7280);
  margin: 24px 8px 10px;
}

.airbnb-group-card {
  background: var(--g-bg-card, #fff);
  border: 1px solid var(--g-border, #e5e7eb);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 10px -2px rgba(0, 0, 0, 0.03);
  margin-bottom: 12px;
}

.airbnb-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid var(--g-border, #f1f5f9);
}

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

.airbnb-row-item:hover {
  background: var(--g-bg-hover, #f8fafc);
}

.airbnb-row-item.no-hover {
  cursor: default;
}
.airbnb-row-item.no-hover:hover {
  background: none;
}

.airbnb-row-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.airbnb-row-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--g-bg-hover, #f1f5f9);
  color: var(--g-text, #1e293b);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.airbnb-row-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--g-text, #111827);
  margin-bottom: 2px;
}

.airbnb-row-subtitle {
  font-size: 13px;
  color: var(--g-text-secondary, #6b7280);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.airbnb-row-trailing {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--g-text-muted, #9ca3af);
}

.airbnb-chevron {
  transition: transform 0.2s ease;
}

[dir="rtl"] .airbnb-chevron {
  transform: scaleX(-1);
}

.fab-switch-portal {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 40px;
  background: #0f172a;
  color: #ffffff;
  padding: 14px 26px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.fab-switch-portal:hover {
  transform: translateX(-50%) translateY(-3px);
  box-shadow: 0 16px 32px -4px rgba(0, 0, 0, 0.5);
  background: #1e293b;
  color: #ffffff;
}

.fab-switch-portal:active {
  transform: translateX(-50%) translateY(0);
}

/* In owner mode on screens with mobile bottom navigation bar */
@media (max-width: 768px) {
  .fab-switch-portal {
    bottom: calc(var(--safe-area-bottom, 0px) + 96px);
  }
}

/* In guest mode on screens with bottom navigation bar */
.guest-mode .fab-switch-portal {
  bottom: calc(var(--safe-area-bottom, 0px) + 96px);
}

@media (min-width: 640px) {
  .guest-mode .fab-switch-portal {
    bottom: 44px;
  }
}


/* Airbnb Personal Information Cards */
.airbnb-pi-card {
  background: var(--g-bg-card, #fff);
  border: 1px solid var(--g-border, #e5e7eb);
  border-radius: 20px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px -2px rgba(0, 0, 0, 0.03);
}

.airbnb-pi-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.airbnb-pi-card-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--g-text, #111827);
}

.airbnb-pi-card-value {
  font-size: 15px;
  color: var(--g-text-secondary, #374151);
  margin-top: 4px;
}

.airbnb-pi-card-desc {
  font-size: 13px;
  color: var(--g-text-muted, #6b7280);
  margin-top: 6px;
  line-height: 1.4;
}

.airbnb-pi-action-btn {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--g-text, #111827);
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 0;
  white-space: nowrap;
}

.airbnb-pi-action-btn:hover {
  color: var(--accent, #7c3aed);
}

/* ====================================================
   Mobile Responsiveness for Profile Page & Calendars
   ==================================================== */
@media (max-width: 640px) {
  .airbnb-profile-wrap {
    padding: 12px 12px 156px;
    max-width: 100%;
  }

  .airbnb-hero-card {
    padding: 20px 16px;
    gap: 16px;
    border-radius: 20px;
  }

  .airbnb-hero-card #profile-hero-view {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: start;
  }

  .airbnb-hero-card #profile-hero-view > div {
    justify-content: flex-start;
  }

  .airbnb-hero-card #profile-hero-edit {
    width: 100%;
    text-align: start;
  }

  .airbnb-hero-card #profile-hero-edit-btn {
    align-self: center;
    margin-top: 4px;
    width: 100%;
    max-width: 200px;
    justify-content: center;
    display: inline-flex;
    align-items: center;
  }

  .airbnb-group-card {
    border-radius: 16px;
  }

  .airbnb-row-item {
    padding: 14px 14px;
    gap: 10px;
  }

  .airbnb-row-left {
    gap: 12px;
    min-width: 0;
    flex: 1;
  }

  .airbnb-row-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .airbnb-row-icon svg {
    width: 18px;
    height: 18px;
  }

  .airbnb-row-title {
    font-size: 14px;
  }

  .airbnb-row-subtitle {
    font-size: 12px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
  }

  .airbnb-row-trailing {
    flex-shrink: 0;
  }

  .airbnb-row-trailing .toggle-group {
    scale: 0.92;
    transform-origin: center right;
  }
  [dir="rtl"] .airbnb-row-trailing .toggle-group {
    transform-origin: center left;
  }

  .fab-switch-portal {
    bottom: calc(var(--safe-area-bottom, 0px) + 96px);
    padding: 12px 20px;
    font-size: 13px;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
    justify-content: center;
  }

  .guest-mode .fab-switch-portal {
    bottom: calc(var(--safe-area-bottom, 0px) + 96px);
  }
}

@media (max-width: 480px) {
  .airbnb-hero-card {
    padding: 16px 12px;
  }
  .airbnb-avatar {
    width: 64px;
    height: 64px;
    font-size: 24px;
  }
}
