:root {
    --bg-color: #e0e5ec;
    --text-color: #2d3436;
    --shadow-light: #ffffff;
    --shadow-dark: #a3b1c6;
    --accent: #0984e3;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    overflow: hidden; /* Control view via bottom sheet */
    color: var(--text-color);
}

#view-mapa, #view-dashboard {
    width: 100%;
    height: 100vh;
    position: relative;
}
#view-dashboard { display: none; }

#map {
    width: 100%;
    height: 100vh;
    z-index: 1;
}

/* Bottom Sheet styles removed. Replaced by filter modal overlay! */

.sheet-content {
    flex: 1;
    overflow-y: auto;
}

/* Soft UI (Neumorphism) Inputs & Filters */
.filters-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #d1d8e0;
    padding-left: 2px;
    margin-bottom: 2px;
}

.soft-input {
    width: 100%;
    background: #f1f3f5;
    border: 1px solid #e1e5e8;
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.2s ease;
}

.soft-input:focus {
    background: #ffffff;
    border-color: #6482e4;
    box-shadow: 0 0 0 3px rgba(100, 130, 228, 0.1);
}

.glass-input {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

.pill-search-input {
    background: rgba(30, 45, 70, 0.65) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    border-radius: 50px !important;
    color: white !important;
    outline: none;
    transition: all 0.3s ease;
}

.pill-search-input::placeholder {
    color: rgba(255, 255, 255, 0.85);
}

.pill-search-input:focus {
    background: rgba(40, 60, 90, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

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

.price-range span {
    font-weight: 600;
    color: var(--text-color);
}

.soft-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    background: #2563eb;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(37,99,235,0.3);
    transition: all 0.2s ease;
    width: 100%;
}

.soft-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37,99,235,0.4);
    background: #1d4ed8;
}

.soft-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

/* ------------------------------------- */
/* Dark UI Inputs & Dual Range Slider */
/* ------------------------------------- */
.dark-input {
    width: 100%;
    background: #2b2b2f;
    border: 1px solid #3a3a3e;
    border-radius: 8px;
    padding: 12px 14px;
    color: #ffffff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.dark-input:focus {
    border-color: #0abde3;
    box-shadow: 0 0 0 2px rgba(10, 189, 227, 0.2);
}

.dark-input.with-icon {
    padding-left: 36px;
}

select.dark-input {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23d1d8e0" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

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

.dual-range-container {
    position: relative;
    width: 100%;
    height: 4px;
    background: #3a3a3e;
    border-radius: 4px;
    margin: 20px 0 10px 0;
}

.range-track {
    position: absolute;
    height: 100%;
    background: #0abde3;
    border-radius: 4px;
    top: 0;
    z-index: 1;
}

.dual-range-container input[type="range"] {
    position: absolute;
    width: 100%;
    height: 6px;
    top: -1px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    z-index: 2;
    margin: 0;
}

.dual-range-container input[type="range"]::-webkit-slider-thumb {
    pointer-events: all;
    width: 20px;
    height: 20px;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 50%;
    background: #0abde3;
    box-shadow: 0 0 10px rgba(10, 189, 227, 0.4);
    cursor: grab;
    border: 3px solid #2b2b2f;
}

.dual-range-container input[type="range"]::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #a4b0be;
    margin-top: 15px;
}


/* Google Maps InfoWindow Customization */
.info-window-content {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    width: 280px; /* Wider for better text fit */
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    margin: 0;
    border-radius: 8px;
}
.info-window-content::-webkit-scrollbar {
    display: none;
}

.info-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    display: block;
}

.info-body {
    padding: 12px 0 5px 0;
}

.info-body h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.info-price {
    margin: 0 0 12px 0;
    font-weight: 700;
    color: var(--accent);
    font-size: 1.05rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px; /* More breathing room */
}

.info-item {
    font-size: 0.85rem;
    color: #2d3436;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Strict left alignment */
    background: #fdfdfd; /* Clean white-ish */
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #f1f3f5; /* Subtle cell border */
    font-weight: 800; /* Crisp numbers */
}

.info-item span {
    font-weight: 600;
    color: #a3b1c6;
    font-size: 0.65rem;
    margin-bottom: 4px;
    text-transform: capitalize; /* Less aggressive than ALL CAPS */
    letter-spacing: 0px;
}

/* Carousel InfoWindow */
.carousel-container {
    position: relative;
    width: 100%;
    height: 140px;
    background: #000;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.carousel-container .info-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.15s ease-in-out;
    border-radius: 0; /* Reset since container has it */
}

/* ------------------------------------- */
/* Mini Card Like Button Hover (Top Level) */
/* ------------------------------------- */
.card-like-btn-top {
    position: absolute;
    top: 15px;
    left: 15px; /* Opposite side of the native X */
    color: #b2bec3; /* soft grey to contrast with Google's white box */
    background: transparent;
    border: none;
    width: 26px;
    height: 26px;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.2s;
    outline: none;
    padding: 0;
}

.card-like-btn-top:hover {
    transform: scale(1.15);
    color: #ff7675;
}

.card-like-btn-top:active {
    transform: scale(0.9);
}

.card-like-btn-top.liked svg {
    fill: #ff7675;
    stroke: #ff7675;
}

