/* ==========================================================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ========================================================================== */
:root {
    --unach-blue: #003366;
    --unach-dark-blue: #0b2240;
    --unach-gold: #D4AF37;
    --unach-teal: #17a2b8;
    --codi-orange: #ff6600;
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 14px;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f4f8;
    color: #333333;
    overflow-x: hidden;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.bg-grey {
    --bs-bg-opacity: 1;
    background-color: rgb(243 246 250) !important;
}

.bg-primary {
    --bs-bg-opacity: 1;
    background-color: rgb(22 67 124) !important;
}

.text-primary {
    --bs-text-opacity: 1;
    color: rgb(22 100 198) !important;
    font-family: 'Open Sans', 'Public Sans', sans-serif;
}

.font-weight-600 {
    font-weight: 600;
}

.pointer-events-none {
    pointer-events: none;
}

.text-danger {
    color: #e53e3e !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-success {
    color: #28a745 !important;
}

/* ==========================================================================
   2. ESTRUCTURA Y LAYOUT PRINCIPAL
   ========================================================================== */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.main-content {
    flex: 1;
    width: 100%;
    min-width: 0;
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.main-container {
    position: relative;
    z-index: 10;
}

.content-area {
    padding: 28px;
}

/* ==========================================================================
   3. SIDEBAR (SYSWEB ESTILO INSTITUCIONAL)
   ========================================================================== */
.sidebar {
    width: 270px;
    background-color: var(--unach-dark-blue);
    background-image: linear-gradient(#0d2b50, rgba(0, 0, 0, 0.9));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    transition: all 0.3s ease-in-out;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.15);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
}

.logo-box {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1f6bff, #3e92ff);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.logo {
    width: 70%;
}

.sidebar-brand-title, .brand-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff;
    line-height: 1;
}

.sidebar-brand-subtitle, .brand-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

.collapse-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

    .collapse-btn:hover {
        background: rgba(255, 255, 255, 0.2);
    }

.sidebar-content {
    padding: 10px 18px;
    flex: 1;
    overflow-y: auto;
}

.menu-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 1.2px;
    margin-top: 20px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.sysweb-menu-item, .menu-item {
    display: flex;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 12px;
    transition: background 0.2s ease, transform 0.25s ease;
    font-weight: 600;
    font-size: 0.95rem;
}

    .sysweb-menu-item:hover, .sysweb-menu-item.active,
    .menu-item:hover, .menu-item.active {
        background-color: rgba(255, 255, 255, 0.08);
        color: #ffffff;
    }

    .menu-item.active {
        background: #16437c;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    }

.sysweb-icon-box, .menu-icon {
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.sysweb-menu-item:hover .sysweb-icon-box,
.sysweb-menu-item.active .sysweb-icon-box {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.sysweb-icon-box i, .menu-icon i {
    font-size: 1.25rem;
    color: #ffffff;
}

.sidebar-footer {
    padding: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-box {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2e74ff, #5f9cff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    margin-right: 12px;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
}

.profile-role {
    font-size: 11px;
    opacity: 0.6;
}

.logout-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffb2b2;
    cursor: pointer;
    transition: 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
}

    .logout-btn:hover {
        background: #dc3545;
        color: white;
    }

/* Sidebar Colapsado */
.sidebar.collapsed {
    margin-left: -270px;
    width: 92px;
}

    .sidebar.collapsed .brand-info,
    .sidebar.collapsed .menu-label,
    .sidebar.collapsed .menu-item span,
    .sidebar.collapsed .profile-info,
    .sidebar.collapsed .logout-btn span {
        display: none;
    }

    .sidebar.collapsed .menu-item,
    .sidebar.collapsed .brand {
        justify-content: center;
    }

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        margin-left: -270px;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3);
    }

        .sidebar.mobile-active {
            margin-left: 0 !important;
        }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(11, 34, 64, 0.5);
        backdrop-filter: blur(2px);
        z-index: 1030;
    }

        .sidebar-backdrop.show {
            display: block;
        }
}

/* ==========================================================================
   4. TOPBAR Y HEADERS INSTITUCIONALES
   ========================================================================== */
.topbar, .layout-topbar {
    height: 74px;
    background: white;
    border-bottom: 1px solid #e8edf5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 26px;
}

.layout-topbar {
    border-bottom: 5px solid #c8a127;
    position: fixed;
    height: 5rem;
    z-index: 997;
    left: 0;
    top: 0;
    width: 100%;
    padding: 0 2rem;
    background-color: #0f2744;
    transition: left 0.2s;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.05);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.mobile-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    background: #f3f6fa;
    cursor: pointer;
    color: #0d2b50;
}

