/* Estilos principales para Ventanilla Única */

:root {
    /* Paleta Verde Principal - Basada en imagen de diseño */
    --green-50: #F7FAE5;
    --green-100: #E2F3D4;
    --green-200: #C6E8AE;
    --green-300: #B3DF96;
    --green-400: #81C556;
    --green-500: #62AA38;
    --green-600: #4A8729;
    --green-700: #3A6823;
    --green-800: #2C4720;
    --green-900: #14260D;

    /* Colores Principales (Verde) */
    --primary-color: #62AA38;
    --primary-hover: #4A8729;
    --primary-light: #81C556;
    --primary-lighter: #C6E8AE;
    --primary-lightest: #E2F3D4;
    --primary-dark: #3A6823;
    --primary-darker: #2C4720;

    /* Colores Secundarios */
    --secondary-color: #81C556;
    --secondary-hover: #62AA38;

    /* Acentos Azules (para elementos clave) */
    --accent-blue: #3498db;
    --accent-blue-hover: #2980b9;
    --accent-blue-light: #5dade2;

    /* Colores de Estado */
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --success-color: #27ae60;
    --info-color: #3498db;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --border-color: #ddd;
    --text-color: #333;
    --text-light: #777;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
    --institutional-green: #79b530;
    --institutional-green-dark: #357231;

    /* Configuración institucional dinámica (sobreescritas por appConfig) */
    --header-bg: #79b530;
    --barra-bg: #ffffff;
    --barra-borde: #79b530;
    --texto-barra1: #2c3e50;
    --texto-barra2: #79b530;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #f5f5f5;
}

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

/* Barra Institucional Superior */
/* ── Header unificado ── */
.header-unified {
    background: var(--barra-bg, white);
    border-bottom: 3px solid var(--barra-borde, transparent);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 0.75rem 0;
    position: static;
    z-index: 101;
}

.header-unified .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}

.header-brand-logo {
    height: 48px;
    width: 48px;
    object-fit: contain;
    border-radius: 50%;
}

.header-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.header-brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--texto-barra1, var(--dark-color));
    letter-spacing: 0.2px;
}

.header-brand-slogan {
    font-size: 0.75rem;
    color: var(--texto-barra2, var(--text-light));
    font-style: italic;
}

.header-unified .nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: center;
    flex: 1;
}

.header-unified .nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-unified .nav-links li a {
    color: var(--nav-links-color, var(--dark-color));
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}

.header-unified .nav-links li a:hover,
.header-unified .nav-links li a:focus {
    background: var(--primary-light);
    color: var(--primary-color);
}

.header-unified .nav-actions,
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .header-unified .header-content {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .header-brand-logo {
        height: 36px;
        width: 36px;
    }
    .header-brand-name {
        font-size: 0.8rem;
    }
    .header-brand-slogan {
        display: none;
    }
    .header-unified .nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-brand-text {
        display: none;
    }
}

/* Legacy selectors kept for other pages that may still reference them */
.header {
    background: var(--header-bg);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: static;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    color: var(--dark-color);
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.nav-links li a:hover,
.nav-links li a:focus {
    background: var(--primary-light);
    color: var(--primary-color);
}

.user-menu {
    position: relative;
}

.user-menu__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: white;
    cursor: pointer;
    font-weight: 500;
    color: var(--dark-color);
    transition: box-shadow 0.2s;
}

.user-menu__toggle:focus,
.user-menu__toggle:hover {
    box-shadow: 0 0 0 3px rgba(121, 181, 48, 0.2);
    outline: none;
}