.card-like-btn-top svg {
    width: 100%;
    height: 100%;
}


.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    color: #2d3436;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 13px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.2s;
    user-select: none;
    outline: none;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.9);
}

.carousel-btn.prev {
    left: 8px;
}

.carousel-btn.next {
    right: 8px;
}

/* Hide scrollbar for a cleaner look */
.sheet-content::-webkit-scrollbar {
    display: none;
}

/* Custom Map Pins (Advanced Markers) */
.custom-map-pin {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.pin-price {
    background: #ffffff;
    color: var(--text-color);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px; /* Space between price and icon */
    box-shadow: 0 4px 10px rgba(163, 177, 198, 0.4);
    border: 1px solid #e0e5ec;
    white-space: nowrap;
    position: relative;
    z-index: 2;
}

/* Triangle pointing from the price tag to the pin */
.pin-price::after {
    content: '';
    position: absolute;
    bottom: -6px; 
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

.pin-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 12px rgba(163, 177, 198, 0.6);
    border: 3px solid #ffffff;
    z-index: 1;
    position: relative;
    transition: transform 0.2s ease;
}

.custom-map-pin:hover .pin-icon {
    transform: scale(1.1);
}

.pin-icon svg {
    width: 20px;
    height: 20px;
}

/* Toggle Switch (Apagar Google Maps) */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-color);
  transition: .4s;
  box-shadow: inset 4px 4px 6px rgba(163, 177, 198, 0.6), inset -4px -4px 6px rgba(255, 255, 255, 0.8);
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: #a3b1c6;
  transition: .4s;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
  /* Cuando está activo (Soft Green) */
  box-shadow: inset 4px 4px 6px rgba(0, 184, 148, 0.3), inset -4px -4px 6px rgba(255, 255, 255, 0.8);
}

input:checked + .slider:before {
  transform: translateX(22px);
  background-color: #00b894; /* Active Soft Green */
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}
.sheet-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Nuevo Diseño de Pin (Tarjeta con Imagen Miniatura) */
.custom-map-pin-card {
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease;
}

/* Auth Primary Button */
.btn-primary-blue {
    background: #0984e3;
    color: white;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(9, 132, 227, 0.4);
    transition: all 0.2s ease;
}
.btn-primary-blue:hover {
    background: #00a8ff;
    transform: translateY(-2px);
}

.custom-map-pin-card:hover {
    transform: scale(1.05) translateY(-5px);
}

/* Integrated Editor Grid */
.editor-layout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    padding-bottom: 50px;
}

#integrated-preview-column {
    position: sticky;
    top: 20px;
    height: fit-content;
}

@media (max-width: 1024px) {
    .editor-layout-grid {
        grid-template-columns: 1fr;
    }
    #integrated-preview-column {
        position: static;
        order: -1;
        margin-bottom: 30px;
    }
}

/* Sidebar UI */
.sidebar-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    z-index: 10000; /* Prioridad Muy Alta */
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.sidebar-overlay.active { opacity: 1; pointer-events: auto; }
.sidebar-content {
    background: rgba(28, 28, 30, 0.85); /* Dark Glassmorphism */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 80%; max-width: 320px; height: 100%;
    transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 10px 0 40px rgba(0,0,0,0.5);
    position: relative; padding: 30px 20px;
    display: flex; flex-direction: column;
}
.sidebar-overlay.active .sidebar-content { transform: translateX(0); }

.sidebar-header h2 { font-size: 1.5rem; margin-bottom: 5px; color: #ffffff !important; }
.sidebar-header p { font-size: 0.9rem; color: #a4b0be !important; margin-top: 0;}

/* Botones Modernos del Sidebar (Dark Glassmorphism) */
.modern-sidebar-btn {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08); /* slight border */
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05); /* semi-transparent base */
    border-radius: 16px;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-bottom: 15px;
}

.modern-sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.12); /* Brighter glass on hover */
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.modern-sidebar-btn svg {
    opacity: 0.9;
}

/* User Profile specific style */
.user-profile-btn {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.25) 0%, rgba(0, 184, 148, 0.25) 100%);
    border: 1px solid rgba(108, 92, 231, 0.4);
}
.user-profile-btn:hover {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.4) 0%, rgba(0, 184, 148, 0.4) 100%);
}

.sidebar-close-btn {
    position: absolute; right: 20px; top: 20px;
    background: rgba(255, 255, 255, 0.08); color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.2rem; cursor: pointer; width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.2s;
}
.sidebar-close-btn:hover { background: rgba(255, 255, 255, 0.15); transform: scale(1.05); }
.sidebar-link:hover { transform: translateX(5px); }

