/* ResQ - Estilos Centralizados */
/* Aplicación para Socorristas */

/* === RESET Y BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* === VARIABLES CSS === */
:root {
    /* === SISTEMA MINIMALISTA === */
    --primary-color: #D33E22;
    --primary-dark: #B5321C;
    --secondary-color: #f5f5f5;
    
    /* === COLORS MINIMAL === */
    --text-color: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --text-required: #D33E22;
    
    /* === STATUS COLORS === */
    --success-color: #2e7d32;
    --success-bg: #e8f5e8;
    --error-color: #c62828;
    --error-bg: #ffebee;
    --warning-color: #f57c00;
    --warning-bg: #fff3e0;
    --info-color: #1976d2;
    --info-bg: #e3f2fd;
    
    /* === MINIMAL SYSTEM === */
    --border-color: #e0e0e0;
    --border-light: #f0f0f0;
    --bg-white: #ffffff;
    --bg-gray: #fafafa;
    --bg-section: #ffffff;
    
    /* === SHADOWS MINIMAL === */
    --shadow-subtle: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.12);
    
    /* === SPACING SYSTEM (8px base) === */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;
    
    /* === BORDER RADIUS MINIMAL === */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* === TRANSITIONS MINIMAL === */
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.25s ease;
    
    /* === TYPOGRAPHY SCALE === */
    --font-size-sm: 14px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --line-height-tight: 1.3;
    --line-height-normal: 1.5;
}

/* === LAYOUT GENERAL === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-small {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* === HEADER MODERNO REDISEÑADO === */
.header {
    background: #D33E22;
    color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border-radius: 12px;
    margin: 10px auto 0;
    max-width: 1200px;
    display: flex;
    align-items: center;
    padding: 16px;
}

.header-content {
    width: 100%;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img.header-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.header-title {
    flex: 1;
    text-align: center;
}

.header-title h1 {
    font-size: 20px;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0;
    font-family: -apple-system, Roboto, 'Segoe UI', sans-serif;
}

.header-actions {
    display: flex;
    align-items: center;
}

.btn-logout {
    background: transparent;
    color: #FFFFFF;
    border: none;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.1);
}

.btn-logout svg {
    width: 24px;
    height: 24px;
}

/* === BOTONES === */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius-small);
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* === FORMULARIOS MODERNOS (ESTILO AIRBNB) === */
.form-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.form {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 6px 40px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.04);
}

/* === FORM GROUPS MINIMAL === */
.form-group {
    margin-bottom: var(--space-md);
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    color: var(--text-color);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-md);
    line-height: var(--line-height-tight);
}

.form-group label.required::after {
    content: ' *';
    color: var(--text-required);
    font-weight: var(--font-weight-semibold);
}

input {
    padding: 5px;
    font-family: Tahoma;
    border-radius: 4px;
    border-width: 1px;
    border-style: solid;
}

input#ubicacion {
    width: 100%;
}

/* === INPUTS MINIMAL === */
.form-input, 
.form select, 
.form textarea,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-size-md);
    font-family: inherit;
    background: var(--bg-white);
    color: var(--text-color);
    transition: var(--transition-fast);
    line-height: var(--line-height-normal);
    outline: none;
}

.form-input:hover, 
.form select:hover, 
.form textarea:hover,
input:hover,
select:hover,
textarea:hover {
    border-color: var(--text-light);
}

.form-input:focus, 
.form select:focus, 
.form textarea:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(211, 62, 34, 0.1);
}

.form-input-center {
    text-align: center;
}

/* === FORM HELP MINIMAL === */
.form-help {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    margin-top: var(--space-xs);
    line-height: var(--line-height-normal);
}

/* === CONTEXT INFO COLLAPSIBLE === */
.context-info {
    width: 100%;
}

.context-info summary {
    padding: var(--space-sm) 0;
    cursor: pointer;
    color: var(--text-light);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    list-style: none;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: var(--space-md);
    transition: var(--transition-fast);
}

.context-info summary:hover {
    color: var(--text-color);
}

.context-info summary::-webkit-details-marker {
    display: none;
}

.context-info summary::before {
    content: '▶';
    margin-right: var(--space-sm);
    transition: var(--transition-fast);
    display: inline-block;
    font-size: 10px;
    color: var(--text-muted);
}

.context-info[open] summary::before {
    transform: rotate(90deg);
}

.context-info[open] summary {
    margin-bottom: var(--space-lg);
    color: var(--text-color);
}

/* Inputs especiales */
input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 3rem;
}

textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

/* === FORM ACTIONS MINIMAL === */
.form-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-light);
}

.form-actions .btn {
    flex: 1;
    max-width: 200px;
    padding: var(--space-md) var(--space-lg);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
}

.form-actions .btn:hover {
    box-shadow: var(--shadow-hover);
}

/* === TARJETAS === */
.card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.card-header {
    margin-bottom: 1rem;
}

.card-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* === GRID DE FORMULARIOS REDISEÑADO === */
.forms-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.form-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #D33E22;
    margin: 16px 0 8px 0;
    padding: 0;
}

