/* ========================================
   OFICINA VIRTUAL LICENCIAS - ESTILOS
   Colores #232D4F y #141414
   ======================================== */

/* Importar fuente Nunito desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700;800&display=swap');

:root {
    --primary-color: #232D4F;
    --primary-dark: #1a2339;
    --secondary-color: #141414;
    --secondary-dark: #0d0d0d;
    --accent-color: #3a4a6f;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #1abc9c;
    --light-bg: #f5f5f5;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
}

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

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light-bg);
    color: var(--gray-800);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* ========================================
   LAYOUT PRINCIPAL
   ======================================== */

.admin-container {
    display: block;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    width: 100%;
}

:root {
    --sidebar-width: 320px;
    --sidebar-minimized-width: 80px;
}

/* ========================================
   SIDEBAR
   ======================================== */

.sidebar {
    width: 320px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(35, 45, 79, 0.2);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

/* Hover en padre: evita "mal selector" con ::-webkit-scrollbar-thumb:hover */
.sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.5);
}

.sidebar.minimized {
    width: 80px;
}

.sidebar.minimized .sidebar-header .sidebar-logo,
.sidebar.minimized .sidebar-header .sidebar-subtitle,
.sidebar.minimized .sidebar-user .user-info,
.sidebar.minimized .nav-link span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar.minimized .sidebar-header {
    padding: 20px 10px;
}

.sidebar.minimized .sidebar-user {
    justify-content: center;
    padding: 15px 10px;
}

.sidebar.minimized .nav-link {
    justify-content: center;
    padding: 15px;
}

.sidebar.minimized .nav-link i {
    margin: 0;
}

.sidebar.minimized .nav-link:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    margin-left: 15px;
    background: var(--gray-800);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 1001;
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    font-weight: 500;
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease;
}

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

.sidebar-toggle {
    margin-right: 20px;
    position: absolute;
    top: 33px;
    left: 20px;
    width: 30px;
    height: 30px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.sidebar-toggle i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    transition: padding 0.3s ease;
}

.sidebar-logo {
    font-size: 1.4rem;
    margin-left: 10px;
    font-weight: 800;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 400;
}

.sidebar-user {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    transition: padding 0.3s ease;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.user-info h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.user-role {
    font-size: 0.875rem;
    opacity: 0.8;
    text-transform: capitalize;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

.nav-link i {
    margin-right: 15px;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    transition: margin 0.3s ease;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    padding-left: 25px;
}

.nav-link.active {
    background: rgba(255,255,255,0.2);
    border-left: 4px solid white;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: white;
}

/* Estilos para submenú */
.nav-item-parent {
    position: relative;
}

.nav-link-parent {
    justify-content: space-between;
}

.nav-chevron {
    margin-left: auto;
    margin-right: 0;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.nav-submenu {
    background: rgba(0, 0, 0, 0.15);
    padding-left: 0;
    margin-left: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
}

.nav-submenu.expanded {
    max-height: 500px;
    opacity: 1;
}

.nav-link-child {
    padding-left: 60px;
    font-size: 0.95rem;
    font-weight: 400;
}

.nav-link-child i {
    font-size: 1rem;
    margin-right: 12px;
}

.nav-link-child:hover {
    background: rgba(255,255,255,0.15);
    padding-left: 65px;
}

.nav-link-child.active {
    background: rgba(255,255,255,0.25);
    border-left: 3px solid white;
    padding-left: 57px;
}

/* Separadores visuales en el menú - diseño minimalista */
.nav-separator {
    margin: 20px 20px 15px 20px;
    height: 1px;
    background: rgba(255,255,255,0.1);
    border: none;
}

/* Etiquetas de grupo en el menú */
.nav-group-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.5);
    padding: 8px 20px 6px;
    margin-top: 4px;
}

/* Badges de notificaciones */
.nav-badge {
    margin-left: auto;
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
}

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

.nav-link:hover .nav-badge {
    background: #c0392b;
    transform: scale(1.1);
}

/* Link de cerrar sesión con estilo especial */
.nav-link-danger {
    color: rgba(255,255,255,0.9) !important;
}

.nav-link-danger:hover {
    background: rgba(231, 76, 60, 0.2) !important;
}

.nav-link-danger.active {
    background: rgba(231, 76, 60, 0.3) !important;
    border-left-color: #e74c3c !important;
}


/* Mejor feedback visual en hover */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: rgba(255,255,255,0.3);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 3px;
}

