/* ==========================================
   Variables CSS
   ========================================== */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --background-color: #ecf0f1;
    --card-background: #ffffff;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* ==========================================
   Reset y Estilos Base
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   Header - Eliminado para pantalla completa
   ========================================== */

/* ==========================================
   Botones
   ========================================== */
button {
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-icon {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    position: relative;
}

.btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

#currentLang {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background-color: var(--accent-color);
    font-size: 0.6rem;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: bold;
}

/* ==========================================
   Main Layout
   ========================================== */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ==========================================
   Info Panel
   ========================================== */
.info-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
}

.info-panel .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.welcome-message h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.welcome-message p {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 600px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-badge.online {
    background-color: var(--success-color);
}

.status-badge.offline {
    background-color: var(--warning-color);
}

/* ==========================================
   Mapa
   ========================================== */
.map-container {
    position: relative;
    flex: 1;
    width: 100%;
    padding: 0;
    margin: 0;
}

#map {
    height: 100%;
    width: 100%;
    border-radius: 0;
    box-shadow: none;
    z-index: 1;
}

.map-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 500;
}

.map-controls .btn-icon {
    background-color: var(--card-background);
    color: var(--primary-color);
    box-shadow: var(--shadow);
}

.map-controls .btn-icon:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Selector de Tipo de Mapa */
.map-type-selector {
    position: relative;
}

.map-type-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 2px solid #333;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    min-width: 160px;
    overflow: hidden;
    margin-top: 5px;
}

.map-type-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #eee;
}

.map-type-option:last-child {
    border-bottom: none;
}

.map-type-option:hover {
    background-color: #f8f9fa;
}

.map-type-option.active {
    background-color: #3498db;
    color: white;
}

.map-type-option i {
    width: 16px;
    text-align: center;
}

/* ==========================================
   Leyenda
   ========================================== */
.legend {
    background-color: var(--card-background);
    padding: 2rem 0;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.legend h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
}

