/**
 * REGISTRO DE SÍNTOMAS - Estilos de la Aplicación
 * 
 * @author Agustín Fonts Cavestany
 * @copyright 2025 Agustín Fonts Cavestany
 * @license CC BY 4.0 - Creative Commons Atribución 4.0 Internacional
 * 
 * Derechos cedidos a: Asociación Española NMO y MOGAD
 * 
 * Esta aplicación se distribuye bajo licencia Creative Commons BY 4.0
 * https://creativecommons.org/licenses/by/4.0/deed.es
 */

/* Reset y configuración básica *//* Reset y configuración básica */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

header h1 {
    margin: 0 0 10px 0;
    font-size: 1.8em;
}

.subtitle {
    margin: 0;
    font-size: 1em;
    opacity: 0.95;
    font-weight: normal;
    margin-bottom: 20px;
}
.user-info {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 5px;
    margin: 0;
    font-size: 0.9em;
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .header-content > div:first-child {
        text-align: center;
    }
    
    .header-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .welcome-btn,
    .logout-btn {
        width: 100%;
    }
    
    header h1 {
        margin-bottom: 10px;
    }
    
    .subtitle {
        margin-bottom: 15px;
    }
}

/* Cards */
.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease;
}

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

.card h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

/* Grid de síntomas */
.symptom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.symptom-btn, .location-btn {
    padding: 15px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    text-align: left;
}

.symptom-btn:hover, .location-btn:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.symptom-btn.selected, .location-btn.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
    font-weight: bold;
}

/* Grid de localización */
.location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

/* Información seleccionada */
.selected-info {
    margin-top: 15px;
    padding: 12px;
    background: #e8f5e9;
    border-radius: 8px;
    color: #2e7d32;
    font-weight: bold;
    display: none;
}

.selected-info.show {
    display: block;
}

/* Intensidad */
.intensity-container {
    text-align: center;
    padding: 20px;
}

#intensity-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #4caf50, #ffc107, #f44336);
    outline: none;
    -webkit-appearance: none;
}

#intensity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: white;
    border: 3px solid #667eea;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#intensity-slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: white;
    border: 3px solid #667eea;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.intensity-display {
    margin-top: 20px;
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
}

/* Observaciones */
#notes {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
}

#notes:focus {
    outline: none;
    border-color: #667eea;
}

/* Botón guardar */
.save-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 20px;
    transition: transform 0.2s ease;
}

.save-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

/* Botón exportar */
.export-btn {
    padding: 12px 24px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    margin-bottom: 15px;
    transition: background 0.3s ease;
}

.export-btn:hover {
    background: #45a049;
}

/* Historial */
#history-list {
    margin-top: 15px;
}

.history-item {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: bold;
    color: #667eea;
}

.history-item-details {
    color: #666;
    font-size: 0.9em;
    line-height: 1.6;
}

.delete-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85em;
}

.delete-btn:hover {
    background: #da190b;
}
/* Selector de fecha */
.date-container {
    text-align: center;
    padding: 10px;
}

#symptom-date {
    width: 100%;
    max-width: 300px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.1em;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

#symptom-date:focus {
    outline: none;
    border-color: #667eea;
}

.date-help {
    margin-top: 10px;
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}
/* Login Screen */
#login-screen {
    max-width: 500px;
    margin: 100px auto;
}

.login-card {
    text-align: center;
}

.login-form {
    padding: 20px 0;
}

#user-email {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.2em;
}

#user-email:focus {
    outline: none;
    border-color: #667eea;
}

#access-code {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.2em;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 15px;
}

#access-code:focus {
    outline: none;
    border-color: #667eea;
}

.login-help {
    margin-top: 15px;
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

/* Header con logout */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.logout-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: white;
    color: #667eea;
}

.user-info {
    color: white;
    font-size: 0.9em;
    opacity: 0.9;
}

/* Filtros de exportación */
.export-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.date-filter-group {
    flex: 1;
    min-width: 200px;
}

.date-filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #667eea;
}

.date-filter-group input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
}

.date-filter-group input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
}
/* Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .symptom-grid {
        grid-template-columns: 1fr;
    }
    
    .location-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Animación de éxito */
@keyframes success {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.success-animation {
    animation: success 0.5s ease;
}
/* ========== ESTILOS DEL PANEL DE ADMINISTRACIÓN ========== */

/* Tabs de navegación */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.tab-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Contenido de tabs */
.tab-content {
    display: none;
}

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

/* Formulario de códigos */
.code-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#new-code,
#new-email {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.1em;
}