.form-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.form-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.form-card-image {
    flex-shrink: 0;
}

.form-card-image img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border-radius: 8px;
}

.form-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-card-description {
    font-size: 14px;
    font-weight: 400;
    color: #555555;
    line-height: 18px;
    margin: 0;
}

.form-card-button {
    width: 120px;
    height: 36px;
    background: #D33E22;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
    transition: background-color 0.2s ease;
}

.form-card-button:hover {
    background: #B5321C;
}

.form-card-button svg {
    width: 16px;
    height: 16px;
}

/* === LAYOUT PRINCIPAL === */
.main-content {
    min-height: calc(100vh - 120px);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem 0;
    border-radius: 10px;
}

/* === MENSAJES MODERNOS === */
.message {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    border: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    animation: slideIn 0.3s ease-out;
}

.message.success {
    color: #1b5e20;
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border-left: 4px solid var(--success-color);
}

.message.error {
    color: #b71c1c;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-left: 4px solid var(--error-color);
}

.message-success {
    color: var(--success-color);
    background: var(--success-bg);
    border-left-color: var(--success-color);
}

.message-error {
    color: var(--error-color);
    background: var(--error-bg);
    border-left-color: var(--error-color);
}

.message-warning {
    color: var(--warning-color);
    background: var(--warning-bg);
    border-left-color: var(--warning-color);
}

.message-info {
    color: var(--info-color);
    background: var(--info-bg);
    border-left-color: var(--info-color);
}

/* === DETALLES DE USUARIO ELIMINADOS === */
/* Sección eliminada - ya no se muestra información detallada del usuario */

/* === PÁGINAS ESPECÍFICAS === */