.page-title {
    margin: 0;
    font-size: 22px;
    color: #0d2b50;
}

.page-subtitle {
    color: #7b8794;
    font-size: 12px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-icon {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    background: #f5f7fb;
    color: #0d2b50;
    cursor: pointer;
    transition: 0.25s;
}

    .top-icon:hover {
        background: #e9eef7;
    }

.top-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 10px;
}

.top-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2e74ff, #5f9cff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 700;
}

.top-name {
    font-size: 13px;
    font-weight: 600;
    color: #0d2b50;
}

.top-role {
    color: #7b8794;
    font-size: 11px;
}

.topbar-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 22px;
    color: #ffffff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.topbar-highlight {
    color: #d4a017;
    font-weight: 800;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.topbar-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #d9e1ec;
    font-style: italic;
    margin-top: 2px;
}

.top-header {
    background: #082b52;
    border-top: 4px solid #6f42c1;
    border-bottom: 5px solid #d4af37;
    padding: 18px 40px;
    color: white;
}

    .top-header h1 {
        margin: 0;
        font-size: 42px;
        font-weight: 800;
        letter-spacing: 1px;
    }

    .top-header span {
        color: #f4c430;
    }

    .top-header p {
        margin: 5px 0 0 0;
        font-style: italic;
        font-size: 18px;
        opacity: 0.9;
    }

.navbar-unach, .navbar-institucional {
    background: var(--unach-blue);
    border-bottom: 4px solid var(--unach-gold);
    padding: 0.8rem 0;
}

.hero-bg {
    background: var(--unach-blue);
    height: 120px;
    width: 100%;
}

/* ==========================================================================
   5. TABLAS Y PAGINACIÓN
   ========================================================================== */
.custom-table-container {
    background-color: #8a94a0;
}

.custom-table-container-principal {
    background-color: #ffffff;
    color: #6c757d;
}

.table-custom, .table-custom2 {
    --bs-table-bg: transparent !important;
    --bs-table-color: #ffffff !important;
    border-color: transparent !important;
}

    .table-custom thead th, .table-custom2 thead th {
        color: white !important;
        font-weight: 700;
        font-size: 0.85rem;
        letter-spacing: 0.5px;
        border-bottom: 2px solid rgba(255, 255, 255, 0.1) !important;
        padding: 15px 10px;
    }

    .table-custom tbody tr, .table-custom2 tbody tr {
        transition: background-color 0.2s ease;
    }

        .table-custom tbody tr:nth-child(odd), .table-custom2 tbody tr:nth-child(odd) {
            background-color: rgba(255, 255, 255, 0.08) !important;
        }

        .table-custom tbody tr:hover, .table-custom2 tbody tr:hover {
            background-color: rgba(255, 255, 255, 0.15) !important;
        }

    .table-custom td, .table-custom2 td {
        /*        color: #ffffff !important;
*/
        padding: 14px 10px;
        border: none !important;
        font-size: .95rem;
    }

    .table-custom .form-check-input, .table-custom2 .form-check-input {
        border-color: rgba(255, 255, 255, 0.6) !important;
        background-color: rgba(255, 255, 255, 0.2);
        cursor: pointer;
    }

        .table-custom .form-check-input:checked, .table-custom2 .form-check-input:checked {
            background-color: #ffffff !important;
            border-color: #ffffff !important;
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23333333' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
        }

    .table-custom label, .table-custom2 label {
        color: #ffffff !important;
        cursor: pointer;
        width: 100%;
    }