.nav-link.active::after {
    width: 4px;
    background: white;
}

/* Cuando el sidebar está minimizado */
.sidebar.minimized .nav-submenu {
    display: none !important;
}

.sidebar.minimized .nav-chevron {
    display: none;
}

.sidebar.minimized .nav-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.6rem;
    padding: 2px 6px;
}

.sidebar.minimized .nav-separator {
    margin: 15px 10px;
}

.sidebar.minimized .nav-group-label {
    display: none;
}

/* ========================================
   CONTENIDO PRINCIPAL
   ======================================== */

.main-content {
    margin-left: var(--sidebar-width) !important;
    padding-left: 0 !important;
    width: calc(100% - var(--sidebar-width)) !important;
    max-width: calc(100vw - var(--sidebar-width)) !important;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
    position: relative;
    float: right;
    background: var(--light-bg);
}

.main-content.sidebar-minimized {
    margin-left: var(--sidebar-minimized-width) !important;
    width: calc(100% - var(--sidebar-minimized-width)) !important;
    max-width: calc(100vw - var(--sidebar-minimized-width)) !important;
}

/* Selector CSS puro como respaldo - cuando sidebar tiene clase minimized */
.sidebar.minimized ~ .main-content {
    margin-left: var(--sidebar-minimized-width) !important;
    width: calc(100% - var(--sidebar-minimized-width)) !important;
    max-width: calc(100vw - var(--sidebar-minimized-width)) !important;
}

/* Optimización de espacio cuando el sidebar está minimizado */
.main-content.sidebar-minimized .stats-grid,
.sidebar.minimized ~ .main-content .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.main-content.sidebar-minimized .content-wrapper,
.sidebar.minimized ~ .main-content .content-wrapper {
    padding: 30px 40px;
}

/* Mejorar el uso del espacio en tablas cuando sidebar está minimizado */
.main-content.sidebar-minimized .table-container,
.sidebar.minimized ~ .main-content .table-container {
    overflow-x: auto;
    width: 100%;
}

.main-content.sidebar-minimized .table,
.sidebar.minimized ~ .main-content .table {
    min-width: 100%;
    width: 100%;
}

.top-bar {
    background: white;
    padding: 20px 30px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    box-sizing: border-box;
}

.page-title {
    
    font-weight: 700;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i {
    color: var(--primary-color);
}

.content-wrapper {
    padding: 30px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ========================================
   CARDS Y ESTADÍSTICAS
   ======================================== */

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

.stat-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

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

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stat-card-title {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 5px;
}

.stat-card-change {
    font-size: 0.875rem;
    color: var(--success-color);
    font-weight: 600;
}

/* ========================================
   BOTONES
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: 'Nunito', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

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

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

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* ========================================
   FORMULARIOS (inputs, select, textarea)
   ======================================== */

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--gray-700);
}

.text-muted {
    color: var(--gray-500);
    font-size: 0.9375rem;
    margin-bottom: 16px;
}

/* Inputs, selects y textareas con form-control */
.form-control,
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-width: 0;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--gray-800);
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.form-control::placeholder,
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-400);
}

.form-control:hover,
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--gray-300);
}

.form-control:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(35, 45, 79, 0.12);
}

/* Select personalizado (sin flecha nativa) */
.form-group select,
select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

/* File input */
.form-group input[type="file"],
input[type="file"].form-control {
    padding: 12px 16px;
    border: 2px dashed var(--gray-300);
    border-radius: 10px;
    background: var(--gray-50);
    cursor: pointer;
    font-size: 0.9375rem;
}

.form-group input[type="file"]:hover,
input[type="file"].form-control:hover {
    border-color: var(--gray-400);
    background: var(--gray-100);
}

/* Textarea con altura mínima y resize controlado */
.form-group textarea,
textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Inputs de fecha y hora */
.form-group input[type="date"],
.form-group input[type="time"],
input[type="date"].form-control,
input[type="time"].form-control {
    cursor: pointer;
}

/* ========================================
   TABLAS
   ======================================== */