/* LOGIN PAGE */
.login-page {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Logo en páginas de login - 150px de ancho */
img.logo-image {
    width: 150px;
    height: auto;
    max-width: 150px;
    max-height: none;
    object-fit: contain;
    border-radius: 8px;
}

/* Logo en headers - 60px x 60px */
.admin-header img.header-logo,
.header img.header-logo {
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
    border-radius: 4px;
    margin-right: 12px;
}

/* Logo en header del dashboard normal - también 60px x 60px */
.dashboard-page .header img.header-logo {
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
    border-radius: 4px;
    margin-right: 8px;
}

/* Fallback para cualquier logo que no se haya especificado */
img[src*="logo"] {
    object-fit: contain;
    border-radius: 4px;
}

/* Responsive para logos */
@media (max-width: 768px) {
    .admin-header img.header-logo,
    .header img.header-logo {
        width: 60px;
        height: 60px;
        max-width: 60px;
        max-height: 60px;
    }
    
    img.logo-image {
        width: 120px;
        max-width: 120px;
        max-height: none;
    }
}

.login-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.login-help {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* DASHBOARD PAGE */
.dashboard-page {
    background: #F5F5F5;
    min-height: 100vh;
}

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

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .header {
        border-radius: 12px;
        margin: 15px;
        padding: 16px;
    }
    
    .header-content {
        padding: 0;
    }
    
    .header-title h1 {
        font-size: 18px;
    }
    
    .logo img.header-logo {
        width: 60px;
        height: 60px;
    }
    
    .btn-logout svg {
        width: 20px;
        height: 20px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .form-container {
        padding: 0 0.5rem;
    }
    
    .form {
        padding: 2rem 1.5rem;
        border-radius: 12px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-actions .btn {
        max-width: none;
        width: 100%;
    }
    
    .forms-grid {
        gap: 8px;
        margin-top: 16px;
    }
    
    .form-section-title {
        font-size: 16px;
        margin: 12px 0 6px 0;
    }
    
    .form-card {
        padding: 20px;
    }
    
    .form-card-image img {
        width: 120px;
    }
    
    .form-card-description {
        font-size: 13px;
    }
    
    .form-card-button {
        width: 100%;
        height: 32px;
        font-size: 13px;
    }
    
    .login-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .form-section {
        padding: var(--space-md);
        margin-bottom: var(--space-md);
    }
    
    .form-section h3 {
        font-size: var(--font-size-md);
        margin-bottom: var(--space-sm);
    }
    
    .checkbox-label {
        padding: var(--space-sm);
        font-size: var(--font-size-sm);
    }

    .context-info summary {
        font-size: 13px;
        padding: var(--space-xs) 0;
    }

    .form-actions {
        flex-direction: column;
        gap: var(--space-sm);
        margin-top: var(--space-lg);
        padding-top: var(--space-md);
    }

    .form-actions .btn {
        max-width: none;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .form {
        padding: 1.5rem 1rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .form-input, 
    .form select, 
    .form textarea {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-help {
        font-size: 0.8rem;
    }
    
    .main-content {
        padding: 1rem 0 0 0;
    }
}

/* === UTILIDADES === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.hidden { display: none; }
.visible { display: block; }

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

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.form {
    animation: fadeIn 0.6s ease-out;
}

.form-group {
    animation: fadeIn 0.4s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }
.form-group:nth-child(6) { animation-delay: 0.6s; }
.form-group:nth-child(7) { animation-delay: 0.7s; }
.form-group:nth-child(8) { animation-delay: 0.8s; }

/* === SECCIONES DE FORMULARIOS === */
/* === FORM SECTIONS MINIMAL === */
.form-section {
    background: var(--bg-section);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-subtle);
    transition: var(--transition-smooth);
}

.form-section:hover {
    box-shadow: var(--shadow-card);
}

.form-section h3 {
    color: var(--text-color);
    margin-bottom: var(--space-md);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    /* Eliminar emojis y centrar el texto */
}

.form-section-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.form-section-header h2 {
    color: var(--primary-color);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

/* === FILAS DE FORMULARIOS === */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* === CHECKBOXES MODERNOS === */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: #fafafa;
    border: 1.5px solid #e0e0e0;
    transition: all 0.2s ease;
    margin: 0.5rem 0;
    width: 100%;
    box-sizing: border-box;
}

.checkbox-label:hover {
    background: white;
    border-color: #c0c0c0;
    transform: translateY(-1px);
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    width: 24px;
    height: 24px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: inline-block;
}

.checkbox-label:hover .checkmark {
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
    display: block;
}

/* Asegurar que los checkboxes funcionen en grids */
.form-row .form-group .checkbox-label {
    align-self: start;
}

/* Estilos específicos para checkboxes en formularios */
.form-group .checkbox-label {
    margin-bottom: 0;
}

.form-group .checkbox-label + .form-help {
    margin-top: 0.5rem;
    margin-left: 0;
}

/* Asegurar visibilidad del checkmark */
.checkmark::after {
    content: '';
    position: absolute;
    display: none;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    display: block;
    content: '✓';
} 

/* ===============================
   ADMIN PANEL STYLES
   =============================== */

/* Admin Header */
.admin-header {
    background: linear-gradient(135deg, #1976d2, #42a5f5);
    color: white;
}

.admin-header .header-title {
    flex: 1;
    text-align: center;
}

.admin-header .header-title h1 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #FFFFFF;
}

.admin-header .header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-badge {
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.3);
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

/* Botones estilo tag/pill */
.btn-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    background: none;
}

.btn-tag-primary {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

.btn-tag-primary:hover {
    background: #1565c0;
    border-color: #1565c0;
    transform: translateY(-1px);
}

.btn-tag-secondary {
    background: #f5f5f5;
    color: #666;
    border-color: #e0e0e0;
}

.btn-tag-secondary:hover {
    background: #e8e8e8;
    border-color: #ccc;
    transform: translateY(-1px);
}

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

.btn-tag-danger:hover {
    background: #d32f2f;
    border-color: #d32f2f;
    transform: translateY(-1px);
}

/* Acciones en tablas con botones tag */
.admin-table .actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    min-width: 160px;
}

/* Admin Header Responsive */
@media (max-width: 768px) {
    .admin-header .header-title h1 {
        font-size: 16px;
    }
    
    .admin-badge {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .admin-header .header-actions {
        gap: 8px;
    }
}

/* Admin Layout */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-welcome {
    text-align: center;
    margin-bottom: 3rem;
}

.admin-welcome h1 {
    color: #1976d2;
    margin-bottom: 0.5rem;
}

/* Statistics Cards - Modern Enterprise Design */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: white;
    padding: 1.75rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1976d2, #42a5f5);
}

.stat-icon {
    font-size: 2.2rem;
    opacity: 0.9;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.1), rgba(66, 165, 245, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(25, 118, 210, 0.1);
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-content h3 {
    font-size: 0.875rem;
    margin: 0 0 0.5rem 0;
    color: #64748b;
    font-weight: 500;
    line-height: 1.2;
}

.stat-number {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1976d2;
    margin: 0 0 0.25rem 0;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Navigation Cards */
.admin-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.admin-nav-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.admin-nav-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.nav-card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.nav-card-arrow {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: #1976d2;
    transition: transform 0.3s ease;
}

.admin-nav-card:hover .nav-card-arrow {
    transform: translateX(4px);
}

/* Quick Actions */
.quick-actions {
    text-align: center;
}

.quick-actions h2 {
    color: #1976d2;
    margin-bottom: 1.5rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Admin Breadcrumb */
.admin-breadcrumb {
    margin-bottom: 2rem;
    color: #666;
    font-size: 0.9rem;
}

.admin-breadcrumb a {
    color: #1976d2;
    text-decoration: none;
}

.admin-breadcrumb a:hover {
    text-decoration: underline;
}

/* Admin Page Header */
.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.admin-page-header h1 {
    color: #1976d2;
    margin: 0;
}

.admin-page-header p {
    color: #666;
    margin: 0.5rem 0 0 0;
}

/* Admin Tables */
.admin-table-container {
    width: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

.admin-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.admin-table-header h2 {
    margin: 0;
    color: #1976d2;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-table {
    overflow-x: auto;
    overflow-y: visible;
}

/* Permitir que los tooltips salgan de las celdas */
.admin-table td {
    position: relative;
    overflow: visible;
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
}

.admin-table tr:hover {
    background: #f8f9fa;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.email-link {
    color: #1976d2;
    text-decoration: none;
}

.email-link:hover {
    text-decoration: underline;
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    display: inline-block;
    min-width: 60px;
}

.badge-success {
    background: #e8f5e8;
    color: #2e7d32;
}

.badge-danger {
    background: #ffebee;
    color: #c62828;
}

.badge-gray {
    background: #f5f5f5;
    color: #666;
}

/* Badge Interactivo */
.badge-interactive {
    cursor: pointer;
    transition: all 0.2s ease;
}

.badge-interactive:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

/* Disabled Button */
.btn-disabled {
    opacity: 0.4;
    cursor: not-allowed !important;
    position: relative;
}

.btn-disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Tooltip mejorado para botones deshabilitados */
.btn-disabled[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    right: 0;
    background: #333;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1001;
    margin-bottom: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    max-width: 200px;
}

.btn-disabled[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 10px;
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1001;
}

/* Tooltip personalizado con JavaScript */
.custom-tooltip {
    position: fixed;
    background: #333;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: pre-line;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    pointer-events: none;
    display: none;
    max-width: 300px;
    line-height: 1.4;
}

/* Estilos para modal de instalaciones */
.instalaciones-summary, .socorristas-summary {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.summary-label {
    font-size: 0.9rem;
    color: #666;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1976d2;
}

.instalaciones-list h3 {
    margin-bottom: 1rem;
    color: #1976d2;
}

.installations-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.installations-table th,
.installations-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.installations-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.installations-table tr:hover {
    background: #f8f9fa;
}

/* Modal Button Fix */
.modal-actions .btn-secondary {
    background: #6c757d;
    color: white;
    border: 1px solid #6c757d;
}

.modal-actions .btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
    color: white;
}

/* === LOADING SPINNER MEJORADO === */
.loading-spinner {
    text-align: center;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.loading-spinner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner-icon {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #D33E22;
    border-radius: 50%;
    animation: spin-loader 1s linear infinite;
}

.loading-spinner-text {
    color: #666;
    font-size: 1rem;
    font-weight: 500;
    animation: pulse-loader 1.5s ease-in-out infinite;
}

@keyframes spin-loader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse-loader {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* No Data State */
.no-data {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-data-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
    position: relative;
    margin: auto;
}

.modal-small {
    max-width: 400px;
}

.modal-large {
    max-width: 800px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h2 {
    margin: 0;
    color: #1976d2;
}

/* Títulos específicos para botiquín */
#modal-elemento-title {
    color: var(--success-color) !important;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.modal-form {
    padding: 1.5rem;
}

/* Formularios dentro de modales */
.modal-content form {
    padding: 1.5rem;
}

.modal-content .form-group {
    margin-bottom: 1.5rem;
}

.modal-content .form-group:last-of-type {
    margin-bottom: 0;
}

/* Modal Messages */
#modal-message-container {
    margin-bottom: 1rem;
}

#modal-message-container .message {
    margin-bottom: 0;
    border-radius: 8px;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

/* Botones tag en modales */
.modal-actions .btn-tag {
    padding: 8px 16px;
    font-size: 0.8rem;
}

/* Admin Responsive */
@media (max-width: 768px) {
    .admin-container {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem 1rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .admin-nav-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .admin-table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .admin-table {
        font-size: 0.8rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.5rem;
    }
    
    .action-buttons {
        flex-direction: row;
        gap: 0.25rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

/* === GESTIÓN DE ESPACIOS === */
.espacios-container {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    padding: 1rem;
    background: #fafafa;
}

.espacios-list {
    margin-bottom: 1rem;
}

.espacio-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.espacio-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.espacio-name {
    font-weight: 500;
    color: var(--text-color);
    flex: 1;
}

.espacios-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.espacios-actions input {
    flex: 1;
    min-width: 200px;
}

.no-espacios {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    background: white;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-small);
}

/* Responsive para espacios */
@media (max-width: 768px) {
    .espacios-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .espacios-actions input {
        min-width: auto;
        margin-bottom: 0.5rem;
    }
    
    .espacio-item {
        padding: 0.5rem;
    }
}

/* === COLUMNA DE ESPACIOS EN TABLA === */
.espacios-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

.espacios-cell .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    margin: 0;
    white-space: nowrap;
}

.text-muted {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

/* Responsive para columna de espacios */
@media (max-width: 768px) {
    .espacios-cell {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.125rem;
    }
    
    .espacios-cell .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

/* === ESTILOS INFORMES Y EXPORTACIÓN === */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--text-muted);
}

.breadcrumb-current {
    color: var(--text-color);
    font-weight: 600;
}

.admin-header-section {
    text-align: center;
    margin-bottom: 3rem;
}

.admin-header-section h1 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.admin-header-section p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.filters-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.filters-section h2 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.filter-group label {
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.filter-group .form-control {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.filter-group .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(211, 62, 34, 0.1);
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
}

.export-section {
    margin-bottom: 2rem;
}

.export-section h2 {
    color: var(--text-color);
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 600;
    text-align: center;
}

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

.export-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.export-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.export-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.export-icon {
    font-size: 2rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
}

.export-card-header h3 {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.export-card-content {
    padding: 1.5rem;
}

.export-card-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.export-fields {
    background: var(--secondary-color);
    padding: 1rem;
    border-radius: var(--border-radius-small);
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

.export-card-actions {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: #fafafa;
}

.export-card-actions .btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius-small);
}

.export-status {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 1000;
    min-width: 300px;
}

.export-status::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: -1;
}

/* Eliminada definición duplicada de loading-spinner - usando la versión mejorada de arriba */

/* Estilos de #export-message ahora manejados por .loading-spinner-text */

/* Responsive para informes */
@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .export-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .admin-header-section h1 {
        font-size: 2rem;
    }
    
    .filters-section,
    .export-card {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
    }
    
    .export-status {
        margin: 0 1rem;
        min-width: auto;
        max-width: calc(100% - 2rem);
    }
}

/* === ESTILOS ESPECÍFICOS PARA CONTROL DE FLUJO POR ESPACIOS === */

/* Espacios Container */
#espacios-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Tarjetas de Espacios */
.espacio-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.espacio-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(211, 62, 34, 0.1);
}

.espacio-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
}

.espacio-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.espacio-content {
    padding: 1.5rem;
}

/* Total Summary */
.total-summary {
    background: #fff;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.total-card {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 1.2rem;
}

.total-label {
    font-weight: 600;
    color: var(--text-color);
}

.total-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    background: rgba(211, 62, 34, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    min-width: 80px;
    display: inline-block;
}

/* Alert Styles */
.alert {
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid transparent;
}

.alert-warning {
    background-color: var(--warning-bg);
    border-color: #ffcc02;
    color: #8a6d00;
}

.alert-warning strong {
    color: #8a6d00;
}

/* Responsive para Control de Flujo */
@media (max-width: 768px) {
    #espacios-container {
        gap: 1rem;
    }
    
    .espacio-content {
        padding: 1rem;
    }
    
    .total-card {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .total-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .espacio-header {
        padding: 0.75rem 1rem;
    }
    
    .espacio-header h4 {
        font-size: 1rem;
    }
    
    .total-summary {
        padding: 1rem;
    }
    
    .alert {
        padding: 1rem;
    }
}

/* === ESTILOS ESPECÍFICOS PARA BOTIQUÍN === */

/* Header unificado del botiquín */
.botiquin-header {
    background: linear-gradient(135deg, var(--success-color), #4caf50);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.botiquin-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.botiquin-header h1 {
    margin: 0;
    font-size: 2.2em;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.user-badge, .instalacion-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    backdrop-filter: blur(5px);
}

.btn.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    backdrop-filter: blur(5px);
}

.btn.btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.botiquin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.botiquin-stats .stat-card {
    background: rgba(255, 255, 255, 0.15);
    padding: 5px 15px;
    border-radius: 8px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.botiquin-stats .stat-number {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

/* Controles de búsqueda y acciones */
.botiquin-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    margin-top: 20px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 16px;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--success-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 18px;
}

/* Botones de acción integrados */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-action {
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Botón outline para contextos fuera del header verde */
.btn-action.btn-outline {
    background: white;
    border: 2px solid var(--success-color);
    color: var(--success-color);
}

.btn-action.btn-outline:hover {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.category-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.filter-btn.active {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.filter-btn:hover {
    border-color: var(--success-color);
}

/* Secciones de categorías */
.categoria-section {
    margin-bottom: 30px;
}

.categoria-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--success-color);
}

.categoria-title {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--success-color);
    margin: 0;
}

.categoria-count {
    background: var(--success-color);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
}

/* Grid de elementos - Responsive mejorado */
.elementos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 0;
}

@media (max-width: 768px) {
    .elementos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .elementos-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Tarjetas de elementos - Diseño compacto */
.elemento-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 120px;
}

.elemento-card:hover {
    border-color: var(--success-color);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
    transform: translateY(-1px);
}

.elemento-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.elemento-nombre {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--success-color);
    margin: 0;
    flex: 1;
    line-height: 1.2;
}

.elemento-actions {
    display: flex;
    gap: 4px;
}

.action-btn {
    padding: 4px 6px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: var(--transition);
    opacity: 0.7;
}

.action-btn.edit {
    background: var(--warning-color);
    color: white;
}

.action-btn.delete {
    background: var(--error-color);
    color: white;
}

.action-btn:hover {
    opacity: 1;
    transform: scale(1.05);
}

.elemento-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Controles de cantidad inline */
.cantidad-section {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.cantidad-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
}

.btn-cantidad {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-cantidad:hover {
    transform: scale(1.05);
}

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

.btn-minus {
    background: #ef4444;
}

.btn-minus:hover {
    background: #dc2626;
}

.btn-plus {
    background: #10b981;
}

.btn-plus:hover {
    background: #059669;
}

.cantidad-display {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 70px;
    justify-content: center;
}

.cantidad-input {
    background: transparent;
    border: none;
    font-size: 1.3em;
    font-weight: bold;
    color: var(--success-color);
    text-align: center;
    width: 50px;
    padding: 2px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.cantidad-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 2px var(--success-color);
}

.cantidad-input.editing {
    background: #fff3cd;
    animation: pulse 1s infinite;
}

.cantidad-input.success {
    background: #d1fae5;
}

.cantidad-input.error {
    background: #fee2e2;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.cantidad-unidad {
    font-size: 0.75em;
    color: var(--text-light);
    text-transform: lowercase;
    white-space: nowrap;
}

.elemento-observaciones {
    background: #f1f5f9;
    padding: 6px 8px;
    border-radius: 4px;
    border-left: 3px solid var(--info-color);
    font-size: 0.8em;
    color: #475569;
    line-height: 1.3;
}

.elemento-meta {
    display: none;
    font-size: 0.7em;
    color: var(--text-light);
    text-align: center;
    padding-top: 6px;
    border-top: 1px solid #f1f5f9;
}

/* Botones flotantes - ELIMINADOS - Ahora se usan botones integrados en la barra de herramientas */

/* Estado vacío */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* === MODAL SOLICITUD MEJORADO === */
.elementos-solicitud-container {
    margin: 20px 0;
}

.elemento-solicitud-item {
    background: #FAFAFA;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.elemento-solicitud-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(211, 62, 34, 0.1);
}

.elemento-solicitud-item .form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.elemento-solicitud-item .form-group {
    margin-bottom: 15px;
}

.elemento-solicitud-item .form-group:last-child {
    margin-bottom: 0;
}

.elemento-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.btn-remove-elemento {
    background: var(--error-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-remove-elemento:hover {
    background: #c62828;
    transform: translateY(-1px);
}

.add-elemento-section {
    text-align: center;
    margin: 25px 0;
    padding: 20px;
    background: #F0F9FF;
    border: 2px dashed #38BDF8;
    border-radius: 12px;
}

.add-elemento-section .btn {
    margin-bottom: 8px;
}

.add-elemento-section .form-help {
    margin-top: 8px;
    color: #0284C7;
    font-style: italic;
}

/* === FIX BOTÓN SECUNDARIO EN MODALES/FORMULARIOS === */
.form-section .btn-secondary,
.modal-content .btn-secondary {
    background: var(--bg-gray);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.form-section .btn-secondary:hover,
.modal-content .btn-secondary:hover {
    background: var(--border-light);
    border-color: var(--text-light);
}

/* Responsive para modal solicitud */
@media (max-width: 768px) {
    .elemento-solicitud-item .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .elemento-solicitud-item {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .add-elemento-section {
        padding: 15px;
        margin: 20px 0;
    }
}

/* Historial */
.historial-item {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.historial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: bold;
}

.historial-accion {
    color: var(--success-color);
}

.historial-fecha {
    color: var(--text-light);
    font-size: 0.9em;
}

.historial-usuario,
.historial-cantidad,
.historial-observaciones {
    margin: 5px 0;
    font-size: 0.9em;
    color: var(--text-light);
}

/* Responsive para botiquín */
@media (max-width: 768px) {
    .botiquin-header {
        padding: 15px;
    }

    .botiquin-header-top {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .botiquin-header h1 {
        font-size: 1.5em;
        justify-content: center;
    }

    .header-actions {
        justify-content: center;
        gap: 8px;
    }

    .user-badge, .instalacion-badge {
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .btn.btn-outline {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

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

    .botiquin-stats .stat-card {
        padding: 10px;
    }

    .botiquin-stats .stat-number {
        font-size: 1.5em;
    }

    .botiquin-controls {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
        align-items: stretch;
    }

    .action-buttons {
        justify-content: center;
        gap: 8px;
    }

    .btn-action {
        flex: 1;
        min-width: 0;
        font-size: 0.8rem;
        padding: 8px 12px;
    }

    .search-box input {
        font-size: 16px; /* Evita zoom en iOS */
    }

    /* Botones flotantes eliminados - Ya no se usan */

    .elemento-card {
        min-height: 110px;
    }

    .elemento-nombre {
        font-size: 0.9em;
    }

    .cantidad-controls {
        padding: 4px 6px;
        gap: 6px;
    }

    .btn-cantidad {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .cantidad-input {
        font-size: 1.2em;
        width: 45px;
    }
}

/* === FOOTER NAVEGACIÓN === */
.nav-footer {
    background: #D33E22;
    border-radius: 12px 12px 0 0;
    padding: 12px 16px;
    margin-top: 24px;
}

.nav-footer-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    min-width: 60px;
}

.nav-item:hover,
.nav-item.active {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
}

.nav-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.nav-label {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

/* === MODAL FORMULARIOS === */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #E5E5E5;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333333;
}

.modal-close {
    background: none;
    border: none;
    color: #666666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #F5F5F5;
    color: #D33E22;
}

.modal-body {
    padding: 16px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-form-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.modal-form-option:hover {
    border-color: #D33E22;
    box-shadow: 0 2px 8px rgba(211, 62, 34, 0.1);
    transform: translateY(-1px);
}

.modal-form-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.modal-form-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-form-content h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333333;
}

.modal-form-content p {
    margin: 0;
    font-size: 14px;
    color: #666666;
    line-height: 1.4;
}

/* === RESPONSIVE FOOTER Y MODAL === */
@media (max-width: 768px) {
    .nav-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 12px 12px 0 0;
        z-index: 100;
        height: 72px;
        display: flex;
        align-items: center;
    }
    
    .nav-footer-container {
        width: 100%;
        max-width: none;
    }
    
    .nav-item {
        min-width: auto;
        flex: 1;
    }
    
    .nav-label {
        font-size: 11px;
    }
    
    /* Ajustar padding del body para el footer fijo */
    body {
        padding-bottom: 72px;
    }
    
    .modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
    
    .modal-form-option {
        padding: 12px;
        gap: 12px;
    }
    
    .modal-form-icon {
        width: 40px;
        height: 40px;
    }
    
    .modal-form-content h4 {
        font-size: 15px;
    }
    
    .modal-form-content p {
        font-size: 13px;
    }
}

/* === DESKTOP FOOTER === */
@media (min-width: 769px) {
    .nav-footer {
        position: static;
        margin-top: 32px;
        border-radius: 12px;
    }
    
    .nav-footer-container {
        max-width: 600px;
    }
    
    .nav-item {
        padding: 12px 16px;
        min-width: 80px;
    }
    
    .nav-label {
        font-size: 13px;
    }
}

/* === ESTILOS MI CUENTA === */
.profile-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.profile-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #FFFFFF;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: #F5F5F5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-icon {
    width: 64px;
    height: 64px;
    background: #F5F5F5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-field label {
    font-size: 12px;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-field p {
    font-size: 16px;
    font-weight: 500;
    color: #333333;
    margin: 0;
    line-height: 1.4;
}

.profile-field a {
    color: #D33E22;
    text-decoration: none;
    transition: color 0.2s ease;
}

.profile-field a:hover {
    color: #B5321C;
    text-decoration: underline;
}

.error-message {
    background: #FFF5F5;
    border: 1px solid #FEB2B2;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.error-message p {
    color: #C53030;
    margin: 0;
    font-size: 14px;
}

/* === RESPONSIVE MI CUENTA === */
@media (max-width: 768px) {
    .profile-card {
        padding: 16px;
        gap: 12px;
    }
    
    .profile-avatar {
        width: 60px;
        height: 60px;
    }
    
    .profile-avatar svg {
        width: 48px;
        height: 48px;
    }
    
    .profile-icon {
        width: 48px;
        height: 48px;
    }
    
    .profile-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .profile-field p {
        font-size: 15px;
    }
    
    .profile-field label {
        font-size: 11px;
    }
}

/* =================================
   ESTILOS ESPECÍFICOS ADMIN BOTIQUÍN
   ================================= */

/* Container específico para botiquín admin */
.admin-botiquin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-md);
}

/* Pestañas de navegación admin */
.admin-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
}

.tab-button {
    background: none;
    border: none;
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    font-size: var(--font-size-md);
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: var(--transition-smooth);
    font-weight: var(--font-weight-medium);
}

.tab-button:hover {
    color: var(--primary-color);
    background: rgba(211, 62, 34, 0.05);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: var(--font-weight-semibold);
}

/* Secciones admin - REGLA OBSOLETA - MOVIDA ABAJO */

/* Header admin específico para botiquín */
.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.admin-nav h1 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* Filtros específicos para admin */
.admin-filters {
    background: var(--bg-gray);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    align-items: end;
}

.filter-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* Stats grid ajustado */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.stat-card.warning {
    border-left: 4px solid var(--warning-color);
}

.stat-card.alert {
    border-left: 4px solid var(--error-color);
}

/* Estados de inventario - REGLA OBSOLETA - MOVIDA ABAJO */

.instalacion-inventario h3 {
    margin: 0 0 var(--space-md) 0;
    padding: var(--space-md) var(--space-lg);
    background: var(--border-light);
    color: var(--text-color);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* Badges específicos para solicitudes */
.badge-pendiente {
    background: var(--warning-bg);
    color: var(--warning-color);
}

.badge-enviada {
    background: var(--success-bg);
    color: var(--success-color);
}

.badge-recibida {
    background: var(--info-bg);
    color: var(--info-color);
}

/* Estados de cantidad - funcionalidad bajo mínimos eliminada */

/* Mensajes de la aplicación */
.message {
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease-out;
}

.message-success {
    background: var(--success-bg);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.message-error {
    background: var(--error-bg);
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.message button {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.message button:hover {
    opacity: 1;
}

/* Estados vacíos y carga */
.loading {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-light);
    font-size: 1.1rem;
}

.no-results {
    text-align: center;
    padding: var(--space-xxl);
    color: var(--text-light);
    font-size: 1.1rem;
}

.error {
    text-align: center;
    padding: var(--space-xl);
    color: var(--error-color);
    font-size: 1.1rem;
}

/* Detalles de solicitud en modal */
.solicitud-info {
    margin-bottom: var(--space-lg);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin: var(--space-md) 0;
    padding: var(--space-md);
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
}

.elementos-solicitados {
    margin: var(--space-md) 0;
}

.elemento-solicitado {
    padding: var(--space-sm);
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.mensaje-adicional,
.observaciones-coordinacion {
    padding: var(--space-md);
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
    margin: var(--space-md) 0;
    font-style: italic;
    color: var(--text-light);
}

/* Botón de peligro */
.btn-danger {
    background-color: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background-color: var(--primary-dark);
}

/* Responsive específico para admin botiquín */
@media (max-width: 768px) {
    .admin-botiquin-container {
        padding: var(--space-sm);
    }
    
    .admin-header-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-nav {
        justify-content: center;
    }
    
    .admin-user-info {
        justify-content: center;
    }
    
    .admin-filters {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        justify-content: center;
    }
    
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tab-button {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--font-size-sm);
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== ESTADÍSTICAS INTEGRADAS EN INVENTARIO ===== */
.inventario-stats {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stats-inline {
    color: var(--text-muted);
    font-size: 0.95rem;
    text-align: center;
}

.stats-inline span {
    color: var(--primary-color);
    font-weight: 600;
}

/* Header de instalaciones mejorado */
.instalacion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.instalacion-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .instalacion-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .instalacion-header button {
        width: 100%;
    }
}

/* Contexto de instalación en modal */
.instalacion-context {
    background: #f0f8ff;
    border: 1px solid #d0e7ff;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: var(--primary-color);
    font-size: 0.95rem;
}

/* ===== MEJORAS ADMIN INSPIRADAS EN SOCORRISTAS ===== */

/* Controles modernos de filtros para admin */
.admin-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    margin-top: 20px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

/* Búsqueda moderna para admin */
.admin-search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.admin-search-box input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.admin-search-box input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    transform: scale(1.02);
}

.admin-search-box input:hover {
    border-color: var(--primary-color);
}

.admin-search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    pointer-events: none;
}

/* Filtros mejorados para admin */
.admin-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 180px;
}

/* Labels opcionales para filtros */
.admin-filter-group label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0;
    text-align: center;
}

.admin-filter-select {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    cursor: pointer;
}

.admin-filter-select:focus,
.admin-filter-select:hover {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    transform: scale(1.02);
}

/* Botones admin mejorados */
.admin-btn-enhanced {
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

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

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

.admin-btn-enhanced.btn-primary {
    background: var(--primary-color);
    color: white;
}

.admin-btn-enhanced.btn-primary:hover {
    background: #1565c0;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.admin-btn-enhanced.btn-secondary {
    background: #f5f5f5;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.admin-btn-enhanced.btn-secondary:hover {
    background: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.admin-btn-enhanced.btn-danger {
    background: #ef4444;
    color: white;
}

.admin-btn-enhanced.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Responsive para filtros admin */
@media (max-width: 768px) {
    .admin-filters {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .admin-search-box {
        min-width: unset;
        order: 2;
    }
    
    .admin-filter-group {
        min-width: unset;
        order: 1;
    }
}

/* Estados de loading y feedback visual mejorados */
.admin-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--primary-color);
    font-size: 1.1rem;
    animation: pulse 2s infinite;
}

.admin-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed var(--border-color);
}

.admin-empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ===== TABLAS ANCHO COMPLETO DENTRO DE SECCIONES ===== */

/* Secciones admin */
.admin-section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.admin-section.active {
    display: block;
}

/* Contenedores de instalación ocupan todo el ancho disponible dentro de su sección */
.instalacion-inventario {
    width: 100%;
    padding: 20px;
    margin-bottom: var(--space-xl);
}

/* Contenido de inventario y solicitudes ocupan todo el ancho de su contenedor */
#inventario-content,
#solicitudes-content {
    width: 100%;
}

/* Todas las tablas dentro del botiquín admin ocupan todo el ancho de su contenedor */
.admin-botiquin-container .admin-table,
.admin-botiquin-container .admin-table-container,
.admin-botiquin-container table {
    width: 100% !important;
    max-width: none !important;
}

/* Responsive: mantener las tablas internas a ancho completo */
@media (max-width: 768px) {
    .admin-section,
    .admin-table-container,
    .instalacion-inventario,
    #inventario-content,
    #solicitudes-content {
        width: 100% !important;
        max-width: none !important;
    }
}

/* === ADMINISTRADORES - TIPOS DE USUARIO === */
.tipo-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.tipo-superadmin {
    background-color: #fef3c7;
    color: #92400e;
}

.tipo-admin {
    background-color: #dbeafe;
    color: #1e40af;
}

.tipo-coordinador {
    background-color: #dcfce7;
    color: #166534;
}

/* === TABLA ADMINISTRADORES === */
.actions {
    white-space: nowrap;
}