/* ===================================================================
   ALOJIA BOUTIQUE STAYS - DESIGN SYSTEM & STYLESHEET
   Responsive 320px - 1440px | Zero Horizontal Overflow
   =================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Boutique Stays Warm Linen & Earth Palette */
  --bg-main: #fcfbf9;           /* Warm creamy linen background */
  --bg-card: #ffffff;           /* Crisp card surface */
  --bg-alt: #f5f2eb;            /* Warm sand subtle surface */
  --text-main: #1c1917;         /* Warm stone-900 (WCAG AAA contrast) */
  --text-muted: #57534e;        /* Warm stone-600 */
  --text-light: #857f78;        /* Warm stone-400 */
  
  /* Forest Green / Botanical tones */
  --primary: #065f46;           /* Deep Forest Green (WCAG AAA 7.2:1) */
  --primary-hover: #044e39;     /* Deep forest hover */
  --primary-light: #ecfdf5;     /* Soft sage/mint tint */
  
  /* Warm Amber & Honey tones */
  --accent-amber: #b45309;      /* Warm golden amber (WCAG AA 5.0:1) */
  --accent-amber-light: #fffbeb;/* Soft honey tint */
  --accent-teal: #0f766e;       /* Deep mineral teal */
  --accent-teal-light: #f0fdfa; /* Soft teal tint */
  
  /* Warm Stone Borders & Organic Shadows */
  --border-color: #e7e2d9;      /* Warm stone border */
  --border-light: #f0ece3;      /* Subtle warm border */
  --shadow-sm: 0 1px 3px 0 rgba(28, 25, 23, 0.05);
  --shadow-md: 0 4px 10px -2px rgba(28, 25, 23, 0.06), 0 2px 4px -1px rgba(28, 25, 23, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(28, 25, 23, 0.08), 0 4px 8px -2px rgba(28, 25, 23, 0.03);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;
  
  --whatsapp: #15803d;
  --whatsapp-hover: #166534;
}

/* Base resets & overflow defense */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  width: 100%;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

img, svg, picture, video {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===================================================================
   TYPOGRAPHY & UTILITIES
   =================================================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(12px, 3vw, 24px);
  padding-right: clamp(12px, 3vw, 24px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  line-height: 1;
  white-space: nowrap;
}

.badge-vip {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(217, 119, 6, 0.25);
}

.badge-hotel {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(4, 120, 87, 0.2);
}

.badge-hostel {
  background: var(--accent-teal-light);
  color: var(--accent-teal);
  border: 1px solid rgba(13, 148, 136, 0.2);
}

.badge-casa {
  background: var(--accent-amber-light);
  color: var(--accent-amber);
  border: 1px solid rgba(217, 119, 6, 0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.925rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.825rem;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.25);
}

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

.btn-whatsapp {
  background-color: var(--whatsapp);
  color: #ffffff;
}
.btn-whatsapp:hover {
  background-color: var(--whatsapp-hover);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.28);
}

.btn-amber {
  background-color: var(--accent-amber);
  color: #ffffff;
}
.btn-amber:hover {
  background-color: #b45309;
}

/* Form inputs */
.input, .select, .textarea {
  width: 100%;
  padding: 10px 14px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-main);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.12);
}

/* ===================================================================
   NAVBAR & HEADER
   =================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brand-logo {
  height: 38px;
  width: auto;
  max-width: clamp(120px, 34vw, 175px);
  object-fit: contain;
}

@media (min-width: 480px) {
  .brand-logo {
    height: 40px;
    max-width: 175px;
  }
}

.nav-links-desktop {
  display: none;
  align-items: center;
  gap: 20px;
}

@media (min-width: 860px) {
  .nav-links-desktop {
    display: flex;
  }
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

/* ===================================================================
   HERO BANNER
   =================================================================== */
.hero-section {
  padding: clamp(16px, 3.5vw, 36px) 0 16px;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(4, 120, 87, 0.18);
  border-radius: var(--radius-full);
  font-size: clamp(0.725rem, 2.2vw, 0.825rem);
  font-weight: 600;
  margin-bottom: 10px;
}