#new-code {
    text-transform: uppercase;
}

#new-code:focus,
#new-email:focus {
    outline: none;
    border-color: #667eea;
}

/* Lista de códigos */
#codes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.code-item {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-info {
    flex: 1;
}

.code-name {
    font-weight: bold;
    font-size: 1.2em;
    color: #667eea;
    margin-bottom: 5px;
}

.code-date {
    font-size: 0.85em;
    color: #666;
}

.code-actions {
    display: flex;
    gap: 5px;
}

.edit-code-btn, .delete-code-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.edit-code-btn {
    background: #ffc107;
    color: white;
}

.edit-code-btn:hover {
    background: #ffb300;
}

.delete-code-btn {
    background: #f44336;
    color: white;
}

.delete-code-btn:hover {
    background: #da190b;
}

/* Controles de exportación */
.export-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #e8f5e9;
    border-radius: 8px;
}

.export-info {
    color: #2e7d32;
    font-weight: bold;
    margin: 0;
}

#export-all-csv-btn {
    background: #4caf50;
    padding: 12px 24px;
}

#export-all-csv-btn:hover {
    background: #45a049;
}

/* Filtros */
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #667eea;
    font-size: 0.9em;
}

.filter-group select,
.filter-group input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
}

.filter-group select:focus,
.filter-group input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
}

.filter-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #5568d3;
}

.filter-btn-secondary {
    padding: 10px 20px;
    background: #999;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn-secondary:hover {
    background: #777;
}

/* Lista de todos los registros */
#all-records-list {
    max-height: 600px;
    overflow-y: auto;
}

.admin-record-item {
    background: #fff;
    border: 2px solid #e0e0e0;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.admin-record-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.admin-record-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.admin-record-patient {
    font-weight: bold;
    color: #667eea;
    font-size: 1.1em;
}

.admin-record-date {
    color: #666;
    font-size: 0.95em;
}

.admin-record-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.admin-record-field {
    padding: 8px;
    background: #f9f9f9;
    border-radius: 5px;
}

.admin-record-field strong {
    color: #667eea;
    display: block;
    margin-bottom: 3px;
    font-size: 0.9em;
}

/* Mensaje de sin datos */
.no-data-message {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1em;
}

/* Responsive para admin */
@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .export-controls {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    #codes-list {
        grid-template-columns: 1fr;
    }
    
    .admin-record-body {
        grid-template-columns: 1fr;
    }
}

/* Animación de carga */
.loading {
    text-align: center;
    padding: 20px;
    color: #667eea;
    font-style: italic;
}

/* Contador de registros */
#total-records {
    font-size: 1.2em;
    color: #2e7d32;
}
/* ========== GESTIÓN DE SÍNTOMAS ========== */

.symptom-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

#new-symptom-name {
    flex: 2;
    min-width: 200px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
}

#new-symptom-emoji {
    flex: 0.5;
    min-width: 80px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.5em;
    text-align: center;
}

#new-symptom-name:focus,
#new-symptom-emoji:focus {
    outline: none;
    border-color: #667eea;
}

.help-text {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
    margin-top: 10px;
}

#symptoms-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.symptom-item {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.symptom-item.special {
    border-left-color: #ffc107;
    background: #fff9e6;
}

.symptom-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.symptom-emoji {
    font-size: 2em;
}

.symptom-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
}

.symptom-actions {
    display: flex;
    gap: 5px;
}

.move-up-btn, .move-down-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    background: #2196F3;
    color: white;
    transition: all 0.3s ease;
}

.move-up-btn:hover, .move-down-btn:hover {
    background: #1976D2;
}

/* Campo de síntoma personalizado */
#custom-symptom-section {
    margin-top: 15px;
    animation: slideIn 0.3s ease;
}

#custom-symptom-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ffc107;
    border-radius: 10px;
    font-size: 1.1em;
    background: #fff9e6;
}

#custom-symptom-input:focus {
    outline: none;
    border-color: #ff9800;
}

/* Responsive para síntomas */
@media (max-width: 768px) {
    .symptom-form {
        flex-direction: column;
    }
    
    #new-symptom-name,
    #new-symptom-emoji {
        width: 100%;
    }
    
    #symptoms-list {
        grid-template-columns: 1fr;
    }
}
/* ========== MEJORAS DE LOCALIZACIÓN ========== */

.special-location {
    background: #fff9e6 !important;
    border-color: #ffc107 !important;
    font-weight: bold;
}