/* Auth Modal Styles */
.auth-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 4000; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.auth-overlay.active { opacity: 1; pointer-events: auto; }
.auth-card {
    background: rgba(28, 28, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px; padding: 30px; width: 90%; max-width: 400px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    position: relative; transform: translateY(20px); transition: transform 0.3s ease;
}
.auth-overlay.active .auth-card { transform: translateY(0); }
.auth-close-btn {
    position: absolute; top: 15px; right: 15px; background: transparent; border: none;
    color: #a4b0be; font-size: 1.2rem; cursor: pointer; padding: 5px;
}
.auth-header h2 { color: #fff; margin-bottom: 8px; font-size: 1.5rem; }
.auth-header p { color: #a4b0be; font-size: 0.9rem; margin-bottom: 25px; line-height: 1.4; }
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 12px; background: white; color: #333; border: none; border-radius: 12px;
    font-weight: 600; font-size: 1rem; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.btn-google:active { transform: scale(0.98); }
.btn-google img { width: 22px; height: 22px; }
.auth-divider { text-align: center; margin: 25px 0; position: relative; }
.auth-divider::before { content: ''; position: absolute; left: 0; top: 50%; width: 100%; height: 1px; background: rgba(255,255,255,0.1); }
.auth-divider span { position: relative; background: #272729; padding: 0 10px; color: #a4b0be; font-size: 0.85rem; border-radius: 10px; }
.auth-btn-small { padding: 14px 20px; white-space: nowrap; font-size: 0.95rem; border-radius: 12px; margin: 0; display: flex; align-items: center;}
.user-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; margin-right: 6px; }
.user-name-label { display: none; margin-left: 2px;}
@media(min-width: 768px) { .user-name-label { display: inline; } }

.pin-card-content {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 6px; /* Gap/margen interno amplio para separar la foto */
    box-shadow: 0 5px 12px rgba(163, 177, 198, 0.6);
    border: 1px solid #e0e5ec;
    height: 48px; /* Mantiene buena proporción para la previsualización */
    z-index: 2;
    position: relative;
}

.pin-card-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 22px;
    height: 22px;
    margin-left: 6px;
}

.pin-card-icon svg {
    width: 100%;
    height: 100%;
}

.pin-card-price {
    padding: 0 12px 0 6px;
    display: flex;
    align-items: center;
    color: var(--text-color);
    font-weight: 800;
    font-size: 13.5px;
    white-space: nowrap;
}

.pin-card-img-wrapper {
    height: 100%;
    width: 42px;
    border-radius: 8px; /* Imagen cuadrada con bordes redondeados */
    overflow: hidden;
}

.pin-card-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.pin-card-arrow {
    width: 0; 
    height: 0; 
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #ffffff;
    filter: drop-shadow(0 4px 3px rgba(163, 177, 198, 0.4));
    z-index: 1;
    margin-top: -1px;
}

/* Contenedor Superior de Amenidades */
.amenidades-container {
    display: flex;
    gap: 8px; /* Adjusted for chips */
    flex-wrap: wrap;
    padding: 12px 8px;
    background: #ffffff;
    justify-content: flex-start; /* Clean left edge instead of jagged center alignment */
    border-bottom: 2px solid #f8f9fa;
}

/* Chips Textuales para las Amenidades */
.amenity-chip {
    background: #f8f9fa;
    color: #2d3436;
    font-size: 0.70rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid #e0e5ec;
    box-shadow: 2px 2px 4px rgba(163, 177, 198, 0.4), -2px -2px 4px rgba(255,255,255,0.9);
    transition: all 0.2s ease;
    cursor: default;
}

.amenity-chip:hover {
    background: #ffffff;
    color: #00b894;
    transform: translateY(-2px);
    box-shadow: 3px 3px 6px rgba(163,177,198,0.5), -3px -3px 6px rgba(255,255,255,1);
}

/* ------------------------------------- */
/* Contact Actions inside InfoWindow */
/* ------------------------------------- */
.contact-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px dashed #b2bec3;
}

.contact-btn {
    flex: 1; /* Makes them take equal 50/50 space */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s ease;
    color: white;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.15);
}

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

.contact-btn svg {
    width: 16px;
    height: 16px;
}

.contact-btn.btn-wa {
    background: linear-gradient(135deg, #25D366, #128C7E);
}
.contact-btn.btn-wa:hover {
    box-shadow: 3px 5px 10px rgba(37, 211, 102, 0.4);
}

.contact-btn.btn-call {
    background: linear-gradient(135deg, #0984e3, #6c5ce7);
}
.contact-btn.btn-call:hover {
    box-shadow: 3px 5px 10px rgba(9, 132, 227, 0.4);
}

/* ------------------------------------- */
/* Carousel Overlays (Dots & Counter) */
/* ------------------------------------- */
.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
    background: rgba(0,0,0,0.35);
    padding: 6px 10px;
    border-radius: 12px;
    backdrop-filter: blur(2px);
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    transition: all 0.25s ease;
}

.carousel-dot.active {
    background: #ffffff;
    box-shadow: 0 0 6px rgba(255,255,255,0.9);
    transform: scale(1.4);
}

.carousel-counter {
    position: absolute;
    bottom: 10px;
    right: 12px;
    color: white;
    font-size: 0.70rem;
    font-weight: 800;
    background: rgba(0,0,0,0.55);
    padding: 4px 8px;
    border-radius: 6px;
    z-index: 5;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

/* ------------------------------------- */
/* Fullscreen Lightbox Overlay */
/* ------------------------------------- */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    transition: opacity 0.2s ease;
}

.lightbox-like {
    position: absolute;
    top: 25px;
    left: 30px;
    color: white;
    background: transparent;
    border: none;
    width: 34px;
    height: 34px;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.2s;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.6));
    outline: none;
}

.lightbox-like:hover {
    transform: scale(1.15);
}