.hero-title {
  font-size: clamp(1.25rem, 5vw, 2.6rem);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
  word-break: break-word;
}

.hero-title span {
  color: var(--primary);
}

.hero-subtitle {
  font-size: clamp(0.825rem, 2.6vw, 1.05rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.45;
}

/* ===================================================================
   MAP SECTION (INDEPENDENT, TOP)
   =================================================================== */
.map-wrapper-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 28px;
}

.map-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 18px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
}

.map-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text-main);
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.map-viewport-container {
  width: 100%;
  height: clamp(340px, 45vh, 480px);
  position: relative;
  background: #e2e8f0;
}

.map-floating-gps {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 10;
  box-shadow: var(--shadow-lg);
}

/* MapLibre Marker Styling */
.custom-map-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  width: 34px;
  height: 34px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  border: 2px solid #ffffff;
  transition: transform 0.15s ease;
}

.custom-map-marker:hover {
  transform: rotate(-45deg) scale(1.15);
  z-index: 50 !important;
}

.marker-pin-inner {
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.marker-svg {
  width: 18px;
  height: 18px;
}

.marker-price-bubble {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.custom-map-marker:hover .marker-price-bubble {
  opacity: 1;
}

/* Map Navigation Controls Touch Polish */
.maplibregl-ctrl-group button,
.maplibre-gl-ctrl-group button {
  width: 36px !important;
  height: 36px !important;
}

/* Map Popup Card */
.maplibre-gl-popup-content,
.maplibregl-popup-content {
  padding: 0 !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden !important;
  box-shadow: var(--shadow-lg) !important;
  border: 1px solid var(--border-color);
  max-width: 270px;
}

.map-popup-card {
  font-family: var(--font-sans);
}

.map-popup-thumb-wrap {
  position: relative;
  width: 100%;
  height: 110px;
  background: #0f172a;
}

.map-popup-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-popup-content {
  padding: 10px 12px;
}

.map-popup-title {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
  line-height: 1.25;
}

.map-popup-meta {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.map-popup-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.map-popup-price {
  font-size: 0.775rem;
  color: var(--text-muted);
}
.map-popup-price strong {
  color: var(--primary);
  font-size: 0.95rem;
}

/* GPS Pulse Marker */
.user-gps-marker {
  width: 22px;
  height: 22px;
  position: relative;
}
.user-gps-dot {
  width: 14px;
  height: 14px;
  background-color: #2563eb;
  border: 2px solid #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 4px;
  left: 4px;
}
.user-gps-pulse {
  width: 22px;
  height: 22px;
  background-color: rgba(37, 99, 235, 0.35);
  border-radius: 50%;
  animation: pulseGps 1.8s infinite ease-out;
}
@keyframes pulseGps {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ===================================================================
   SEARCH & CATEGORY FILTERS
   =================================================================== */
.filters-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.search-bar-wrap {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.search-input-box {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-input-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

.search-input-box input {
  padding-left: 44px;
  height: 48px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  width: 100%;
}

.category-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px;
  scrollbar-width: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.category-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.category-chip svg {
  width: 16px;
  height: 16px;
}

.category-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.category-chip.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(6, 95, 70, 0.25);
}

/* Sort dropdown */
.sort-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 0.875rem;
  color: var(--text-muted);
  width: 100%;
}

.sort-select {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-main);
  font-size: 0.875rem;
  max-width: 100%;
}

/* ===================================================================
   LISTINGS GRID & MODULAR CARDS (16:9 + ACCORDION)
   =================================================================== */
.listings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 2.5vw, 24px);
  margin-bottom: 48px;
}

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

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

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

.stay-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.stay-card.highlighted {
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(4, 120, 87, 0.15);
}

/* 16:9 Aspect Ratio Media Container */
.stay-media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #0f172a;
  overflow: hidden;
}

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

.stay-card:hover .stay-media-img {
  transform: scale(1.03);
}

.stay-badges-row {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.stay-price-tag {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  font-weight: 500;
}
.stay-price-tag strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: #34d399;
}

/* Card Body */
.stay-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.stay-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stay-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 10px;
}

/* 3 Key Amenities Pills */
.stay-amenities-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.amenity-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: var(--bg-alt);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}