.special-location:hover {
    background: #fff3cd !important;
    border-color: #ff9800 !important;
}

.skip-btn {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    background: #9e9e9e;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skip-btn:hover {
    background: #757575;
}

.skip-btn:active {
    background: #616161;
}
#custom-location-section {
    animation: slideIn 0.3s ease;
}

#custom-location-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ffc107;
    border-radius: 10px;
    font-size: 1.1em;
    background: #fff9e6;
}

#custom-location-input:focus {
    outline: none;
    border-color: #ff9800;
}
/* ========== SELECTOR DE MÚLTIPLES FECHAS ========== */

.date-selection-mode {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.radio-option input[type="radio"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.radio-option input[type="radio"]:checked + span {
    font-weight: bold;
    color: #667eea;
}

.radio-option:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: #f0f4ff;
}

.date-picker-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#date-picker-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
}

#date-picker-input:focus {
    outline: none;
    border-color: #667eea;
}

.add-date-btn {
    padding: 12px 20px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.add-date-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.add-date-btn:active {
    transform: translateY(0);
}

#selected-dates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background: #e8f5e9;
    border-radius: 8px;
    min-height: 60px;
}

#selected-dates-list:empty::before {
    content: 'No has añadido fechas todavía';
    color: #999;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.date-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #4caf50;
    color: white;
    border-radius: 20px;
    font-size: 0.95em;
    font-weight: bold;
    animation: slideIn 0.3s ease;
}

.date-tag button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.date-tag button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dates-count {
    width: 100%;
    text-align: center;
    color: #2e7d32;
    font-weight: bold;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #c8e6c9;
}

/* Responsive para selector de fechas */
@media (max-width: 600px) {
    .date-selection-mode {
        flex-direction: column;
        gap: 10px;
    }
    
    .date-picker-controls {
        flex-direction: column;
    }
    
    .add-date-btn {
        width: 100%;
    }
}
/* ========== FOOTER CON INFORMACIÓN DE LICENCIA ========== */

.app-footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    margin-top: auto;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-copyright {
    font-size: 0.9em;
    margin: 0 0 10px 0;
    opacity: 0.95;
}

.footer-license {
    margin: 10px 0;
}

.footer-license a {
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    transition: border-color 0.3s ease;
}

.footer-license a:hover {
    border-bottom-color: white;
}

.footer-disclaimer {
    font-size: 0.85em;
    margin: 15px 0 0 0;
    opacity: 0.8;
    font-style: italic;
}

#app-screen,
#login-screen,
#welcome-screen,
#admin-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#app-screen main,
#login-screen main,
#welcome-screen main,
#admin-screen main {
    flex: 1;
}


@media (max-width: 600px) {
    .app-footer {
        padding: 20px 15px;
        margin-top: 30px;
    }
    
    .footer-copyright,
    .footer-license,
    .footer-disclaimer {
        font-size: 0.8em;
    }
}
/* Responsive footer */
@media (max-width: 600px) {
    .app-footer {
        padding: 20px 15px;
    }
    
    .footer-copyright,
    .footer-license,
    .footer-disclaimer {
        font-size: 0.85em;
    }
}
/* ========== SELECCIÓN MÚLTIPLE DE LOCALIZACIONES ========== */

.multi-select-help {
    color: #666;
    font-size: 0.95em;
    font-style: italic;
    margin-bottom: 15px;
    text-align: center;
    background: #f0f4ff;
    padding: 10px;
    border-radius: 8px;
}

.selected-locations-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding: 15px;
    background: #e8f5e9;
    border-radius: 8px;
    min-height: 50px;
}

.selected-locations-list:empty {
    display: none;
}

.location-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #4caf50;
    color: white;
    border-radius: 20px;
    font-size: 0.95em;
    font-weight: bold;
    animation: slideIn 0.3s ease;
}

.location-tag button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.location-tag button:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