.legend-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.legend-marker.interest {
    background-color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* ==========================================
   Info Cards
   ========================================== */
.info-section {
    padding: 3rem 0;
    background-color: var(--background-color);
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.info-card {
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.info-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.info-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ==========================================
   Footer
   ========================================== */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 0;
    flex-shrink: 0;
}

footer p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ==========================================
   Loading
   ========================================== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.loading p {
    font-size: 1.2rem;
    margin-top: 1rem;
}

/* ==========================================
   Leaflet Customization
   ========================================== */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.leaflet-popup-content {
    margin: 1rem;
    font-size: 1rem;
}

.popup-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.popup-content p {
    color: var(--text-light);
    margin: 0.25rem 0;
}

.popup-content .popup-icon {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
    .welcome-message h2 {
        font-size: 1.5rem;
    }
    
    .welcome-message p {
        font-size: 1rem;
    }
    
    .info-panel .container {
        justify-content: center;
        text-align: center;
    }
    
    .map-controls {
        right: 15px;
        top: 15px;
    }
    
    .legend-items {
        flex-direction: column;
        gap: 1rem;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .btn-primary span {
        display: none;
    }
    
    .btn-primary {
        width: 45px;
        height: 45px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .info-panel {
        padding: 1.5rem 0;
    }
    
    .map-container {
        padding: 0;
    }
    
    #map {
        border-radius: 0;
    }
    
    .map-controls {
        right: 10px;
        top: 10px;
    }
    /* Modal de autenticación optimizado para móviles pequeños */
    .auth-modal-content {
        width: 92%;
        max-width: 420px;
        padding: 20px;
        margin: 0 auto;
    }
    .auth-buttons {
        flex-direction: column;
    }
    .auth-buttons .btn-primary,
    .auth-buttons .btn-secondary {
        width: 100%;
        padding: 12px;
    }
}

/* ==========================================
   Animaciones
   ========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 3px 15px rgba(52, 152, 219, 0.6);
    }
    50% {
        box-shadow: 0 3px 25px rgba(52, 152, 219, 0.9);
    }
    100% {
        box-shadow: 0 3px 15px rgba(52, 152, 219, 0.6);
    }
}

.info-card, .legend, .welcome-message {
    animation: fadeIn 0.6s ease-out;
}

/* ==========================================
   Estilos para geolocalización
   ========================================== */
.user-location-marker {
    animation: pulse 2s infinite;
}

.location-loading {
    backdrop-filter: blur(5px);
}

.location-message {
    font-weight: 500;
    max-width: 300px;
    word-wrap: break-word;
}

/* ==========================================
   Escala Gráfica
   ========================================== */
.leaflet-control-scale {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #333;
    border-radius: 6px;
    padding: 5px 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

.leaflet-control-scale-line {
    background: #333;
    border: 1px solid #fff;
    border-radius: 2px;
}

/* ==========================================
   Controles de Edición
   ========================================== */
.edit-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 500;
}

/* Botón Exportar PDF: negro con icono/letras rojas, tamaño compacto */
#exportPdfBtn {
    background-color: #000000;
    color: #e74c3c; /* rojo PDF */
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #e74c3c;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}

#exportPdfBtn:hover {
    background-color: #111111;
    transform: scale(1.07);
}

.edit-btn {
    background-color: var(--secondary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.edit-btn:hover {
    background-color: #2980b9;
    transform: scale(1.1);
}

.edit-btn.active {
    background-color: #e74c3c;
    animation: pulse 2s infinite;
}

/* ==========================================
   Panel de Edición
   ========================================== */
.edit-panel {
    position: fixed;
    bottom: 20px;
    right: 80px;
    width: 400px;
    max-height: 85vh;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow-y: auto;
}

/* Responsivo para móviles */
@media (max-width: 768px) {
    .edit-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        z-index: 1000;
    }
    
    .edit-controls {
        bottom: 15px;
        right: 15px;
    }
    
    .edit-btn {
        width: 45px;
        height: 45px;
    }
    
    .edit-panel-header {
        padding: 12px 15px;
    }
    
    .edit-panel-header h3 {
        font-size: 1rem;
    }
    
    /* Mostrar botón de minimizar en móviles */
    .minimize-btn {
        display: flex !important;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .minimize-btn i {
        font-size: 14px;
    }
    
    /* Estado minimizado del panel */
    .edit-panel.minimized {
        height: auto;
        max-height: 60px;
        overflow: hidden;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .edit-panel.minimized .edit-panel-content {
        display: none;
    }
    
    .edit-panel.minimized .edit-panel-header {
        border-radius: 12px;
        padding: 8px 15px;
    }
    
    .edit-panel.minimized .edit-panel-header h3 {
        font-size: 0.9rem;
    }
    
    .edit-panel.minimized .minimize-btn {
        width: 32px;
        height: 32px;
    }
    
    .edit-panel.minimized .minimize-btn i {
        font-size: 12px;
    }
    
    /* Indicador de panel minimizado */
    .edit-panel.minimized .edit-panel-header h3::after {
        content: " (minimizado)";
        font-size: 0.7rem;
        opacity: 0.8;
        font-weight: normal;
    }
    
    /* Hacer el panel minimizado más visible */
    .edit-panel.minimized {
        position: fixed;
        top: 20px;
        left: 20px;
        right: 20px;
        width: auto;
        z-index: 1001;
    }
    
    .edit-panel-content {
        padding: 15px;
    }
    
    /* Tabs responsivos */
    .edit-tabs {
        flex-wrap: wrap;
        gap: 5px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 80px;
        font-size: 0.8rem;
        padding: 8px 4px;
    }
    .edit-panel-header .btn-close {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    .edit-panel {
        overscroll-behavior: contain;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .edit-panel-content {
        padding-bottom: 16px;
    }
    
    /* Formularios responsivos */
    .add-form {
        padding: 0;
    }
    
    .add-form label {
        font-size: 0.9rem;
        margin-bottom: 8px;
        display: block;
    }
    
    .add-form input,
    .add-form textarea,
    .add-form select {
        font-size: 16px; /* Previene zoom en iOS */
        padding: 12px;
        width: 100%;
        border-radius: 6px;
        border: 2px solid #ddd;
        margin-bottom: 15px;
        box-sizing: border-box;
    }
    
    .add-form textarea {
        min-height: 80px;
        resize: vertical;
    }
    
    .add-form select {
        background-color: white;
        cursor: pointer;
    }
    
    /* Sección de coordenadas responsiva */
    .add-form div[style*="background"] {
        margin: 15px 0 !important;
        padding: 12px !important;
    }
    
    .add-form input[type="checkbox"] {
        width: auto;
        margin-right: 8px;
        margin-bottom: 0;
    }
    
    .add-form label[style*="display: flex"] {
        margin-bottom: 15px;
        padding: 10px;
        background: #f8f9fa;
        border-radius: 6px;
        cursor: pointer;
    }
    
    /* Botones responsivos */
    .add-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .add-actions button {
        width: 100%;
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .edit-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .edit-actions button {
        width: 100%;
        padding: 10px;
    }
    
    /* Lista de POIs responsiva */
    .poi-list {
        max-height: 300px;
        overflow-y: auto;
        border: 1px solid #ddd;
        border-radius: 6px;
        background: white;
    }
    
    .poi-list-item {
        padding: 12px;
        font-size: 0.9rem;
        border-bottom: 1px solid #eee;
        cursor: pointer;
        transition: background-color 0.2s;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .poi-list-item:last-child {
        border-bottom: none;
    }
    
    .poi-list-item:hover {
        background-color: #f8f9fa;
    }
    
    .poi-list-item.selected {
        background-color: #e3f2fd;
        border-left: 4px solid #2196f3;
    }
    
    .poi-name {
        font-weight: 600;
        color: #333;
    }
    
    .poi-details {
        font-size: 0.8rem;
        color: #666;
    }
    
    .poi-whatsapp {
        font-size: 0.8rem;
        color: #25d366;
        font-weight: 500;
    }
    
    /* Tab Editar responsivo */
    .poi-edit-section {
        padding: 0;
        margin-bottom: 20px;
    }
    
    .poi-edit-section label {
        font-size: 0.9rem;
        margin-bottom: 8px;
        display: block;
        font-weight: 500;
    }
    
    .poi-edit-section input,
    .poi-edit-section textarea {
        font-size: 16px;
        padding: 12px;
        width: 100%;
        border-radius: 6px;
        border: 2px solid #ddd;
        margin-bottom: 15px;
        box-sizing: border-box;
    }
    
    .poi-edit-section textarea {
        min-height: 80px;
        resize: vertical;
    }
    
    /* Vista previa de icono responsiva */
    .icon-preview {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 6px;
        margin-bottom: 15px;
    }
    
    .icon-preview i {
        font-size: 1.5rem;
        color: #3498db;
    }
    
    .icon-preview span {
        font-size: 0.9rem;
        color: #666;
    }
    
    /* Coordenadas responsivas */
    .coordinates-display {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .coordinates-display label {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }
    
    .coordinates-display input {
        font-size: 14px;
        padding: 8px;
        margin-bottom: 0;
    }
    
    /* Iconos responsivos */
    .icon-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .icon-option {
        padding: 8px;
        font-size: 1.2rem;
    }
    
    /* Modal de autenticación responsivo */
    .modal {
        padding: 15px;
    }
    
    .modal-content {
        width: 90%;
        max-width: 400px;
        margin: 10% auto;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .auth-form input {
        font-size: 16px; /* Previene zoom en iOS */
        padding: 12px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-actions button {
        width: 100%;
        padding: 12px;
    }
    
    /* Modal de galería de iconos responsivo */
    .icon-gallery {
        max-height: 70vh;
    }
    
    .icon-gallery .modal-content {
        max-height: 80vh;
        overflow-y: auto;
    }
    
    /* Botón de cerrar más grande en móviles */
    .close-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .edit-panel-header .close-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    /* Mejorar la usabilidad táctil */
    .tab-btn,
    .icon-option,
    .poi-list-item {
        min-height: 44px; /* Tamaño mínimo recomendado para touch */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .poi-list-item {
        justify-content: flex-start;
        padding-left: 15px;
    }
    
    /* Contenido general de tabs responsivo */
    .tab-content {
        padding: 0;
        margin-top: 15px;
    }
    
    .tab-content p {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 15px;
        color: #666;
    }
    
    /* Mejorar la sección de coordenadas */
    .tab-content div[style*="background: #e3f2fd"] {
        padding: 15px !important;
        margin: 15px 0 !important;
        border-radius: 8px !important;
        border-left: 4px solid #2196f3 !important;
    }
    
    .tab-content div[style*="background: #e3f2fd"] strong {
        font-size: 1rem;
        color: #1976d2;
        margin-bottom: 10px;
        display: block;
    }
    
    .tab-content div[style*="background: #e3f2fd"] label {
        margin-bottom: 8px !important;
        font-size: 0.9rem !important;
    }
    
    .tab-content div[style*="background: #e3f2fd"] input {
        width: 100% !important;
        padding: 10px !important;
        font-size: 16px !important;
        margin-bottom: 8px !important;
        box-sizing: border-box !important;
    }
    
    .tab-content div[style*="background: #e3f2fd"] small {
        font-size: 0.8rem !important;
        color: #666 !important;
        line-height: 1.3 !important;
    }
    
    /* Mejorar el toggle de coordenadas */
    .tab-content div[style*="background: #f8f9fa"] {
        padding: 12px !important;
        margin: 15px 0 !important;
        border-radius: 8px !important;
        border: 1px solid #dee2e6 !important;
    }
    
    .tab-content label[style*="display: flex"] {
        margin-bottom: 0 !important;
        padding: 8px !important;
        cursor: pointer;
        border-radius: 4px;
        transition: background-color 0.2s;
    }
    
    .tab-content label[style*="display: flex"]:hover {
        background-color: #e9ecef !important;
    }
}

/* Responsivo para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .edit-panel {
        width: 350px;
        right: 20px;
    }
    
    .edit-controls {
        bottom: 20px;
        right: 20px;
    }
    
    .edit-btn {
        width: 50px;
        height: 50px;
    }
    
    .add-form input,
    .add-form textarea,
    .add-form select {
        font-size: 16px;
    }
    
    .tab-btn {
        font-size: 0.85rem;
        padding: 10px 8px;
    }
    
    .icon-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.edit-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    border-radius: 12px 12px 0 0;
}

.panel-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.minimize-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    font-size: 14px;
}

.minimize-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.minimize-btn i {
    font-size: 12px;
}

.edit-panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.edit-panel-content {
    padding: 20px;
}

.edit-panel-content p {
    margin-bottom: 15px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.selected-poi {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 2px solid var(--secondary-color);
}

.selected-poi h4 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

.coordinates {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.coordinates label {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 600;
}

.coordinates input {
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-top: 5px;
    transition: var(--transition);
}

.coordinates input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.edit-help {
    background: #e8f4f8;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.edit-help p {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: var(--primary-color);
}

.edit-help ul {
    margin: 0;
    padding-left: 20px;
}

.edit-help li {
    margin: 5px 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Estilos para marcadores en modo edición */
.marker-editable {
    cursor: move !important;
    opacity: 0.8;
    transition: var(--transition);
}

.marker-editable:hover {
    opacity: 1;
    transform: scale(1.1);
}

.marker-selected {
    z-index: 1000 !important;
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.8) !important;
}

/* ==========================================
   Modal de Autenticación
   ========================================== */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.auth-modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 400px;
    max-width: 90%;
    text-align: center;
}

.auth-modal h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-form input {
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.auth-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.auth-error {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 10px;
    display: none;
}

.auth-error.show {
    display: block;
}

/* ==========================================
   Tabs de Edición
   ========================================== */
.edit-tabs {
    display: flex;
    border-bottom: 2px solid #e1e8ed;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ==========================================
   Formularios de Edición
   ========================================== */
.poi-edit-section {
    margin: 15px 0;
}

.poi-edit-section label {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.poi-edit-section input,
.poi-edit-section textarea,
.poi-edit-section select {
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-top: 5px;
    transition: var(--transition);
}

.poi-edit-section input:focus,
.poi-edit-section textarea:focus,
.poi-edit-section select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.poi-edit-section textarea {
    resize: vertical;
    min-height: 60px;
}

/* ==========================================
   Icon Preview y Gallery
   ========================================== */
.icon-preview {
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    color: white;
    font-size: 1.2rem;
}

.icon-gallery {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.icon-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    border-radius: 12px 12px 0 0;
}

.icon-gallery-content {
    background: white;
    padding: 20px;
    border-radius: 0 0 12px 12px;
    max-width: 500px;
    width: 90%;
    max-height: 70vh;
    overflow-y: auto;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 15px;
    padding: 10px 0;
}

.icon-option {
    width: 50px;
    height: 50px;
    background: var(--background-color);
    border: 2px solid #e1e8ed;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
    color: var(--text-color);
}

.icon-option:hover {
    background: var(--secondary-color);
    color: white;
    transform: scale(1.1);
}

.icon-option.selected {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* ==========================================
   Lista de POIs
   ========================================== */
.manage-header {
    margin-bottom: 15px;
}

.manage-header p {
    margin: 0;
}

.poi-list {
    max-height: 300px;
    overflow-y: auto;
}

.poi-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: var(--transition);
}

.poi-list-item:hover {
    background: #f8f9fa;
}

.poi-list-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.poi-list-item-icon {
    width: 30px;
    height: 30px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.poi-list-item-actions {
    display: flex;
    gap: 5px;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* ==========================================
   Formulario de Agregar
   ========================================== */
.add-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.add-form label {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    color: var(--text-color);
}

.add-form input,
.add-form textarea,
.add-form select {
    padding: 10px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-top: 5px;
    transition: var(--transition);
}

.add-form input:focus,
.add-form textarea:focus,
.add-form select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.add-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {
    footer, .map-controls, .info-panel, .info-section, .legend {
        display: none;
    }
    
    #map {
        height: 100vh;
        box-shadow: none;
    }
}