.amenity-pill svg {
  width: 12px;
  height: 12px;
  color: var(--primary);
}

/* Accordion Trigger & Container */
.stay-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background-color: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: background-color 0.15s ease;
  margin-top: auto;
}

.stay-toggle-btn:hover {
  background-color: #e2e8f0;
}

.stay-toggle-icon {
  transition: transform 0.25s ease;
}

.stay-toggle-btn[aria-expanded="true"] .stay-toggle-icon {
  transform: rotate(180deg);
}

.stay-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: #fafbfc;
  border-top: 1px solid transparent;
}

.stay-accordion-content.open {
  border-color: var(--border-color);
}

.stay-accordion-inner {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stay-desc {
  font-size: 0.875rem;
  color: #334155;
  line-height: 1.55;
}

.stay-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #ffffff;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
}

.stay-detail-label {
  color: var(--text-muted);
  display: block;
  font-size: 0.725rem;
  text-transform: uppercase;
  font-weight: 600;
}
.stay-detail-val {
  font-weight: 600;
  color: var(--text-main);
}

.stay-all-amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stay-amenity-chip {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stay-actions-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (min-width: 480px) {
  .stay-actions-row {
    flex-direction: row;
  }
  .stay-actions-row .btn {
    flex: 1;
  }
}

.btn-pin-map {
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(4, 120, 87, 0.2);
}
.btn-pin-map:hover {
  background-color: #d1fae5;
}

/* ===================================================================
   FOOTER
   =================================================================== */
.site-footer {
  margin-top: auto;
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 36px 0 80px; /* Space for mobile bottom bar */
}

@media (min-width: 860px) {
  .site-footer {
    padding-bottom: 36px;
  }
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    text-align: left;
  }
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--primary);
}

/* Responsive Form Grid (1 col on mobile, 2 cols on >=640px) */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===================================================================
   MOBILE BOTTOM APP DOCK BAR (< 860px)
   =================================================================== */
.mobile-bottom-bar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  justify-content: space-around;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

@media (min-width: 860px) {
  .mobile-bottom-bar {
    display: none;
  }
}

.bottom-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 0.725rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
  min-width: 54px;
}

.bottom-bar-item svg {
  width: 20px;
  height: 20px;
}

.bottom-bar-item.active, .bottom-bar-item:hover {
  color: var(--primary);
}

/* ===================================================================
   UNIVERSAL POPUP & TOAST SYSTEM (popup.js)
   =================================================================== */