.confirm-btn {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-btn:hover {
    background: #45a049;
}

.confirm-btn:active {
    background: #3d8b40;
}

.add-custom-btn {
    margin-top: 10px;
    padding: 10px 15px;
    background: #ffc107;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.add-custom-btn:hover {
    background: #ffb300;
}

/* Responsive para localizaciones múltiples */
@media (max-width: 600px) {
    .location-actions {
        flex-direction: column;
    }
    
    .confirm-btn,
    .skip-btn {
        width: 100%;
    }
}
/* ========== PANTALLA DE BIENVENIDA ========== */

.welcome-intro {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.welcome-note {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
    line-height: 1.6;
    margin-top: 15px;
}

/* Formulario de perfil */
.profile-form {
    margin: 20px 0;
}

.form-group {
    margin-bottom: 25px;
}

.form-group > label {
    display: block;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.05em;
}

.profile-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.profile-input:focus {
    outline: none;
    border-color: #667eea;
}

.field-help {
    display: block;
    color: #999;
    font-size: 0.85em;
    margin-top: 5px;
    font-style: italic;
}

/* Radio buttons del perfil */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.radio-option-profile:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.radio-option-profile input[type="radio"] {
    cursor: pointer;
    width: 20px;
    height: 20px;
}

.radio-option-profile input[type="radio"]:checked + span {
    font-weight: bold;
    color: #667eea;
}

.radio-option-profile:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: #f0f4ff;
}

/* Recursos */
.resources-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.resource-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resource-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.resource-icon {
    font-size: 2.5em;
    flex-shrink: 0;
}

.resource-info {
    flex: 1;
}

.resource-info strong {
    display: block;
    color: #333;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.resource-info p {
    color: #666;
    font-size: 0.95em;
    margin: 5px 0;
}

.resource-link {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
    margin-top: 5px;
    transition: color 0.3s ease;
}

.resource-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* Responsive para bienvenida */
@media (max-width: 600px) {
    .radio-group {
        gap: 8px;
    }
    
    .resource-item {
        flex-direction: column;
        text-align: center;
    }
    
    .resource-icon {
        font-size: 2em;
    }
}
/* ========== MEJORAS PANTALLA BIENVENIDA ========== */

/* Checkboxes para enfermedades */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-option-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.checkbox-option-profile:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.checkbox-option-profile input[type="checkbox"] {
    cursor: pointer;
    width: 20px;
    height: 20px;
}

.checkbox-option-profile input[type="checkbox"]:checked + span {
    font-weight: bold;
    color: #667eea;
}

.checkbox-option-profile:has(input[type="checkbox"]:checked) {
    border-color: #667eea;
    background: #f0f4ff;
}

/* Botones del header */
.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.welcome-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: all 0.3s ease;
}

.welcome-btn:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
}

/* Botón para volver a la app desde bienvenida */
.back-to-app-btn {
    width: 100%;
    padding: 12px;
    background: #9e9e9e;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.back-to-app-btn:hover {
    background: #757575;
}

/* Responsive para header */
@media (max-width: 600px) {
    .header-buttons {
        flex-direction: column;
        gap: 5px;
    }
    
    .welcome-btn,
    .logout-btn {
        width: 100%;
        padding: 8px 15px;
    }

/* ID anónimo destacado */
.anonymous-id {
    font-family: 'Courier New', monospace;
    background: #e3f2fd;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    color: #1976d2;
}    
}
.export-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.export-info-box {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.export-info {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

.export-info span {
    font-weight: bold;
    color: #667eea;
    font-size: 1.2em;
}

.export-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.export-btn {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.export-btn:active {
    transform: translateY(0);
}

.export-btn-primary {
    background: #4caf50;
    color: white;
}

.export-btn-primary:hover {
    background: #45a049;
}

.export-btn-warning {
    background: #ff9800;
    color: white;
}

.export-btn-warning:hover {
    background: #f57c00;
}

.export-btn-danger {
    background: #f44336;
    color: white;
}

.export-btn-danger:hover {
    background: #d32f2f;
}

.export-warning {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
}

.warning-icon {
    font-size: 1.5em;
    flex-shrink: 0;
}

.export-warning p {
    margin: 0;
    color: #856404;
    line-height: 1.5;
}

.export-warning strong {
    color: #664d03;
}

@media (max-width: 768px) {
    .export-buttons-grid {
        grid-template-columns: 1fr;
    }
    
    .export-section {
        padding: 15px;
    }
    
    .export-warning {
        flex-direction: column;
        gap: 10px;
    }
    /* ========== MEJORAS DE ESPACIADO EN HEADERS ========== */

.header-text {
    flex: 1;
    margin-right: 20px;
}

.header-text h1 {
    margin: 0 0 8px 0;
}

.header-text .subtitle {
    margin: 0;
    padding-bottom: 10px;
}

/* Asegurar que footers estén siempre abajo */
#app-screen,
#welcome-screen,
#admin-screen {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#app-screen main,
#welcome-screen main,
#admin-screen main {
    flex: 1;
}

/* Responsive para headers */
@media (max-width: 600px) {
    .header-text {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: center;
    }
    
    .header-buttons {
        width: 100%;
    }
}
}