.lightbox-like:active {
    transform: scale(0.9);
}

.lightbox-like.liked svg {
    fill: #ff7675;
    stroke: #ff7675;
}

.lightbox-like svg {
    width: 100%;
    height: 100%;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10000;
    user-select: none;
    transition: color 0.2s;
    line-height: 1;
}

.lightbox-close:hover {
    color: #ff7675;
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    width: 60px;
    height: 60px;
    border-radius: 30px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
    z-index: 10000;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-btn.prev {
    left: 4vw;
}

.lightbox-btn.next {
    right: 4vw;
}

#lightbox-counter {
    bottom: 30px;
    right: auto;
    font-size: 1rem;
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
}

/* ------------------------------------- */
/* COMPACTACIÓN EXTREMA MÓVIL (InfoWindows y Lightbox) */
/* ------------------------------------- */
@media (max-width: 768px) {
    /* Evitar que se cree barra de scroll en la tarjeta reduciendo todas las alturas */
    .info-window-content {
        width: 250px !important;
    }
    .carousel-container {
        height: 115px !important;
    }
    .amenidades-container {
        padding: 5px 4px !important;
        gap: 4px !important;
        border-bottom: 1px solid #f1f3f5 !important;
    }
    .amenity-chip {
        padding: 3px 6px !important;
        font-size: 0.60rem !important;
    }
    .info-body {
        padding: 8px 0 2px 0 !important;
    }
    .info-body h3 {
        font-size: 0.95rem !important;
        margin-bottom: 2px !important;
    }
    .info-price {
        font-size: 0.9rem !important;
        margin-bottom: 6px !important;
    }
    .info-grid {
        gap: 6px !important;
    }
    .info-item {
        padding: 4px 6px !important;
        font-size: 0.75rem !important;
    }
    .info-item span {
        font-size: 0.60rem !important;
        margin-bottom: 2px !important;
    }
    .contact-actions {
        margin-top: 8px !important;
        padding-top: 8px !important;
    }
    .contact-btn {
        padding: 8px 0 !important;
        font-size: 0.75rem !important;
    }

    /* Arreglo Lightbox (Imagen se va para abajo) */
    .lightbox {
        height: 100dvh; /* Adaptación a barra de dirección de iOS Safari */
    }
    .lightbox-img {
        max-width: 95vw !important;
        max-height: 70vh !important;
        transform: translateY(-5%); /* Compensa espacios de los controles para verse visualmente centrada */
    }

    /* Aniquilar la molesta barra de scroll horizontal nativa de Google Maps */
    .gm-style-iw-d {
        overflow-x: hidden !important;
    }
}

/* ==========================================================================
   SELLER DASHBOARD STYLES (SPA INTEGRATION)
   ========================================================================== */

#view-dashboard { 
    display: none; 
    width: 100%; 
    height: 100vh; 
    position: fixed; 
    top: 0; 
    left: 0; 
    z-index: 2000; 
    background: #f0f2f5;
    flex-direction: row;
}

