/*========================================
   CFE INSIGHT - STYLESHEET
   Organized by: Universal → Page-Specific
   Each page: Layout → Buttons → Interactions → Mobile
   ======================================== */

/* ========================================
   UNIVERSAL STYLES (Shared across all pages)
   ======================================== */

/* ----- Reset & Base ----- */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(135deg, #C8E6C9 0%, #F1F8E9 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    padding-top: 110px;
    padding-bottom: 150px;
}

body::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 5%;
    width: 80px;
    height: 55px;
    background: rgba(76, 175, 80, 0.12);
    border-radius: 60% 40% 70% 30%;
    z-index: 1;
    transform: rotate(-10deg);
}

body::after {
    content: '';
    position: absolute;
    bottom: 20%;
    left: 8%;
    width: 65px;
    height: 40px;
    background: rgba(255, 193, 7, 0.10);
    border-radius: 0 50% 50% 50%;
    z-index: 1;
    transform: skew(10deg);
}

/* ----- Common Layout ----- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 10px 60px;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.15);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-full {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(255, 193, 7, 0.25);
    padding: 5px 0;
    text-align: center;
    color: #2E7D32;
    font-size: 0.75em;
    z-index: 2;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-text {
    font-size: 1.2em;
    font-weight: bold;
    color: #2E7D32;
    margin: 0;
}

/* ----- Universal Buttons ----- */
.btn-back {
    background: transparent;
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #2E7D32;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-export {
    background: #4CAF50;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-export:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.btn-export:active {
    transform: translateY(0);
}

.btn-logout {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s;
}

/* ----- Header Actions ----- */
.header-actions {
    padding-right: 100px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-add {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-edit {
    background: linear-gradient(135deg, #FFC107, #FF8F00);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.9em;
    transition: all 0.3s;
}

.btn-view {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.9em;
    transition: all 0.3s;
}

.btn-view:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.btn-delete {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.9em;
    transition: all 0.3s;
}

/* ----- Universal Button Interactions ----- */
.btn-back:hover {
    background: rgba(76, 175, 80, 0.1);
    color: #2E7D32;
    transform: translateY(-1px);
}

.btn-back:hover i {
    transform: rotate(180deg);
    transition: transform 0.3s ease-in-out;
}

.btn-logout:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.3);
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
    background: linear-gradient(135deg, #45a049, #2E7D32);
}

.btn-edit:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.btn-delete:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.3);
}