/* Contenedores de tablas: estilo redondeado unificado (como las cards) */
.table-container,
.table-responsive {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-container {
    /* Mantener compatibilidad */
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.table th {
    padding: 15px;
    text-align: left;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid var(--gray-200);
}

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

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

/* Esquinas redondeadas en tablas dentro de contenedores */
.table-container .table thead th:first-child,
.table-responsive .table thead th:first-child {
    border-top-left-radius: 12px;
}

.table-container .table thead th:last-child,
.table-responsive .table thead th:last-child {
    border-top-right-radius: 12px;
}

.table-container .table tbody tr:last-child td:first-child,
.table-responsive .table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.table-container .table tbody tr:last-child td:last-child,
.table-responsive .table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content,
    .main-content.sidebar-minimized,
    .sidebar.minimized ~ .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        float: none;
    }

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

/* ========================================
   ADMIN LIBRE DEUDA - ESTILOS ESPECÍFICOS
   ======================================== */

/* Barra de filtros */
.filters-bar {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

/* Badges de estado */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.status-pendiente { 
    background: #ffeeba; 
    color: #856404; 
}

.status-badge.status-en_revision { 
    background: #b8daff; 
    color: #004085; 
}

.status-badge.status-aprobado { 
    background: #c3e6cb; 
    color: #155724; 
}

.status-badge.status-rechazado { 
    background: #f5c6cb; 
    color: #721c24; 
}

.status-badge.status-finalizado { 
    background: #d6d8d9; 
    color: #1b1e21; 
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    animation: fadeIn 0.3s;
}

.modal.show {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-100);
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-action {
    border: none;
    background: var(--gray-100);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-action:hover {
    background: var(--primary-color);
    color: white;
}

.modal-header.modal-danger {
    border-bottom: 2px solid #e74c3c;
}

.modal-header.modal-danger h2 {
    color: #e74c3c;
}

#modalRechazar .modal-content {
    border: 2px solid #e74c3c;
}

.modal-action.close {
    font-size: 1.1rem;
}

.modal.fullscreen {
    padding: 0;
}

.modal.fullscreen .modal-content {
    width: 100%;
    max-width: none;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

.modal.fullscreen .modal-content > div:last-child {
    flex: 1;
    overflow-y: auto;
}

/* Secciones de detalle */
.detail-section {
    background: var(--gray-50);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.detail-section label {
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-section p {
    margin: 8px 0;
    color: var(--gray-700);
    line-height: 1.6;
}

.detail-section strong {
    color: var(--gray-800);
    font-weight: 600;
}

.detail-subtitle {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 15px 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-600);
}

.detail-subtitle i {
    font-size: 0.9rem;
}

.detail-subtitle.contribuyente {
    color: #1f6feb;
}

.detail-subtitle.rechazo {
    color: #d93025;
}

.detail-subtitle.aprobacion {
    color: #117a65;
}

.detail-subtitle.gestion {
    color: var(--primary-color);
}

/* Badges de estado en detalle */
.estado-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.estado-badge.estado-pendiente {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.estado-badge.estado-en_revision {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

.estado-badge.estado-aprobado {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.estado-badge.estado-rechazado {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.estado-badge.estado-finalizado {
    background: #e5e7eb;
    color: #374151;
    border: 1px solid #9ca3af;
}

.tipo-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--primary-color);
    color: white;
}

/* Galería de archivos */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.img-thumbnail {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid var(--gray-200);
    transition: all 0.3s;
}

.img-thumbnail:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* Comentarios */
.comment-list {
    max-height: 260px;
    overflow-y: auto;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 12px 15px;
    box-shadow: var(--shadow-sm);
}

.comment-item header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--gray-600);
}

.comment-item p {
    margin: 0;
    color: var(--gray-700);
    white-space: pre-wrap;
}

.comment-form textarea {
    width: 100%;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: 'Nunito', sans-serif;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 10px;
}

.comment-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(35, 45, 79, 0.12);
}

/* Formularios en modales */
.modal-content .form-group {
    margin-bottom: 20px;
}

.modal-content .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-700);
}

.modal-content .form-group input,
.modal-content .form-group select,
.modal-content .form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.modal-content .form-group input:hover,
.modal-content .form-group select:hover,
.modal-content .form-group textarea:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.modal-content .form-group input:focus,
.modal-content .form-group select:focus,
.modal-content .form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(35, 45, 79, 0.12);
}

.modal-content select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.modal-content input[type="file"] {
    padding: 10px;
    border: 2px dashed var(--gray-300);
    border-radius: 10px;
    cursor: pointer;
    background: var(--gray-50);
}