.user-menu__icon {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.user-menu__chevron {
    font-size: 0.75rem;
    color: var(--text-light);
}

.user-menu__dropdown {
    position: absolute;
    right: 0;
    margin-top: 0.75rem;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    min-width: 240px;
    padding: 0.75rem 0;
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 120;
}

.user-menu.is-open .user-menu__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu__header {
    padding: 0 1.25rem 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.user-menu__role {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: capitalize;
}

.user-menu__email {
    font-size: 0.85rem;
    color: var(--text-light);
}

.user-menu__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 1.25rem;
    color: var(--dark-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}

.user-menu__link i {
    width: 18px;
    text-align: center;
    color: var(--primary-color);
}

.user-menu__link:hover,
.user-menu__link:focus {
    background: var(--light-color);
}

.user-menu__link--logout {
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    color: var(--danger-color);
}

.user-menu__link--logout i {
    color: var(--danger-color);
}

.user-menu__form {
    margin: 0;
}

/* Cuadros informativos */
.info-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.info-box i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.info-success i {
    color: #28a745;
}

.info-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.info-warning i {
    color: #ffc107;
}

.firma-actions {
    margin-top: 1rem;
}

/* Form row (para campos en línea) */
.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.help-text {
    display: block;
    font-size: 0.85rem;
    color: #666666;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Badge de vencimiento */
.badge-vencimiento {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
}

/* Stat cards con animación para urgencia */
.stat-card-vencida {
    animation: pulse-vencida 1.5s ease-in-out infinite;
    border: 2px solid #c0392b;
}

.stat-card-urgente {
    animation: pulse-urgente 2s ease-in-out infinite;
    border: 2px solid #d35400;
}

@keyframes pulse-vencida {

    0%,
    100% {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    50% {
        box-shadow: 0 4px 12px rgba(192, 57, 43, 0.4);
    }
}

@keyframes pulse-urgente {

    0%,
    100% {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    50% {
        box-shadow: 0 4px 12px rgba(211, 84, 0, 0.4);
    }
}

/* Badge de corrección del rector */
.stat-card-alert {
    animation: pulse-card 2s ease-in-out infinite;
    border: 2px solid #e74c3c;
}

@keyframes pulse-card {

    0%,
    100% {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    50% {
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    }
}

/* Tarjeta destacada para admin */
.admin-card-featured {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.admin-card-featured:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.4);
}

.featured-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.featured-content h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.featured-content p {
    margin: 0;
    opacity: 0.9;
    line-height: 1.5;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .admin-card-featured {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }

    .featured-icon {
        margin: 0 auto;
    }

    .btn-large {
        width: 100%;
    }
}

.solicitud-con-correccion {
    border-left: 4px solid #e74c3c !important;
    background: #fff5f5 !important;
}

.badge-correccion {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #e74c3c;
    color: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.85;
        transform: scale(1.02);
    }
}

.comentario-rector {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 6px;
}

.comentario-rector-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #856404;
    font-weight: 600;
}

.comentario-rector-content {
    color: #856404;
    line-height: 1.6;
}

/* Archivos adjuntos en respuestas */
.respuesta-archivos {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.respuesta-archivos strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.archivos-list-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.archivo-item-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--dark-color);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.archivo-item-inline:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.archivo-item-inline i {
    color: var(--primary-color);
}

.archivo-item-inline:hover i {
    color: white;
}

.archivo-item-inline small {
    color: var(--text-light);
}

.archivo-item-inline:hover small {
    color: rgba(255, 255, 255, 0.8);
}

/* Estilos para Archivos Adjuntos - Formato Elaborado (FASE 1 Uniformización) */
.archivos-lista {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.archivo-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--green-50);
    border: 2px solid var(--green-200);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.archivo-item:hover {
    background: var(--green-100);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(98, 170, 56, 0.15);
}

.archivo-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.archivo-icon .fa-file-pdf {
    color: #e74c3c;
}

.archivo-icon .fa-file-image {
    color: #9b59b6;
}

.archivo-icon .fa-file-word {
    color: #3498db;
}

.archivo-icon .fa-file-excel {
    color: #27ae60;
}

.archivo-icon .fa-file {
    color: var(--primary-color);
}

.archivo-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.archivo-info strong {
    color: var(--primary-darker);
    font-size: 0.95rem;
    font-weight: 600;
}

.archivo-info small {
    color: var(--primary-dark);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.archivo-item .btn {
    flex-shrink: 0;
}

/* Archivos Section Header */
.card-info h3,
.archivos-section h2 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.card-info h3 i,
.archivos-section h2 i {
    font-size: 1.2rem;
}

.archivos-preview {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--light-color);
    border-radius: 6px;
    border: 1px dashed var(--border-color);
}

.archivo-preview-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.archivo-preview-item:last-child {
    margin-bottom: 0;
}

.archivo-preview-item i {
    color: var(--primary-color);
}

.archivo-preview-item small {
    color: var(--text-light);
    margin-left: auto;
}

/* Perfil de usuario */
.perfil-container {
    padding: 2rem 0;
}

/* FASE 2: Perfil Card con paleta verde */
.perfil-card {
    background: white;
    border-radius: 12px;
    border: 2px solid var(--green-200);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    transition: all 0.3s ease;
}

.perfil-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(98, 170, 56, 0.12);
}

.perfil-info h2,
.perfil-actions h2 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.perfil-info .info-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}

.perfil-info .info-item label {
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    font-size: 0.8rem;
}

.perfil-actions p {
    color: var(--text-light);
    margin-bottom: 1.25rem;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-app-name {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.footer-copy {
    font-size: 0.85rem;
    opacity: 0.8;
}

.footer-right {
    display: flex;
    gap: 1.5rem;
}

.footer-right a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.footer-right a:hover {
    opacity: 1;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-right {
        justify-content: center;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* FASE 4: Botones - Estilo Uniforme */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 8px rgba(98, 170, 56, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-darker) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(98, 170, 56, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--green-200);
}

.btn-secondary:hover {
    background: var(--green-50);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(98, 170, 56, 0.1);
}

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

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Forms */
/* FASE 4: Inputs y Form Groups - Estilo Uniforme */
.input,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 0.85rem;
    border: 2px solid var(--green-200);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    transition: all 0.3s ease;
}

.input:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--green-50);
    box-shadow: 0 0 0 4px rgba(98, 170, 56, 0.15);
    transform: translateY(-1px);
}

.input:hover,
input:hover,
select:hover,
textarea:hover {
    border-color: var(--green-300);
}

.input-large {
    font-size: 1.2rem;
    padding: 1rem;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.form-group label .required {
    color: var(--danger-color);
    margin-left: 0.25rem;
}

.required {
    color: var(--danger-color);
}

.help-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Ventanilla Única */
.ventanilla-container {
    padding: 1.5rem 0;
}

/* ── Portal label ── */
.portal-label {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ── Hero section ── */
.hero-section {
    text-align: center;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.hero-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.hero-section p {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Legacy page-header (used by other pages) ── */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, white 100%);
    border-radius: 12px;
    border: 2px solid var(--black-200);
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

/* ── Areas grid ── */
.areas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* ── Area card ── */
.area-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 1.75rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.area-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.area-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 700;
}

.area-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 0.5rem;
    flex: 1;
}

.area-stats {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.area-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-weight: 600;
}

/* ── Consulta section ── */
.consulta-section {
    background: var(--dark-color);
    color: white;
    padding: 2rem 2.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.consulta-info h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: white;
}

.consulta-info h2 i {
    margin-right: 0.5rem;
}

.consulta-info p {
    font-size: 0.9rem;
    opacity: 0.85;
    margin: 0;
}

.consulta-form {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.consulta-form .input {
    min-width: 220px;
    border-radius: 8px;
}

/* ── Responsive ── */
@media (max-width: 992px) {
    .areas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    .areas-grid {
        grid-template-columns: 1fr;
    }
    .consulta-section {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    .consulta-form {
        width: 100%;
        flex-direction: column;
    }
    .consulta-form .input {
        min-width: unset;
        width: 100%;
    }
}

/* Formulario de Solicitud */
.formulario-container {
    padding: 2rem 0;
}

/* FASE 3: Breadcrumb con paleta verde */
.breadcrumb {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    padding: 0.75rem 1rem;
    background: var(--white-50);
    border-radius: 8px;
    border: 1px solid var(--black-200);
}

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

.breadcrumb a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* FASE 3: Form Header con paleta verde */
.form-header {
    background: linear-gradient(135deg, var(--green-50) 0%, white 100%);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--green-200);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.form-header:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(98, 170, 56, 0.12);
    text-align: center;
}

.form-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.formulario-solicitud {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* FASE 2: Form Sections con paleta verde */
.form-section {
    margin-bottom: 2.5rem;
    padding: 1.75rem;
    background: var(--green-50);
    border: 2px solid var(--green-200);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.form-section:hover {
    background: white;
    border-color: var(--green-300);
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

/* FASE 4: Checkbox y Radio Groups */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    border: 2px solid var(--green-200);
    background: white;
    transition: all 0.2s ease;
}

.checkbox-label:hover {
    background: var(--green-50);
    border-color: var(--green-300);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label:has(input[type="checkbox"]:checked) {
    background: var(--green-100);
    border-color: var(--primary-color);
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Consulta */
.consulta-container {
    padding: 2rem 0;
}

.consulta-card {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
}

.consulta-detalle-container {
    padding: 2rem 0;
}

/* FASE 2: Headers uniformizados */
.solicitud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--green-50) 0%, white 100%);
    padding: 1.75rem;
    border-radius: 12px;
    border: 2px solid var(--green-200);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.solicitud-header:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(98, 170, 56, 0.12);
}

.radicado-badge {
    font-size: 1.5rem;
    color: var(--dark-color);
}

.estado-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.875rem;
}

/* FASE 2: Badges de Estado - Actualizados con paleta verde */
.estado-recibida {
    background: var(--green-100);
    color: var(--primary-dark);
    border: 1px solid var(--green-300);
}

.estado-en_revision {
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffe0b2;
}

.estado-en_tramite {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.estado-finalizada {
    background: var(--green-200);
    color: var(--primary-darker);
    border: 1px solid var(--primary-color);
    font-weight: 600;
}

.estado-rechazada {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.estado-escalada {
    background: #e7e7ff;
    color: #5050c0;
    border: 1px solid #d0d0ff;
}

.estado-pendiente_validacion {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.solicitud-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* FASE 2: Cards y Secciones de Información - Estilo Uniforme */
.solicitud-info,
.solicitud-timeline,
.card-info,
.detalle-info {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--green-200);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.solicitud-info:hover,
.solicitud-timeline:hover,
.card-info:hover,
.detalle-info:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(98, 170, 56, 0.12);
}

.solicitud-info h2,
.solicitud-timeline h2,
.card-info h2,
.detalle-info h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.solicitud-info h2 i,
.solicitud-timeline h2 i,
.card-info h2 i,
.detalle-info h2 i {
    font-size: 1.3rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: var(--green-50);
    border: 1px solid var(--green-100);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.info-item:hover {
    background: var(--green-100);
    border-color: var(--green-200);
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item label {
    font-weight: 600;
    color: var(--primary-dark);
    min-width: 150px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-item span {
    color: var(--dark-color);
    text-align: right;
    flex: 1;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* FASE 2: Timeline con paleta verde */
.timeline-content {
    background: var(--green-50);
    padding: 1.25rem;
    border-radius: 10px;
    border: 1px solid var(--green-200);
    transition: all 0.2s ease;
}

.timeline-content:hover {
    background: var(--green-100);
    border-color: var(--green-300);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Login */
.login-container {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.login-card {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.login-form {
    margin-bottom: 1.5rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: start;
    gap: 1rem;
}

/* FASE 3: Alerts con paleta verde */
.alert-success {
    background: var(--green-100);
    color: var(--primary-darker);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 1rem;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 1rem;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #f39c12;
    border-radius: 8px;
    padding: 1rem;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 1rem;
}

/* Empty State */
/* FASE 3: Empty State con paleta verde */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: var(--white-50);
    border: 2px dashed var(--black-300);
    border-radius: 12px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
    color: var(--white-400);
}

.empty-state p {
    color: var(--primary-dark);
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* Back Link */
.back-link {
    margin-top: 2rem;
    text-align: center;
}

.back-link a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Gestión */
.gestion-container {
    padding: 2rem 0;
}

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

/* FASE 2: Stat Cards con paleta verde */
.stat-card {
    background: linear-gradient(135deg, white 0%, var(--green-50) 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--green-200);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 16px rgba(98, 170, 56, 0.12);
    transform: translateY(-2px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* FASE 2: Sections con paleta verde */
.solicitudes-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--green-200);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.solicitudes-section:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(98, 170, 56, 0.12);
}

.solicitudes-list {
    margin-top: 1.5rem;
}

/* FASE 2: Solicitud Item con paleta verde */
.solicitud-item {
    background: white;
    border: 2px solid var(--green-200);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.solicitud-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(98, 170, 56, 0.12);
    transform: translateY(-2px);
}

.solicitud-header-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.radicado-small {
    font-size: 1.1rem;
    color: var(--dark-color);
}

.solicitud-info-item {
    flex: 1;
    margin-left: 1.5rem;
}

.solicitud-info-item p {
    margin: 0.25rem 0;
    color: var(--text-light);
}

.detalle-container {
    padding: 2rem 0;
}

.solicitud-header-detalle {
    background: linear-gradient(135deg, var(--green-50) 0%, white 100%);
    padding: 1.75rem;
    border-radius: 12px;
    border: 2px solid var(--green-200);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.solicitud-header-detalle:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(98, 170, 56, 0.12);
}


.radicado-badge-large {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.detalle-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.detalle-info {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.detalle-panel-derecho {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Mensajería Interna */
.mensajeria-interna {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.mensajeria-interna h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mensajeria-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0.5rem;
}

/* Scrollbar personalizado para mensajería */
.mensajeria-list::-webkit-scrollbar {
    width: 6px;
}

.mensajeria-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.mensajeria-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.mensajeria-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* FASE 3: Mensaje Item con paleta verde */
.mensaje-item {
    background: var(--green-50);
    padding: 0.95rem;
    border-radius: 8px;
    border: 1px solid var(--green-200);
    border-left: 4px solid var(--green-400);
    transition: all 0.2s ease;
}

.mensaje-item:hover {
    transform: translateX(3px);
    background: var(--green-100);
    border-color: var(--primary-color);
    box-shadow: 0 3px 8px rgba(98, 170, 56, 0.1);
}

.mensaje-item.mensaje-interno {
    background: #fff9e6;
    border-left-color: var(--warning-color);
    border-color: #ffeeba;
}

.mensaje-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.mensaje-header strong {
    color: var(--dark-color);
    font-size: 0.9rem;
}

.mensaje-fecha {
    font-size: 0.75rem;
    color: var(--text-light);
}

.mensaje-content {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.badge-interno-mini,
.badge-publico-mini {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-interno-mini {
    background: var(--primary-color);
    color: white;
}

.badge-publico-mini {
    background: var(--secondary-color);
    color: white;
}

.mensajeria-interna-vacia {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    color: var(--text-light);
}

.mensajeria-interna-vacia i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.3;
}

.mensajeria-interna-vacia p {
    font-size: 0.9rem;
}

/* Acciones (ahora debajo de mensajería) */
.detalle-acciones {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.info-group {
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: var(--green-50);
    border-radius: 10px;
    border: 1px solid var(--green-100);
}

.info-group h3 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--green-200);
    padding-bottom: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accion-form {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.accion-form:last-child {
    border-bottom: none;
}

.comentario-interno {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.badge-interno {
    background: #ffc107;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

.badge-firmado {
    background: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

.respuesta-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.respuesta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.respuesta-content {
    background: var(--light-color);
    padding: 1rem;
    border-radius: 5px;
}

/* Admin y Rector */
.admin-container,
.rector-container {
    padding: 2rem 0;
}

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

.admin-card,
.rector-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
}

.admin-card h2,
.rector-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* Tablas */
/* FASE 3: Tablas - Estilo Uniforme */
.table-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--green-200);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    transition: all 0.3s ease;
}

.table-container:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(98, 170, 56, 0.12);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.data-table th {
    padding: 1.1rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th:last-child {
    border-right: none;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--green-100);
    transition: background 0.2s ease;
}

.data-table tbody tr {
    transition: all 0.2s ease;
}

.data-table tbody tr:nth-child(even) {
    background: var(--green-50);
}

.data-table tbody tr:hover {
    background: var(--green-100);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(98, 170, 56, 0.1);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Modales */
.modal {
    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;
}

/* FASE 4: Modales - Estilo Uniforme */
.modal-content {
    background: white;
    border-radius: 12px;
    border: 3px solid var(--green-200);
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 1.75rem;
    border-bottom: 2px solid var(--green-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 9px 9px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-content form {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--green-100);
    background: var(--green-50);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-radius: 0 0 9px 9px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* FASE 2: Badges Generales - Con paleta verde */
.badge-success {
    background: var(--success-color);
    color: white;
    border: 1px solid #229954;
}

.badge-danger {
    background: var(--danger-color);
    color: white;
    border: 1px solid #c0392b;
}

.badge-info {
    background: var(--accent-blue);
    color: white;
    border: 1px solid #2980b9;
}

.badge-secondary {
    background: var(--green-300);
    color: var(--primary-darker);
    border: 1px solid var(--green-400);
}

.badge-warning {
    background: var(--warning-color);
    color: white;
    border: 1px solid #e67e22;
}

.badge-small {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: var(--light-color);
    border-radius: 3px;
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

.color-badge {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* FASE 3: Filtros con paleta verde */
.filtros-section {
    background: linear-gradient(135deg, var(--green-50) 0%, white 100%);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--green-200);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.filtros-section:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(98, 170, 56, 0.12);
}

.filtros-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

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

.filtro-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.9rem;
}

/* Charts */
.chart-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.chart-container {
    margin-top: 1.5rem;
}

.chart-item {
    margin-bottom: 1.5rem;
}

.chart-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.chart-bar {
    height: 30px;
    background: var(--light-color);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.chart-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
}

.chart-value {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Firma */
.firma-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.respuesta-pendiente {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.form-firmar {
    margin-top: 1rem;
}

/* FASE 4: Botones de Acción */
.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #229954 100%);
    color: white;
    border: 2px solid var(--success-color);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.2);
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #c0392b 100%);
    color: white;
    border: 2px solid var(--danger-color);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #e67e22 100%);
    color: white;
    border: 2px solid var(--warning-color);
    box-shadow: 0 4px 8px rgba(243, 156, 18, 0.2);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #2980b9 100%);
    color: white;
    border: 2px solid var(--accent-blue);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
}

.btn-info:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .solicitud-grid {
        grid-template-columns: 1fr;
    }

    .detalle-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-grid,
    .rector-grid {
        grid-template-columns: 1fr;
    }

    .nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
    }

    .nav-actions {
        width: 100%;
        justify-content: space-between;
    }

    .perfil-card {
        grid-template-columns: 1fr;
    }

    .filtros-form {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .solicitud-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .table-container {
        overflow-x: scroll;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

/* Sección de Respuestas Oficiales */
.respuestas-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.respuestas-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* FASE 2: Respuesta Card con paleta verde */
.respuesta-card {
    background: linear-gradient(135deg, var(--green-50) 0%, white 100%);
    border: 2px solid var(--green-200);
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(98, 170, 56, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.respuesta-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(98, 170, 56, 0.15);
}

.respuesta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
    flex-wrap: wrap;
    gap: 1rem;
}

.respuesta-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.respuesta-info i {
    font-size: 2rem;
    color: var(--primary-color);
}

.respuesta-info strong {
    display: block;
    color: #2c3e50;
    font-size: 1.1rem;
}

.respuesta-info small {
    display: block;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.firma-badge {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.firma-badge i {
    font-size: 1rem;
}

.respuesta-directa-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.respuesta-directa-badge i {
    font-size: 1rem;
}

.respuesta-contenido {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #2c3e50;
    font-size: 1.05rem;
    border-left: 4px solid var(--primary-color);
}

.respuesta-contenido p {
    margin: 0;
    white-space: pre-wrap;
}

.respuesta-archivos {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
}

.respuesta-archivos h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.archivos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

/* Respuesta con Archivos - Modo Seguro */
.respuesta-archivos-segura {
    background: #f8f9ff;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1rem;
    border: 2px dashed var(--primary-color);
}

.aviso-seguridad {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 1rem;
}

.aviso-seguridad>i {
    font-size: 2.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.aviso-content h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.aviso-content p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--text-color);
}

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

.btn-reenviar {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.btn-reenviar:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.btn-reenviar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.mensaje-reenvio {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

/* FASE 3: Mensajes de Confirmación con paleta verde */
.mensaje-exito {
    background: var(--green-100);
    color: var(--primary-darker);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
}

.mensaje-error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #e74c3c;
    border-radius: 8px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.archivo-respuesta-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.archivo-respuesta-item:hover {
    border-color: var(--primary-color);
    background: #f0f8e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(121, 181, 48, 0.1);
}

.archivo-icono {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.archivo-icono i {
    font-size: 1.2rem;
    color: white;
}

.archivo-info {
    flex: 1;
}

.archivo-info strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: #2c3e50;
}

.archivo-info small {
    display: block;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.archivo-descarga {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* ==================================================
   ESTILOS PARA SISTEMA DE VALIDACIÓN POR LÍDER
   ================================================== */

/* Toggle de vista Cards/Tabla */
.solicitudes-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* FASE 3: View Controls con paleta verde */
.view-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.btn-view {
    padding: 10px 20px;
    border: 2px solid var(--green-200);
    background: white;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-view:hover {
    border-color: var(--primary-color);
    background: var(--green-50);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(98, 170, 56, 0.1);
}

.btn-view.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(98, 170, 56, 0.2);
}

.btn-view.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(98, 170, 56, 0.3);
}

/* Tabla de solicitudes */
/* FASE 3: Tabla de Solicitudes - Estilo Uniforme */
.solicitudes-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--green-200);
}

.solicitudes-table th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.1rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.solicitudes-table th:last-child {
    border-right: none;
}

.solicitudes-table td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--green-100);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.solicitudes-table tbody tr {
    transition: all 0.2s ease;
}

.solicitudes-table tbody tr:nth-child(even) {
    background: var(--green-50);
}

.solicitudes-table tbody tr:hover {
    background: var(--green-100);
    transform: scale(1.005);
}

.solicitudes-table tr:last-child td {
    border-bottom: none;
}

.row-vencida {
    background: #fce4e4 !important;
    border-left: 4px solid #e74c3c !important;
}

.row-vencida:hover {
    background: #fad7d7 !important;
}

.row-urgente {
    background: #fff3cd !important;
    border-left: 4px solid #f39c12 !important;
}

.row-urgente:hover {
    background: #ffe8a1 !important;
}

.text-muted {
    color: #95a5a6;
    font-style: italic;
}

.badge-correccion-mini {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

/* Badges de categoría */
.badge-categoria-peticion {
    background: var(--primary-color);
    color: white;
}

.badge-categoria-queja {
    background: #e74c3c;
    color: white;
}

.badge-categoria-reclamo {
    background: #e67e22;
    color: white;
}

.badge-categoria-solicitud {
    background: #9b59b6;
    color: white;
}

.badge-categoria-requerimiento {
    background: #3498db;
    color: white;
}

.badge-categoria-felicitacion {
    background: #27ae60;
    color: white;
}

/* Badge de estado pendiente_validacion */
.badge.estado-pendiente_validacion,
.badge.badge-pendiente_validacion {
    background: #f39c12;
}

/* ==========================================
   MODAL DE VALIDACIÓN OPTIMIZADO
   ========================================== */

/* FASE 4: Modal Validación */
.modal-content-validacion {
    max-width: 600px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    border: 3px solid var(--green-200);
    border-radius: 12px;
}

/* FASE 4: Modal Compact con paleta verde */
.modal-header-compact {
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--green-200);
}

.modal-header-compact h2 {
    font-size: 1.2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.modal-body-validacion {
    padding: 1.5rem;
    max-height: calc(90vh - 150px);
    overflow-y: auto;
}

.modal-footer-compact {
    padding: 1rem 1.25rem;
    border-top: 2px solid var(--green-100);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: var(--green-50);
    border-radius: 0 0 12px 12px;
}

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

/* Secciones compactas */
.validacion-section-compact {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
}

.section-title {
    display: block;
    margin-bottom: 0.75rem;
    color: #2c3e50;
    font-size: 0.95rem;
    font-weight: 600;
}

.required {
    color: #e74c3c;
    font-weight: bold;
}

/* Chips de categoría (más compactos) */
.categoria-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
}

.chip-categoria {
    position: relative;
    cursor: pointer;
}

.chip-categoria input[type="radio"] {
    position: absolute;
    opacity: 0;
}

/* FASE 4: Chip Labels */
.chip-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 0.5rem;
    background: white;
    border: 2px solid var(--green-200);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.chip-categoria:hover .chip-label {
    border-color: var(--primary-color);
    background: var(--green-50);
}

.chip-categoria input[type="radio"]:checked+.chip-label {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(98, 170, 56, 0.3);
}

/* FASE 4: Radio Buttons */
.radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.85rem 1rem;
    border: 2px solid var(--green-200);
    border-radius: 8px;
    background: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.radio-label:hover {
    border-color: var(--primary-color);
    background: var(--green-50);
    transform: translateX(3px);
}

.radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.radio-label input[type="radio"]:checked {
    accent-color: var(--primary-color);
}

input[type="radio"]:checked+.radio-label,
.radio-label:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background: var(--green-100);
    font-weight: 600;
    box-shadow: 0 0 0 4px rgba(98, 170, 56, 0.15);
}

/* Botones de acción (diseño moderno) */
.accion-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
}

.btn-accion {
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-accion input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.btn-accion i {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.btn-accion-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.btn-accion strong {
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-accion small {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Colores específicos por tipo de acción */
.btn-accion-aceptar:hover {
    border-color: #27ae60;
    background: #eafaf1;
}

.btn-accion-aceptar i {
    color: #27ae60;
}

.btn-accion-aceptar input[type="radio"]:checked~i,
.btn-accion-aceptar input[type="radio"]:checked~.btn-accion-text {
    color: white;
}

.btn-accion-aceptar:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    border-color: #27ae60;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-accion-rechazar:hover {
    border-color: #e74c3c;
    background: #fceaea;
}

.btn-accion-rechazar i {
    color: #e74c3c;
}

.btn-accion-rechazar input[type="radio"]:checked~i,
.btn-accion-rechazar input[type="radio"]:checked~.btn-accion-text {
    color: white;
}

.btn-accion-rechazar:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-color: #e74c3c;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-accion-redireccionar:hover {
    border-color: #f39c12;
    background: #fef5e7;
}

.btn-accion-redireccionar i {
    color: #f39c12;
}

.btn-accion-redireccionar input[type="radio"]:checked~i,
.btn-accion-redireccionar input[type="radio"]:checked~.btn-accion-text {
    color: white;
}

.btn-accion-redireccionar:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border-color: #f39c12;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

/* Paneles de acción compactos */
.accion-panel-compact {
    background: white;
    padding: 1rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    margin-top: 1rem;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* FASE 4: Form Group Compact */
.form-group-compact {
    margin-bottom: 1rem;
}

.form-group-compact:last-child {
    margin-bottom: 0;
}

.form-group-compact label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
    font-size: 0.9rem;
    font-weight: 600;
}

/* FASE 4: Input Compact */
.input-compact {
    width: 100%;
    padding: 0.7rem;
    border: 2px solid var(--green-200);
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    transition: all 0.3s ease;
}

.input-compact:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--green-50);
    box-shadow: 0 0 0 4px rgba(98, 170, 56, 0.15);
    transform: translateY(-1px);
}

/* Botón de validar en header de detalle */
.solicitud-header-detalle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.solicitud-header-detalle .btn-warning {
    background: #f39c12;
    border-color: #f39c12;
    font-weight: 600;
    padding: 12px 24px;
    font-size: 1rem;
}

.solicitud-header-detalle .btn-warning:hover {
    background: #e67e22;
    border-color: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(243, 156, 18, 0.3);
}

/* Badge warning para líder en asignaciones */
.badge-warning {
    background: #f39c12;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .solicitudes-header-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .view-controls {
        width: 100%;
    }

    .btn-view {
        flex: 1;
        justify-content: center;
    }

    .solicitudes-table {
        font-size: 0.85rem;
    }

    .solicitudes-table th,
    .solicitudes-table td {
        padding: 8px 6px;
    }

    .modal-content-large {
        width: 98%;
        max-width: none;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-label {
        width: 100%;
    }

    .solicitud-header-detalle {
        flex-direction: column;
        align-items: flex-start;
    }

    .solicitud-header-detalle .btn-warning {
        width: 100%;
    }
}

/* Tabla responsive en móvil */
@media (max-width: 640px) {
    .solicitudes-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ==========================================
   NUEVO LAYOUT DETALLE SOLICITUD
   ========================================== */

/* Header con botones de acción */
.solicitud-header-detalle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.header-actions .btn {
    white-space: nowrap;
}

/* Grid de 2 columnas: Principal (65%) + Secundaria (35%) */
.detalle-grid-nuevo {
    display: grid;
    grid-template-columns: 1.85fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Columna principal (izquierda) */
.detalle-columna-principal {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.formulario-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--green-200);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.formulario-section:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(98, 170, 56, 0.12);
}

.formulario-section h2 {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.formulario-contenido {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.formulario-item {
    border-bottom: 1px solid var(--light-color);
    padding-bottom: 0.75rem;
}

.formulario-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.formulario-item strong {
    display: block;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.formulario-item p {
    color: var(--text-color);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Columna secundaria (derecha) */
.detalle-columna-secundaria {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.info-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.info-card .info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.info-card .info-item:last-child {
    margin-bottom: 0;
}

.info-card .info-item label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-card .info-item span {
    color: var(--text-color);
    font-size: 0.95rem;
}

/* Mensajería en columna principal */
.mensajeria-section {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.mensajeria-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mensajeria-list-principal {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0.5rem;
}

/* Custom scrollbar para mensajería principal */
.mensajeria-list-principal::-webkit-scrollbar {
    width: 8px;
}

.mensajeria-list-principal::-webkit-scrollbar-track {
    background: var(--light-color);
    border-radius: 4px;
}

.mensajeria-list-principal::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.mensajeria-list-principal::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* FASE 3: Mensaje Item Principal con paleta verde */
.mensaje-item-principal {
    background: var(--green-50);
    padding: 1.25rem;
    border-radius: 10px;
    border: 2px solid var(--green-200);
    border-left: 4px solid var(--primary-color);
    transition: all 0.2s ease;
}

.mensaje-item-principal:hover {
    transform: translateX(3px);
    background: var(--green-100);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(98, 170, 56, 0.12);
}

.mensaje-item-principal.mensaje-interno {
    background: #fff9e6;
    border-left-color: var(--warning-color);
    border-color: #ffeeba;
}

.mensaje-item-principal.mensaje-interno:hover {
    background: #fff3cd;
    border-color: var(--warning-color);
}

.mensaje-header-principal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.mensaje-header-principal strong {
    color: var(--dark-color);
    font-size: 0.95rem;
}

.mensaje-fecha-principal {
    color: var(--text-light);
    font-size: 0.8rem;
}

.mensaje-content-principal {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Modal tamaño medio */
/* FASE 4: Modal Medium */
.modal-content-medium {
    background: white;
    border-radius: 12px;
    border: 3px solid var(--green-200);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(98, 170, 56, 0.15);
}

.mensajeria-vacia {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    padding: 1rem;
}

/* Badges dentro de mensajes */
.badge-interno-mini,
.badge-publico-mini {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-interno-mini {
    background: var(--warning-color);
    color: white;
}

.badge-publico-mini {
    background: var(--secondary-color);
    color: white;
}

/* Required indicator */
.required {
    color: var(--danger-color);
    font-weight: bold;
}

/* Responsive para detalle */
@media (max-width: 992px) {
    .detalle-grid-nuevo {
        grid-template-columns: 1fr;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .header-actions .btn {
        flex: 1;
    }
}

@media (max-width: 640px) {
    .solicitud-header-detalle {
        flex-direction: column;
        align-items: stretch;
    }

    .header-info {
        justify-content: center;
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
    }

    .header-actions .btn {
        width: 100%;
    }

    .modal-content-medium {
        width: 95%;
        max-height: 90vh;
    }
}

/* ==========================================
   SISTEMA DE FILTRADO INTERACTIVO
   ========================================== */

/* Tarjetas filtrables */
.stat-card-filtrable {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.stat-card-filtrable:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.stat-card-filtrable:active {
    transform: translateY(-1px);
}

/* Tarjeta activa (filtro aplicado) */
.stat-card-active {
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 20px rgba(121, 181, 48, 0.3);
}

.stat-card-active::before {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card-active::after {
    content: '✓';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    color: white;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Notificación de filtro */
.filtro-notificacion {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.filtro-notificacion i {
    font-size: 1.2rem;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mensaje sin resultados mejorado */
/* FASE 3: Mensaje Sin Filtros con paleta verde */
.mensaje-sin-filtros {
    background: var(--green-50);
    padding: 3rem 2rem;
    border-radius: 12px;
    border: 2px dashed var(--green-300);
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.mensaje-sin-filtros i {
    color: var(--green-400);
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.mensaje-sin-filtros p {
    color: var(--primary-dark);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* Indicador visual de tarjeta clickeable */
.stat-card-filtrable .stat-info::after {
    content: '👆 Click para filtrar';
    display: block;
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card-filtrable:hover .stat-info::after {
    opacity: 1;
}

.stat-card-active .stat-info::after {
    content: '✓ Filtro activo';
    opacity: 1;
    color: var(--primary-color);
    font-weight: 600;
}

/* ==========================================
   RESPONSIVE - TARJETAS DE ESTADÍSTICAS
   ========================================== */

/* Tablets y dispositivos medianos */
@media (max-width: 968px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem;
        gap: 0.75rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .stat-info h3 {
        font-size: 1.5rem;
    }

    .stat-info p {
        font-size: 0.85rem;
    }
}

/* Móviles grandes */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 0.875rem;
        gap: 0.625rem;
        flex-direction: column;
        text-align: center;
    }

    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        margin: 0 auto;
    }

    .stat-info {
        width: 100%;
    }

    .stat-info h3 {
        font-size: 1.35rem;
        margin-bottom: 0.2rem;
    }

    .stat-info p {
        font-size: 0.75rem;
        line-height: 1.2;
    }

    .filtro-notificacion {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }

    .stat-card-filtrable .stat-info::after {
        opacity: 1;
        font-size: 0.65rem;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .stat-card {
        padding: 0.75rem 0.5rem;
        gap: 0.5rem;
        border-radius: 8px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        border-radius: 8px;
    }

    .stat-info h3 {
        font-size: 1.25rem;
        margin-bottom: 0.15rem;
        font-weight: 700;
    }

    .stat-info p {
        font-size: 0.7rem;
        line-height: 1.1;
        margin: 0;
    }

    .stat-card-filtrable .stat-info::after {
        font-size: 0.6rem;
        margin-top: 0.15rem;
    }

    /* Tarjetas con animación más suave en móvil */
    .stat-card-vencida,
    .stat-card-urgente,
    .stat-card-alert {
        border-width: 1px;
    }
}

/* Dispositivos muy pequeños */
@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .stat-card {
        flex-direction: row;
        text-align: left;
        padding: 0.75rem;
    }

    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 1rem;
        flex-shrink: 0;
    }

    .stat-info {
        width: auto;
        flex: 1;
    }

    .stat-info h3 {
        font-size: 1.4rem;
    }

    .stat-info p {
        font-size: 0.75rem;
    }
}

/* ==========================================
   OPTIMIZACIÓN GENERAL DEL DASHBOARD
   ========================================== */

@media (max-width: 768px) {
    .dashboard-section {
        padding: 1.5rem 0;
    }

    .page-header {
        margin-bottom: 1.5rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .solicitudes-section {
        padding: 1.25rem;
    }

    .solicitud-item {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }

    .view-controls {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .btn-view {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        flex: 1;
    }

    .btn-view i {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .dashboard-section {
        padding: 1rem 0;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .solicitudes-section {
        padding: 1rem;
        border-radius: 8px;
    }

    .solicitudes-section h2 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .solicitud-item {
        padding: 0.875rem;
        border-radius: 6px;
    }

    .view-controls {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-view {
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
    }

    /* Optimizar filtro de notificación en móvil */
    .filtro-notificacion {
        font-size: 0.85rem;
        padding: 0.6rem 0.875rem;
        margin-bottom: 1rem;
    }

    .filtro-notificacion i {
        font-size: 0.9rem;
    }

    /* Reducir animaciones en móvil para mejor rendimiento */
    .stat-card-vencida,
    .stat-card-urgente,
    .stat-card-alert {
        animation-duration: 2.5s;
    }

    /* Hacer el hover más suave en móvil */
    .stat-card-filtrable:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

@media (max-width: 360px) {
    .page-header h1 {
        font-size: 1.35rem;
    }

    .solicitudes-section {
        padding: 0.875rem;
    }

    .solicitudes-section h2 {
        font-size: 1rem;
    }

    /* Texto más pequeño en tarjetas para dispositivos muy pequeños */
    .stat-info h3 {
        font-size: 1.2rem;
    }

    .stat-info p {
        font-size: 0.7rem;
        line-height: 1.1;
    }
}

/* ==========================================
   ADVERTENCIA DE SESIÓN
   ========================================== */

.session-warning {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    animation: slideInRight 0.5s ease-out;
}

.session-warning-content {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(243, 156, 18, 0.4);
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 400px;
}

.session-warning-content i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.session-warning-content p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    flex: 1;
}

.session-warning-content button {
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid white;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.session-warning-content button:hover {
    background: white;
    color: #f39c12;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .session-warning {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .session-warning-content {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .session-warning-content button {
        width: 100%;
    }
}

/* ==========================================
   RESPONSIVE MODAL DE VALIDACIÓN
   ========================================== */

@media (max-width: 768px) {
    .modal-content-validacion {
        width: 96%;
        max-height: 92vh;
    }

    .modal-header-compact h2 {
        font-size: 1rem;
    }

    .modal-body-validacion {
        padding: 0.75rem;
        max-height: calc(92vh - 130px);
    }

    .categoria-chips {
        grid-template-columns: repeat(2, 1fr);
    }

    .chip-label {
        font-size: 0.8rem;
        padding: 0.5rem 0.3rem;
    }

    .accion-buttons {
        grid-template-columns: 1fr;
    }

    .btn-accion {
        flex-direction: row;
        justify-content: flex-start;
        gap: 1rem;
        padding: 0.75rem;
    }

    .btn-accion i {
        font-size: 1.5rem;
        margin-bottom: 0;
    }

    .btn-accion-text {
        text-align: left;
    }

    .modal-footer-compact {
        padding: 0.5rem 0.75rem;
        flex-wrap: wrap;
    }

    .btn-sm-modal {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .modal-content-validacion {
        width: 98%;
        max-height: 94vh;
        border-radius: 8px;
    }

    .modal-header-compact {
        padding: 0.75rem;
        border-radius: 8px 8px 0 0;
    }

    .modal-header-compact h2 {
        font-size: 0.95rem;
    }

    .modal-body-validacion {
        padding: 0.5rem;
    }

    .validacion-section-compact {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .section-title {
        font-size: 0.9rem;
    }

    .categoria-chips {
        grid-template-columns: 1fr;
    }

    .chip-label {
        font-size: 0.85rem;
        padding: 0.7rem 0.5rem;
    }

    .btn-accion {
        padding: 0.6rem;
    }

    .btn-accion i {
        font-size: 1.3rem;
    }

    .btn-accion strong {
        font-size: 0.85rem;
    }

    .btn-accion small {
        font-size: 0.7rem;
    }

    .accion-panel-compact {
        padding: 0.75rem;
    }

    .form-group-compact label {
        font-size: 0.85rem;
    }

    .input-compact {
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    .modal-footer-compact {
        padding: 0.5rem;
    }

    .btn-sm-modal {
        width: 100%;
        padding: 0.6rem;
    }
}

/* ==========================================
   ADMIN DASHBOARD - SIDEBAR LAYOUT
   ========================================== */

/* Hide global header/footer when sidebar layout is active */
body:has(.admin-sidebar-layout) .header,
body:has(.admin-sidebar-layout) .footer {
    display: none;
}

body:has(.admin-sidebar-layout) .main-content {
    padding: 0;
    min-height: auto;
}

.admin-sidebar-layout {
    display: flex;
    min-height: 100vh;
    background: #f0f2f5;
}

/* --- Sidebar --- */
.admin-sidebar {
    width: 240px;
    background: white;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 50;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #e8e8e8;
}

.sidebar-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-institution {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.sidebar-institution-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #2c3e50;
}

.sidebar-institution-sub {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.25rem;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: var(--green-50);
    color: var(--primary-color);
    border-left-color: var(--green-300);
}

.sidebar-link.active {
    color: var(--primary-color);
    background: var(--green-50);
    font-weight: 600;
    border-left-color: var(--primary-color);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #e8e8e8;
    margin-top: auto;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 0.75rem;
    background: transparent;
    border: none;
    color: #777;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sidebar-logout:hover {
    background: #fce4e4;
    color: var(--danger-color);
}

/* --- Main Content --- */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* --- Top Bar --- */
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 2rem;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 40;
}

.topbar-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: 0.5px;
}

.topbar-user-menu {
    position: relative;
}

.topbar-user-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: white;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    color: #555;
    transition: box-shadow 0.2s;
}

.topbar-user-toggle:hover,
.topbar-user-toggle:focus {
    box-shadow: 0 0 0 3px rgba(121, 181, 48, 0.2);
    outline: none;
}

.topbar-user-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.topbar-chevron {
    font-size: 0.7rem;
    color: #aaa;
}

.topbar-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid #e0e0e0;
    min-width: 260px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 100;
}

.topbar-user-menu.is-open .topbar-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.topbar-dropdown-header {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.topbar-dropdown-header strong {
    font-size: 0.95rem;
    color: #2c3e50;
}

.topbar-dropdown-role {
    font-size: 0.82rem;
    color: #888;
    text-transform: capitalize;
}

.topbar-dropdown-email {
    font-size: 0.82rem;
    color: #888;
}

.topbar-dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.25rem;
    color: #444;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: background 0.15s;
}

.topbar-dropdown-link i {
    width: 18px;
    text-align: center;
    color: var(--primary-color);
}

.topbar-dropdown-link:hover {
    background: #f5f5f5;
}

/* --- Dashboard Content --- */
.admin-dashboard-content {
    padding: 2rem;
    flex: 1;
}

.admin-dashboard-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

/* --- Stat Cards --- */
.admin-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow 0.2s ease;
}

.admin-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.admin-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.admin-stat-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.admin-stat-label {
    font-size: 0.82rem;
    color: #777;
    font-weight: 500;
}

.admin-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.1;
}

/* --- Recent Solicitudes Section --- */
.admin-recent-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.5rem;
}

.admin-recent-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.admin-table-wrapper {
    overflow-x: auto;
}

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

.admin-recent-table thead th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #555;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #e8e8e8;
    white-space: nowrap;
}

.admin-recent-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}

.admin-recent-table tbody tr:last-child {
    border-bottom: none;
}

.admin-recent-table tbody tr:hover {
    background: #fafbfc;
}

.admin-recent-table tbody td {
    padding: 0.85rem 1rem;
    color: #444;
    vertical-align: middle;
}

.td-radicado {
    font-weight: 600;
    color: #2c3e50 !important;
    white-space: nowrap;
}

.td-empty {
    text-align: center;
    padding: 2rem 1rem !important;
    color: #aaa;
    font-style: italic;
}

/* --- Estado Badges inside table --- */
.admin-badge-estado {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* --- Vencimiento labels --- */
.venc-completada {
    color: #555;
    font-weight: 500;
}

.venc-vencida {
    color: var(--danger-color);
    font-weight: 600;
}

.venc-hoy {
    color: var(--warning-color);
    font-weight: 600;
}

.venc-urgente {
    color: #e67e22;
    font-weight: 500;
}

.venc-normal {
    color: var(--success-color);
    font-weight: 500;
}

.fecha-small {
    font-size: 0.78rem;
    color: #999;
}

/* ==========================================
   ADMIN SIDEBAR LAYOUT - RESPONSIVE
   ========================================== */

@media (max-width: 1024px) {
    .admin-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-sidebar-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .sidebar-header {
        width: 100%;
        border-bottom: 1px solid #e8e8e8;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0.5rem;
        gap: 0;
    }

    .sidebar-link {
        padding: 0.5rem 0.75rem;
        border-left: none;
        border-bottom: 2px solid transparent;
        font-size: 0.82rem;
    }

    .sidebar-link.active {
        border-left: none;
        border-bottom-color: var(--primary-color);
    }

    .sidebar-link:hover {
        border-left: none;
        border-bottom-color: var(--green-300);
    }

    .sidebar-footer {
        border-top: none;
        padding: 0.5rem;
    }

    .sidebar-logout {
        padding: 0.5rem 0.75rem;
        font-size: 0.82rem;
    }

    .admin-dashboard-content {
        padding: 1.25rem;
    }

    .admin-stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .admin-stats-row {
        grid-template-columns: 1fr;
    }

    .admin-dashboard-content {
        padding: 1rem;
    }

    .admin-dashboard-title {
        font-size: 1.3rem;
    }

    .admin-recent-section {
        padding: 1rem;
    }
}

/* ============================================================
   MÓDULO: RESERVA DE ESPACIOS
   ============================================================ */

/* --- Thumbnails en tablas admin --- */
.espacio-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.espacio-thumb-sm {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
}

.espacio-thumb-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
}

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

/* --- Tabs de configuración admin --- */
.esp-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.esp-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.esp-tab:hover {
    color: #4A8729;
    background: rgba(74, 135, 41, 0.05);
}

.esp-tab.active {
    color: #4A8729;
    border-bottom-color: #4A8729;
}

.esp-tab-content {
    display: none;
}

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

/* --- Bloques horarios admin --- */
.bloque-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

/* --- Checkbox grid (roles) --- */
.checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* --- User-facing: Espacios grid --- */
.espacios-container {
    padding: 2rem 0;
}

.espacios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.espacio-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

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

.espacio-card-img {
    height: 180px;
    overflow: hidden;
    background: #e9ecef;
}

.espacio-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.espacio-card-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.espacio-card-body {
    padding: 16px;
    flex: 1;
}

.espacio-card-body h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    color: #2c3e50;
}

.espacio-card-desc {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.espacio-card-meta {
    font-size: 0.85rem;
    color: #888;
}

.espacio-card-meta i {
    margin-right: 4px;
}

.espacio-card-footer {
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* --- Stepper --- */
.reserva-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 4px;
}

.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 70px;
}

.stepper-step span {
    font-size: 0.75rem;
    color: #adb5bd;
    text-align: center;
}

.stepper-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e9ecef;
    color: #adb5bd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.stepper-step.active .stepper-circle {
    background: #4A8729;
    color: #fff;
}

.stepper-step.active span {
    color: #4A8729;
    font-weight: 600;
}

.stepper-step.completed .stepper-circle {
    background: #81C556;
    color: #fff;
}

.stepper-step.completed span {
    color: #81C556;
}

.stepper-line {
    width: 40px;
    height: 2px;
    background: #e0e0e0;
    margin: 0 2px;
    margin-bottom: 18px;
}

/* --- Reservation steps --- */
.reserva-step {
    display: none;
}

.reserva-step.active {
    display: block;
}

.reserva-step-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.reserva-step-card h2 {
    margin: 0 0 16px;
    color: #2c3e50;
    font-size: 1.3rem;
}

.reserva-step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 8px;
}

/* --- Conditions box --- */
.condiciones-box {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.6;
}

/* --- Sub-spaces grid --- */
.sub-espacios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.sub-espacio-card {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.sub-espacio-card:hover {
    border-color: #4A8729;
    background: rgba(74, 135, 41, 0.05);
}

.sub-espacio-card.selected {
    border-color: #4A8729;
    background: rgba(74, 135, 41, 0.1);
    box-shadow: 0 0 0 2px rgba(74, 135, 41, 0.3);
}

.sub-espacio-img {
    width: 100%;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #adb5bd;
}

.sub-espacio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sub-espacio-card h4 {
    margin: 4px 0;
    color: #2c3e50;
}

.sub-espacio-card p {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

/* --- FullCalendar overrides --- */
#calendarContainer {
    max-width: 800px;
    margin: 0 auto;
}

.fc .fc-toolbar-title {
    font-size: 1.2rem !important;
    color: #2c3e50;
}

.fc .fc-button-primary {
    background-color: #4A8729 !important;
    border-color: #3A6823 !important;
}

.fc .fc-button-primary:hover {
    background-color: #3A6823 !important;
}

.fc .fc-button-primary:disabled {
    background-color: #81C556 !important;
    border-color: #81C556 !important;
}

.fc .fc-daygrid-day:hover {
    background: rgba(74, 135, 41, 0.05);
}

.fc-day-disabled {
    background: #f5f5f5 !important;
    opacity: 0.5;
    pointer-events: none;
}

.fc-day-selected {
    background: rgba(74, 135, 41, 0.15) !important;
}

.fc .fc-daygrid-day.fc-day-today {
    background: rgba(74, 135, 41, 0.08) !important;
}

/* --- Block selection --- */
.bloques-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.bloque-option {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.bloque-option:hover:not(.bloque-reserved) {
    border-color: #4A8729;
    background: rgba(74, 135, 41, 0.05);
}

.bloque-option.selected {
    border-color: #4A8729;
    background: rgba(74, 135, 41, 0.12);
}

.bloque-option i {
    display: block;
    font-size: 1.3rem;
    margin-bottom: 6px;
    color: #4A8729;
}

.bloque-option span {
    display: block;
    font-size: 0.85rem;
    color: #666;
}

.bloque-reserved {
    background: #f8d7da;
    border-color: #e74c3c;
    cursor: not-allowed;
    opacity: 0.7;
}

.bloque-reserved i {
    color: #e74c3c;
}

.bloque-tag-reserved {
    color: #e74c3c;
    font-weight: 600;
    font-size: 0.8rem;
}

.bloque-tag-available {
    color: #4A8729;
    font-weight: 600;
    font-size: 0.8rem;
}

/* --- Summary --- */
.resumen-reserva {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

.resumen-item {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.95rem;
}

.resumen-item:last-child {
    border-bottom: none;
}

.resumen-item i {
    width: 20px;
    color: #4A8729;
    margin-right: 4px;
}

.resumen-actividad {
    padding-left: 28px;
}

.resumen-field {
    padding: 4px 0;
    font-size: 0.9rem;
    color: #555;
}

.resumen-field span {
    font-weight: 600;
    color: #333;
}

/* --- Rating stars in survey --- */
.rating-group {
    display: flex;
    gap: 8px;
}

.rating-label {
    cursor: pointer;
}

.rating-star {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.2s;
}

.rating-label input:checked+.rating-star {
    background: #4A8729;
    color: #fff;
    border-color: #4A8729;
}

.rating-label input {
    display: none;
}

.radio-label {
    display: block;
    padding: 4px 0;
    cursor: pointer;
}

.radio-label input {
    margin-right: 6px;
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
    .espacios-grid {
        grid-template-columns: 1fr;
    }

    .reserva-stepper {
        gap: 2px;
    }

    .stepper-step {
        min-width: 50px;
    }

    .stepper-step span {
        font-size: 0.65rem;
    }

    .stepper-circle {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .stepper-line {
        width: 20px;
    }

    .sub-espacios-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bloques-grid {
        grid-template-columns: 1fr;
    }

    .bloque-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .esp-tabs {
        gap: 2px;
    }

    .esp-tab {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* --- Reservation status badges --- */
.estado-reserva-pendiente {
    background: #fff3cd;
    color: #856404;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.estado-reserva-confirmada {
    background: #d4edda;
    color: #155724;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.estado-reserva-rechazada {
    background: #f8d7da;
    color: #721c24;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.estado-reserva-cancelada {
    background: #e2e3e5;
    color: #383d41;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.text-warning {
    color: #f39c12;
    font-size: 0.85rem;
}

.stat-clickable {
    cursor: pointer;
    transition: transform 0.2s;
}

.stat-clickable:hover {
    transform: translateY(-2px);
}

.btn-success {
    background: #2ecc71;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
}

.btn-success:hover {
    background: #27ae60;
}