/* ----- Universal Search & Filters ----- */
.search-section {
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.filters-container {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.search-group {
    flex: 1;
    position: relative;
    min-width: 200px;
}

.filter-group {
    flex: 1;
    min-width: 150px;
    max-width: 200px;
    cursor: pointer;
    background: white;
    transition: all 0.3s ease;
    min-height: 44px;
}

.search-input {
    position: relative;
    display: flex;
    align-items: center;
    border: 2px solid rgba(76, 175, 80, 0.2);
    border-radius: 12px;
    padding: 12px 12px 12px 40px;
    flex: 1;
    background: white;
    transition: all 0.3s ease;
    min-height: 44px;
    min-width: 400px;

}

.search-input i.bi-search {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #2E7D32;
    font-size: 1rem;
    pointer-events: none;
}

.search-input input {
    border: none;
    background: transparent;
    color: #2E7D32;
    font-size: 1em;
    width: 100%;
    padding: 0;
    outline: none;
}

.search-input input::placeholder {
    color: #999;
}

.filters-select {
    position: relative;
    display: flex;
    align-items: center;
    border: 2px solid rgba(76, 175, 80, 0.2);
    border-radius: 12px;
    padding: 12px 40px 12px 16px;
    min-width: 180px;
    flex: 1;
    max-width: 250px;
    cursor: pointer;
    background: white;
    transition: all 0.3s ease;
}

.filters-select select {
    border: none;
    background: transparent;
    color: #2E7D32;
    flex: 1;
    font-size: 1em;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 0;
}

.filters-select label {
    font-weight: bold;
    color: #2E7D32;
    margin-right: 0.5rem;
    white-space: nowrap;
    font-size: 0.9rem;
}

/* Custom Select */
.custom-select {
    position: relative;
    width: 100%;
    user-select: none;
}

.select-selected {
    color: #999;
    font-size: 1em;
    padding: 8px 0;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.select-selected.selected {
    color: #2E7D32;
    font-weight: 500;
}

.select-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 10;
    list-style: none;
    padding: 0;
    margin: 0;
}

.select-items.show {
    max-height: 400px;
    padding: 8px 0;
    overflow-y: auto;
}

.select-items div {
    padding: 10px 16px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.select-items div.same-as-selected {
    background: rgba(76, 175, 80, 0.08);
    color: #4CAF50;
    font-weight: 600;
}

.select-items .bi-check-lg {
    color: #4CAF50;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.select-items div.same-as-selected .bi-check-lg {
    opacity: 1;
}

.custom-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #2E7D32;
    font-size: 1rem;
    pointer-events: none;
    transition: transform 0.3s ease-in-out;
    z-index: 1;
}

/* ----- Universal Search & Filter Interactions ----- */
.search-input:hover {
    border-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

.filters-select:hover {
    border-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

.filters-select:hover .custom-arrow,
.select-items.show+.custom-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.select-items div:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(46, 125, 50, 0.05));
    color: #2E7D32;
    transform: translateX(4px);
}

/* ----- Universal Modals ----- */
.modal-content {
    border-radius: 12px;
    border: 2px solid rgba(255, 193, 7, 0.3);
    z-index: 1061;
}

.modal-header {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}

.modal-header h3 {
    font-size: 1.2rem;
    margin: 0;
}

.modal-header h3 i {
    font-size: 1rem;
}

.modal-body {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    position: relative;
    z-index: 1062;
}

.modal-body .form-group {
    margin-bottom: 15px;
}

.modal-body label {
    font-weight: bold;
    color: #2E7D32;
}

.modal-body input,
.modal-body select {
    border: 2px solid rgba(76, 175, 80, 0.2);
    border-radius: 8px;
    padding: 10px;
    width: 100%;
    transition: border-color 0.3s;
    position: relative;
    z-index: 1062;
}

.modal-body input:focus,
.modal-body select:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
    outline: none;
}

/* Bootstrap Modal Fix - Asegurar interactividad */
.modal {
    pointer-events: auto;
}

.modal.show {
    display: flex !important;
    pointer-events: auto;
}

.modal-dialog {
    pointer-events: auto;
    z-index: 1061 !important;
}

.modal-content {
    pointer-events: auto;
    z-index: 1061 !important;
}

.modal-header,
.modal-body,
.modal-footer {
    pointer-events: auto;
}

.modal-header button,
.modal-body input,
.modal-body select,
.modal-body textarea,
.modal-body button,
.modal-footer button {
    pointer-events: auto;
    cursor: pointer;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-dialog {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: relative;
    z-index: 1001;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal-btn-confirm {
    background: #f44336;
    color: white;
}

.modal-btn-cancel {
    background: #e0e0e0;
    color: #333;
}

.modal-btn-confirm:hover {
    background: #d32f2f;
    transform: translateY(-1px);
}

.modal-btn-cancel:hover {
    background: #ccc;
}

.modal-btn-primary {
    background: #4CAF50;
    color: white;
}

.modal-btn-primary:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.modal-btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.modal-btn-secondary:hover {
    background: #ccc;
    transform: translateY(-1px);
}

.modal-btn-danger {
    background: #f44336;
    color: white;
}

.modal-btn-danger:hover {
    background: #d32f2f;
    transform: translateY(-1px);
}

/* ----- Universal Utilities ----- */
.hidden {
    display: none !important;
}

/* ----- Soporte IA Styles ----- */
.additional-features {
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
    border: 2px solid rgba(255, 193, 7, 0.3);
}

.additional-features h3 {
    color: #2E7D32;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.additional-features .nav-tabs {
    border-bottom: 2px solid rgba(76, 175, 80, 0.2);
    margin-bottom: 1.5rem;
}

.additional-features .nav-link {
    color: #666;
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.additional-features .nav-link:hover {
    color: #2E7D32;
    background: rgba(76, 175, 80, 0.05);
}

.additional-features .nav-link.active {
    color: #2E7D32;
    background: white;
    border-bottom-color: #4CAF50;
}

.additional-features .tab-content {
    padding: 1rem 0;
}

.reporte-section,
.sugerencias-section {
    padding: 1.5rem;
    background: rgba(76, 175, 80, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.1);
}

.reporte-section p,
.sugerencias-section p {
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.reporte-section .form-group,
.sugerencias-section .form-group {
    margin-bottom: 1.5rem;
}

.reporte-section label,
.sugerencias-section label {
    font-weight: 600;
    color: #2E7D32;
    margin-bottom: 0.5rem;
    display: block;
}

.reporte-section select,
.reporte-section textarea,
.sugerencias-section select,
.sugerencias-section input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid rgba(76, 175, 80, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.reporte-section select:focus,
.reporte-section textarea:focus,
.sugerencias-section select:focus,
.sugerencias-section input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
    outline: none;
}

.reporte-section .btn,
.sugerencias-section .btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.reporte-section .btn-success {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
}

.reporte-section .btn-success:hover {
    background: linear-gradient(135deg, #45a049, #2E7D32);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.sugerencias-section .btn-warning {
    background: linear-gradient(135deg, #FFC107, #FF8F00);
    color: white;
}

.sugerencias-section .btn-warning:hover {
    background: linear-gradient(135deg, #FF8F00, #FF6F00);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

#reporteResultado,
#sugerenciasResultado {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 8px;
    display: none;
}

#reporteResultado {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

#sugerenciasResultado {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
}

#reporteResultado h5,
#sugerenciasResultado h5 {
    color: #2E7D32;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

#reporteContenido,
#sugerenciasContenido {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid rgba(76, 175, 80, 0.1);
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
}

.btn-outline-primary,
.btn-outline-warning {
    border: 2px solid;
    background: transparent;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}

.btn-outline-primary:hover {
    background: #007bff;
    color: white;
    transform: translateY(-1px);
}

.btn-outline-warning {
    color: #ffc107;
    border-color: #ffc107;
}

.btn-outline-warning:hover {
    background: #ffc107;
    color: #212529;
    transform: translateY(-1px);
}

/* Responsive for additional features */
@media (max-width: 768px) {
    .additional-features {
        padding: 1rem;
        margin-top: 1.5rem;
    }

    .additional-features h3 {
        font-size: 1.3rem;
    }

    .additional-features .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .reporte-section,
    .sugerencias-section {
        padding: 1rem;
    }

    .reporte-section .btn,
    .sugerencias-section .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 1rem;
    }

    #reporteResultado,
    #sugerenciasResultado {
        padding: 1rem;
    }
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #999;
    font-size: 1.2rem;
    display: none;
    width: 100%;
}

.no-results i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

/* ----- Universal Status Badges ----- */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 500;
    display: inline-block;
    margin: 1rem 0;
}

.status-activo {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-pendiente {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-completado {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ----- Botón flotante Ayuda ----- */
.ayuda-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: linear-gradient(135deg, #FFC107, #FF8F00);
    border: none;
    color: white;
    padding: 12px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9em;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
    cursor: pointer;
}

.ayuda-btn i {
    font-size: 1.2em;
}

.ayuda-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 193, 7, 0.5);
    background: linear-gradient(135deg, #FF8F00, #FF6F00);
}

/* ----- Botón flotante Soporte IA ----- */
.soporte-ia-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border: none;
    color: white;
    padding: 12px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9em;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
    cursor: pointer;
}

.soporte-ia-btn i {
    font-size: 1.2em;
}

.soporte-ia-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.5);
    background: linear-gradient(135deg, #1976D2, #1565C0);
}

/* ----- Tema Oscuro/Claro Toggle ----- */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(76, 175, 80, 0.2);
    border-radius: 60px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4CAF50;
}

.theme-toggle i {
    font-size: 1.2em;
    color: #2E7D32;
}

/* ----- Tema Oscuro ----- */
body.dark-theme {
    background: linear-gradient(135deg, #121212 0%, #1e1e1e 100%);
    color: #90EE90;
}

body.dark-theme .header {
    background: rgba(33, 33, 33, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

body.dark-theme .footer-full {
    background: rgba(33, 33, 33, 0.9);
    border-top: 1px solid rgba(255, 193, 7, 0.25);
    color: #e0e0e0;
}

body.dark-theme .dashboard-container,
body.dark-theme .usuarios-container,
body.dark-theme .entities-container,
body.dark-theme .create-form-container {
    background: #1e1e1e;
    color: #e0e0e0;
    border: 2px solid rgba(255, 193, 7, 0.3);
}

body.dark-theme .search-input,
body.dark-theme .filters-select,
body.dark-theme .form-control {
    background: #2a2a2a;
    border-color: rgba(76, 175, 80, 0.3);
    color: #e0e0e0;
}

body.dark-theme .search-input input,
body.dark-theme .filters-select select {
    color: #e0e0e0;
}

body.dark-theme .entity-card,
body.dark-theme .commitment-card,
body.dark-theme .record-row {
    background: #2a2a2a;
    border-color: rgba(76, 175, 80, 0.3);
    color: #e0e0e0;
}

body.dark-theme .modal-content {
    background: #1e1e1e;
    color: #e0e0e0;
    border-color: rgba(255, 193, 7, 0.3);
}

body.dark-theme .modal-header {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
}

body.dark-theme .theme-toggle {
    background: rgba(33, 33, 33, 0.9);
    border-color: rgba(76, 175, 80, 0.3);
}

body.dark-theme .theme-toggle i {
    color: #e0e0e0;
}

body.dark-theme .page-btn {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

body.dark-theme .page-btn.active {
    background: linear-gradient(135deg, #FFC107, #FF8F00);
    color: #2E7D32;
}

/* Override green text to white in dark theme */
body.dark-theme .welcome-text,
body.dark-theme .btn-back,
body.dark-theme .search-input i.bi-search,
body.dark-theme .search-input input,
body.dark-theme .filters-select select,
body.dark-theme .filters-select label,
body.dark-theme .select-selected.selected,
body.dark-theme .custom-arrow,
body.dark-theme .modal-body label,
body.dark-theme .form-label,
body.dark-theme .historial-header h4,
body.dark-theme .historial-item h5,
body.dark-theme .date-filter input[type="date"],
body.dark-theme .entity-name,
body.dark-theme .detail-label,
body.dark-theme .compromisos-list h6,
body.dark-theme .header-content h1,
body.dark-theme .commitment-card h3,
body.dark-theme .commitment-info h2,
body.dark-theme .sub-section h4,
body.dark-theme .progress-label,
body.dark-theme .tab-btn.active,
body.dark-theme .filter-group label,
body.dark-theme .page-btn,
body.dark-theme .record-field strong,
body.dark-theme .footer-full,
body.dark-theme .theme-toggle i,
body.dark-theme .title-icon,
body.dark-theme .entity-state,
body.dark-theme .status-icon,
body.dark-theme .record-icon {
    color: white;
}

/* ----- File List Styles ----- */
.file-list {
    max-height: 150px;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-in-out;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.9em;
    animation: slideInRight 0.3s ease-out;
    transition: all 0.3s ease;
}

.file-item:hover {
    background: rgba(76, 175, 80, 0.15);
    transform: translateX(2px);
}

.file-item i {
    color: #4CAF50;
}

.remove-file {
    margin-left: auto;
    padding: 0.25rem 0.5rem;
    font-size: 0.8em;
    transition: all 0.2s ease;
}

.remove-file:hover {
    transform: scale(1.1);
    color: #d32f2f;
}

/* ----- Historial Styles ----- */
.historial-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
    border: 2px solid rgba(255, 193, 7, 0.3);
    animation: slideInUp 0.5s ease-out;
}

.historial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(76, 175, 80, 0.2);
}

.historial-header h4 {
    color: #2E7D32;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.historial-list {
    max-height: 400px;
    overflow-y: auto;
}

.historial-item {
    padding: 1rem;
    border: 1px solid rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
    background: rgba(76, 175, 80, 0.05);
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease-out;
}

.historial-item:hover {
    background: rgba(76, 175, 80, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
}

.historial-item h5 {
    color: #2E7D32;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.historial-item p {
    color: #666;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.historial-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
    color: #999;
}

.historial-archivos {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(76, 175, 80, 0.1);
}

.historial-archivos small {
    color: #4CAF50;
    font-weight: 500;
}

/* ----- Animations ----- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----- Button Animations ----- */
.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

/* ----- Loading Spinner ----- */
.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

body.dark-theme .file-item {
    background: rgba(76, 175, 80, 0.2);
    color: #e0e0e0;
}

/* ----- Universal Responsive ----- */
@media (max-width: 768px) {
    body {
        padding-top: 100px;
        padding-bottom: 50px;
    }

    .header {
        padding: 10px 30px;
    }

    .welcome-text {
        font-size: 1em;
    }

    .main-container {
        padding: 0 20px;
    }

    .ayuda-btn {
        bottom: 80px;
        right: 15px;
        padding: 10px 14px;
        font-size: 0.8em;
    }

    .soporte-ia-btn {
        bottom: 15px;
        right: 15px;
        padding: 10px 14px;
        font-size: 0.8em;
    }
}

/* ===== REGISTROS.HTML ===== */

/* ----- Actions Section ----- */
.actions-section {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

/* ----- Date Filter Styling ----- */
.date-filter {
    position: relative;
    max-width: 350px;
}

.date-filter input[type="date"] {
    border: 2px solid rgba(76, 175, 80, 0.2);
    border-radius: 12px;
    padding: 12px 40px 12px 16px;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
    color: #2E7D32;
    font-size: 0.65em;
    width: 100%;
    position: relative;
}

.date-filter input[type="date"]:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
    outline: none;
}

.date-filter input[type="date"]::-webkit-calendar-picker-indicator {
    display: none;
}



.date-filter .bi-calendar {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #2E7D32;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

/* ========================================
   PAGE-SPECIFIC STYLES
   ======================================== */

/* ===== LOGIN.HTML ===== */

/* ----- Body ----- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    margin: 0;
    padding: 0;
}

/* ----- Login Page Layout ----- */
.login-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 420px;
}

/* ----- Logo & Brand ----- */
.logo-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
    text-align: center;
}

.logo-brand-img {
    height: 175px;
    width: auto;
    margin-bottom: 2px;
}

.brand-name {
    font-size: 2.2em;
    font-weight: 700;
    color: #2E7D32;
    margin: 0;
    letter-spacing: 0.5px;
}

/* ----- Login Container ----- */
.login-container {
    width: 100%;
    padding: 35px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

/* ----- Form Groups ----- */
.form-group {
    width: 100%;
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #333333;
    font-size: 0.95em;
    margin-bottom: 8px;
    text-align: left;
}

.form-control {
    width: 100%;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    padding: 11px 12px;
    font-size: 0.95em;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #fafafa;
}

.form-control:focus {
    border-color: #4CAF50;
    background: white;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #999999;
}

.input-group {
    display: flex;
    width: 100%;
}

.input-group .form-control {
    flex: 1;
    border-radius: 6px 0 0 6px;
}

.btn-toggle-password {
    padding: 11px 14px;
    border: 1px solid #d0d0d0;
    border-left: none;
    border-radius: 0 6px 6px 0;
    background: #fafafa;
    color: #666666;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9em;
}

.btn-toggle-password:hover {
    background: #f0f0f0;
    color: #333333;
}

/* ----- Buttons ----- */
.btn-login {
    width: 100%;
    background: #4CAF50;
    border: none;
    color: white;
    padding: 11px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.2s;
    cursor: pointer;
    margin-top: 10px;
}

.btn-login:hover {
    background: #45a049;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.25);
}

.btn-login:active {
    background: #2E7D32;
}

.btn-login:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* ----- Alerts ----- */
#alertContainer {
    margin-bottom: 20px;
}

.alert {
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 0.9em;
    margin: 0;
    border: none;
}

.alert-danger {
    background: #ffebee;
    color: #c62828;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
}

/* ----- Footer Login ----- */
.footer-login {
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    padding: 12px 20px;
    text-align: center;
    font-size: 0.8em;
    color: #666666;
}

.footer-login p {
    margin: 0;
}

/* ----- Mobile ----- */
@media (max-width: 576px) {
    .login-wrapper {
        max-width: 100%;
    }

    .logo-brand {
        margin-bottom: 30px;
    }

    .logo-brand-img {
        height: 45px;
    }

    .brand-name {
        font-size: 1.5em;
    }

    .login-container {
        padding: 25px;
        border-radius: 8px;
    }

    .login-title {
        font-size: 1.3em;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-control {
        padding: 10px 11px;
        font-size: 0.9em;
    }
}

/* ===== DASHBOARD.HTML ===== */

/* ----- Header Dashboard ----- */
.header-dashboard {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 14px;
    align-items: center;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.header-col {
    display: flex;
    align-items: center;
}

.header-col-1 {
    justify-content: flex-start;
}

.header-col-2 {
    justify-content: center;
}

.header-col-3 {
    justify-content: flex-end;
    gap: 8px;
}

.welcome-text {
    font-size: 1.1em;
    font-weight: 600;
    color: #333333;
    margin: 0;
}

.header-search {
    display: flex;
    gap: 8px;
    width: 100%;
}

.header-search input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 0.85em;
    background: #fafafa;
    transition: all 0.2s;
}

.header-search input:focus {
    outline: none;
    border-color: #4CAF50;
    background: white;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.btn-search {
    padding: 10px 14px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.btn-search:hover {
    background: #45a049;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-btn {
    width: 42px;
    height: 42px;
    background: #f5f5f5;
    border: 2px solid #d0d0d0;
    border-radius: 8px;
    cursor: pointer;
    color: #333333;
    font-size: 1.1em;
    transition: all 0.2s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn:hover {
    background: #eeeeee;
    color: #4CAF50;
    border-color: #4CAF50;
}

.btn-logout {
    padding: 8px 16px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-logout:hover {
    background: #ff5252;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: #ff6b6b;
    color: white;
    border-radius: 50%;
    font-size: 0.7em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-menu {
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

.dropdown-item {
    padding: 10px 14px;
    font-size: 0.9em;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #f5f5f5;
    color: #4CAF50;
}

/* ----- Layout ----- */
.dashboard-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 10px 20px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 12px;
    align-items: start;
}

.widgets-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
    grid-column: span 3;
}

.content-grid {
    display: contents;
}

/* ----- Dashboard Widgets ----- */
.dashboard-widget {
    background: white;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    min-height: auto;
}

.dashboard-widget:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border-color: #d0d0d0;
}

.dashboard-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #4CAF50;
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.widget-icon {
    width: 28px;
    height: 28px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4CAF50;
    font-size: 0.95rem;
}

.widget-title {
    font-size: 0.8em;
    font-weight: 600;
    color: #333333;
    margin: 0;
}

.widget-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2E7D32;
    margin: 2px 0;
    line-height: 1;
}

.widget-meta {
    font-size: 0.75em;
    color: #666666;
    margin-top: 2px;
    font-weight: 400;
}

.widget-trend {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75em;
    font-weight: 600;
    margin-top: 6px;
    padding: 3px 6px;
    border-radius: 6px;
    width: fit-content;
}


.widget-trend.positive {
    color: #2E7D32;
    background: rgba(46, 125, 50, 0.1);
}

.widget-trend.negative {
    color: #C62828;
    background: rgba(198, 40, 40, 0.1);
}

.widget-trend.neutral {
    color: #455A64;
    background: rgba(69, 90, 100, 0.1);
}

.widget-content {
    margin-top: 14px;
}

.widget-content p {
    color: #666666;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0;
    font-weight: 400;
}

/* AI Widget special styling */
.ai-widget::before {
    background: #2196F3;
}

.ai-widget .widget-icon {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.ai-widget .widget-title {
    color: #1976D2;
}

/* ----- Content Cards ----- */
.content-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    overflow: hidden;
    transition: all 0.2s;
    height: fit-content;
    margin-bottom: -200px;
}

.content-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border-color: #d0d0d0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #fafafa;
    border-bottom: 1px solid #e8e8e8;
}

.card-header h3 {
    margin: 0;
    color: #333333;
    font-size: 0.9em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-header h3 i {
    color: #4CAF50;
}

.btn-link {
    background: none;
    border: none;
    color: #4CAF50;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

.btn-link:hover {
    color: #2E7D32;
}

.card-content {
    padding: 14px 16px;
    max-height: 350px;
    overflow-y: auto;
}

/* Actions Card - tamaño normal */
.actions-card .card-content {
    padding: 16px;
    max-height: none;
    overflow-y: visible;
}

/* Deadlines & Calendar - columna 3, debajo del widget Insights IA */
.content-card:has(#upcomingDeadlinesList),
.calendar-card {
    grid-column: 3;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 28px;
    height: 28px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4CAF50;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 0.85em;
    font-weight: 500;
    color: #333333;
    margin: 0 0 2px 0;
}

.activity-time {
    font-size: 0.75em;
    color: #999999;
    margin-top: 0;
}

/* ----- Mobile Responsive ----- */
@media (max-width: 1024px) {
    .header-dashboard {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .header-col-2 {
        order: 3;
        grid-column: 1;
    }

    .dashboard-content {
        grid-template-columns: 1fr;
        padding: 12px 16px;
    }

    .widgets-row {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        grid-column: 1;
    }
}

@media (max-width: 576px) {
    .header-dashboard {
        grid-template-columns: 1fr;
        padding: 12px 16px;
    }

    .welcome-text {
        font-size: 1.1em;
    }

    .header-search input {
        font-size: 0.85em;
        padding: 8px 12px;
    }

    .header-actions {
        gap: 6px;
    }

    .btn-logout {
        padding: 6px 12px;
        font-size: 0.85em;
    }

    .dashboard-content {
        padding: 12px;
        grid-template-columns: 1fr;
    }

    .widgets-row {
        gap: 10px;
        margin-bottom: 12px;
        grid-template-columns: 1fr;
        grid-column: 1;
    }

    .dashboard-widget {
        padding: 12px;
        min-height: auto;
    }

    .widget-header {
        gap: 10px;
        margin-bottom: 10px;
    }

    .widget-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .widget-title {
        font-size: 0.9em;
    }

    .widget-value {
        font-size: 1.8rem;
    }
}

/* ===== FOOTER ===== */
.footer-full {
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    padding: 5px 12px;
    text-align: center;
    font-size: 0.7em;
    color: #666666;
    margin-top: 8px;
}

.footer-full p {
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-container {
    flex: 1;
}

.activity-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(76, 175, 80, 0.1);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-weight: 500;
    color: #2E7D32;
    margin-bottom: 4px;
    line-height: 1.4;
}

.activity-meta {
    font-size: 0.85rem;
    color: #666;
}

/* ----- Deadline Items ----- */
.deadline-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(76, 175, 80, 0.1);
}

.deadline-item:last-child {
    border-bottom: none;
}

.deadline-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #FFC107, #FF8F00);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.deadline-content {
    flex: 1;
}

.deadline-title {
    font-weight: 500;
    color: #2E7D32;
    margin-bottom: 4px;
    line-height: 1.4;
}

.deadline-date {
    font-size: 0.85rem;
    color: #666;
}

.deadline-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

.deadline-status.urgent {
    background: #ffebee;
    color: #c62828;
}

/* ----- Calendar Styles ----- */
.calendar-card .card-content {
    padding: 0;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-icon {
    background: none;
    border: 1px solid rgba(76, 175, 80, 0.2);
    color: #2E7D32;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4CAF50;
}

#currentMonth {
    font-weight: 600;
    color: #2E7D32;
    flex: 1;
    text-align: center;
}

.calendar-events {
    max-height: 300px;
    overflow-y: auto;
}

.calendar-event {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(76, 175, 80, 0.1);
    transition: background 0.3s ease;
    cursor: pointer;
}

.calendar-event:hover {
    background: rgba(76, 175, 80, 0.05);
}

.calendar-event:last-child {
    border-bottom: none;
}

.event-date {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.event-content {
    flex: 1;
}

.event-title {
    font-weight: 500;
    color: #2E7D32;
    margin-bottom: 2px;
}

.event-time {
    font-size: 0.8rem;
    color: #666;
}

/* ----- Quick Actions ----- */
.actions-card .card-content {
    padding: 24px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    background: linear-gradient(135deg, #45a049, #2E7D32);
}

.action-btn i {
    font-size: 1.3rem;
    opacity: 0.9;
}

.action-btn span {
    flex: 1;
    font-size: 0.9rem;
}

/* ----- Header Enhancements ----- */
.header-search {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.search-input {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid rgba(76, 175, 80, 0.2);
    border-radius: 25px;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.search-input:focus-within {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.search-input i {
    color: #2E7D32;
    margin-right: 8px;
}

.search-input input {
    border: none;
    background: transparent;
    flex: 1;
    font-size: 0.9rem;
    color: #2E7D32;
    outline: none;
}

.btn-search {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.btn-search:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(76, 175, 80, 0.2);
    color: #2E7D32;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.header-btn:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4CAF50;
    transform: translateY(-1px);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f44336;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ----- Modal Styles ----- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 24px;
    max-height: calc(80vh - 140px);
    overflow-y: auto;
}

/* ----- Search Results ----- */
.search-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-section {
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.search-section h5 {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    margin: 0;
    padding: 12px 16px;
    color: #2E7D32;
    font-size: 1rem;
    border-bottom: 1px solid rgba(76, 175, 80, 0.1);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(76, 175, 80, 0.1);
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(76, 175, 80, 0.05);
}

.result-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.result-content {
    flex: 1;
}

.result-title {
    font-weight: 500;
    color: #2E7D32;
    margin-bottom: 2px;
}

.result-meta {
    font-size: 0.85rem;
    color: #666;
}

/* ----- Notification Dropdown ----- */
.notification-dropdown {
    position: absolute;
    top: 60px;
    right: 20px;
    width: 350px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.2);
    display: none;
    z-index: 1000;
    max-height: 400px;
    overflow: hidden;
}

.notification-dropdown.show {
    display: block;
}

.notification-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notification-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(76, 175, 80, 0.1);
    transition: background 0.3s ease;
    cursor: pointer;
}

.notification-item:hover {
    background: rgba(76, 175, 80, 0.05);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-text {
    font-weight: 500;
    color: #2E7D32;
    margin-bottom: 4px;
    line-height: 1.4;
}

.notification-time {
    font-size: 0.8rem;
    color: #666;
}

/* ----- IA Chat Container ----- */
.ia-chat-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 193, 7, 0.3);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.ia-chat-container.show {
    display: flex;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chat-messages {
    flex: 1;
    padding: 16px 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.chat-message {
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 80%;
    line-height: 1.4;
}

.chat-message.user {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    margin-left: auto;
    text-align: right;
}

.chat-message.ai {
    background: white;
    color: #2E7D32;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.chat-message.typing {
    font-style: italic;
    color: #666;
}

.chat-input-container {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    background: white;
    border-top: 1px solid rgba(76, 175, 80, 0.1);
}

.chat-input-container input {
    flex: 1;
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 20px;
    padding: 8px 16px;
    outline: none;
    font-size: 0.9rem;
}

.chat-input-container input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.chat-input-container button {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-input-container button:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* ----- Mobile Responsiveness ----- */
@media (max-width: 768px) {
    .dashboard-content {
        padding: 10px;
    }

    .widgets-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .header-search {
        max-width: 200px;
        margin: 0 10px;
    }

    .search-input input {
        font-size: 0.8rem;
    }

    .header-actions {
        gap: 4px;
    }

    .header-btn {
        width: 36px;
        height: 36px;
    }

    .card-header {
        padding: 16px 20px;
    }

    .card-header h3 {
        font-size: 1.1rem;
    }

    .card-content {
        padding: 16px 20px;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 20px;
    }

    .notification-dropdown,
    .ia-chat-container {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }

    .ia-chat-container {
        height: 400px;
    }
}

@media (max-width: 576px) {
    .header-search {
        display: none;
        /* Hide search on very small screens */
    }

    .dashboard-widget {
        padding: 20px;
    }

    .widget-value {
        font-size: 2rem;
    }

    .activity-item,
    .deadline-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .calendar-event {
        padding: 12px 20px;
    }

    .action-btn {
        padding: 12px;
    }

    .action-btn span {
        font-size: 0.8rem;
    }
}

/* ===== USUARIOS.HTML ===== */

/* ----- Layout ----- */
.usuarios-container {
    width: 100%;
    max-width: 1200px;
    padding: 40px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.15);
    border: 2px solid rgba(255, 193, 7, 0.3);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filters {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filters input,
.filters select {
    border: 2px solid rgba(76, 175, 80, 0.2);
    border-radius: 8px;
    padding: 10px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.table {
    margin-bottom: 0;
}

.table th {
    background-color: #4CAF50;
    color: white;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table td {
    vertical-align: middle;
}

/* ----- Interactions ----- */
.filters input:focus,
.filters select:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
    outline: none;
}

/* ----- Censored Text ----- */
.censored-text {
    width: 120px;
    display: inline-block;
    text-align: left;
}

.password-censored {
    width: 100px;
    display: inline-block;
    text-align: left;
}

/* ----- Mobile ----- */
@media (max-width: 768px) {
    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .usuarios-container {
        padding: 20px;
    }

    .table-responsive {
        max-height: 300px;
    }
}

/* ===== ENTIDADES.HTML ===== */

/* ----- Layout ----- */
.entities-container {
    width: 100%;
    max-width: 1200px;
    padding: 20px 40px 40px;
    background: #f6f7f6;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.15);
    border: 2px solid rgba(255, 193, 7, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== CREAR-COMPROMISO.HTML ===== */

/* ----- Layout ----- */
.create-form-container {
    width: 100%;
    max-width: 1000px;
    padding: 40px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.15);
    border: 2px solid rgba(255, 193, 7, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== FORMULARIOS (A100, A101, etc.) ===== */

/* ----- Layout ----- */
.form-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 3rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-size: 1.1rem;
}

.create-form {
    width: 100%;
    max-width: 800px;
}

.form-section {
    border-bottom: 1px solid rgba(76, 175, 80, 0.2);
    padding-bottom: 2rem;
}

.form-section:last-child {
    border-bottom: none;
}

.section-title {
    color: #2E7D32;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-actions {
    border-top: 1px solid rgba(76, 175, 80, 0.2);
    padding-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.form-actions .btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-title {
    text-align: center;
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 2rem;
    background: linear-gradient(to right, #FFC107, #4CAF50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-filters {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    flex: 1;
    max-width: 600px;
    margin-bottom: 2rem;
}

.entities-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
}

.entity-card {
    border: 2px solid rgba(76, 175, 80, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.entity-card.active {
    background: linear-gradient(135deg, #C8E6C9, #F1F8E9);
    border-color: #4CAF50;
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.25);
}

.entity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(76, 175, 80, 0.2);
}

.entity-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2E7D32;
}

.entity-state {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
}

.state-active {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
}

.state-inactive {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.entity-summary {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 0.5rem;
    color: #666;
    font-size: 0.95rem;
    align-items: center;
}

.details-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    margin-top: 1rem;
}

.details-section.show {
    max-height: 800px;
    padding-top: 1rem;
}

.details-section h5 {
    color: #2E7D32;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(76, 175, 80, 0.2);
    padding-bottom: 0.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(76, 175, 80, 0.1);
}

.detail-label {
    font-weight: bold;
    color: #2E7D32;
    min-width: 150px;
}

.detail-value {
    color: #555;
    text-align: right;
    flex: 1;
}

.compromisos-list {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(76, 175, 80, 0.05);
    border-radius: 8px;
    border-left: 3px solid #4CAF50;
}

.compromisos-list h6 {
    color: #2E7D32;
    margin-bottom: 0.75rem;
}

.compromisos-list ul {
    list-style: none;
    padding: 0;
}

.compromisos-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(76, 175, 80, 0.1);
}

/* ----- Interactions ----- */
.entity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.2);
    border-color: #4CAF50;
}

.search-input input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
    outline: none;
}

/* ----- Mobile ----- */
@media (max-width: 576px) {
    .entities-container {
        max-width: 95vw;
        padding: 40px 20px 20px;
    }

    .page-title {
        font-size: 2em;
    }

    .search-filters {
        flex-direction: column;
        align-items: center;
    }

    .search-input input,
    .filters-select {
        min-width: 100%;
        max-width: 400px;
    }

    .entities-list {
        grid-template-columns: 1fr;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-label {
        min-width: auto;
    }

    .entity-summary {
        flex-direction: column;
        justify-content: flex-start;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

/* ===== COMPROMISOS.HTML ===== */

/* ----- Layout ----- */
.main-container {
    flex-direction: column;
}

.page-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 5px 4rem;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    height: 60px;
}

.header-content h1 {
    color: #2E7D32;
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-content h1 i {
    font-size: 2.5rem;
    color: #4CAF50;
}

.commitments-section {
    max-width: 80%px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.commitments-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.commitment-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #4CAF50;
}

.commitment-card h3 {
    color: #2E7D32;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.commitment-card p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
    text-decoration: none;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.action-btn i {
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

.btn-primary i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}



.btn-secondary {
    background: #3786cb;
}

.btn-dsecondary {
    background: #eaab3f;
}

/* ----- Interactions ----- */
.commitment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
    background: linear-gradient(135deg, #45a049, #2E7D32);
}

.btn-primary:hover i {
    transform: scale(1.1);
}

.btn-secondary:hover {
    background: #2e5a87;
}

.btn-dsecondary:hover {
    background: #c89e16;
}

/* ----- Mobile ----- */
@media (max-width: 768px) {
    .page-header {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }

    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }

    .commitments-grid {
        grid-template-columns: 1fr;
    }

    .card-actions {
        justify-content: center;
    }
}

/* ===== COMPROMISOS-DETALLES.HTML ===== */

/* ----- Layout ----- */
.header-actions-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-content h1 {
    color: #2E7D32;
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-content h1 i {
    font-size: 2.5rem;
    color: #4CAF50;
}

.global-progress {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.details-container {
    max-width: 1300px;
    margin: 2rem auto;
    padding: 2rem 3rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.commitment-info {
    padding: 2rem;
    border-bottom: 1px solid rgba(76, 175, 80, 0.2);
}

.hidden-section {
    display: none;
}

.commitment-info h2 {
    color: #2E7D32;
    margin-bottom: 0.5rem;
}

.entity-assoc {
    color: #4CAF50;
    font-weight: 500;
    margin-bottom: 1rem;
}

.commitment-info p {
    color: #666;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.dates {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.date-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4CAF50;
}

.tabs-section {
    padding: 0 2rem 2rem;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid rgba(76, 175, 80, 0.2);
    margin-bottom: 1rem;
    overflow-x: auto;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: color 0.3s ease;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.sub-sections-container {
    display: flex;
    gap: 2rem;
    flex: 1;
    flex-wrap: wrap;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(76, 175, 80, 0.1);
}

.section-progress {
    flex: 1;
    max-width: 300px;
}

.progress-container {
    margin: 1rem 0;
}

.sub-section {
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 8px;
}

.sub-section h4 {
    color: #2E7D32;
    margin-bottom: 1rem;
}

.sub-list {
    list-style: none;
}

.sub-item {
    padding: 0.75rem;
    border: 1px solid rgba(76, 175, 80, 0.1);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.status-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.status-completed {
    color: #4CAF50;
}

.status-pending {
    color: #FFC107;
}

.no-content {
    text-align: center;
    padding: 2rem;
    color: #999;
}

.no-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ccc;
}

/* ----- Progress Bars ----- */
.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2E7D32;
}

.progress-label span:first-child {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar {
    height: 24px;
    background: linear-gradient(135deg, #f5f5f5, #e9ecef);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.global-progress .progress-bar {
    width: 200px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 50%, #2E7D32 100%);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    position: relative;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 12px;
}

.progress-zero {
    width: 0%;
    box-shadow: none;
}

/* ----- Buttons ----- */
.action-btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 4px;
    margin-left: 0.25rem;
}

.action-btn-general {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
    margin: 1rem auto 0;
    width: fit-content;
}

.action-btn-delete {
    background: #f44336;
    color: white;
}

/* ----- Modals ----- */
.modal-success {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 1rem 2rem;
    border-radius: 8px;
    display: none;
    z-index: 1002;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        top: -50px;
        opacity: 0;
    }

    to {
        top: 20px;
        opacity: 1;
    }
}

.modal-subida {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
}

.modal-contenido {
    background-color: #fff;
    padding: 30px;
    border-radius: 16px;
    width: 420px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    animation: aparecer 0.3s ease;
}

@keyframes aparecer {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.cerrar-modal {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 22px;
    cursor: pointer;
    color: #777;
}

.zona-subida {
    border: 2px dashed #7ecb91;
    border-radius: 12px;
    padding: 40px 20px;
    cursor: pointer;
    transition: 0.3s;
    background-color: #f8fff9;
}

.icono-nube {
    font-size: 50px;
    color: #44b874;
    margin-bottom: 10px;
}

.lista-archivos {
    margin-top: 20px;
    text-align: left;
    font-size: 14px;
    color: #333;
}

.lista-archivos li {
    margin-bottom: 6px;
}

/* ----- Interactions ----- */
.tab-btn:hover {
    color: #2E7D32;
}

.sub-item:hover {
    background: rgba(76, 175, 80, 0.05);
}

.action-btn-general:hover {
    background: #2E7D32;
    transform: translateY(-1px);
}

.action-btn-delete:hover {
    background: #d32f2f;
}

.cerrar-modal:hover {
    color: #008f66;
}

.zona-subida:hover {
    background-color: #e9fff0;
    border-color: #44b874;
}

/* ----- Mobile ----- */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        text-align: center;
    }

    .details-container {
        margin: 1rem;
        border-radius: 8px;
    }

    .commitment-info,
    .tabs-section {
        padding: 1rem;
    }

    .tab-buttons {
        flex-wrap: nowrap;
    }

    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .dates,
    .section-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tab-content.active {
        flex-direction: column;
        gap: 1rem;
    }

    .sub-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .action-btn-general {
        width: 100%;
    }

    .modal-dialog {
        padding: 1.5rem;
        margin: 1rem;
    }

    .modal-actions {
        flex-direction: column;
    }
}

/* ===== REGISTROS.HTML ===== */

/* ----- Layout ----- */
.title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.title-icon {
    font-size: 2rem;
    color: #4CAF50;
    filter: drop-shadow(0 2px 4px rgba(76, 175, 80, 0.3));
}

.page-title {
    color: transparent;
    background: linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
    margin: 0;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.header h1 {
    color: #2E7D32;
    margin: 0;
    font-size: 2rem;
}

/* ----- Modal de Detalles del Registro ----- */
.record-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.record-details .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(76, 175, 80, 0.1);
}

.record-details .detail-row:last-child {
    border-bottom: none;
}

.record-details .detail-row strong {
    color: #2E7D32;
    font-weight: 600;
    min-width: 120px;
}

.record-details .detail-row span {
    color: #555;
    text-align: right;
    flex: 1;
}

/* ----- Toggle Filters Section ----- */
.toggle-filters-section {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.btn-toggle-filters {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.btn-toggle-filters:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
}

/* ----- Advanced Filters Tabs ----- */
.advanced-filters-tabs {
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(76, 175, 80, 0.2);
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.tabs-header {
    display: flex;
    background: linear-gradient(135deg, #E8F5E8 0%, #F1F8E9 100%);
    border-bottom: 1px solid rgba(76, 175, 80, 0.2);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn.active {
    color: #2E7D32;
    background: white;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
}

.tab-content {
    display: none;
    padding: 1.5rem;
}

.tab-content.active {
    display: block;
}

.advanced-filters-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: flex-start;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #2E7D32;
    font-size: 0.9rem;
}

.filter-group select,
.filter-group input {
    padding: 0.75rem;
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.advanced-filters-actions {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(76, 175, 80, 0.1);
}

.btn-reset-filters {
    background: transparent;
    color: #666;
    border: 1px solid rgba(102, 102, 102, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-reset-filters:hover {
    background: #f8f9fa;
    border-color: #666;
}

/* ----- Actions Section ----- */
.actions-section {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.btn-export {
    background: linear-gradient(135deg, #FFC107 0%, #FF8F00 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.4);
}

/* ----- Main Content ----- */
.records-list {
    display: grid;
    gap: 1rem;
}

.record-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.2);
    transition: all 0.3s ease;
}

.record-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
}

.record-icon {
    color: #4CAF50;
}

#noResults {
    display: none;
    text-align: center;
    padding: 3rem;
    color: #999;
    font-size: 1.2rem;
}

/* ----- Pagination Controls ----- */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.page-btn {
    padding: 0.75rem 1rem;
    border: 2px solid rgba(76, 175, 80, 0.2);
    background: white;
    color: #2E7D32;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 44px;
    text-align: center;
}

.page-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.page-btn.active {
    background: linear-gradient(135deg, #FFC107, #FF8F00);
    color: #2E7D32;
    border-color: #FFC107;
    font-weight: 600;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ----- Interactions ----- */
.record-row:hover {
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
    border-color: #4CAF50;
}

/* ----- Mobile ----- */
@media (max-width: 768px) {

    /* Header adjustments */
    .header {
        padding: 10px 20px;
        height: auto;
        min-height: 70px;
    }

    .header-actions {
        padding-right: 0;
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .page-title {
        font-size: 1.5rem;
    }

    /* Main container adjustments */
    .main-container {
        padding: 0 15px;
    }

    .entities-container {
        padding: 20px 0;
    }

    /* Search filters responsive */
    .search-filters {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .search-input,
    .filters-select,
    .date-filter {
        min-width: 100%;
        max-width: none;
        margin-bottom: 0;
    }

    .search-input input {
        min-width: 0;
    }

    .filters-select {
        padding: 12px 16px;
    }

    .custom-select {
        width: 100%;
    }

    /* Actions section responsive */
    .actions-section {
        justify-content: center;
        padding: 0;
        margin-bottom: 1.5rem;
    }

    .btn-export {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    /* Records responsive */
    .record-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1.25rem;
    }

    .record-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(76, 175, 80, 0.1);
    }

    .record-field:last-child {
        border-bottom: none;
    }

    .record-field strong {
        font-size: 0.85rem;
        color: #2E7D32;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 0.25rem;
    }

    /* Pagination responsive */
    .pagination-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 1.5rem 1rem;
        margin-top: 1.5rem;
    }

    .page-btn {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        min-width: 48px;
        min-height: 48px;
    }

    /* No results responsive */
    #noResults {
        padding: 2rem 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {

    /* Extra small screens */
    .header {
        padding: 10px 15px;
    }

    .page-title {
        font-size: 1.3rem;
    }

    .search-filters {
        gap: 0.75rem;
    }

    .record-row {
        padding: 1rem;
        gap: 0.5rem;
    }

    .record-field {
        padding: 0.5rem 0;
    }

    .pagination-controls {
        padding: 1rem 0.5rem;
        gap: 0.25rem;
    }

    .page-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        min-width: 44px;
        min-height: 44px;
    }

    .btn-export {
        padding: 12px 16px;
        font-size: 1rem;
    }
}