.toast-container {
  position: fixed;
  bottom: clamp(16px, 4vw, 32px);
  right: clamp(16px, 4vw, 32px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

@media (max-width: 860px) {
  .toast-container {
    bottom: 74px; /* above mobile bar */
  }
}

.toast-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  pointer-events: auto;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.toast-item.toast-show {
  transform: translateY(0);
  opacity: 1;
}

.toast-item.toast-hide {
  transform: translateY(-10px);
  opacity: 0;
}

.toast-success { background: #064e3b; border-left: 4px solid #34d399; }
.toast-error   { background: #7f1d1d; border-left: 4px solid #f87171; }
.toast-warning { background: #78350f; border-left: 4px solid #fbbf24; }
.toast-info    { background: #0f172a; border-left: 4px solid #38bdf8; }

.toast-msg {
  flex: 1;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 4px;
}
.toast-close:hover {
  color: #ffffff;
}

/* Modal Dialogs */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-backdrop.active {
  opacity: 1;
}

.modal-backdrop.fade-out {
  opacity: 0;
}

.modal-box {
  background: #ffffff;
  width: 100%;
  max-width: 460px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.modal-backdrop.active .modal-box {
  transform: scale(1);
}

.modal-header {
  padding: 18px 20px 12px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-body {
  padding: 8px 20px 18px;
  font-size: 0.925rem;
  color: #334155;
  line-height: 1.5;
}

.modal-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.modal-footer {
  padding: 12px 20px;
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-footer-split {
  justify-content: space-between;
}

/* ===================================================================
   PANEL & ADMIN SPECIFIC STYLES
   =================================================================== */
.admin-dock-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
  width: 100%;
  min-width: 0;
  contain: paint;
}
.admin-dock-nav::-webkit-scrollbar {
  display: none;
}

.admin-dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.admin-dock-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(6, 95, 70, 0.25);
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(16px, 4vw, 24px);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.data-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.data-table th {
  background: var(--bg-alt);
  padding: 10px 14px;
  font-weight: 600;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  color: #334155;
  vertical-align: middle;
}

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

.data-table tr:hover td {
  background-color: #fafbfc;
}

/* ===================================================================
   ATLOS FEATURED & VIP PLANS MODULE
   =================================================================== */
.badge-plan-vip {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border: 1px solid #fef08a;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.35);
  font-weight: 700;
}

.badge-plan-plus {
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #ffffff;
  border: 1px solid #99f6e4;
  box-shadow: 0 2px 4px rgba(13, 148, 136, 0.3);
  font-weight: 700;
}

.badge-plan-destacado {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #10b981;
  font-weight: 700;
}

.badge-plan-free {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.atlos-plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 16px 0;
}

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

.atlos-plan-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.atlos-plan-card.plan-featured {
  border: 2px solid #f59e0b;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.18);
  background: #fffdfa;
}

.atlos-plan-ribbon {
  position: absolute;
  top: -10px;
  right: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 0.675rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(217, 119, 6, 0.3);
}

.atlos-plan-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.atlos-plan-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin: 8px 0 12px;
}
.atlos-plan-price span {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-weight: 500;
}

.atlos-plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.8rem;
  color: #334155;
  flex: 1;
}

.atlos-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.35;
}

.atlos-plan-features li svg {
  width: 14px;
  height: 14px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 1px;
}

.btn-atlos {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: #0f172a;
  color: #ffffff;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 0.825rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #1e293b;
  transition: all 0.2s ease;
}
.btn-atlos:hover {
  background-color: #1e293b;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.25);
}

.btn-atlos.btn-atlos-vip {
  background: linear-gradient(135deg, #d97706, #b45309);
  border-color: #f59e0b;
}
.btn-atlos.btn-atlos-vip:hover {
  background: linear-gradient(135deg, #b45309, #92400e);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

/* ===================================================================
   RESPONSIVE POLISH: SMARTPHONES (<= 480px) & MICRO SCREENS (<= 360px)
   =================================================================== */
@media (max-width: 480px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .navbar-inner {
    height: 52px;
  }

  .brand-logo {
    height: 32px;
  }

  .map-viewport-container {
    height: 250px;
  }

  .map-header-bar {
    padding: 8px 12px;
  }
  .map-header-title {
    font-size: 0.85rem;
  }
  .map-legend {
    font-size: 0.7rem;
    gap: 8px;
  }

  .category-tabs-scroll {
    gap: 6px;
    padding: 2px 0;
  }
  .category-chip {
    padding: 6px 12px;
    font-size: 0.775rem;
    gap: 5px;
  }
  .category-chip svg {
    width: 14px;
    height: 14px;
  }

  .search-input-box input {
    height: 42px;
    font-size: 0.85rem;
    padding-left: 36px;
  }
  .search-input-box svg {
    left: 12px;
    width: 16px;
    height: 16px;
  }

  .sort-wrap {
    font-size: 0.775rem;
  }
  .sort-select {
    padding: 4px 8px;
    font-size: 0.775rem;
  }

  .stay-body {
    padding: 12px;
  }
  .stay-title {
    font-size: 0.975rem;
    line-height: 1.25;
    margin-bottom: 6px;
  }
  .stay-location {
    font-size: 0.75rem;
    margin-bottom: 4px;
  }
  .stay-price-tag {
    padding: 3px 7px;
    font-size: 0.75rem;
    bottom: 8px;
    right: 8px;
  }
  .stay-price-tag strong {
    font-size: 0.95rem;
  }
  .stay-badges-row {
    top: 8px;
    left: 8px;
    right: 8px;
  }
  .badge {
    font-size: 0.675rem;
    padding: 3px 7px;
  }
  .amenity-pill {
    font-size: 0.685rem;
    padding: 2px 6px;
  }
  .stay-toggle-btn {
    font-size: 0.775rem;
    padding: 6px 10px;
  }

  .stay-accordion-inner {
    padding: 12px;
    gap: 10px;
  }
  .stay-desc {
    font-size: 0.8rem;
    line-height: 1.45;
  }
  .stay-details-grid {
    padding: 8px 10px;
    font-size: 0.75rem;
    gap: 6px;
  }
  .stay-detail-label {
    font-size: 0.675rem;
  }
  .stay-actions-row {
    gap: 6px;
  }
  .stay-actions-row .btn {
    font-size: 0.775rem;
    padding: 6px 10px;
  }

  .modal-box {
    max-width: 95vw;
    margin: 8px;
  }
  .modal-header {
    padding: 14px 16px 8px;
  }
  .modal-title {
    font-size: 1.05rem;
  }
  .modal-body {
    padding: 6px 16px 14px;
  }
  .modal-footer {
    padding: 10px 16px;
  }

  .bottom-bar-item {
    font-size: 0.65rem;
    min-width: 44px;
    padding: 2px 4px;
    gap: 2px;
  }
  .bottom-bar-item svg {
    width: 17px;
    height: 17px;
  }
}

@media (max-width: 360px) {
  html {
    font-size: 14px;
  }

  .container {
    padding-left: 6px;
    padding-right: 6px;
  }

  .brand-logo {
    max-width: 80px;
    height: 24px;
  }

  .navbar-inner {
    height: 48px;
    gap: 4px;
  }

  .admin-top-actions .btn-sm {
    padding: 2px 5px;
    font-size: 0.68rem;
  }

  .admin-dock-nav {
    padding: 3px;
    gap: 4px;
  }

  .admin-dock-btn {
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .stat-item {
    padding: 6px 4px;
  }

  .stat-number {
    font-size: 1.1rem;
  }

  .stat-label {
    font-size: 0.65rem;
  }

  .hero-title {
    font-size: 1.15rem;
    line-height: 1.2;
    letter-spacing: -0.015em;
  }

  .hero-subtitle {
    font-size: 0.775rem;
    line-height: 1.35;
  }

  .hero-pill {
    font-size: 0.675rem;
    padding: 2px 8px;
  }

  .map-viewport-container {
    height: 200px;
  }

  .category-chip {
    padding: 4px 9px;
    font-size: 0.7rem;
    gap: 4px;
  }

  .stay-body {
    padding: 10px;
  }
  .stay-title {
    font-size: 0.9rem;
  }
  .stay-location {
    font-size: 0.7rem;
  }
  .stay-price-tag {
    padding: 2px 6px;
    font-size: 0.7rem;
  }
  .stay-price-tag strong {
    font-size: 0.875rem;
  }
  .stay-details-grid {
    grid-template-columns: 1fr;
  }

  .panel-card {
    padding: 12px;
  }

  .modal-box {
    max-width: 98vw;
    margin: 4px;
  }
  .modal-header {
    padding: 10px 12px 6px;
  }
  .modal-title {
    font-size: 0.975rem;
  }
  .modal-body {
    padding: 4px 12px 12px;
    font-size: 0.8rem;
  }
  .modal-footer {
    padding: 8px 12px;
  }
}

/* ===================================================================
   MAP-FIRST DUAL SPLIT SCREEN (ESTILO GOOGLE MAPS / AIRBNB)
   =================================================================== */

.mapfirst-split-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
  min-height: calc(100vh - 66px);
}

@media (min-width: 992px) {
  .mapfirst-split-wrapper {
    flex-direction: row;
    height: calc(100vh - 66px);
    overflow: hidden;
  }

  .stays-feed-column {
    flex: 0 0 50%;
    max-width: 50%;
    height: 100%;
    overflow-y: auto;
    padding: 20px 24px 60px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    border-right: 1px solid var(--border-color);
    background: var(--bg-alt);
  }

  .stays-feed-column .listings-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }

  .map-view-column {
    flex: 1;
    height: 100%;
    position: relative;
    background: #e2e8f0;
  }
}

@media (min-width: 1380px) {
  .stays-feed-column .listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

body.has-split-map .site-footer {
  display: none;
}

@media (max-width: 991px) {
  .mapfirst-split-wrapper {
    height: calc(100dvh - 62px);
    overflow: hidden;
    position: relative;
  }

  /* Default on mobile: MAP IS FULL SCREEN PROTAGONIST */
  .map-view-column {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: block;
  }

  /* Feed column slides in when toggled */
  .stays-feed-column {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-alt);
    z-index: 20;
    overflow-y: auto;
    padding: 16px 14px 120px;
    display: none;
  }

  .mapfirst-split-wrapper.view-feed-active .stays-feed-column {
    display: block;
  }
  .mapfirst-split-wrapper.view-feed-active .map-view-column {
    display: none;
  }
}

/* Floating View Toggle Pill on Mobile (Airbnb / Google Maps style) */
.floating-mobile-view-pill {
  display: none;
}

@media (max-width: 991px) {
  .floating-mobile-view-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    bottom: 76px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    z-index: 100;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
  }
  .floating-mobile-view-pill:active {
    transform: translateX(-50%) scale(0.95);
    background: #020617;
  }
}

/* Map Canvas in Split Mode */
.split-map-canvas {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

/* Floating overlay bar on map */
.map-floating-overlay-top {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.gmaps-style-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  padding: 6px 14px;
  border-radius: 9999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #047857;
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(4, 120, 87, 0.4);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(4, 120, 87, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(4, 120, 87, 0); }
  100% { box-shadow: 0 0 0 0 rgba(4, 120, 87, 0); }
}

.map-floating-gps-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  border-radius: 9999px;
  padding: 7px 14px;
}

/* Google Maps Style Price Markers */
.gmaps-marker-anchor {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  z-index: 10;
}
.gmaps-marker-anchor:hover,
.gmaps-marker-anchor.active {
  z-index: 99 !important;
}

.gmaps-price-pill,
.gmaps-price-marker {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, -10px);
  width: max-content !important;
  max-width: max-content !important;
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  font-size: 13px;
  padding: 5px 10px;
  border-radius: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
  border: 1.5px solid #047857;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  pointer-events: auto;
}

.gmaps-marker-anchor:hover .gmaps-price-pill,
.gmaps-marker-anchor.active .gmaps-price-pill,
.gmaps-price-marker:hover,
.gmaps-price-marker.active {
  transform: translate(-50%, -10px) scale(1.15);
  background: #047857;
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 6px 18px rgba(4, 120, 87, 0.45);
}

.gmaps-price-pill.is-vip,
.gmaps-price-marker.is-vip {
  background: #d97706;
  color: #ffffff;
  border: 1.5px solid #fef08a;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
}

.gmaps-marker-anchor:hover .gmaps-price-pill.is-vip,
.gmaps-marker-anchor.active .gmaps-price-pill.is-vip,
.gmaps-price-marker.is-vip:hover,
.gmaps-price-marker.is-vip.active {
  background: #b45309;
  border-color: #fef08a;
  box-shadow: 0 6px 20px rgba(180, 83, 9, 0.55);
}

.gmaps-marker-stem {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #047857;
}

.gmaps-price-pill.is-vip .gmaps-marker-stem,
.gmaps-price-marker.is-vip .gmaps-marker-stem {
  border-top-color: #d97706;
}

.gmaps-marker-anchor:hover .gmaps-price-pill.is-vip .gmaps-marker-stem,
.gmaps-marker-anchor.active .gmaps-price-pill.is-vip .gmaps-marker-stem {
  border-top-color: #b45309;
}

/* Google Maps Direct Navigation Button */
.btn-gmaps-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: #1a73e8;
  color: #ffffff !important;
  border: 1px solid #1a73e8;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 7px 12px;
  font-size: 0.825rem;
  text-decoration: none;
  transition: all 0.15s ease;
}
.btn-gmaps-nav:hover {
  background-color: #1557b0;
  border-color: #1557b0;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.35);
}
.btn-gmaps-nav svg {
  flex-shrink: 0;
}

/* Mobile Bottom Sheet Drawer */
.map-mobile-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.22);
  z-index: 50;
  padding: 12px 16px 20px;
  transform: translateY(110%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 82vh;
  overflow-y: auto;
  border-top: 1px solid var(--border-color);
}
.map-mobile-sheet.is-open {
  transform: translateY(0);
}
.sheet-drag-pill {
  width: 36px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 9999px;
  margin: 0 auto 10px;
}
.btn-sheet-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #475569;
  cursor: pointer;
}

/* Card highlight when marker is active */
.stay-card.card-marker-highlight {
  border-color: #047857;
  box-shadow: 0 0 0 2px #047857, var(--shadow-md);
  transform: translateY(-2px);
}

/* ===================================================================
   WEB STORIES RAIL & FULLSCREEN VIEWER (Instagram / TikTok Style)
   =================================================================== */

.stories-rail-wrap {
  margin-bottom: 16px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px 6px;
  box-shadow: var(--shadow-sm);
}

.stories-rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 2px;
}

.stories-pulse-badge {
  width: 8px;
  height: 8px;
  background: #e11d48;
  border-radius: 50%;
  animation: pulseDot 1.8s infinite;
}

.stories-rail-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.stories-rail-scroll::-webkit-scrollbar {
  display: none;
}

.story-rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  width: 68px;
  text-align: center;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}

