/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header Principal - Estilo Grove */
.main-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 24px;
    height: 64px;
    z-index: 1000;
}

.header-container {
    max-width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: #0f172a;
    cursor: pointer;
}

.logo svg {
    color: #0f172a;
}

.logo-text {
    font-weight: 600;
}

.main-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: #0f172a;
    background-color: #f8fafc;
}

.nav-link.active {
    color: #0f172a;
    background-color: #f1f5f9;
}

.header-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    color: #0f172a;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.header-btn:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.inbox-btn {
    position: relative;
}

.badge {
    background-color: #0f172a;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Banner Promocional */
.promo-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.promo-banner svg:last-child {
    margin-left: 4px;
}

/* Main Container */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Panel Izquierdo (40%) - Lista */
.list-panel {
    width: 40%;
    background-color: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Search Section */
.search-section {
    padding: 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.results-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Toggle Switch Estilo Grove */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #e5e7eb;
    border-radius: 24px;
    transition: background-color 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #0f172a;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.filter-button {
    padding: 8px 16px;
    background-color: #ffffff;
    color: #0f172a;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
}

.filter-button:hover {
    border-color: #0f172a;
    background-color: #f8fafc;
}

.filter-button.active {
    background-color: #0f172a;
    color: white;
    border-color: #0f172a;
}

.filter-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: #3b82f6;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 11px 40px 11px 44px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    background-color: #f8fafc;
}

.search-input:focus {
    border-color: #0f172a;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.05);
}

.clear-icon {
    position: absolute;
    right: 14px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.clear-icon:hover {
    color: #64748b;
}

.filter-section {
    padding: 16px;
    background-color: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

.filter-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background-color: white;
    cursor: pointer;
    color: #0f172a;
}

.filter-select:focus {
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.05);
}

/* Lista Scrollable */
.list-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background-color: #ffffff;
}

.list-scroll::-webkit-scrollbar {
    width: 6px;
}

.list-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.list-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.list-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Billboard Item - Estilo Grove */
.billboard-item {
    padding: 20px;
    background-color: white;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background-color 0.15s ease;
    position: relative;
}

.billboard-item:hover {
    background-color: #fafbfc;
}

.billboard-item.selected {
    background-color: #f0f9ff;
    border-left: 3px solid #0ea5e9;
}

.billboard-content {
    display: flex;
    gap: 16px;
    align-items: start;
}

/* Avatar circular */
.billboard-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 20px;
    position: relative;
}

/* Checkmark de verificación */
.billboard-verified {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background-color: #0ea5e9;
    border-radius: 50%;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.billboard-verified svg {
    width: 12px;
    height: 12px;
    color: white;
}

.billboard-info {
    flex: 1;
    min-width: 0;
}

.billboard-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.billboard-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.billboard-location {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}

.billboard-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.billboard-tag {
    font-size: 13px;
    color: #64748b;
}

.billboard-details {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.billboard-price {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.billboard-status {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

.billboard-status.disponible {
    background-color: #dcfce7;
    color: #166534;
}

.billboard-status.ocupada {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Iconos de acción - Estilo Grove */
.billboard-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-left: auto;
    padding-left: 16px;
}

.action-icon {
    width: 20px;
    height: 20px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
}

.action-icon:hover {
    color: #0f172a;
    transform: scale(1.1);
}

.action-icon.favorited {
    color: #ef4444;
    fill: #ef4444;
}

/* Panel Derecho (60%) - Mapa */
.map-panel {
    width: 60%;
    position: relative;
    background-color: #dbeafe;
}

.map {
    width: 100%;
    height: 100%;
}

/* Botón de navegación */
.map-back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background-color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.2s;
}

.map-back-btn:hover {
    background-color: #f8fafc;
    transform: scale(1.05);
}

/* Controles de zoom personalizados */
.map-zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 1000;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    background-color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.zoom-btn:first-child {
    border-radius: 8px 8px 0 0;
}

.zoom-btn:last-child {
    border-radius: 0 0 8px 8px;
}

.zoom-btn:hover {
    background-color: #f8fafc;
}

.zoom-btn svg {
    color: #0f172a;
}

/* Ocultar controles de zoom por defecto de Leaflet */
.leaflet-control-zoom {
    display: none !important;
}

/* Leyenda del Mapa */
.map-legend {
    position: absolute;
    bottom: 24px;
    right: 24px;
    background-color: white;
    padding: 16px 18px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    font-size: 13px;
    z-index: 1000;
}

.legend-title {
    font-weight: 600;
    margin-bottom: 14px;
    color: #0f172a;
    font-size: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.legend-available {
    background-color: #0ea5e9;
}

.legend-occupied {
    background-color: #ef4444;
}

.legend-selected {
    background-color: #10b981;
}

.legend-item span {
    color: #64748b;
    font-size: 13px;
}

/* Popup personalizado */
.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    padding: 0 !important;
}

/* Polígonos de provincias - sin contorno */
.leaflet-interactive {
    stroke: none !important;
    border: none !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.leaflet-popup-tip {
    box-shadow: 0 3px 14px rgba(0,0,0,.15) !important;
}

/* Footer Estilo Grove */
.footer {
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 14px 24px;
    font-size: 13px;
    color: #64748b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-copyright {
    color: #64748b;
}

.footer-separator {
    color: #cbd5e1;
}

.footer-link {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #0f172a;
}

.footer-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

.footer-dropdown {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: transparent;
    border: none;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.footer-dropdown:hover {
    background-color: #f8fafc;
    color: #0f172a;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-nav {
        display: none;
    }
    
    .main-container {
        flex-direction: column;
    }
    
    .list-panel,
    .map-panel {
        width: 100%;
    }
    
    .list-panel {
        height: 50%;
    }
    
    .map-panel {
        height: 50%;
    }
}

@media (max-width: 768px) {
    .logo-text {
        display: none;
    }
    
    .header-btn span:not(.badge) {
        display: none;
    }
    
    .toggle-label {
        display: none;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-left {
        flex-wrap: wrap;
    }
    
    .footer-right {
        display: none;
    }
}