.admin-sidebar { 
    width: 250px; min-width: 250px; z-index: 10; display: flex; flex-direction: column; padding: 1.5rem 1rem;
    background: #282c34; border-right: none; color: #f5f6fa; box-shadow: 5px 0 15px rgba(0,0,0,0.1);
}
.admin-sidebar h2 { color: #f5f6fa !important; font-size: 1.5rem; margin-bottom: 20px !important; letter-spacing: 0px; }
.admin-sidebar h2 span { color: #6482e4 !important; }

.admin-nav-item { padding: 12px 14px; margin-bottom: 5px; border-radius: 8px; cursor: pointer; color: #b1b8c0; font-weight: 600; font-size: 0.95rem; transition: all 0.2s; box-shadow: none !important; }
.admin-nav-item:hover, .admin-nav-item.active { background: rgba(255,255,255,0.1); color: white !important; box-shadow: none !important; }

#submenu-registrar { margin-left: 5px; border-left: 2px solid rgba(255,255,255,0.1); padding-left: 10px; margin-bottom: 10px; font-size: 0.85rem; }
.sub-nav-item { padding: 8px 12px; border-radius: 6px; margin-bottom: 2px; cursor: pointer; color: #b1b8c0; transition: all 0.2s; box-shadow: none !important;}
.sub-nav-item:hover, .sub-nav-item.submenu-active { background: rgba(255,255,255,0.15); color: white !important; font-weight: 600; }

.admin-main { flex: 1; position: relative; overflow: hidden; display: flex; }
.admin-panel { display: none; width: 100%; height: 100%; position: relative; flex-direction: column; }
.admin-panel.active { display: flex; }

.panel-registrar-map { position: absolute; top:0; left:0; right:0; bottom:0; z-index: 1; background: #e5e3df; }
.panel-registrar-form { 
    position: absolute; top: 1.5rem; left: 1.5rem; bottom: 1.5rem; width: 370px; z-index: 5;
    background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: 16px; border: 1px solid rgba(255,255,255,0.6); box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 1.5rem; display: flex; flex-direction: column; overflow-y:auto; 
}

.hint-overlay { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); background: white; padding: 12px 24px; border-radius: 30px; font-weight: 700; font-size: 0.8em; color: #4a4a4a; box-shadow: 0 5px 15px rgba(0,0,0,0.1); z-index: 10; font-family: 'Inter', sans-serif; border: 1px solid #eee; display: flex; align-items: center; gap: 8px;}
#map-picker, #map-admin { width: 100%; height: 100%; }

.section-title { font-size: 0.95rem; font-weight: 800; color: #636e72; margin-top: 15px; margin-bottom: 8px; border-bottom: 1px solid #eee; padding-bottom: 4px; }
.pill-checkbox-container { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-checkbox-container label { cursor: pointer; }
.pill-checkbox-container input[type="checkbox"] { display: none; }
.pill-checkbox {
    display: inline-block; background: #f1f3f5; padding: 6px 12px; border-radius: 20px; font-size: 0.8rem; color: #636e72; border: 1px solid #e1e5e8; transition: all 0.2s; font-weight: 700;
}
.pill-checkbox-container input[type="checkbox"]:checked + .pill-checkbox {
    background: #e8f0fe; color: #2563eb; border-color: #2563eb;
}

#panel-editar { flex-direction: column; padding: 2rem; overflow-y: auto; background: #f8f9fa; width: 100%; }
.soft-card-admin {
    background: white; padding: 12px 16px; border-radius: 16px; display: flex; align-items: center; gap: 15px; border: 1px solid rgba(163, 177, 198, 0.4); box-shadow: 2px 5px 15px rgba(163, 177, 198, 0.1); transition: transform 0.2s; margin-bottom: 10px;
}
.soft-card-admin:hover { transform: translateY(-2px); border-color: #2563eb; }

.soft-btn-icon {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid #eee; display: flex; align-items: center; justify-content: center; background: white; cursor: pointer; transition: all 0.2s; font-size: 1rem;
}
.soft-btn-icon:hover { background: #2563eb; color: white; border-color: #2563eb; transform: scale(1.1); }



@media (max-width: 768px) {
    #view-dashboard { flex-direction: column; }
    .admin-sidebar { width: 100%; min-width: 100%; height: auto; padding: 1rem; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .panel-registrar-form { width: 90%; left: 5%; bottom: 10px; top: auto; height: 60vh; }
    .admin-sidebar h2 { margin-bottom: 10px !important; }
}

/* ============================================
   EDITOR OVERLAY & LIVE PREVIEW SYSTEM
   ============================================ */

.editor-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: editorFadeIn 0.3s ease;
}

.editor-container {
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.editor-header {
    padding: 20px 40px;
    border-bottom: 1px solid #f1f3f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.editor-main-layout {
    flex: 1;
    display: flex;
    overflow: hidden;
    background: #f8f9fa;
}

.editor-controls-column {
    flex: 1.2;
    padding: 30px 40px;
    overflow-y: auto;
    border-right: 1px solid #eee;
}

.editor-preview-column {
    flex: 1;
    padding: 30px 40px;
    background: #f1f3f5;
    overflow-y: auto;
}

.preview-sticky-container {
    position: sticky;
    top: 0;
}

.preview-section-box {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.preview-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: #b2bec3;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.preview-canvas-pin {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px dashed #dfe6e9;
}

.preview-canvas-card {
    min-height: 200px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px dashed #dfe6e9;
    padding: 20px;
}

/* Quick Status Dropdown in List */
.status-select-admin {
    background: #e8f0fe;
    color: #2563eb;
    border: 1px solid #2563eb;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    outline: none;
    transition: 0.2s;
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
}

.status-select-admin:hover {
    background: #2563eb;
    color: white;
}

@keyframes editorFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 1024px) {
    .editor-main-layout { flex-direction: column; }
    .editor-preview-column { order: -1; flex: none; height: 350px; border-bottom: 1px solid #eee; }
    .preview-sticky-container { position: relative; }
}

/* --- Drag & Drop Image Feedback --- */
.preview-img-container {
    transition: all 0.2s ease;
    z-index: 1;
}
.preview-img-container:hover {
    transform: scale(1.05);
    z-index: 10;
}
.preview-img-container[draggable="true"]:active {
    cursor: grabbing;
}
.preview-img-container.dragging {
    opacity: 0.5 !important;
    transform: scale(0.9) !important;
}
.btn-remove-img:hover {
    background: #d63031 !important;
    transform: scale(1.1);
}

/* Search Bar Enhancements (Icons inside) */
.search-bar-icon-left {
    position: absolute;
    left: 18px;
    width: 22px;
    height: 22px;
    pointer-events: none;
    z-index: 5;
    stroke: white;
}

.search-bar-filter-btn {
    position: absolute;
    right: 6px;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.15); /* Dark transparent */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    z-index: 5;
    backdrop-filter: blur(8px);
}

.search-bar-filter-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.search-bar-filter-btn:active {
    transform: scale(0.95);
}

/* --- Map Nav Floating Controls (Premium Refined) --- */
#map-controls-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.map-control-btn {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    font-size: 1.5rem;
    position: relative;
    color: #2d3436;
}

.map-control-btn:hover {
    transform: translateY(-3px) scale(1.05);
    background: white;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    border-color: #6c5ce7;
}

.map-control-btn:active {
    transform: scale(0.95);
}

/* Layer Menu Logic */
#layer-options-menu {
    position: absolute;
    right: 65px;
    bottom: 0;
    display: flex;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: right center;
}

.layer-menu-hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8) translateX(20px);
    pointer-events: none;
}

.layer-menu-visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateX(0);
    pointer-events: auto;
}

.layer-option-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.layer-option-btn:hover {
    background: #f1f3f5;
    transform: scale(1.1);
}

.layer-option-btn.active {
    background: #6c5ce7;
    color: white;
    border-color: #6c5ce7;
}

/* Tooltip enhancements */
.map-control-btn::after, .layer-option-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 65px;
    background: rgba(45, 52, 54, 0.95);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
    font-weight: 700;
}

.map-control-btn:hover::after, .layer-option-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 600px) {
    #map-controls-vertical {
        bottom: 95px; 
        right: 15px;
        z-index: 2000;
    }
    .map-control-btn {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
}

/* --- User Location Marker (Blue Dot) --- */
.user-location-marker {
    width: 20px;
    height: 20px;
    background: #4285F4;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1000;
}

.user-location-pulse-container {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-location-pulse {
    position: absolute;
    width: 24px;
    height: 24px;
    background: rgba(66, 133, 244, 0.45);
    border-radius: 50%;
    animation: user-pulse 2.2s infinite;
    z-index: 1;
    pointer-events: none;
}

.user-location-marker {
    position: absolute;
    width: 18px;
    height: 18px;
    background: #4285F4;
    border: 3px solid white;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 15px rgba(66, 133, 244, 0.6);
}

@keyframes user-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(4.5);
        opacity: 0;
    }
}

/* ==========================================================================
   MESSAGE CENTER & MODERN CHAT STYLES
   ========================================================================== */

#message-center-view {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #1c1c1e;
    color: white;
    z-index: 10100;
    display: none;
    flex-direction: column;
    animation: slideInFromRight 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slideInFromRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.mc-container {
    display: grid;
    grid-template-columns: minmax(280px, 320px) 1fr minmax(280px, 320px);
    height: 100%;
    max-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Sidebar: Threads */
.mc-threads {
    background: rgba(255, 255, 255, 0.03);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.mc-threads-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mc-threads-header h3 { font-size: 1.1rem; font-weight: 800; }

#mc-threads-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    height: 100%;
    min-height: 0; /* Crucial para scroll en flex */
    box-sizing: border-box;
}

/* Custom Scrollbars for Message Center */
#mc-threads-list::-webkit-scrollbar,
#mc-chat-messages::-webkit-scrollbar,
.mc-profile::-webkit-scrollbar {
    width: 6px;
}
#mc-threads-list::-webkit-scrollbar-track,
#mc-chat-messages::-webkit-scrollbar-track,
.mc-profile::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
}
#mc-threads-list::-webkit-scrollbar-thumb,
#mc-chat-messages::-webkit-scrollbar-thumb,
.mc-profile::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}
#mc-threads-list::-webkit-scrollbar-thumb:hover,
#mc-chat-messages::-webkit-scrollbar-thumb:hover,
.mc-profile::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

