/* Estilos principales para Ventanilla Única */

:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --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);
}

* {
    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;
}

/* Header */
.header {
    background: white;
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
}

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

.logo span {
    font-size: 1.5rem;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 720px;
}

.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-color);
    color: white;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.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(52, 152, 219, 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, #667eea 0%, #764ba2 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);
}

.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;
}

.perfil-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 2rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
}

.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;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

/* 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;
}

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

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: var(--text-light);
    color: white;
}

.btn-secondary:hover {
    background: #555;
}

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

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

/* Forms */
.input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

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

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

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.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: 2rem 0;
}

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

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

.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.area-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.area-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.area-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

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

.consulta-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
}

.consulta-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 1.5rem auto 0;
}

.consulta-form .input {
    flex: 1;
}

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

.breadcrumb {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

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

.form-header {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    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);
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

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

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

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.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;
}

.solicitud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

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

.estado-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.875rem;
}

.estado-recibida {
    background: #e3f2fd;
    color: #1976d2;
}

.estado-en_revision {
    background: #fff3e0;
    color: #f57c00;
}

.estado-en_tramite {
    background: #f3e5f5;
    color: #7b1fa2;
}

.estado-finalizada {
    background: #e8f5e9;
    color: #388e3c;
}

.estado-rechazada {
    background: #ffebee;
    color: #c62828;
}

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

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

.solicitud-info h2, .solicitud-timeline h2 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.info-item {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.info-item label {
    font-weight: 600;
    width: 150px;
    color: var(--text-light);
}

.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);
}

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

.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;
}

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

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.empty-state i {
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 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;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.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;
}

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

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

.solicitud-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.3s;
}

.solicitud-item:hover {
    box-shadow: var(--shadow);
}

.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: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.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: #2980b9;
}

.mensaje-item {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid #ddd;
    transition: all 0.2s;
}

.mensaje-item:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mensaje-item.mensaje-interno {
    background: #e8f4fd;
    border-left-color: var(--primary-color);
}

.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;
}

.info-group h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 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 */
.table-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

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

.data-table thead {
    background: var(--primary-color);
    color: white;
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background: var(--light-color);
}

.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;
}

.modal-content {
    background: white;
    border-radius: 10px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-color);
    color: white;
    border-radius: 10px 10px 0 0;
}

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

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    opacity: 0.7;
}

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

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

.badge-success {
    background: #28a745;
    color: white;
}

.badge-danger {
    background: #dc3545;
    color: white;
}

.badge-info {
    background: #17a2b8;
    color: white;
}

.badge-secondary {
    background: var(--text-light);
    color: white;
}

.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;
}

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

.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: 500;
}

/* 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;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

/* Responsive */
@media (max-width: 768px) {
    .solicitud-grid {
        grid-template-columns: 1fr;
    }
    
    .detalle-grid {
        grid-template-columns: 1fr;
    }
    
    .areas-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-grid, .rector-grid {
        grid-template-columns: 1fr;
    }
    
    .consulta-form {
        flex-direction: column;
    }
    
    .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: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.respuesta-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.respuesta-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.2);
}

.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: #667eea;
}

.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, #3498db 0%, #2980b9 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 #667eea;
}

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

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

.respuesta-archivos h4 {
    color: #667eea;
    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 #667eea;
}

.aviso-seguridad {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 1rem;
}

.aviso-seguridad > i {
    font-size: 2.5rem;
    color: #667eea;
    flex-shrink: 0;
}

.aviso-content h4 {
    color: #667eea;
    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: #667eea;
    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;
}

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

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

@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: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.1);
}

.archivo-icono {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 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: #667eea;
    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;
}

.view-controls {
    display: flex;
    gap: 10px;
}

.btn-view {
    padding: 10px 20px;
    border: 2px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-view:hover {
    border-color: #3498db;
    background: #ecf8ff;
}

.btn-view.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Tabla de solicitudes */
.solicitudes-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.solicitudes-table th {
    background: #34495e;
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.solicitudes-table td {
    padding: 12px;
    border-bottom: 1px solid #ecf0f1;
    font-size: 0.9rem;
}

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

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

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

.row-vencida:hover {
    background: #fad7d7 !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: #3498db; 
    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-felicitacion { 
    background: #27ae60; 
    color: white;
}

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

/* Modal de validación (más grande) */
.modal-content-large {
    max-width: 800px;
    width: 95%;
}

.validacion-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.validacion-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* Radio groups para categorías */
.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s;
    background: white;
    font-weight: 500;
}

.radio-label:hover {
    border-color: #3498db;
    background: #ecf8ff;
}

.radio-label input[type="radio"] {
    cursor: pointer;
}

.radio-label input[type="radio"]:checked {
    accent-color: #3498db;
}

input[type="radio"]:checked + .radio-label,
.radio-label:has(input[type="radio"]:checked) {
    border-color: #3498db;
    background: #ecf8ff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Radio groups verticales para acciones */
.radio-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label-vertical {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s;
    background: white;
}

.radio-label-vertical:hover {
    border-color: #3498db;
    background: #ecf8ff;
}

.radio-label-vertical input[type="radio"] {
    margin-top: 3px;
    cursor: pointer;
}

.radio-label-vertical:has(input[type="radio"]:checked) {
    border-color: #3498db;
    background: #ecf8ff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Paneles de acción dinámicos */
.accion-panel {
    background: white;
    padding: 20px;
    border: 2px solid #3498db;
    border-radius: 8px;
    margin-top: 15px;
    animation: fadeIn 0.3s ease-in-out;
}

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

.accion-panel h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accion-panel .form-group {
    margin-bottom: 15px;
}

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

/* 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: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

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

.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: #2980b9;
}

.mensaje-item-principal {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.mensaje-item-principal:hover {
    transform: translateX(2px);
    box-shadow: var(--shadow);
}

.mensaje-item-principal.mensaje-interno {
    background: #fff9e6;
    border-left-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 */
.modal-content-medium {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.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(52, 152, 219, 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, #667eea 0%, #764ba2 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 */
.mensaje-sin-filtros {
    background: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.mensaje-sin-filtros i {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.mensaje-sin-filtros p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* 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 para filtros */
@media (max-width: 768px) {
    .filtro-notificacion {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
    
    .stat-card-filtrable .stat-info::after {
        opacity: 1;
        font-size: 0.65rem;
    }
}