.table-responsive {
    border-radius: 6px;
    overflow-x: auto;
}

#tabla-archivos-agregados tbody tr {
    transition: background-color 0.2s ease-in-out;
}

    #tabla-archivos-agregados tbody tr:hover {
        background-color: rgba(43, 108, 176, 0.03) !important;
    }

/* Paginación DataTables & Custom */
.dataTables_wrapper .dataTables_paginate {
    width: 100%;
    text-align: center !important;
    padding-top: 1.5rem !important;
    display: flex;
    justify-content: center;
}

.dataTables_wrapper .pagination, .custom-pagination {
    margin-bottom: 0;
    display: flex;
    gap: 8px;
}

    .dataTables_wrapper .page-item .page-link,
    .custom-pagination .page-item .page-link {
        border: none !important;
        color: #6c757d !important;
        background-color: transparent !important;
        border-radius: 50% !important;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.95rem;
        transition: all 0.2s ease-in-out;
    }

        .dataTables_wrapper .page-item .page-link:hover,
        .custom-pagination .page-item:not(.active):not(.disabled) .page-link:hover {
            background-color: #f1f3f5 !important;
            color: #212529 !important;
        }

    .dataTables_wrapper .page-item.active .page-link,
    .custom-pagination .page-item.active .page-link {
        background-color: #ebf0ff !important;
        color: #4361ee !important;
        font-weight: 600;
    }

    .dataTables_wrapper .page-item.disabled .page-link,
    .custom-pagination .page-item.disabled .page-link {
        color: #dee2e6 !important;
        background-color: transparent !important;
        cursor: not-allowed;
    }

    .custom-pagination .page-link:focus {
        box-shadow: none;
        background: transparent;
    }

.dataTables_wrapper .dataTables_info {
    padding-top: 1.5rem !important;
    color: #6c757d !important;
    font-size: 0.875rem;
}

/* ==========================================================================
   6. FORMULARIOS E INPUTS
   ========================================================================== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

label, .form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #7d8286;
    margin-bottom: 0.4rem;
    padding-left: 0.2rem;
    font-family: 'Open Sans', 'Public Sans', sans-serif;
}

.form-control {
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
    width: 100%;
}

    .form-control:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    }

.form-custom-input {
    border-radius: 20px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

    .form-custom-input:focus {
        border-color: #1d4ed8 !important;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25) !important;
        outline: none;
    }

    .form-custom-input[readonly] {
        background-color: #f8f9fa !important;
        border-color: #dbe2e8 !important;
        color: #6c757d !important;
    }

.form-custom-select, .form-select {
    border: 2px solid #3b82f6 !important;
    border-radius: 12px !important;
    height: 46px;
    padding: 10px 15px;
    transition: all 0.3s ease;
    background-color: #eff6ff !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    cursor: pointer;
    font-family: 'Open Sans', 'Public Sans', sans-serif;
}

    .form-select:focus {
        border-color: #86b7fe !important;
        box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15) !important;
    }

.custom-label {
    font-size: 13px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 6px;
    display: block;
}

.custom-input {
    height: 56px;
    border-radius: 16px;
    border: 1px solid #dfe3e8;
    background-color: #f8f9fb;
    padding: 12px 18px;
    font-size: 15px;
    color: #495057;
    transition: all 0.2s ease-in-out;
}

    .custom-input:focus {
        border-color: #86b7fe;
        background-color: #fff;
        box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
    }

    .custom-input::placeholder {
        color: #adb5bd;
        font-size: 14px;
    }

.input-note {
    font-size: 12px;
    color: #6c757d;
    margin-top: 6px;
}

.optional-badge {
    font-size: 11px;
    border: 1px solid #d6d9de;
    color: #6c757d;
    padding: 2px 8px;
    border-radius: 8px;
    background: #fff;
    float: right;
}

.input-group-rounded-custom {
    border: 1px solid #ced4da;
    border-radius: 12px !important;
    overflow: hidden;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    background-color: #ffffff;
}

    .input-group-rounded-custom .form-control,
    .input-group-rounded-custom .input-group-text {
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        height: 44px;
    }

    .input-group-rounded-custom .input-group-text {
        font-weight: 600;
        font-size: 0.95rem;
        padding-right: 16px;
        background-color: #ffffff !important;
        color: #6c757d !important;
        border-left: 1px solid #e9ecef !important;
    }

    .input-group-rounded-custom .form-control {
        padding-left: 16px;
        color: #212529;
    }

    .input-group-rounded-custom:focus-within {
        border-color: #a4b3f6 !important;
        box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.15) !important;
    }

#input-nombre {
    text-transform: uppercase;
}

/* ==========================================================================
   7. TARJETAS, MÓDULOS Y COMPONENTES DE SELECCIÓN
   ========================================================================== */