.mc-thread-item {
    padding: 15px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
    display: flex;
    gap: 12px;
    border: 1px solid transparent;
}

.mc-thread-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.mc-thread-item.active {
    background: rgba(108, 92, 231, 0.15);
    border-color: rgba(108, 92, 231, 0.3);
}

.mc-thread-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: #3a3a3e;
}

.mc-thread-info { flex: 1; min-width: 0; }
.mc-thread-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-thread-preview { font-size: 0.75rem; color: #a4b0be; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Main Chat Area */
.mc-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0; /* Crucial for flex nested in grid */
    background: radial-gradient(circle at top right, rgba(108, 92, 231, 0.05), transparent);
}

.mc-chat-header {
    padding: 15px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(28, 28, 30, 0.8);
    backdrop-filter: blur(10px);
}

#mc-chat-messages {
    flex: 1;
    min-height: 0; /* Permite que el contenedor se encoja en vez de desbordar */
    overflow-y: auto;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mc-bubble {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    word-break: break-word;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.mc-bubble.in {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    border-bottom-left-radius: 4px;
    color: #f1f3f5;
}

.mc-bubble.out {
    align-self: flex-end;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    border-bottom-right-radius: 4px;
    color: white;
}

.mc-bubble-time {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-top: 5px;
    display: block;
    text-align: right;
}

/* Chat Input */
.mc-chat-input-wrapper {
    width: 100% !important;
    box-sizing: border-box !important;
    align-self: stretch !important;
    padding: 20px 25px;
    background: rgba(28, 28, 30, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mc-chat-input-box {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 8px 8px 18px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mc-chat-input-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    outline: none;
    font-size: 0.95rem;
}

.mc-btn-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #6c5ce7;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mc-btn-send:hover { transform: scale(1.05); background: #5b4cc4; }

/* Right Panel: Profile */
.mc-profile {
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: auto;
}

.mc-profile-card {
    text-align: center;
    margin-bottom: 30px;
}

.mc-profile-pic {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid rgba(108, 92, 231, 0.3);
    margin: 0 auto 15px auto;
    display: block;
    object-fit: cover;
}

.mc-profile-name { font-size: 1.2rem; font-weight: 800; margin-bottom: 5px; }
.mc-profile-role { font-size: 0.8rem; color: #a4b0be; text-transform: uppercase; letter-spacing: 1px; }

.mc-profile-section {
    margin-top: 25px;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mc-profile-label { font-size: 0.7rem; color: #a4b0be; text-transform: uppercase; font-weight: 700; margin-bottom: 8px; display: block; }
.mc-profile-value { font-size: 0.9rem; font-weight: 600; color: #f1f3f5; }

/* Responsive Adaptations */
/* Responsive Adaptations: Tiered Layout */

/* 1. Desktop Estrecho (1025px - 1400px) - Reducir anchos laterales */
@media (max-width: 1400px) {
    .mc-container {
        grid-template-columns: 280px 1fr 280px;
    }
}

/* 2. Tablet (769px - 1024px) - Ocultar panel lateral derecho para priorizar chat */
@media (max-width: 1024px) {
    .mc-container {
        grid-template-columns: 300px 1fr;
    }
    .mc-profile { display: none !important; }
}

/* 3. Mobile ( < 768px) - Overlay de una sola columna */
@media (max-width: 768px) {
    .mc-container {
        display: block; 
        position: relative;
    }
    .mc-threads { 
        position: absolute; 
        width: 100%; 
        height: 100%; 
        z-index: 2; 
        transition: transform 0.3s ease;
        background: #1c1c1e;
    }
    .mc-chat { 
        position: absolute; 
        width: 100%; 
        height: 100%; 
        z-index: 1; 
        border: none;
    }
    .mc-profile { display: none !important; }
    
    .mc-container.chat-active .mc-threads { transform: translateX(-100%); }
    
    /* Asegurar que el botón de volver sea visible en móvil */
    #mc-back-btn { display: flex !important; }
}

/* intl-tel-input Dark Mode Overrides */
.iti { width: 100% !important; display: block !important; }
.iti__dropdown-content {
    background-color: #1e272e !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6) !important;
}
.iti__country-list {
    background-color: transparent !important;
    color: #fff !important;
    padding: 10px !important;
    border: none !important;
}
.iti__country {
    padding: 10px 15px !important;
    border-radius: 8px !important;
}
.iti__country:hover, .iti__country--highlight {
    background-color: rgba(108, 92, 231, 0.2) !important;
}
.iti__selected-dial-code {
    color: #fff !important;
    font-weight: 600;
}
.iti__arrow {
    border-top-color: #a4b0be !important;
}
.iti__arrow--up {
    border-bottom-color: #a4b0be !important;
}
.iti__search-input {
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #fff !important;
    border-radius: 8px !important;
    margin: 10px !important;
    width: calc(100% - 20px) !important;
}
.iti__search-input:focus {
    border-color: #6c5ce7 !important;
    outline: none !important;
}

/* Global Unread Badge Styles */
.unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    display: none; /* Hidden if 0 */
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 2px solid white;
    z-index: 100;
    pointer-events: none;
}

.admin-nav-item {
    position: relative; /* For badges */
}

/* --- Optimization: Migrated from app.js Geocoder Overrides --- */
.maplibregl-ctrl-geocoder, 
.maptiler-ctrl-geocoder,
.maptiler-ctrl-geocoder form,
.maplibregl-ctrl-geocoder form,
.maptiler-gc-wrapper,
.maptiler-gc-input-container {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
    max-width: none !important;
    width: 100% !important;
}

/* Aggressive catch-all for any MapTiler internal elements that might have borders/backgrounds */
#geocoder-wrapper, #geocoder-wrapper *, .maptiler-ctrl-geocoder, .maptiler-ctrl-geocoder * {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    background-color: transparent !important;
}

#geocoder-wrapper .search-button,
#geocoder-wrapper button.svelte-zh3kmv {
    display: none !important;
}

#geocoder-wrapper input,
.maplibregl-ctrl-geocoder input,
.maptiler-ctrl-geocoder input,
.maptiler-gc-input {
    height: 48px !important;
    padding: 0 0 0 5px !important;
    font-size: 1.05rem !important;
    color: white !important;
    font-weight: 500 !important;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    background: transparent !important;
    width: 100% !important;
    pointer-events: auto !important;
    cursor: text !important;
    position: relative !important;
    z-index: 100 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#geocoder-wrapper input::placeholder,
.maplibregl-ctrl-geocoder input::placeholder,
.maptiler-ctrl-geocoder input::placeholder {
    color: rgba(255,255,255,0.7) !important;
}

/* --- Restablecer sugerencias clásicas blancas --- */
.maplibregl-ctrl-geocoder--results,
.maptiler-ctrl-geocoder--results,
.maptiler-gc-results,
#geocoder-wrapper ul {
    position: absolute !important;
    top: 55px !important; 
    left: 0px !important; 
    width: 100% !important; 
    background: white !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25) !important;
    z-index: 10000 !important;
    padding: 5px 0 !important;
    overflow: hidden !important;
    list-style: none !important;
    margin: 0 !important;
}

.maplibregl-ctrl-geocoder--suggestion,
.maplibregl-ctrl-geocoder li,
.maptiler-ctrl-geocoder li,
.maptiler-gc-item {
    padding: 12px 15px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    background: white !important;
    color: #202124 !important;
    border-bottom: 1px solid #eee !important;
    transition: background 0.1s !important;
}

.maplibregl-ctrl-geocoder--suggestion:hover,
.maplibregl-ctrl-geocoder li:hover,
.maptiler-ctrl-geocoder li:hover {
    background: #f1f3f4 !important;
}

.maplibregl-ctrl-geocoder--suggestion-title,
.primary {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #202124 !important;
    display: block !important;
    text-align: left !important;
}

.maplibregl-ctrl-geocoder--suggestion-address,
.secondary {
    font-size: 0.85rem !important;
    color: #70757a !important;
    font-weight: 500 !important;
    display: inline !important;
}

/* Icono clásico de marcador */
.maplibregl-ctrl-geocoder--suggestion::before,
.maplibregl-ctrl-geocoder li::before,
.maptiler-ctrl-geocoder li::before {
    content: "📍" !important;
    font-size: 1.1rem !important;
    filter: grayscale(100%) brightness(0.6) !important;
    opacity: 0.8 !important;
    margin-right: 5px !important;
    display: inline-block !important;
    background: none !important;
}

.maplibregl-ctrl-geocoder--icon-search,
.maplibregl-ctrl-geocoder--icon-close,
.maplibregl-ctrl-geocoder--button {
    display: none !important;
}

#geocoder-wrapper *, .maptiler-ctrl-geocoder *, .maplibregl-ctrl-geocoder * {
    outline: none !important;
    box-shadow: none !important;
}

/* Force hide all MapTiler Geocoder accessories (buttons, icons, clear, search) */
#geocoder-wrapper button, 
#geocoder-wrapper .maptiler-ctrl-icon, 
#geocoder-wrapper .maplibregl-ctrl-icon,
#geocoder-wrapper .maptiler-ctrl-geocoder-icon,
#geocoder-wrapper div[class*="button"],
#geocoder-wrapper span[class*="icon"],
#geocoder-wrapper svg,
.maptiler-ctrl-geocoder button,
.maptiler-ctrl-geocoder .maptiler-ctrl-icon {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Ensure the input itself takes the full space and remains visible */
#geocoder-wrapper input {
    background: transparent !important;
    border: none !important;
    width: 100% !important;
    padding-left: 10px !important;
}

/* Final and definitive fix for the white rectangle/border in the search bar */
#geocoder-wrapper, 
#geocoder-wrapper div,
#geocoder-wrapper form,
#geocoder-wrapper section,
#geocoder-wrapper input,
.maptiler-ctrl-geocoder, 
.maptiler-ctrl-geocoder form,
.maptiler-gc-input-container,
.maptiler-gc-root,
.maptiler-ctrl-geocoder--input,
.maplibregl-ctrl-geocoder,
.maplibregl-ctrl-geocoder form {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    border-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}

#geocoder-wrapper input:focus,
.maptiler-ctrl-geocoder input:focus,
.maplibregl-ctrl-geocoder input:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* 🟢 Restablecer fondo blanco SOLO para las sugerencias sin afectar la transparencia de la barra */
#geocoder-wrapper .maplibregl-ctrl-geocoder--results,
#geocoder-wrapper .maptiler-ctrl-geocoder--results,
#geocoder-wrapper .maptiler-gc-results,
#geocoder-wrapper ul,
#geocoder-wrapper li {
    background-color: white !important;
    background: white !important;
    border: 1px solid #ddd !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#geocoder-wrapper li:hover {
    background-color: #f1f3f4 !important;
    transform: none !important;
    transition: background 0.1s ease !important;
}

/* 🚫 Estabilización total: Eliminar cualquier movimiento, icono extra o recuadro blanco residual */
#geocoder-wrapper .maplibregl-ctrl-geocoder--results,
#geocoder-wrapper .maptiler-ctrl-geocoder--results,
#geocoder-wrapper .maptiler-gc-results,
#geocoder-wrapper ul,
#geocoder-wrapper li,
#geocoder-wrapper li *,
.maplibregl-ctrl-geocoder--suggestion,
.maplibregl-ctrl-geocoder li,
.maptiler-ctrl-geocoder li,
.maptiler-gc-item {
    transform: none !important;
    transition: background 0.1s ease !important;
    box-shadow: none !important;
}

#geocoder-wrapper li,
.maplibregl-ctrl-geocoder li,
.maptiler-ctrl-geocoder li,
.maptiler-gc-item {
    padding: 12px 15px !important; /* Padding idéntico en normal y hover */
    margin: 0 !important;
    border: none !important;
    border-bottom: 1px solid #eee !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Matar CUALQUIER icono o imagen de la librería para evitar duplicados y saltos */
#geocoder-wrapper li img,
#geocoder-wrapper li svg,
#geocoder-wrapper li span[class*="icon"],
#geocoder-wrapper li div[class*="icon"],
#geocoder-wrapper li .maptiler-gc-icon {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Asegurar que el texto no tenga fondos propios que creen "cuadros blancos" */
#geocoder-wrapper li .primary,
#geocoder-wrapper li .secondary,
#geocoder-wrapper li .texts,
#geocoder-wrapper li div {
    background: transparent !important;
    background-color: transparent !important;
}