.story-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, #047857 0%, #10b981 50%, #f59e0b 100%);
  position: relative;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  box-shadow: 0 3px 10px rgba(4, 120, 87, 0.28);
}
.story-ring.seen {
  background: #94a3b8;
  box-shadow: none;
}
.story-rail-item:hover .story-ring {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(4, 120, 87, 0.38);
}

.story-ring-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #0f172a;
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-ring-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-rail-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 66px;
  line-height: 1.15;
}

/* Fullscreen Stories Viewer Modal */
.story-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.story-viewer-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  height: 90vh;
  max-height: 780px;
  background: #000000;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}

@media (max-width: 640px) {
  .story-viewer-card {
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
}

/* Segmented Progress Bars */
.story-progress-bar {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 25;
  display: flex;
  gap: 4px;
}

.story-progress-segment {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.story-progress-fill {
  height: 100%;
  background: #ffffff;
  width: 0%;
  transition: width 0.1s linear;
}
.story-progress-fill.completed {
  width: 100% !important;
}

/* Story Header */
.story-viewer-header {
  position: absolute;
  top: 20px;
  left: 12px;
  right: 12px;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: auto;
}

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

.story-header-thumb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  object-fit: cover;
  background: #0f172a;
}

.story-header-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.story-header-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-story-badge {
  background: rgba(245, 158, 11, 0.9);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-story-control {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn-story-control:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* Media Box */
.story-media-box {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #000000;
}

.story-video-el {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Tap Zones */
.story-tap-zone-left {
  position: absolute;
  top: 60px;
  left: 0;
  width: 35%;
  bottom: 120px;
  z-index: 15;
  cursor: pointer;
}
.story-tap-zone-right {
  position: absolute;
  top: 60px;
  right: 0;
  width: 65%;
  bottom: 120px;
  z-index: 15;
  cursor: pointer;
}

/* Story Footer & Scrim */
.story-viewer-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 25;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.85) 40%, rgba(0, 0, 0, 0.98) 100%);
  padding: 30px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.story-footer-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.25;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.story-footer-desc {
  color: #e2e8f0;
  font-size: 0.825rem;
  line-height: 1.4;
  margin: 0 0 4px;
  max-height: 60px;
  overflow-y: auto;
}

.story-cta-btn {
  width: 100%;
  justify-content: center;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 9999px;
  box-shadow: 0 4px 16px rgba(4, 120, 87, 0.5);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Tickets & Community in Host Panel */
.host-promo-banner {
  background: linear-gradient(135deg, #064e3b 0%, #047857 50%, #0d9488 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

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

.ticket-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.725rem;
  font-weight: 700;
}
.ticket-status-pending { background: #fef3c7; color: #92400e; }
.ticket-status-in_review { background: #e0f2fe; color: #0369a1; }
.ticket-status-completed { background: #dcfce7; color: #166534; }
.ticket-status-rejected { background: #fee2e2; color: #991b1b; }