.card-custom {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header-custom {
    background: white;
    border-bottom: 1px solid #eee;
    padding: 20px 30px;
}

.card-modulo {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

.card-header-institucional {
    background-color: #1a365d;
    color: white;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
    padding: 1.5rem;
}

.card-terms {
    transition: all 0.2s ease-in-out;
    border: 1px solid #e0e0e0 !important;
}

.was-validated #checkTerminos:invalid ~ .form-check-label {
    color: #dc3545 !important;
}

/* Tarjetas Seleccionables */
.card-selectable {
    cursor: pointer;
    background-color: #ffffff;
    border: 2px solid #e2e8f0 !important;
    border-radius: 16px !important;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease-in-out;
}

    .card-selectable:hover {
        background-color: #f8fafc;
        border-color: #cbd5e1 !important;
    }

    .card-selectable.active,
    .card-selectable.tarjeta-activa {
        border-color: #3b82f6 !important;
        background-color: #f0f6ff !important;
        box-shadow: 0 8px 16px rgba(59, 130, 246, 0.08) !important;
    }

    .card-selectable .card-clickable-content {
        pointer-events: none;
    }

    .card-selectable .title-card {
        font-weight: 700;
        font-size: 0.95rem;
        color: #002244;
    }

    .card-selectable.active .title-card {
        color: #2563eb;
    }

    .card-selectable .desc-card {
        font-size: 0.8rem;
        color: #64748b;
        line-height: 1.3;
    }

    .card-selectable .icon-box, .icon-box {
        width: 46px;
        height: 46px;
        min-width: 40px;
        border-radius: 50%;
        background-color: #f1f5f9;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #64748b;
        font-size: 1.2rem;
    }

    .card-selectable.active .icon-box,
    .card-selectable.tarjeta-activa .icon-box {
        background-color: #e0f2fe;
        color: #0369a1;
    }

/* Indicadores Circulares */
.radio-circle {
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    position: relative;
    transition: all 0.2s ease;
}

.card-selectable.active .radio-circle {
    border-color: #1a365d;
    background-color: #1a365d;
}

    .card-selectable.active .radio-circle::after {
        content: '';
        position: absolute;
        top: 5px;
        left: 5px;
        width: 8px;
        height: 8px;
        background-color: white;
        border-radius: 50%;
    }

.card-checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.card-checkbox-marker {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    color: transparent;
    font-size: 10px;
    z-index: 10;
    transition: all 0.2s ease;
}

.card-selectable.tarjeta-activa .card-checkbox-marker {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

/* Radio Cards (Perfiles / Accesos) */
.acceso-options-group, .perfil-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.acceso-option-card, .radio-card {
    flex: 1;
    cursor: pointer;
    position: relative;
    margin: 0;
}

    .acceso-option-card input[type="radio"],
    .radio-card input[type="radio"] {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

.acceso-card-content, .card-content {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.acceso-icon {
    font-size: 1.4rem;
    color: #64748b;
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.acceso-text {
    display: flex;
    flex-direction: column;
}

.acceso-title, .perfil-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
}

.acceso-subtitle, .perfil-desc {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 1px;
}

.acceso-option-card:hover .acceso-card-content,
.radio-card:hover .card-content {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.acceso-option-card input[type="radio"]:checked + .acceso-card-content,
.radio-card input[type="radio"]:checked + .card-content {
    background-color: #eff6ff;
    border-color: #3b82f6;
}

    .acceso-option-card input[type="radio"]:checked + .acceso-card-content .acceso-title {
        color: #1d4ed8;
    }

    .acceso-option-card input[type="radio"]:checked + .acceso-card-content .acceso-icon {
        color: #3b82f6;
    }

/* ==========================================================================
   8. BOTONES Y ACCIONES
   ========================================================================== */
.btn-custom {
    padding: 16px 35px;
    border-radius: 14px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    transition: 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    color: #fff;
    background-color: #d4af37;
    border-color: #d4af37;
    border-radius: 50px;
}

.btn-primary-custom {
    background: #0b3d6d;
    color: white;
}

    .btn-primary-custom:hover, .btn-secondary-custom:hover {
        background: #124d88;
        transform: scale(1.03);
    }

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
    border-radius: 50px;
}

.btn-secondary2 {
    color: #fff;
    border-radius: 50px;
    background-color: #7b7b7b;
    border-color: #737373;
}

.btn-secondary-custom {
    background: #0b3d6d;
    color: white;
}

.btn-submit {
    background-color: #d9b13e;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

    .btn-submit:hover {
        background-color: #c49e31;
    }

.btn-generar {
    background-color: #16437c;
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

    .btn-generar:hover {
        background-color: #15803d;
    }

.btn-rounded {
    border-radius: 50px !important;
    padding-left: 12px;
    padding-right: 12px;
}

.btn-nuevo-pago {
    background-color: #7481d1;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

    .btn-nuevo-pago:hover {
        background-color: #5b69be;
    }

.btn-metodo {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    text-align: left;
    background: white;
    transition: all 0.2s ease;
    width: 100%;
}

    .btn-metodo:hover {
        border-color: #2b6cb0;
        background-color: #f7fafc;
    }

    .btn-metodo input[type="radio"]:checked + label {
        font-weight: bold;
    }

.btn-pagar-final {
    background-color: #d69e2e;
    color: #1a365d;
    font-weight: 700;
    border: none;
    padding: 1rem;
    transition: all 0.3s;
}

    .btn-pagar-final:hover {
        background-color: #b7791f;
        color: white;
    }

/* ==========================================================================
   9. PROCESOS DE PAGO Y CONGRESO
   ========================================================================== */
.access-badge {
    background: #e8f4fd;
    color: #007bff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.section-title {
    font-weight: 700;
    color: var(--unach-blue);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

    .section-title i {
        margin-right: 10px;
        color: var(--unach-teal);
    }

.payment-option {
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    height: 100%;
}

    .payment-option:hover {
        transform: translateY(-5px);
        border-color: var(--unach-teal);
        background: #fcfdfe;
    }

    .payment-option.active {
        border-color: var(--unach-teal);
        background: #f0faff;
    }

.codi-border {
    border-color: var(--codi-orange) !important;
}

.btn-codi {
    background: var(--codi-orange);
    color: white;
    border: none;
    font-weight: 600;
}

    .btn-codi:hover {
        background: #e65c00;
        color: white;
    }

.total-box {
    background: var(--unach-blue);
    color: white;
    border-radius: 10px;
    padding: 20px;
}

.pago-panel {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    animation: slideUp 0.3s ease-in-out;
}

.pago-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.pago-total-box {
    display: flex;
    flex-direction: column;
}

.total-label {
    font-size: 14px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
}

.total-monto {
    font-size: 28px;
    font-weight: bold;
    color: #1e293b;
}

.contenedor-costo {
    background-color: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.5rem;
}

.precio-grande {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a365d;
}

.congress-banner {
    background: #fff;
    background-size: cover;
    background-position: center;
    color: grey;
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 6px 20px rgba(0, 34, 68, 0.15);
    position: relative;
    overflow: hidden;
}

.congress-badge {
    background-color: #ffcc00;
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.congress-title {
    font-weight: 800;
    font-size: 18px;
    line-height: 1.3;
    color: #7b7b7b;
    margin-bottom: 10px;
}

.congress-subtitle {
    font-size: 1.1rem;
    color: #e0e0e0;
    font-weight: 400;
    max-width: 900px;
}

.congress-meta {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #ffcc00;
    font-weight: 500;
}

    .congress-meta span {
        margin-right: 20px;
        color: #2c2c2c;
    }

    .congress-meta i {
        margin-right: 5px;
        color: #ffcc00;
    }

/* STEPPER */
.setup-stepper {
    margin-bottom: 2rem;
}

    .setup-stepper .step-line {
        position: absolute;
        top: 24px;
        left: 8%;
        right: 8%;
        height: 3px;
        background-color: #e2e8f0;
        z-index: 1;
    }

    .setup-stepper .step-item {
        position: relative;
        z-index: 2;
        flex: 1;
    }

    .setup-stepper .step-icon {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background-color: #ffffff;
        border: 3px solid #e2e8f0;
        color: #94a3b8;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 10px;
        font-size: 1.1rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .setup-stepper .step-item.active .step-icon {
        border-color: #3b82f6;
        background-color: #3b82f6;
        color: #ffffff;
        box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.15);
    }

    .setup-stepper .step-text {
        font-size: 0.8rem;
        font-weight: 700;
        color: #64748b;
    }

    .setup-stepper .step-item.active .step-text {
        color: #1e293b;
    }

/* ==========================================================================
   10. MODALES, TOASTS Y NOTIFICACIONES
   ========================================================================== */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeInModal 0.2s ease-out;
}

.custom-modal-content {
    background-color: #ffffff;
    width: 100%;
    max-width: 550px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    animation: scaleUpModal 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-modal-header {
    padding: 18px 24px;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .custom-modal-header h3 {
        margin: 0;
        font-size: 18px;
        color: #1e293b;
        display: flex;
        align-items: center;
        gap: 8px;
    }

.close-modal-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
}

    .close-modal-btn:hover {
        color: #475569;
    }

.custom-modal-body {
    padding: 24px;
}

.modal-instruction {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
}

.metodos-pago-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metodo-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .metodo-card:hover {
        border-color: #3b82f6;
        background-color: #f0f6ff;
        transform: translateX(4px);
    }

.metodo-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

    .metodo-icon.banco {
        background-color: #f0fdf4;
        color: #16a34a;
    }

    .metodo-icon.spei {
        background-color: #fef9c3;
        color: #ca8a04;
    }

    .metodo-icon.tarjeta {
        background-color: #eff6ff;
        color: #2563eb;
    }

.metodo-info {
    flex-grow: 1;
}

.metodo-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.metodo-desc {
    display: block;
    font-size: 11px;
    color: #64748b;
}

.arrow-next {
    color: #cbd5e1;
    font-size: 12px;
}

.metodo-card:hover .arrow-next {
    color: #3b82f6;
}

/* Toasts */
.custom-toast {
    min-width: 360px;
    border-radius: 12px !important;
    overflow: hidden;
    background-color: rgba(220, 53, 69, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    color: #ffffff !important;
    position: relative;
}

.toast-content {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
}

.toast-icon {
    font-size: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.toast-body-custom {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.toast-title {
    font-family: 'Public Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

.toast-message {
    font-family: 'Public Sans', sans-serif;
    font-size: 0.85rem;
    opacity: 0.9;
}

.custom-toast .btn-close {
    opacity: 0.75;
    transition: opacity 0.2s ease;
    background-color: transparent;
    border: none;
}

    .custom-toast .btn-close:hover {
        opacity: 1;
    }

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: rgba(255, 255, 255, 0.35);
    transform-origin: left;
    animation: progressBar 4s linear forwards;
}

.toast-success {
    background: #a0d388 !important;
}

.toast-info {
    background: rgba(33, 150, 243, 0.90) !important;
}

.toast-warning {
    background: rgba(255, 152, 0, 0.92) !important;
}

.toast-error {
    background: rgba(244, 67, 54, 0.92) !important;
}

/* ==========================================================================
   11. DASHBOARDS Y CRONOGRAMAS (KPIs & TIMELINES)
   ========================================================================== */
.dashboard-evento, .dashboard-cirilpe {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    padding: 24px;
    color: #333;
}

.dashboard-metrics, .kpi-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card, .kpi-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #7481d1;
    border-top: 4px solid #7481d1;
}

    .metric-card.total-pagado, .kpi-card.financiado {
        border-left-color: #28a745;
        border-top-color: #38a169;
    }

    .kpi-card.highlight {
        border-top-color: #e53e3e;
    }

    .metric-card h3, .kpi-card h3 {
        font-size: 13px;
        color: #6c757d;
        margin: 0 0 10px 0;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .metric-card .metric-value, .kpi-card .kpi-value {
        font-size: 28px;
        font-weight: bold;
        margin-bottom: 5px;
    }

    .metric-card p, .kpi-card p {
        font-size: 12px;
        color: #a0a0a0;
        margin: 0;
    }

.dashboard-content, .dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 1200px) {
    .dashboard-grid, .dashboard-content {
        grid-template-columns: 1fr;
    }
}

.panel-section, .grid-section {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.section-header, .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f4f6f9;
    padding-bottom: 12px;
}

    .section-header h2, .panel-header h2 {
        font-size: 18px;
        margin: 0;
        color: #495057;
    }

/* Timeline / Cronograma */
.timeline {
    border-left: 3px solid #e9ecef;
    padding-left: 20px;
    margin-left: 10px;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

    .timeline-item::before {
        content: '';
        position: absolute;
        left: -26.5px;
        top: 4px;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background-color: #ced4da;
        border: 3px solid #fff;
    }

    .timeline-item.actual::before {
        background-color: #7481d1;
        box-shadow: 0 0 0 4px rgba(116, 129, 209, 0.2);
    }

    .timeline-item .time {
        font-size: 12px;
        font-weight: bold;
        color: #7481d1;
        display: block;
        margin-bottom: 4px;
    }

.timeline-content h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #333;
}

.timeline-content p {
    margin: 0;
    font-size: 12px;
    color: #6c757d;
}

.milestone-timeline {
    padding-left: 10px;
    margin-top: 15px;
}

.milestone-item {
    position: relative;
    padding-left: 24px;
    margin-bottom: 25px;
    border-left: 2px solid #e2e8f0;
}

    .milestone-item:last-child {
        border-left-color: transparent;
    }

.milestone-dot {
    position: absolute;
    left: -7px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e0;
}

.milestone-item.completed .milestone-dot {
    background: #38a169;
}

.milestone-item.active .milestone-dot {
    background: #e53e3e;
    box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.2);
}

/* Status Badges */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.status {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-paid {
    background: #c6f6d5;
    color: #22543d;
}

.status-unpaid {
    background: #fed7d7;
    color: #742a2a;
}

.status-approved {
    background: #e2f8ff;
    color: #2b6cb0;
}

.status-pending {
    background: #feebc8;
    color: #744210;
}

.status-hold {
    background: #edf2f7;
    color: #4a5568;
}

.tag {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.tag-blue {
    background: #ebf8ff;
    color: #2b6cb0;
}

.tag-purple {
    background: #faf5ff;
    color: #6b46c1;
}

/* ==========================================================================
   12. ANIMACIONES CSS
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInModal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleUpModal {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes progressBar {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}
/* Color del Spinner SweetAlert (Azul UNACH + Dorado) */
.swal2-loader {
    border-color: #c59b27 transparent #0b2341 transparent !important;
}

/* Modal estilizado con sombra corporativa */
.swal2-popup {
    border-top: 5px solid #0b2341 !important; /* Barra superior azul UNACH */
    border-radius: 12px !important;
    box-shadow: 0 15px 30px rgba(11, 35, 65, 0.2) !important;
}

/* Animación opcional de pulso para la imagen */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.9;
    }
}
