:root {
    --ga-blue: #176CC1;
    --ga-blue-dark: #0F4F93;
    --ga-orange: #F39A22;
    --ga-orange-dark: #D87D0A;
    --ga-bg: #F5F7FB;
    --ga-card: #FFFFFF;
    --ga-text: #1E293B;
    --ga-muted: #64748B;
    --ga-border: #E2E8F0;
    --ga-success: #15803D;
    --ga-danger: #B91C1C;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--ga-bg);
    color: var(--ga-text);
}

a { color: var(--ga-blue); text-decoration: none; }
a:hover { color: var(--ga-orange); }

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #B55353;
}

.login-card {
    width: 410px;
    background: white;
    border-radius: 22px;
    padding: 34px;
    box-shadow: 0 22px 55px rgba(15, 79, 147, .16);
    text-align: center;
    border-top: 5px solid var(--ga-orange);
}

.login-logo { max-width: 230px; margin-bottom: 18px; }
.login-title { margin: 8px 0 4px; font-size: 24px; color: var(--ga-blue-dark); }
.login-subtitle { margin: 0 0 22px; color: var(--ga-muted); }

.form-group { margin-bottom: 14px; text-align: left; }
.form-label { display: block; font-weight: 600; margin-bottom: 7px; color: var(--ga-blue-dark); }
.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--ga-border);
    border-radius: 12px;
    background: white;
    font-size: 15px;
}
.form-control:focus { outline: 2px solid rgba(23,108,193,.18); border-color: var(--ga-blue); }

.btn {
    display: inline-block;
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 700;
    transition: .18s ease;
}
.btn-primary-ga { background: var(--ga-blue); color: white; }
.btn-primary-ga:hover { background: var(--ga-orange); color: white; }
.btn-secondary-ga { background: var(--ga-orange); color: white; }
.btn-secondary-ga:hover { background: var(--ga-blue); color: white; }
.btn-block { width: 100%; }

.message { margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.message-error { background: #FEE2E2; color: var(--ga-danger); }
.message-ok { background: #DCFCE7; color: var(--ga-success); }
.message-info { background: #DBEAFE; color: var(--ga-blue-dark); }

.topbar {
    height: 76px;
    background: white;
    border-bottom: 1px solid var(--ga-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.brand img { height: 47px; display: block; }
.nav { display: flex; gap: 14px; align-items: center; }
.nav a, .nav span {
    font-weight: 650;
    color: var(--ga-blue-dark);
    padding: 8px 10px;
    border-radius: 9px;
}
.nav a:hover { background: rgba(243,154,34,.12); color: var(--ga-orange-dark); }
.user-chip {
    background: rgba(23,108,193,.09);
    color: var(--ga-blue-dark);
    border-radius: 999px;
    padding: 9px 14px;
    font-weight: 700;
}

.container { width: min(1180px, calc(100% - 44px)); margin: 30px auto; }
.page-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 12px; }
.page-title h1 { margin: 0; color: var(--ga-blue-dark); font-size: 28px; }
.page-title p { margin: 7px 0 0; color: var(--ga-muted); }

.card {
    background: var(--ga-card);
    border: 1px solid var(--ga-border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 8px 26px rgba(15, 79, 147, .06);
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.video-card { display: flex; flex-direction: column; gap: 12px; }
.video-card h3 { margin: 0; color: var(--ga-blue-dark); }
.video-card p { color: var(--ga-muted); margin: 0; min-height: 42px; }
.badge { display: inline-block; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.badge-ok { background: #DCFCE7; color: var(--ga-success); }
.badge-pending { background: #FFEFD8; color: var(--ga-orange-dark); }

.progress-panel { margin-bottom: 18px; border-left: 5px solid var(--ga-orange); }
.video-player { width: 100%; max-height: 620px; background: #000; border-radius: 18px; }
.question-card { background: white; border: 1px solid var(--ga-border); border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.question-card h3 { margin-top: 0; color: var(--ga-blue-dark); }
.alternativas label { margin-left: 8px; }
.alternativas td { padding: 7px 0; }

.admin-grid { width: 100%; border-collapse: collapse; background: white; }
.admin-grid th { background: var(--ga-blue); color: white; padding: 10px; text-align: left; }
.admin-grid td { border-bottom: 1px solid var(--ga-border); padding: 9px; }
.admin-grid tr:nth-child(even) { background: #F8FAFC; }

.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-row-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

.result-hero { text-align: center; padding: 34px; }
.result-score { font-size: 56px; font-weight: 900; color: var(--ga-blue); margin: 12px 0; }
.result-approved { color: var(--ga-success); }
.result-failed { color: var(--ga-danger); }

@media (max-width: 760px) {
    .topbar { height: auto; padding: 14px; flex-direction: column; gap: 12px; align-items: flex-start; }
    .nav { flex-wrap: wrap; }
    .form-row, .form-row-4 { grid-template-columns: 1fr; }
    .login-card { width: min(92vw, 410px); }
}


.capacitacion-card { margin-bottom: 22px; }
.capacitacion-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.capacitacion-header h2 { margin: 0; color: var(--ga-blue-dark); }
.capacitacion-header p { margin: 8px 0 0; color: var(--ga-muted); }

.btn-danger-ga { background: #DC2626; color: white; }
.btn-danger-ga:hover { background: #991B1B; color: white; }
.btn-small { padding: 7px 11px; border-radius: 9px; font-size: 12px; }
.report-actions { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.report-actions .form-label { width: 100%; margin-bottom: 0; }

.video-grid { align-items: stretch; }
.video-card { overflow: hidden; }
.video-preview-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0F172A;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--ga-border);
    margin-bottom: 2px;
}
.video-preview {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0F172A;
}
.video-card .btn { margin-top: auto; text-align: center; }



.grid-thumb {
    width: 72px;
    height: 42px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--ga-border);
    background: #fff;
}
.form-help {
    display: block;
    color: var(--ga-muted);
    margin-top: 6px;
}

/* Carga de imagen de apoyo en preguntas */
.ga-file-upload {
    padding: 11px 14px;
    min-height: 48px;
}

.ga-file-upload::file-selector-button {
    margin-right: 12px;
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    background: var(--ga-blue-logo);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.support-image-current {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(9, 94, 186, .14);
    background: rgba(9, 94, 186, .05);
}

.support-image-current span {
    color: #095eba;
    font-weight: 900;
    font-size: .82rem;
}

.support-image-current img {
    width: 96px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(9, 94, 186, .16);
    background: #fff;
}

.remove-image-check {
    display: block;
    margin-top: 10px;
    color: #5c6f86;
    font-weight: 800;
}

body.dark-mode .support-image-current {
    background: rgba(124,184,247,.10) !important;
    border-color: rgba(139,177,220,.22) !important;
}

body.dark-mode .support-image-current span {
    color: #9CCBFF !important;
}

body.dark-mode .support-image-current img {
    background: #0F1C2D !important;
    border-color: rgba(139,177,220,.24) !important;
}

body.dark-mode .remove-image-check {
    color: #CFE3F8 !important;
}
.capacitacion-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
}
.training-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.training-card-link { display: block; }
.training-card-image {
    height: 190px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #EAF2FF;
    border-bottom: 1px solid var(--ga-border);
}
.training-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}
.training-card-title-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}
.training-card h2 {
    margin: 0;
    color: var(--ga-blue-dark);
    font-size: 22px;
}
.training-card p {
    color: var(--ga-muted);
    margin: 0;
    min-height: 44px;
}
.training-meta {
    color: var(--ga-blue-dark);
    font-weight: 700;
}
.training-result { margin-top: 0; }
.progress-mini {
    height: 10px;
    width: 100%;
    background: #E2E8F0;
    border-radius: 999px;
    overflow: hidden;
}
.progress-mini > div {
    height: 100%;
    background: var(--ga-blue);
    border-radius: 999px;
}
.training-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 22px;
    align-items: start;
}
.video-main-card { min-width: 0; }
.video-current-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}
.video-current-header h2 {
    margin: 0 0 7px;
    color: var(--ga-blue-dark);
}
.video-current-header p { margin: 0; color: var(--ga-muted); }
.video-current-kicker {
    color: var(--ga-orange-dark) !important;
    font-weight: 800;
    margin-bottom: 6px !important;
}
.video-sidebar {
    position: sticky;
    top: 98px;
}
.video-sidebar h2 {
    color: var(--ga-blue-dark);
    margin: 0;
    font-size: 21px;
}
.sidebar-help {
    color: var(--ga-muted);
    margin: 6px 0 16px;
}
.video-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.video-sidebar-item {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 12px;
    border: 1px solid var(--ga-border);
    border-radius: 14px;
    background: #F8FAFC;
    color: var(--ga-text);
}
.video-sidebar-item:hover {
    border-color: var(--ga-orange);
    background: #FFF7ED;
}
.video-sidebar-item.active {
    border-color: var(--ga-blue);
    background: #EFF6FF;
    box-shadow: inset 4px 0 0 var(--ga-blue);
}
.video-sidebar-item strong {
    color: var(--ga-blue-dark);
}
.video-sidebar-item small {
    color: var(--ga-muted);
    line-height: 1.35;
}
.sidebar-test-box, .sidebar-test-button { margin-top: 18px; }
.detail-progress { margin: -6px 0 20px; }
.progress-detail { margin-top: 10px; }

@media (max-width: 900px) {
    .training-detail-layout { grid-template-columns: 1fr; }
    .video-sidebar { position: static; }
}


.assignment-box {
    border-left: 4px solid var(--ga-orange);
    padding-left: 14px;
}

.assignment-panel {
    background: #f8fbff;
    border: 1px solid #dbe6f5;
    border-radius: 14px;
    padding: 14px;
}

.check-list table {
    width: 100%;
}

.check-list td {
    padding: 6px 16px 6px 0;
    vertical-align: top;
}

.check-list label {
    margin-left: 6px;
}

/* Layout lateral responsivo */
.app-body {
    background: var(--ga-bg);
}

.sidebar-checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    min-height: 100vh;
    background: #ffffff;
    border-right: 1px solid var(--ga-border);
    box-shadow: 8px 0 28px rgba(15, 79, 147, .08);
    padding: 22px 18px;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 8px 10px 22px;
    border-bottom: 1px solid var(--ga-border);
    margin-bottom: 18px;
}

.sidebar-brand img {
    display: block;
    max-width: 205px;
    height: auto;
}

.sidebar-user-box {
    background: var(--ga-blue-logo);
    border: 1px solid rgba(23,108,193,.14);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 18px;
}

.sidebar-user-label {
    display: block;
    color: var(--ga-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 5px;
}

.sidebar-user-name {
    display: block;
    color: var(--ga-blue-dark);
    font-weight: 800;
    line-height: 1.3;
}

.sidebar-nav,
.sidebar-admin-menu,
.sidebar-submenu {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.sidebar-menu-group {
    border: 1px solid var(--ga-border);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}

.sidebar-menu-group summary {
    list-style: none;
    cursor: pointer;
    min-height: 46px;
    padding: 12px 14px;
    color: var(--ga-blue-dark);
    font-weight: 850;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.sidebar-menu-group summary::-webkit-details-marker {
    display: none;
}

.sidebar-menu-group summary::after {
    content: "▾";
    font-size: 13px;
    color: var(--ga-orange-dark);
    transition: transform .18s ease;
}

.sidebar-menu-group:not([open]) summary::after {
    transform: rotate(-90deg);
}

.sidebar-menu-group summary:hover {
    background: rgba(243,154,34,.14);
    color: var(--ga-orange-dark);
}

.sidebar-submenu {
    padding: 0 10px 10px 10px;
    border-top: 1px solid var(--ga-border);
    background: #F8FAFC;
}

.sidebar-submenu > a,
.sidebar-admin-menu a {
    display: flex;
    align-items: center;
    min-height: 39px;
    padding: 10px 12px;
    border-radius: 11px;
    color: var(--ga-blue-dark);
    font-weight: 720;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.sidebar-submenu > a {
    margin-top: 10px;
}

.sidebar-submenu > a:hover,
.sidebar-admin-menu a:hover {
    background: rgba(243,154,34,.14);
    color: var(--ga-orange-dark);
    transform: translateX(2px);
}

.sidebar-admin-menu {
    gap: 5px;
}

.sidebar-logout {
    margin-top: 14px;
    border: 1px solid var(--ga-border);
    color: var(--ga-danger) !important;
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 11px 13px;
    border-radius: 12px;
    font-weight: 750;
}

.sidebar-logout:hover {
    background: #FEE2E2;
    color: var(--ga-danger) !important;
}

.main-shell {
    margin-left: 280px;
    min-height: 100vh;
}

.mobile-topbar {
    display: none;
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 980px) {
    .sidebar {
        transform: translateX(-102%);
        transition: transform .22s ease;
        width: min(86vw, 300px);
        box-shadow: 14px 0 40px rgba(15, 23, 42, .22);
    }

    .sidebar-checkbox:checked ~ .sidebar {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .45);
        z-index: 90;
        cursor: pointer;
    }

    .sidebar-checkbox:checked ~ .sidebar-overlay {
        display: block;
    }

    .main-shell {
        margin-left: 0;
    }

    .mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        height: 70px;
        padding: 0 16px;
        background: white;
        border-bottom: 1px solid var(--ga-border);
        position: sticky;
        top: 0;
        z-index: 80;
    }

    .mobile-brand img {
        display: block;
        height: 38px;
        max-width: 190px;
    }

    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 0;
        border-radius: 12px;
        padding: 10px 14px;
        background: var(--ga-blue);
        color: #fff;
        font-weight: 800;
        cursor: pointer;
        white-space: nowrap;
    }

    .container {
        width: min(1180px, calc(100% - 28px));
        margin: 22px auto;
    }
}

@media (max-width: 520px) {
    .mobile-brand img {
        max-width: 145px;
    }

    .sidebar-toggle {
        padding: 9px 12px;
        font-size: 14px;
    }

    .page-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-grid {
        font-size: 13px;
    }
}

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

.questions-list-card {
    margin-top: 22px;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.section-title-row h2 {
    margin: 0;
    color: var(--ga-blue-dark);
}

.section-title-row p {
    margin: 6px 0 0;
    color: var(--ga-muted);
}

.questions-grid td {
    vertical-align: top;
}

.alternative-line {
    margin-bottom: 5px;
    line-height: 1.35;
}

@media (max-width: 760px) {
    .section-title-row { flex-direction: column; }
    .questions-grid { font-size: 13px; }
}

.alternatives-title-row {
    margin-bottom: 10px;
}

.alternative-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.alternatives-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alternative-editor-row {
    display: grid;
    grid-template-columns: 130px minmax(240px, 1fr) 110px 90px;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--ga-border);
    border-radius: 14px;
    background: #F8FAFC;
}

.alternative-label {
    font-weight: 800;
    color: var(--ga-blue-dark);
}

.correct-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--ga-muted);
}

@media (max-width: 860px) {
    .alternative-editor-row {
        grid-template-columns: 1fr;
    }

    .alternative-actions {
        width: 100%;
    }
}


.multi-select-users {
    min-height: 160px;
    padding: 10px 12px;
}

.multi-select-users option {
    padding: 8px 10px;
    border-radius: 8px;
}

.grid-combo {
    min-width: 230px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 14px;
}

@media (max-width: 760px) {
    .grid-combo {
        min-width: 180px;
    }
}

/* ==========================================================
   Tema visual premium - GestiónAuto Intranet
   Rediseño aplicado sin modificar lógica C# ni eventos ASP.NET
   ========================================================== */
:root {
    --ga-blue: #2563EB;
    --ga-blue-dark: #0F2A4A;
    --ga-blue-soft: #EAF2FF;
    --ga-orange: #F59E0B;
    --ga-orange-dark: #B45309;
    --ga-bg: #F4F7FB;
    --ga-card: rgba(255,255,255,.96);
    --ga-text: #0F172A;
    --ga-muted: #64748B;
    --ga-border: #DDE6F2;
    --ga-success: #15803D;
    --ga-danger: #B91C1C;
    --ga-shadow: 0 24px 60px rgba(15, 42, 74, .12);
    --ga-shadow-soft: 0 14px 34px rgba(15, 42, 74, .08);
    --ga-radius-xl: 26px;
    --ga-radius-lg: 18px;
    --ga-radius-md: 14px;
}

html { scroll-behavior: smooth; }

body {
    min-height: 100vh;
    background:
        #B55353;
    color: var(--ga-text);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

body::selection { background: rgba(37,99,235,.18); }

a { color: var(--ga-blue); font-weight: 650; }
a:hover { color: var(--ga-orange-dark); }

/* Login */
.login-body {
    position: relative;
    overflow: hidden;
    padding: 28px;
    background:
        var(--ga-orange);
}

.login-body::before,
.login-body::after {
    content: "";
    position: fixed;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(4px);
}

.login-body::before {
    left: -120px;
    bottom: -130px;
    background: rgba(245,158,11,.16);
}

.login-body::after {
    right: -120px;
    top: -130px;
    background: rgba(37,99,235,.20);
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(440px, calc(100vw - 36px));
    padding: 34px;
    border: 1px solid rgba(255,255,255,.48);
    border-top: 0;
    border-radius: 30px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 34px 90px rgba(0,0,0,.28);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 7px;
    background: var(--ga-blue-logo);
}

.login-pill {
    width: max-content;
    margin: 0 auto 16px;
    padding: 7px 13px;
    border-radius: 999px;
    background: #EFF6FF;
    color: var(--ga-blue-dark);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.login-logo {
    max-width: 225px;
    margin-bottom: 14px;
    filter: drop-shadow(0 8px 18px rgba(15,42,74,.10));
}

.login-title {
    margin: 8px 0 6px;
    color: var(--ga-blue-dark);
    font-size: 27px;
    letter-spacing: -.03em;
}

.login-subtitle { margin-bottom: 14px; }

.login-feature-strip {
    margin: 0 0 22px;
    padding: 10px 12px;
    border: 1px solid #DBEAFE;
    border-radius: 999px;
    background: #FFFFFF;
    color: #475569;
    font-size: 13px;
    font-weight: 750;
}

/* Layout general */
.app-body { background: transparent; }

.sidebar {
    width: 292px;
    padding: 22px 16px;
    border-right: 1px solid rgba(255,255,255,.13);
    background:
        var(--ga-blue-logo);
    box-shadow: 20px 0 60px rgba(15,23,42,.22);
}

.sidebar-brand {
    position: relative;
    margin-bottom: 18px;
    padding: 14px 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.sidebar-brand a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 74px;
    border-radius: 22px;
    background: rgba(255,255,255,.97);
    box-shadow: inset 0 0 0 1px rgba(15,42,74,.06), 0 18px 36px rgba(0,0,0,.16);
}

.sidebar-brand img { max-width: 210px; }

.sidebar-user-box {
    position: relative;
    padding: 16px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    background: var(--ga-blue-logo);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
}

.sidebar-user-box::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 0 5px rgba(34,197,94,.13);
    vertical-align: middle;
}

.sidebar-user-label {
    display: inline-block;
    color: rgba(226,232,240,.76);
    font-size: 11px;
    letter-spacing: .11em;
}

.sidebar-user-name {
    margin-top: 8px;
    color: #FFFFFF;
    font-size: 16px;
    letter-spacing: -.01em;
}

.sidebar-section-label {
    margin: 18px 10px 9px;
    color: rgba(226,232,240,.58);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sidebar-menu-group {
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    background: rgba(255,255,255,.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.sidebar-menu-group summary {
    min-height: 50px;
    padding: 14px 15px;
    color: #FFFFFF;
    font-size: 15px;
}

.sidebar-menu-group summary::before {
    content: "▣";
    margin-right: 10px;
    color: #93C5FD;
}

.sidebar-menu-group summary::after { color: #FCD34D; }
.sidebar-menu-group summary:hover { background: rgba(255,255,255,.08); color: #FFFFFF; }

.sidebar-submenu {
    gap: 6px;
    padding: 10px;
    border-top: 1px solid rgba(255,255,255,.10);
    background: rgba(2,6,23,.16);
}

.sidebar-submenu > a,
.sidebar-admin-menu a,
.sidebar-logout {
    min-height: 42px;
    border-radius: 14px;
    color: rgba(241,245,249,.90) !important;
    font-weight: 760;
}

.sidebar-submenu > a::before,
.sidebar-admin-menu a::before {
    content: "›";
    display: inline-grid;
    place-items: center;
    width: 23px;
    height: 23px;
    margin-right: 8px;
    border-radius: 9px;
    background: rgba(255,255,255,.09);
    color: #BFDBFE;
}

.sidebar-submenu > a:hover,
.sidebar-admin-menu a:hover {
    background: rgba(255,255,255,.12);
    color: #FFFFFF !important;
    transform: translateX(3px);
}

.sidebar-logout {
    border: 1px solid rgba(248,113,113,.26);
    background: rgba(239,68,68,.10);
    color: #FECACA !important;
}

.sidebar-logout::before {
    content: "⏻";
    margin-right: 10px;
}

.sidebar-logout:hover {
    background: rgba(239,68,68,.18);
    color: #FFFFFF !important;
}

.main-shell {
    margin-left: 292px;
    min-height: 100vh;
}

.desktop-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    min-height: 74px;
    padding: 18px 34px;
    border-bottom: 1px solid rgba(221,230,242,.78);
    background: rgba(248,251,255,.82);
    backdrop-filter: blur(18px);
}

.desktop-topbar strong {
    display: block;
    color: var(--ga-blue-dark);
    font-size: 18px;
    letter-spacing: -.02em;
}

.desktop-kicker {
    display: block;
    margin-bottom: 2px;
    color: var(--ga-muted);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.desktop-status {
    padding: 9px 13px;
    border: 1px solid #DBEAFE;
    border-radius: 999px;
    background: #EFF6FF;
    color: #1D4ED8;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.container {
    width: min(1240px, calc(100% - 54px));
    margin: 30px auto 44px;
}

/* Encabezados y tarjetas */
.page-title {
    position: relative;
    align-items: stretch;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(221,230,242,.92);
    border-radius: var(--ga-radius-xl);
    background:
        #F4F9FE;
    box-shadow: var(--ga-shadow-soft);
    overflow: hidden;
}

.page-title::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 7px;
    background: var(--ga-blue-logo);
}

.page-title > div { position: relative; z-index: 1; }

.page-title h1 {
    color: var(--ga-blue-dark);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.12;
    letter-spacing: -.04em;
}

.page-title p {
    max-width: 820px;
    margin-top: 8px;
    color: #64748B;
    font-size: 15.5px;
}

.card,
.question-card,
.assignment-panel {
    border: 1px solid rgba(221,230,242,.92);
    border-radius: var(--ga-radius-xl);
    background: var(--ga-card);
    box-shadow: var(--ga-shadow-soft);
}

.card { padding: 24px; }
.card:hover { box-shadow: var(--ga-shadow); }

/* Formularios */
.form-label {
    color: #173B66;
    font-size: 13px;
    font-weight: 850;
    letter-spacing: .02em;
}

.form-control,
select.form-control,
textarea.form-control,
input[type="file"].form-control {
    min-height: 46px;
    border: 1px solid #D7E2F0;
    border-radius: 15px;
    background: #FFFFFF;
    color: var(--ga-text);
    box-shadow: inset 0 1px 0 rgba(15,42,74,.03);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

textarea.form-control { min-height: 96px; resize: vertical; }

.form-control:focus {
    border-color: #60A5FA;
    outline: none;
    box-shadow: 0 0 0 4px rgba(37,99,235,.12), inset 0 1px 0 rgba(15,42,74,.03);
}

.form-row,
.form-row-4 { align-items: end; }

input[type="checkbox"], input[type="radio"] { accent-color: var(--ga-blue); }

/* Botones */
.btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    border: 1px solid transparent;
    padding: 11px 18px;
    font-weight: 850;
    letter-spacing: -.01em;
    box-shadow: 0 10px 20px rgba(15,42,74,.10);
    text-align: center;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary-ga {
    background: var(--ga-blue-logo);
    color: #FFFFFF !important;
}

.btn-primary-ga:hover {
    background: var(--ga-blue-logo);
    color: #FFFFFF !important;
}

.btn-secondary-ga {
    background: var(--ga-orange);
    color: #FFFFFF !important;
}

.btn-secondary-ga:hover {
    background: var(--ga-orange);
    color: #FFFFFF !important;
}

.btn-danger-ga {
    background: #B55353;
    color: #FFFFFF !important;
}

.btn-danger-ga:hover {
    background: #B55353;
    color: #FFFFFF !important;
}

.btn-small {
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 11px;
    font-size: 12px;
    box-shadow: none;
}

/* Mensajes y estados */
.message {
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 12px 14px;
    font-weight: 760;
}

.message-error { border-color: #FECACA; background: #FEF2F2; color: var(--ga-danger); }
.message-ok { border-color: #BBF7D0; background: #F0FDF4; color: var(--ga-success); }
.message-info { border-color: #BFDBFE; background: #EFF6FF; color: #1E40AF; }
.validation-message { display: block; margin-top: 14px; }

.badge {
    padding: 7px 11px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11.5px;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.badge-ok { border-color: #BBF7D0; background: #ECFDF5; color: #047857; }
.badge-pending { border-color: #FED7AA; background: #FFF7ED; color: #C2410C; }

/* Dashboard y capacitaciones */
.capacitacion-menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 24px;
}

.training-card {
    position: relative;
    border-radius: 28px;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.training-card:hover {
    transform: translateY(-4px);
    border-color: rgba(37,99,235,.26);
}

.training-card-image {
    height: 204px;
    border-bottom: 1px solid #E2E8F0;
    background-color: #EAF2FF;
    transition: transform .28s ease;
}

.training-card:hover .training-card-image { transform: scale(1.015); }

.training-card-body { padding: 22px; gap: 14px; }
.training-card h2 { font-size: 22px; line-height: 1.2; letter-spacing: -.03em; }
.training-card p { color: #64748B; }
.training-meta { color: #173B66; font-size: 13px; }

.progress-mini {
    height: 11px;
    background: #E5EDF8;
    box-shadow: inset 0 1px 2px rgba(15,42,74,.08);
}

.progress-mini > div {
    background: var(--ga-orange);
}

.training-result { font-size: 13px; }

/* Video y detalle */
.training-detail-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
}

.video-main-card,
.video-sidebar { overflow: hidden; }

.video-current-header {
    padding: 4px 2px 2px;
}

.video-current-header h2 {
    color: var(--ga-blue-dark);
    font-size: 24px;
    letter-spacing: -.03em;
}

.video-player {
    display: block;
    width: 100%;
    border: 1px solid rgba(15,42,74,.14);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(2,6,23,.18);
}

.video-sidebar {
    top: 98px;
    border-radius: 24px;
}

.video-sidebar-item {
    border-radius: 18px;
    background: #F8FBFF;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.video-sidebar-item:hover {
    transform: translateX(2px);
    border-color: #FDBA74;
    background: #FFF7ED;
}

.video-sidebar-item.active {
    border-color: #93C5FD;
    background: var(--ga-blue-logo);
    box-shadow: inset 5px 0 0 var(--ga-blue), 0 10px 20px rgba(37,99,235,.08);
}

.video-current-kicker {
    color: var(--ga-orange-dark) !important;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 12px;
}

/* Evaluaciones */
.question-card {
    padding: 22px;
    margin-bottom: 18px;
}

.question-card h3 {
    color: var(--ga-blue-dark);
    font-size: 20px;
    letter-spacing: -.02em;
}

.alternativas td { padding: 9px 0; }
.alternativas label { color: #334155; font-weight: 650; }

.result-hero {
    position: relative;
    max-width: 720px;
    margin: 52px auto;
    padding: 42px 34px;
    overflow: hidden;
}

.result-hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 8px;
    background: var(--ga-blue-logo);
}

.result-hero h1 {
    margin-top: 4px;
    color: var(--ga-blue-dark);
    font-size: 34px;
    letter-spacing: -.04em;
}

.result-score {
    font-size: clamp(52px, 8vw, 78px);
    color: var(--ga-blue);
    letter-spacing: -.06em;
}

/* Administración */
.admin-grid {
    width: 100%;
    overflow: hidden;
    border: 1px solid #DDE6F2;
    border-radius: 20px;
    border-collapse: separate;
    border-spacing: 0;
    background: #FFFFFF;
    box-shadow: var(--ga-shadow-soft);
}

.admin-grid th {
    padding: 13px 12px;
    background: var(--ga-blue-logo);
    color: #FFFFFF;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.admin-grid td {
    padding: 12px;
    border-bottom: 1px solid #E5EDF8;
    color: #334155;
    vertical-align: middle;
}

.admin-grid tr:nth-child(even) { background: #F8FBFF; }
.admin-grid tr:hover td { background: #EFF6FF; }
.admin-grid tr:last-child td { border-bottom: 0; }

.grid-thumb {
    width: 84px;
    height: 50px;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(15,42,74,.10);
}

.report-actions {
    padding: 0;
    align-items: center;
}

.form-actions { margin-top: 4px; }

.section-title-row h2 {
    color: var(--ga-blue-dark);
    font-size: 24px;
    letter-spacing: -.03em;
}

.alternative-editor-row {
    border-radius: 18px;
    background: #F8FBFF;
}

.multi-select-users {
    min-height: 178px;
    border-radius: 18px;
}

.grid-combo { border-radius: 13px; }

/* Responsive */
@media (max-width: 1100px) {
    .training-detail-layout { grid-template-columns: 1fr; }
    .video-sidebar { position: static; }
}

@media (max-width: 980px) {
    .sidebar { width: min(88vw, 308px); }
    .main-shell { margin-left: 0; }
    .desktop-topbar { display: none; }
    .mobile-topbar {
        height: 72px;
        background: rgba(255,255,255,.88);
        backdrop-filter: blur(16px);
    }
    .sidebar-toggle {
        background: var(--ga-blue-logo);
        border-radius: 14px;
    }
    .container {
        width: min(1180px, calc(100% - 30px));
        margin-top: 22px;
    }
}

@media (max-width: 760px) {
    body { font-size: 14px; }
    .page-title {
        flex-direction: column;
        padding: 22px 18px;
    }
    .page-title .btn { width: 100%; }
    .card { padding: 18px; border-radius: 22px; }
    .capacitacion-menu-grid { grid-template-columns: 1fr; }
    .training-card-image { height: 180px; }
    .admin-grid {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        border-radius: 18px;
    }
    .report-actions .btn { width: 100%; }
    .login-card { padding: 30px 24px; }
}

@media (max-width: 520px) {
    .container { width: min(100% - 22px, 1180px); }
    .login-body { padding: 18px; }
    .login-title { font-size: 24px; }
    .desktop-status { display: none; }
}

/* ==========================================================
   Ajuste visual suave basado en colores del logo GestiónAuto
   Paleta tomada del logo: azul #095EBA / #2874C4, naranja #F5A23D,
   azul muy claro #DCE9F5 y naranja muy claro #FCEDDB.
   ========================================================== */
:root {
    --ga-blue: #2874C4;
    --ga-blue-logo: #095EBA;
    --ga-blue-dark: #074785;
    --ga-blue-soft: #DCE9F5;
    --ga-blue-pale: #F4F9FE;
    --ga-orange: #F5A23D;
    --ga-orange-dark: #C97912;
    --ga-orange-soft: #FCEDDB;
    --ga-bg: #F7FAFD;
    --ga-card: #FFFFFF;
    --ga-text: #16324F;
    --ga-muted: #6B7F93;
    --ga-border: #D9E7F4;
    --ga-success: #2E7D5A;
    --ga-danger: #B55353;
    --ga-shadow: 0 18px 42px rgba(9, 94, 186, .10);
    --ga-shadow-soft: 0 10px 26px rgba(9, 94, 186, .07);
}

body {
    background:
        #B55353;
    color: var(--ga-text);
}

a { color: var(--ga-blue-logo); }
a:hover { color: var(--ga-orange-dark); }

/* Login más claro y cercano al logo */
.login-body {
    background:
        #FFF8EF;
}

.login-body::before { background: rgba(245,162,61,.12); }
.login-body::after { background: rgba(9,94,186,.12); }

.login-card {
    border: 1px solid rgba(217,231,244,.95);
    background: rgba(255,255,255,.97);
    box-shadow: 0 26px 70px rgba(9,94,186,.13);
}

.login-card::before {
    background: var(--ga-blue-logo);
}

.login-pill {
    background: var(--ga-orange);
    color: var(--ga-blue-dark);
}

.login-feature-strip {
    border-color: #E6EFF8;
    background: #FFF8EF;
    color: var(--ga-muted);
}

/* Sidebar suave: deja atrás el bloque oscuro y usa la paleta del logo */
.sidebar {
    border-right: 1px solid var(--ga-border);
    background:
        var(--ga-orange);
    box-shadow: 16px 0 46px rgba(9,94,186,.10);
}

.sidebar-brand {
    border-bottom: 1px solid var(--ga-border);
}

.sidebar-brand a {
    background: #FFFFFF;
    box-shadow: 0 12px 28px rgba(9,94,186,.09);
}

.sidebar-user-box {
    border: 1px solid #D5E8F7;
    background: var(--ga-blue-logo);
    box-shadow: 0 8px 22px rgba(9,94,186,.06);
}

.sidebar-user-box::before {
    background: var(--ga-orange);
    box-shadow: 0 0 0 5px rgba(245,162,61,.18);
}

.sidebar-user-label,
.sidebar-section-label {
    color: #6E879F;
}

.sidebar-user-name,
.sidebar-menu-group summary,
.sidebar-submenu > a,
.sidebar-admin-menu a {
    color: var(--ga-blue-dark) !important;
}

.sidebar-menu-group {
    border: 1px solid #D9E7F4;
    background: rgba(255,255,255,.76);
    box-shadow: 0 8px 20px rgba(9,94,186,.05);
}

.sidebar-menu-group summary::before {
    color: var(--ga-blue);
}

.sidebar-menu-group summary::after {
    color: var(--ga-orange-dark);
}

.sidebar-menu-group summary:hover,
.sidebar-submenu > a:hover,
.sidebar-admin-menu a:hover {
    background: var(--ga-orange);
    color: var(--ga-blue-logo) !important;
}

.sidebar-submenu {
    border-top: 1px solid var(--ga-border);
    background: rgba(244,249,254,.92);
}

.sidebar-submenu > a::before,
.sidebar-admin-menu a::before {
    background: #FFFFFF;
    color: var(--ga-blue-logo);
    border: 1px solid #D9E7F4;
}

.sidebar-logout {
    border-color: #F5CFCF;
    background: #FFF5F5;
    color: #A94C4C !important;
}

.sidebar-logout:hover {
    background: #FFECEC;
    color: #8F3F3F !important;
}

/* Barras superiores */
.desktop-topbar,
.mobile-topbar {
    border-bottom: 1px solid rgba(217,231,244,.92);
    background: rgba(255,255,255,.88);
}

.desktop-status {
    border-color: #D9E7F4;
    background: #F4F9FE;
    color: var(--ga-blue-dark);
}

.sidebar-toggle {
    background: var(--ga-blue-logo);
}

/* Encabezados y contenedores */
.page-title {
    border-color: rgba(217,231,244,.96);
    background:
        var(--ga-blue-logo);
}

.page-title::before,
.result-hero::before {
    background: var(--ga-blue-logo);
}

.page-title h1,
.section-title-row h2,
.training-card h2,
.video-current-header h2,
.video-sidebar h2,
.question-card h3,
.result-hero h1,
.capacitacion-header h2 {
    color: var(--ga-blue-dark);
}

.card,
.question-card,
.assignment-panel,
.training-card,
.video-sidebar,
.video-main-card {
    border-color: rgba(217,231,244,.96);
    background: #FFFFFF;
    box-shadow: var(--ga-shadow-soft);
}

.card:hover,
.training-card:hover {
    box-shadow: var(--ga-shadow);
}

/* Formularios */
.form-label,
.alternative-label,
.training-meta {
    color: var(--ga-blue-dark);
}

.form-control,
select.form-control,
textarea.form-control,
input[type="file"].form-control,
.grid-combo {
    border-color: #D6E6F5;
    background: #FFFFFF;
    color: var(--ga-text);
}

.form-control:focus {
    border-color: var(--ga-blue);
    box-shadow: 0 0 0 4px rgba(40,116,196,.13), inset 0 1px 0 rgba(9,94,186,.03);
}

input[type="checkbox"], input[type="radio"] { accent-color: var(--ga-blue-logo); }

/* Botones con menos saturación */
.btn {
    box-shadow: 0 8px 17px rgba(9,94,186,.09);
}

.btn-primary-ga {
    background: var(--ga-blue-logo);
    color: #FFFFFF !important;
}

.btn-primary-ga:hover {
    background: var(--ga-blue-logo);
}

.btn-secondary-ga {
    background: var(--ga-orange);
    color: #563207 !important;
}

.btn-secondary-ga:hover {
    background: var(--ga-orange);
    color: #FFFFFF !important;
}

.btn-danger-ga {
    background: #B55353;
}

/* Tablas, tarjetas de capacitación y progreso */
.admin-grid {
    border-color: #D9E7F4;
    box-shadow: var(--ga-shadow-soft);
}

.admin-grid th {
    background: #B55353;
}

.admin-grid td {
    border-bottom-color: #E7F0F8;
}

.admin-grid tr:nth-child(even) { background: #F7FBFE; }
.admin-grid tr:hover td { background: #F0F7FD; }

.training-card:hover {
    border-color: rgba(40,116,196,.30);
}

.training-card-image {
    border-bottom-color: #E4EFF8;
    background-color: #F4F9FE;
}

.progress-mini {
    background: #E7F0F8;
}

.progress-mini > div {
    background: var(--ga-blue-logo);
}

.progress-panel,
.assignment-box {
    border-left-color: var(--ga-orange);
}

.video-sidebar-item {
    border-color: #D9E7F4;
    background: #F7FBFE;
}

.video-sidebar-item:hover {
    border-color: #F8BD75;
    background: #FFF8EF;
}

.video-sidebar-item.active {
    border-color: #AFCFED;
    background: #FFF8EF;
    box-shadow: inset 5px 0 0 var(--ga-blue-logo), 0 10px 20px rgba(9,94,186,.07);
}

.video-current-kicker {
    color: var(--ga-orange-dark) !important;
}

.result-score { color: var(--ga-blue-logo); }

.message-info {
    border-color: #CFE1F1;
    background: #F4F9FE;
    color: var(--ga-blue-dark);
}

.badge-pending {
    border-color: #F8D6AD;
    background: #FFF8EF;
    color: var(--ga-orange-dark);
}

.badge-ok {
    border-color: #C8E6D8;
    background: #F2FBF6;
    color: var(--ga-success);
}

/* ==========================================================
   Ajustes finales: logo integrado y pie de página institucional
   ========================================================== */
.login-logo,
.sidebar-brand img,
.mobile-brand img,
.brand img {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.login-logo {
    display: block;
    max-width: 225px;
    width: 100%;
    height: auto;
    margin: 2px auto 18px;
    filter: drop-shadow(0 8px 18px rgba(9,94,186,.08));
}

.sidebar-brand a,
.mobile-brand {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}

.sidebar-brand a {
    min-height: 66px;
    padding: 6px 0;
}

.ga-footer {
    width: min(1240px, calc(100% - 54px));
    margin: auto auto 18px;
    padding: 16px 12px 20px;
    text-align: center;
    color: var(--ga-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .01em;
}

.ga-footer-text {
    line-height: 1.35;
}

.ga-footer-logo {
    display: block;
    width: 92px;
    max-width: 34vw;
    height: auto;
    margin: 8px auto 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    opacity: .92;
}

.main-shell {
    display: flex;
    flex-direction: column;
}

.main-shell .container {
    flex: 1 0 auto;
}

.login-body > form {
    width: min(440px, calc(100vw - 36px));
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-body .login-card {
    width: 100%;
}

.login-footer {
    width: 100%;
    margin-top: 14px;
    margin-bottom: 0;
    padding: 8px 10px 0;
    color: #6B7F93;
}

@media (max-width: 760px) {
    .ga-footer {
        width: min(100% - 28px, 1180px);
        padding-bottom: 16px;
        font-size: 12.5px;
    }
}

/* ==========================================================
   Campana de notificaciones de capacitaciones pendientes
   ========================================================== */
.desktop-status-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    border: 1px solid #D9E7F4;
    border-radius: 999px;
    background: var(--ga-blue-logo);
    color: var(--ga-blue-dark);
    box-shadow: 0 8px 18px rgba(9,94,186,.08);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.notification-bell:hover {
    transform: translateY(-1px);
    border-color: #BBD6F0;
    background: var(--ga-blue-logo);
    color: var(--ga-blue-logo);
    box-shadow: 0 12px 24px rgba(9,94,186,.12);
}

.notification-bell-icon,
.notification-bell-icon svg {
    display: block;
}

.notification-bell-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -7px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border: 2px solid #FFFFFF;
    border-radius: 999px;
    background: var(--ga-orange);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 900;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 6px 14px rgba(245,162,61,.32);
}

.notification-empty .notification-badge {
    display: none;
}

.notification-empty {
    opacity: .82;
}

.notification-bell.has-pending {
    border-color: #F8D6AD;
    background: var(--ga-orange);
    color: var(--ga-orange-dark);
    box-shadow: 0 10px 24px rgba(245,162,61,.20);
}

.notification-bell.has-pending::after {
    content: "";
    position: absolute;
    inset: -4px;
    border: 1px solid rgba(245,162,61,.42);
    border-radius: inherit;
    pointer-events: none;
    animation: gaBellPulse 1.9s ease-out infinite;
}

.notification-bell.has-pending .notification-bell-icon {
    transform-origin: 50% 4px;
    animation: gaBellSwing 2.3s ease-in-out infinite;
}

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

@keyframes gaBellPulse {
    0% { opacity: .78; transform: scale(.95); }
    70% { opacity: 0; transform: scale(1.18); }
    100% { opacity: 0; transform: scale(1.18); }
}

@keyframes gaBellSwing {
    0%, 50%, 100% { transform: rotate(0); }
    6% { transform: rotate(10deg); }
    12% { transform: rotate(-8deg); }
    18% { transform: rotate(6deg); }
    24% { transform: rotate(-4deg); }
    30% { transform: rotate(0); }
}

@media (max-width: 520px) {
    .mobile-topbar-actions { gap: 8px; }
    .notification-bell {
        width: 39px;
        height: 39px;
        min-width: 39px;
    }
    .notification-badge {
        top: -5px;
        right: -6px;
    }
}

/* Funciones avanzadas de capacitación */
.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(320px, 1.4fr);
    gap: 22px;
    align-items: center;
    margin-bottom: 18px;
}
.dashboard-kicker {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(9, 94, 186, .09);
    color: #095eba;
    font-weight: 800;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.dashboard-hero h2 { margin: 10px 0 4px; font-size: 1.55rem; color: #0b4076; }
.dashboard-stats-grid,
.report-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.dashboard-stat,
.report-metric {
    border: 1px solid rgba(9, 94, 186, .12);
    border-radius: 18px;
    padding: 16px;
    background: #F4F9FE;
    box-shadow: 0 10px 24px rgba(9, 94, 186, .06);
}
.dashboard-stat span,
.report-metric span { display: block; color: #63748a; font-weight: 800; font-size: .8rem; }
.dashboard-stat strong,
.report-metric strong { display: block; color: #095eba; font-size: 1.55rem; margin-top: 5px; }
.dashboard-stat small { color: #7c8da3; font-weight: 700; }
.progress-hero { height: 12px; margin-top: 12px; }
.dashboard-filter-card { margin-bottom: 18px; }
.alert-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.alert-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 18px; background: rgba(245, 162, 61, .14); border: 1px solid rgba(245, 162, 61, .32); text-decoration: none; color: #7a4b09; }
.alert-card strong { color: #0b4076; }
.badge-info { background: rgba(40, 116, 196, .13); color: #095eba; }
.badge-warning { background: rgba(245, 162, 61, .18); color: #93600d; }
.badge-danger { background: rgba(220, 68, 68, .13); color: #b62929; }
.training-card-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.training-card-meta-row span { border-radius: 999px; padding: 6px 10px; background: #f4f8fc; color: #5c6f86; font-size: .78rem; font-weight: 800; }
.history-card { margin-top: 20px; }
.responsive-table { overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; }
.history-table th, .history-table td { padding: 12px 10px; border-bottom: 1px solid rgba(9, 94, 186, .10); text-align: left; }
.history-table th { color: #0b4076; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.checkbox-form-group { display: flex; flex-direction: column; justify-content: flex-end; }
.question-card-header { display: flex; gap: 14px; align-items: flex-start; }
.question-number { min-width: 34px; height: 34px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(9, 94, 186, .10); color: #095eba; font-weight: 900; }
.question-card-header h3 { margin: 0; }
.question-card-header p { margin: 4px 0 0; color: #718298; }
.question-image { max-width: min(100%, 520px); display: block; margin: 14px 0; border-radius: 16px; border: 1px solid rgba(9, 94, 186, .12); box-shadow: 0 12px 24px rgba(9, 94, 186, .08); }
.question-image-chip { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: rgba(9, 94, 186, .08); color: #095eba; font-weight: 800; margin-bottom: 6px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.report-metrics-grid { margin: 0 0 18px; }
.certificate-shell { max-width: 960px; margin: 0 auto; }
.certificate-actions-bar { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 14px; }
.certificate-card { background: #fff; border-radius: 28px; border: 1px solid rgba(9, 94, 186, .16); padding: 56px; text-align: center; box-shadow: 0 24px 60px rgba(9, 94, 186, .12); position: relative; overflow: hidden; }
.certificate-card:before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px; background: var(--ga-orange); }
.certificate-logo { width: 170px; height: auto; margin-bottom: 18px; }
.certificate-kicker { display: inline-flex; padding: 8px 16px; border-radius: 999px; background: rgba(9, 94, 186, .08); color: #095eba; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.certificate-card h1 { font-size: 2rem; color: #0b4076; margin: 18px 0 8px; }
.certificate-card h2 { font-size: 1.45rem; color: #095eba; margin: 10px auto 28px; max-width: 720px; }
.certificate-text { color: #65758a; font-size: 1.05rem; }
.certificate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 26px 0; }
.certificate-grid div { border-radius: 18px; background: #f7fbff; border: 1px solid rgba(9, 94, 186, .10); padding: 16px; }
.certificate-grid span { display: block; color: #718298; font-weight: 800; font-size: .82rem; }
.certificate-grid strong { display: block; margin-top: 6px; color: #0b4076; }
.certificate-card footer { margin-top: 34px; color: #64748b; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 860px) {
    .dashboard-hero { grid-template-columns: 1fr; }
    .dashboard-stats-grid, .report-metrics-grid, .certificate-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .dashboard-stats-grid, .report-metrics-grid, .certificate-grid { grid-template-columns: 1fr; }
    .certificate-card { padding: 34px 20px; }
    .certificate-actions-bar { justify-content: stretch; flex-direction: column; }
}
@media print {
    .sidebar, .desktop-topbar, .mobile-topbar, .ga-footer, .certificate-actions-bar { display: none !important; }
    .main-shell, .container { margin: 0 !important; padding: 0 !important; }
    .certificate-card { box-shadow: none; border: 1px solid #ddd; }
}
.message-warning {
    background: rgba(245, 162, 61, .15);
    border-color: rgba(245, 162, 61, .30);
    color: #86580d;
}
.theme-toggle {
    border: 1px solid rgba(9, 94, 186, .18);
    background: rgba(255, 255, 255, .75);
    color: #095eba;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    font-weight: 900;
    cursor: pointer;
}
.dark-mode {
    background: #0d1828;
    color: #d8e6f5;
}
.dark-mode .main-shell,
.dark-mode .container { background: #0d1828; }
.dark-mode .card,
.dark-mode .desktop-topbar,
.dark-mode .mobile-topbar,
.dark-mode .sidebar,
.dark-mode .certificate-card {
    background: #132337;
    color: #d8e6f5;
    border-color: rgba(139, 177, 220, .18);
}
.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode .sidebar-user-name,
.dark-mode .desktop-topbar strong,
.dark-mode .training-card-title-row h2 a,
.dark-mode .certificate-card h1,
.dark-mode .certificate-card h2 { color: #eaf4ff; }
.dark-mode p,
.dark-mode .training-meta,
.dark-mode .form-help,
.dark-mode .certificate-text { color: #a9bad0; }
.dark-mode .form-control,
.dark-mode input,
.dark-mode textarea,
.dark-mode select {
    background: #0f1c2d;
    border-color: rgba(139, 177, 220, .22);
    color: #eaf4ff;
}
.dark-mode .dashboard-stat,
.dark-mode .report-metric,
.dark-mode .certificate-grid div { background: #0f1c2d; }
.dark-mode .theme-toggle { background: #0f1c2d; color: #f5a23d; border-color: rgba(245, 162, 61, .35); }

/* ==========================================================
   Corrección de contraste del modo oscuro
   Ajuste aplicado para que encabezados, tarjetas, inputs,
   tablas, badges y textos secundarios mantengan legibilidad.
   ========================================================== */
body.dark-mode {
    --ga-blue: #63A9F2;
    --ga-blue-logo: #7CB8F7;
    --ga-blue-dark: #EAF4FF;
    --ga-blue-soft: #162B44;
    --ga-blue-pale: #0F1D30;
    --ga-orange: #F5B45E;
    --ga-orange-dark: #FFD08A;
    --ga-orange-soft: #33261A;
    --ga-bg: #0D1828;
    --ga-card: #132337;
    --ga-text: #EAF4FF;
    --ga-muted: #AFC2D8;
    --ga-border: rgba(139, 177, 220, .24);
    --ga-success: #7AD7A2;
    --ga-danger: #F3A0A0;
    --ga-shadow: 0 18px 42px rgba(0, 0, 0, .28);
    --ga-shadow-soft: 0 10px 26px rgba(0, 0, 0, .22);
    background:
        #B55353;
    color: var(--ga-text) !important;
}

body.dark-mode a { color: #8EC5FF; }
body.dark-mode a:hover { color: #FFD08A; }
body.dark-mode .main-shell,
body.dark-mode .container {
    background: transparent !important;
}

/* Encabezado principal de página */
body.dark-mode .page-title {
    border-color: rgba(139, 177, 220, .26) !important;
    background:
        var(--ga-blue-logo);
    box-shadow: 0 18px 42px rgba(0,0,0,.24) !important;
}

body.dark-mode .page-title::before {
    background: var(--ga-orange);
}

body.dark-mode .page-title h1,
body.dark-mode .page-title h2,
body.dark-mode .page-title h3 {
    color: #F1F7FF !important;
    text-shadow: none !important;
}

body.dark-mode .page-title p,
body.dark-mode .desktop-kicker,
body.dark-mode .section-title-row p,
body.dark-mode .sidebar-help,
body.dark-mode .video-current-header p,
body.dark-mode .capacitacion-header p {
    color: #AFC2D8 !important;
}

/* Tarjetas, paneles y secciones */
body.dark-mode .card,
body.dark-mode .question-card,
body.dark-mode .assignment-panel,
body.dark-mode .training-card,
body.dark-mode .video-sidebar,
body.dark-mode .video-main-card,
body.dark-mode .dashboard-filter-card,
body.dark-mode .history-card,
body.dark-mode .result-hero,
body.dark-mode .certificate-card {
    background: #132337 !important;
    color: #EAF4FF !important;
    border-color: rgba(139, 177, 220, .24) !important;
    box-shadow: 0 16px 36px rgba(0,0,0,.26) !important;
}

body.dark-mode .card:hover,
body.dark-mode .training-card:hover {
    box-shadow: 0 22px 48px rgba(0,0,0,.34) !important;
    border-color: rgba(124, 184, 247, .40) !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode .section-title-row h2,
body.dark-mode .training-card h2,
body.dark-mode .video-current-header h2,
body.dark-mode .video-sidebar h2,
body.dark-mode .question-card h3,
body.dark-mode .result-hero h1,
body.dark-mode .capacitacion-header h2,
body.dark-mode .certificate-card h1,
body.dark-mode .certificate-card h2 {
    color: #F1F7FF !important;
}

body.dark-mode p,
body.dark-mode .form-help,
body.dark-mode .certificate-text,
body.dark-mode .question-card-header p,
body.dark-mode .training-card p,
body.dark-mode .video-sidebar-item small,
body.dark-mode .ga-footer {
    color: #AFC2D8 !important;
}

/* Barra superior, estado y campana */
body.dark-mode .desktop-topbar,
body.dark-mode .mobile-topbar {
    background: rgba(13, 24, 40, .88) !important;
    border-bottom-color: rgba(139, 177, 220, .22) !important;
    backdrop-filter: blur(18px);
}

body.dark-mode .desktop-topbar strong {
    color: #F1F7FF !important;
}

body.dark-mode .desktop-status {
    border-color: rgba(139, 177, 220, .26) !important;
    background: #132337 !important;
    color: #DCEBFA !important;
}

body.dark-mode .notification-bell {
    border-color: rgba(139, 177, 220, .26) !important;
    background: var(--ga-blue-logo);
    color: #DCEBFA !important;
    box-shadow: 0 10px 22px rgba(0,0,0,.26) !important;
}

body.dark-mode .notification-bell:hover,
body.dark-mode .notification-bell.has-pending {
    border-color: rgba(245,180,94,.46) !important;
    background: var(--ga-blue-logo);
    color: #FFD08A !important;
}

body.dark-mode .notification-badge {
    border-color: #0D1828 !important;
    background: #F5B45E !important;
    color: #1A1208 !important;
}

/* Menú lateral */
body.dark-mode .sidebar {
    background:
        var(--ga-blue-logo);
    border-right-color: rgba(139, 177, 220, .22) !important;
}

body.dark-mode .sidebar-brand {
    border-bottom-color: rgba(139, 177, 220, .22) !important;
}

body.dark-mode .sidebar-user-box,
body.dark-mode .sidebar-menu-group {
    background: rgba(255,255,255,.045) !important;
    border-color: rgba(139,177,220,.20) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04) !important;
}

body.dark-mode .sidebar-user-label,
body.dark-mode .sidebar-section-label {
    color: #9EB3CA !important;
}

body.dark-mode .sidebar-user-name,
body.dark-mode .sidebar-menu-group summary,
body.dark-mode .sidebar-submenu > a,
body.dark-mode .sidebar-admin-menu a {
    color: #EAF4FF !important;
}

body.dark-mode .sidebar-submenu {
    background: rgba(7, 14, 24, .42) !important;
    border-top-color: rgba(139,177,220,.18) !important;
}

body.dark-mode .sidebar-submenu > a::before,
body.dark-mode .sidebar-admin-menu a::before {
    background: rgba(124,184,247,.10) !important;
    color: #9CCBFF !important;
    border-color: rgba(139,177,220,.22) !important;
}

body.dark-mode .sidebar-menu-group summary:hover,
body.dark-mode .sidebar-submenu > a:hover,
body.dark-mode .sidebar-admin-menu a:hover {
    background: rgba(124,184,247,.10) !important;
    color: #FFFFFF !important;
}

body.dark-mode .sidebar-logout {
    border-color: rgba(243,160,160,.28) !important;
    background: rgba(185,83,83,.14) !important;
    color: #FFC9C9 !important;
}

body.dark-mode .sidebar-logout:hover {
    background: rgba(185,83,83,.24) !important;
    color: #FFFFFF !important;
}

/* Formularios */
body.dark-mode .form-label,
body.dark-mode .alternative-label,
body.dark-mode .training-meta,
body.dark-mode .correct-option {
    color: #DCEBFA !important;
}

body.dark-mode .form-control,
body.dark-mode select.form-control,
body.dark-mode textarea.form-control,
body.dark-mode input[type="file"].form-control,
body.dark-mode .grid-combo,
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background: #0F1C2D !important;
    border-color: rgba(139, 177, 220, .28) !important;
    color: #F1F7FF !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035) !important;
}

body.dark-mode .form-control::placeholder,
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #8FA6BF !important;
    opacity: 1;
}

body.dark-mode .form-control:focus,
body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
    border-color: #7CB8F7 !important;
    box-shadow: 0 0 0 4px rgba(124,184,247,.16), inset 0 1px 0 rgba(255,255,255,.04) !important;
}

body.dark-mode option {
    background: #0F1C2D;
    color: #F1F7FF;
}

/* Dashboard */
body.dark-mode .dashboard-kicker,
body.dark-mode .certificate-kicker,
body.dark-mode .question-number,
body.dark-mode .question-image-chip {
    background: rgba(124,184,247,.13) !important;
    color: #9CCBFF !important;
}

body.dark-mode .dashboard-hero h2 {
    color: #F1F7FF !important;
}

body.dark-mode .dashboard-stat,
body.dark-mode .report-metric,
body.dark-mode .certificate-grid div {
    background: #0F1D30;
    border-color: rgba(139, 177, 220, .22) !important;
    box-shadow: 0 10px 24px rgba(0,0,0,.22) !important;
}

body.dark-mode .dashboard-stat span,
body.dark-mode .report-metric span,
body.dark-mode .certificate-grid span {
    color: #BFD0E2 !important;
}

body.dark-mode .dashboard-stat strong,
body.dark-mode .report-metric strong,
body.dark-mode .certificate-grid strong,
body.dark-mode .result-score {
    color: #7CB8F7 !important;
}

body.dark-mode .dashboard-stat small {
    color: #9EB3CA !important;
}

body.dark-mode .progress-mini {
    background: #20334A !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.28) !important;
}

body.dark-mode .progress-mini > div {
    background: var(--ga-orange);
}

/* Tarjetas de capacitaciones */
body.dark-mode .training-card-image {
    background-color: #0F1C2D !important;
    border-bottom-color: rgba(139, 177, 220, .22) !important;
}

body.dark-mode .training-card-title-row h2 a,
body.dark-mode .training-card a {
    color: #9CCBFF !important;
}

body.dark-mode .training-card a:hover {
    color: #FFD08A !important;
}

body.dark-mode .training-card-meta-row span {
    background: rgba(124,184,247,.10) !important;
    color: #CFE3F8 !important;
    border: 1px solid rgba(139,177,220,.18);
}

body.dark-mode .alert-card {
    background: rgba(245, 180, 94, .14) !important;
    border-color: rgba(245, 180, 94, .34) !important;
    color: #FFD08A !important;
}

body.dark-mode .alert-card strong {
    color: #F1F7FF !important;
}

/* Video y evaluación */
body.dark-mode .video-sidebar-item,
body.dark-mode .alternative-editor-row {
    background: #0F1C2D !important;
    border-color: rgba(139, 177, 220, .22) !important;
    color: #EAF4FF !important;
}

body.dark-mode .video-sidebar-item strong {
    color: #F1F7FF !important;
}

body.dark-mode .video-sidebar-item:hover {
    background: #182A40 !important;
    border-color: rgba(245, 180, 94, .44) !important;
}

body.dark-mode .video-sidebar-item.active {
    background: var(--ga-blue-logo);
    border-color: rgba(124, 184, 247, .48) !important;
    box-shadow: inset 5px 0 0 #7CB8F7, 0 10px 20px rgba(0,0,0,.25) !important;
}

body.dark-mode .alternativas label {
    color: #DCEBFA !important;
}

body.dark-mode .question-image {
    border-color: rgba(139,177,220,.24) !important;
    box-shadow: 0 12px 24px rgba(0,0,0,.24) !important;
}

/* Tablas */
body.dark-mode .admin-grid,
body.dark-mode .history-table {
    background: #132337 !important;
    border-color: rgba(139, 177, 220, .24) !important;
    color: #EAF4FF !important;
}

body.dark-mode .admin-grid th,
body.dark-mode .history-table th {
    background: #0F1D30;
    color: #FFFFFF !important;
}

body.dark-mode .admin-grid td,
body.dark-mode .history-table td {
    color: #DCEBFA !important;
    border-bottom-color: rgba(139, 177, 220, .18) !important;
}

body.dark-mode .admin-grid tr:nth-child(even),
body.dark-mode .history-table tr:nth-child(even) {
    background: rgba(255,255,255,.035) !important;
}

body.dark-mode .admin-grid tr:hover td,
body.dark-mode .history-table tr:hover td {
    background: rgba(124,184,247,.10) !important;
}

/* Mensajes y badges */
body.dark-mode .message-info {
    background: rgba(124,184,247,.12) !important;
    border-color: rgba(124,184,247,.30) !important;
    color: #CFE3F8 !important;
}

body.dark-mode .message-ok {
    background: rgba(34,197,94,.12) !important;
    border-color: rgba(122,215,162,.30) !important;
    color: #BFF4D3 !important;
}

body.dark-mode .message-warning {
    background: rgba(245,180,94,.14) !important;
    border-color: rgba(245,180,94,.35) !important;
    color: #FFD08A !important;
}

body.dark-mode .message-error {
    background: rgba(185,83,83,.16) !important;
    border-color: rgba(243,160,160,.35) !important;
    color: #FFC9C9 !important;
}

body.dark-mode .badge-info {
    background: rgba(124,184,247,.16) !important;
    color: #CFE3F8 !important;
    border-color: rgba(124,184,247,.32) !important;
}

body.dark-mode .badge-warning,
body.dark-mode .badge-pending {
    background: rgba(245,180,94,.16) !important;
    color: #FFD08A !important;
    border-color: rgba(245,180,94,.34) !important;
}

body.dark-mode .badge-danger {
    background: rgba(185,83,83,.18) !important;
    color: #FFC9C9 !important;
    border-color: rgba(243,160,160,.34) !important;
}

body.dark-mode .badge-ok {
    background: rgba(34,197,94,.14) !important;
    color: #BFF4D3 !important;
    border-color: rgba(122,215,162,.32) !important;
}

/* Botones y control de tema */
body.dark-mode .btn-primary-ga {
    background: #B55353;
    color: #FFFFFF !important;
}

body.dark-mode .btn-secondary-ga {
    background: var(--ga-orange);
    color: #1A1208 !important;
}

body.dark-mode .btn-secondary-ga:hover {
    color: #FFFFFF !important;
}

body.dark-mode .btn-danger-ga {
    background: #B55353;
    color: #FFFFFF !important;
}

body.dark-mode .theme-toggle {
    background: #0F1C2D !important;
    color: #FFD08A !important;
    border-color: rgba(245, 180, 94, .38) !important;
}

body.dark-mode .theme-toggle:hover {
    background: #1A2C44 !important;
}

/* Certificado */
body.dark-mode .certificate-card::before,
body.dark-mode .result-hero::before {
    background: #B55353;
}

body.dark-mode .certificate-card footer {
    color: #AFC2D8 !important;
}

/* ==========================================================
   Capa profesional final: navegación, estados activos,
   breadcrumbs, notificaciones, modales, certificados y móvil.
   ========================================================== */
.sidebar-admin-menu {
    margin-top: 2px;
}
.sidebar-admin-label {
    margin-top: 14px;
}
.sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 11px 13px;
    border-radius: 15px;
    color: var(--ga-blue-dark) !important;
    font-weight: 800;
    transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.sidebar-link::before {
    content: "";
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    background: #FFFFFF;
    border: 1px solid #D9E7F4;
    color: var(--ga-blue-logo);
    box-shadow: 0 4px 10px rgba(9,94,186,.05);
    font-size: 13px;
}
.sidebar-link[data-icon="home"]::before { content: "⌂"; }
.sidebar-link[data-icon="training"]::before { content: "▣"; }
.sidebar-link[data-icon="history"]::before { content: "◷"; }
.sidebar-link[data-icon="folder"]::before { content: "▤"; }
.sidebar-link[data-icon="video"]::before { content: "▶"; }
.sidebar-link[data-icon="test"]::before { content: "✓"; }
.sidebar-link[data-icon="question"]::before { content: "?"; }
.sidebar-link[data-icon="users"]::before { content: "◉"; }
.sidebar-link[data-icon="groups"]::before { content: "◎"; }
.sidebar-link[data-icon="reports"]::before { content: "▥"; }
.sidebar-link[data-icon="mail"]::before { content: "✉"; }
.sidebar-link[data-icon="logout"]::before { content: "⏻"; }
.sidebar-link:hover,
.sidebar-link.is-active {
    background: var(--ga-blue-logo);
    color: var(--ga-blue-logo) !important;
    transform: translateX(2px);
}
.sidebar-link.is-active {
    box-shadow: inset 4px 0 0 var(--ga-orange), 0 8px 18px rgba(9,94,186,.08);
}
.sidebar-link.is-active::before {
    border-color: rgba(245,162,61,.42);
    color: var(--ga-orange-dark);
}
.sidebar-user-role {
    display: inline-flex;
    margin-top: 9px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(9,94,186,.09);
    color: var(--ga-blue-logo);
    font-size: 12px;
    font-weight: 850;
}
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 0 0 16px;
    color: var(--ga-muted);
    font-size: 13px;
    font-weight: 800;
}
.breadcrumbs a {
    color: var(--ga-blue-logo);
}
.breadcrumbs-separator {
    color: #9CB0C4;
}
.notification-panel {
    position: fixed;
    top: 84px;
    right: 28px;
    width: min(390px, calc(100vw - 34px));
    z-index: 240;
    padding: 14px;
    border: 1px solid rgba(217,231,244,.96);
    border-radius: 24px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 24px 60px rgba(9,94,186,.18);
    opacity: 0;
    transform: translateY(-10px) scale(.98);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}
.notification-panel.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.notification-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ga-border);
}
.notification-panel-header span {
    display: block;
    color: var(--ga-muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.notification-panel-header strong {
    display: block;
    color: var(--ga-blue-dark);
    font-size: 18px;
}
.notification-panel-header a {
    white-space: nowrap;
    font-size: 13px;
}
.notification-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding-top: 12px;
}
.notification-item {
    display: grid;
    grid-template-columns: 11px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border-radius: 17px;
    background: #F7FBFE;
    border: 1px solid #E1EDF7;
    color: var(--ga-text);
}
.notification-item:hover {
    background: #FFF8EF;
    border-color: #F8D6AD;
}
.notification-dot {
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border-radius: 999px;
    background: var(--ga-orange);
    box-shadow: 0 0 0 4px rgba(245,162,61,.16);
}
.notification-item strong {
    display: block;
    color: var(--ga-blue-dark);
}
.notification-item small {
    display: block;
    margin-top: 2px;
    color: var(--ga-muted);
    font-weight: 700;
}
.empty-state {
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 30px 22px;
    border: 1px dashed #BFD5EA;
    border-radius: 22px;
    background: var(--ga-orange);
    color: var(--ga-muted);
    text-align: center;
}
.empty-state.compact { padding: 18px 14px; }
.empty-state-icon {
    width: 46px;
    height: 46px;
    display: inline-grid;
    place-items: center;
    border-radius: 16px;
    background: #FFFFFF;
    color: var(--ga-blue-logo);
    border: 1px solid #D9E7F4;
    font-size: 21px;
    box-shadow: 0 10px 20px rgba(9,94,186,.08);
}
.empty-state strong {
    color: var(--ga-blue-dark);
    font-size: 17px;
}
.empty-state p { margin: 0; }
.admin-command-center {
    margin: -2px 0 18px;
}
.quick-actions-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 16px;
}
.quick-actions-row a {
    padding: 12px 14px;
    border: 1px solid #D9E7F4;
    border-radius: 16px;
    background: #F7FBFE;
    color: var(--ga-blue-dark);
    font-weight: 850;
}
.quick-actions-row a:hover {
    background: #FFF8EF;
    border-color: #F8D6AD;
}
.ga-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(10,19,32,.56);
    backdrop-filter: blur(6px);
}
.ga-modal-overlay.is-open { display: flex; }
.ga-modal {
    width: min(460px, 100%);
    display: grid;
    grid-template-columns: 52px minmax(0,1fr);
    gap: 15px;
    padding: 22px;
    border: 1px solid #D9E7F4;
    border-radius: 26px;
    background: #FFFFFF;
    box-shadow: 0 30px 90px rgba(0,0,0,.28);
}
.ga-modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: #FFF3E2;
    color: var(--ga-orange-dark);
    font-size: 25px;
    font-weight: 950;
}
.ga-modal-body h2 {
    margin: 0 0 6px;
    color: var(--ga-blue-dark);
    font-size: 22px;
}
.ga-modal-body p {
    margin: 0;
    color: var(--ga-muted);
}
.ga-modal-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}
.admin-grid {
    margin-bottom: 18px;
}
.admin-grid .btn-small {
    margin: 2px;
}
.admin-grid td .badge,
.history-table td .badge {
    white-space: nowrap;
}
.test-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 360px) minmax(240px, 1fr);
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
}
.test-toolbar strong {
    display: block;
    margin-top: 5px;
    color: var(--ga-blue-dark);
}
.test-progress-wrap {
    align-self: end;
}
.test-submit-bar {
    position: sticky;
    bottom: 16px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 22px;
    padding: 16px;
    border: 1px solid rgba(217,231,244,.96);
    border-radius: 22px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 18px 44px rgba(9,94,186,.14);
    backdrop-filter: blur(14px);
}
.test-submit-bar strong {
    display: block;
    color: var(--ga-blue-dark);
}
.test-submit-bar span {
    display: block;
    color: var(--ga-muted);
    font-weight: 700;
    margin-top: 2px;
}
.question-card {
    position: relative;
}
.question-card::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: 24px 0 0 24px;
    background: var(--ga-blue-logo);
    opacity: .55;
}
.certificate-folio {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 10px;
    padding: 8px 13px;
    border: 1px solid #F8D6AD;
    border-radius: 999px;
    background: #FFF8EF;
    color: var(--ga-orange-dark);
    font-weight: 900;
}
.certificate-folio span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.certificate-validation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 26px auto 0;
    color: var(--ga-muted);
}
.certificate-validation p {
    max-width: 320px;
    text-align: left;
    margin: 0;
    font-weight: 700;
}
.certificate-qr {
    width: 94px;
    height: 94px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid #D9E7F4;
    background: #FFFFFF;
    box-shadow: 0 12px 28px rgba(9,94,186,.09);
}
.certificate-qr span {
    border-radius: 3px;
    background: #DCE9F5;
}
.certificate-qr span:nth-child(1), .certificate-qr span:nth-child(2), .certificate-qr span:nth-child(3),
.certificate-qr span:nth-child(7), .certificate-qr span:nth-child(9), .certificate-qr span:nth-child(13),
.certificate-qr span:nth-child(14), .certificate-qr span:nth-child(15), .certificate-qr span:nth-child(18),
.certificate-qr span:nth-child(20), .certificate-qr span:nth-child(22), .certificate-qr span:nth-child(24),
.certificate-qr span:nth-child(25), .certificate-qr span:nth-child(28), .certificate-qr span:nth-child(29),
.certificate-qr span:nth-child(31), .certificate-qr span:nth-child(33), .certificate-qr span:nth-child(34),
.certificate-qr span:nth-child(36) {
    background: var(--ga-blue-logo);
}
.report-chart-card {
    margin: -4px 0 18px;
}
.report-bar-row {
    display: grid;
    grid-template-columns: 180px minmax(0,1fr);
    gap: 14px;
    align-items: center;
    margin-top: 12px;
}
.report-bar-row > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--ga-blue-dark);
    font-weight: 850;
}
.report-bar-track {
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #E7F0F8;
}
.report-bar-track div {
    height: 100%;
    border-radius: inherit;
    background: var(--ga-blue-logo);
}
.report-bar-danger .report-bar-track div {
    background: #B55353;
}
@media (max-width: 760px) {
    .notification-panel {
        top: 78px;
        right: 12px;
        left: 12px;
        width: auto;
    }
    .ga-modal { grid-template-columns: 1fr; }
    .ga-modal-icon { width: 46px; height: 46px; }
    .ga-modal-actions { flex-direction: column-reverse; }
    .ga-modal-actions .btn { width: 100%; }
    .test-toolbar { grid-template-columns: 1fr; }
    .test-submit-bar {
        flex-direction: column;
        align-items: stretch;
        bottom: 10px;
    }
    .test-submit-bar .btn { width: 100%; }
    .certificate-validation {
        flex-direction: column;
    }
    .certificate-validation p { text-align: center; }
    .report-bar-row { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 700px) {
    .admin-grid,
    .history-table {
        display: block;
        border: 0;
        box-shadow: none;
        background: transparent;
        white-space: normal;
    }
    .admin-grid tbody,
    .admin-grid tr,
    .admin-grid td,
    .history-table tbody,
    .history-table tr,
    .history-table td {
        display: block;
        width: 100%;
    }
    .admin-grid thead,
    .history-table thead,
    .admin-grid th,
    .history-table th {
        display: none;
    }
    .admin-grid tr,
    .history-table tr {
        margin-bottom: 14px;
        padding: 12px;
        border: 1px solid var(--ga-border);
        border-radius: 18px;
        background: var(--ga-card);
        box-shadow: var(--ga-shadow-soft);
    }
    .admin-grid td,
    .history-table td {
        border: 0 !important;
        padding: 8px 4px;
    }
    .admin-grid td:last-child,
    .history-table td:last-child {
        padding-top: 12px;
    }
}
body.dark-mode .sidebar-link {
    color: #EAF4FF !important;
}
body.dark-mode .sidebar-link::before {
    background: rgba(124,184,247,.10) !important;
    color: #9CCBFF !important;
    border-color: rgba(139,177,220,.22) !important;
}
body.dark-mode .sidebar-link:hover,
body.dark-mode .sidebar-link.is-active {
    background: rgba(124,184,247,.10) !important;
    color: #FFFFFF !important;
    box-shadow: inset 4px 0 0 #F5B45E, 0 8px 18px rgba(0,0,0,.18) !important;
}
body.dark-mode .sidebar-user-role,
body.dark-mode .quick-actions-row a,
body.dark-mode .notification-item,
body.dark-mode .notification-panel,
body.dark-mode .test-submit-bar,
body.dark-mode .ga-modal,
body.dark-mode .empty-state,
body.dark-mode .certificate-qr {
    background: #132337 !important;
    color: #EAF4FF !important;
    border-color: rgba(139,177,220,.24) !important;
}
body.dark-mode .notification-panel-header,
body.dark-mode .notification-item {
    border-color: rgba(139,177,220,.20) !important;
}
body.dark-mode .notification-panel-header strong,
body.dark-mode .notification-item strong,
body.dark-mode .empty-state strong,
body.dark-mode .test-toolbar strong,
body.dark-mode .test-submit-bar strong,
body.dark-mode .ga-modal-body h2,
body.dark-mode .report-bar-row > div:first-child {
    color: #F1F7FF !important;
}
body.dark-mode .notification-item small,
body.dark-mode .test-submit-bar span,
body.dark-mode .ga-modal-body p,
body.dark-mode .certificate-validation,
body.dark-mode .empty-state p,
body.dark-mode .breadcrumbs {
    color: #AFC2D8 !important;
}
body.dark-mode .empty-state-icon {
    background: #0F1C2D !important;
    color: #9CCBFF !important;
    border-color: rgba(139,177,220,.24) !important;
}
body.dark-mode .ga-modal-icon,
body.dark-mode .certificate-folio {
    background: rgba(245,180,94,.14) !important;
    color: #FFD08A !important;
    border-color: rgba(245,180,94,.34) !important;
}
body.dark-mode .report-bar-track {
    background: #20334A !important;
}
body.dark-mode .certificate-qr span { background: #20334A; }
body.dark-mode .certificate-qr span:nth-child(1), body.dark-mode .certificate-qr span:nth-child(2), body.dark-mode .certificate-qr span:nth-child(3),
body.dark-mode .certificate-qr span:nth-child(7), body.dark-mode .certificate-qr span:nth-child(9), body.dark-mode .certificate-qr span:nth-child(13),
body.dark-mode .certificate-qr span:nth-child(14), body.dark-mode .certificate-qr span:nth-child(15), body.dark-mode .certificate-qr span:nth-child(18),
body.dark-mode .certificate-qr span:nth-child(20), body.dark-mode .certificate-qr span:nth-child(22), body.dark-mode .certificate-qr span:nth-child(24),
body.dark-mode .certificate-qr span:nth-child(25), body.dark-mode .certificate-qr span:nth-child(28), body.dark-mode .certificate-qr span:nth-child(29),
body.dark-mode .certificate-qr span:nth-child(31), body.dark-mode .certificate-qr span:nth-child(33), body.dark-mode .certificate-qr span:nth-child(34),
body.dark-mode .certificate-qr span:nth-child(36) { background: #9CCBFF; }
@media print {
    .breadcrumbs, .test-submit-bar, .test-toolbar, .notification-panel, .ga-modal-overlay { display: none !important; }
    .certificate-folio, .certificate-validation { color: #333 !important; }
}


/* Acceso claro a preguntas desde administración de tests */
.next-step-help {
    margin-top: 10px;
    margin-bottom: 0;
}
.admin-grid .btn + .btn,
.admin-grid .btn + a.btn,
.admin-grid a.btn + .btn,
.admin-grid a.btn + a.btn {
    margin-left: 6px;
}
body.dark-mode .next-step-help {
    color: var(--ga-dark-muted);
}

/* Certificado: logo real y QR escaneable */
.certificate-logo {
    display: block;
    width: 190px;
    max-width: 60%;
    height: auto;
    margin: 0 auto 18px;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
.certificate-qr-panel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(9, 94, 186, .16);
    box-shadow: 0 12px 28px rgba(9, 94, 186, .10);
}
.certificate-qr-img {
    width: 150px;
    height: 150px;
    display: block;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}
.certificate-validation p {
    margin-top: 12px;
    font-weight: 700;
    color: #53677f;
}
body.dark-mode .certificate-qr-panel {
    background: #ffffff !important;
    border-color: rgba(156, 203, 255, .34) !important;
    box-shadow: 0 14px 30px rgba(0,0,0,.28) !important;
}
body.dark-mode .certificate-validation p {
    color: #c8d8ea !important;
}
@media print {
    .certificate-logo {
        width: 175px !important;
        max-width: 175px !important;
    }
    .certificate-qr-panel {
        box-shadow: none !important;
        border: 1px solid #d8e4f2 !important;
        background: #fff !important;
    }
    .certificate-qr-img {
        width: 135px !important;
        height: 135px !important;
    }
}

/* Integración Mailjet: botones de notificación en grillas */
.grid-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}

.email-help {
    display: block;
    margin-top: 10px;
}

@media (max-width: 780px) {
    .grid-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .grid-actions .btn {
        width: 100%;
    }
}

/* Menú Correos y administración de notificaciones */
.correo-info-card {
    border-left: 5px solid var(--ga-orange);
    background: #FFF8EF;
}
.correo-info-card p {
    margin: 8px 0 0;
    color: var(--ga-muted);
    line-height: 1.55;
}
.correo-actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.correo-actions .form-label {
    width: 100%;
    margin-bottom: 0;
}
.email-summary-card {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 16px;
    padding: 14px 16px;
    border: 1px solid #D9E7F4;
    border-radius: 18px;
    background: #F4F9FE;
    box-shadow: 0 10px 26px rgba(9,94,186,.05);
    color: var(--ga-blue-dark);
}
.email-summary-card strong {
    font-size: 18px;
    color: var(--ga-blue-logo, var(--ga-blue));
}
.email-summary-card span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 11px;
    border-radius: 999px;
    background: #EEF6FF;
    color: var(--ga-blue-dark);
    font-weight: 800;
    font-size: 12px;
}
.email-summary-card small {
    color: var(--ga-muted);
    font-weight: 700;
}
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .01em;
}
.status-ok {
    background: #DCFCE7;
    color: #166534;
    border: 1px solid #BBF7D0;
}
.status-error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}
.api-response {
    display: inline-block;
    max-width: 280px;
    color: var(--ga-muted);
    font-size: 12px;
    line-height: 1.35;
}
.correos-grid td:nth-child(9) {
    max-width: 300px;
}
body.dark-mode .correo-info-card,
body.dark-mode .email-summary-card {
    background: #132337 !important;
    color: #EAF4FF !important;
    border-color: rgba(139,177,220,.24) !important;
}
body.dark-mode .correo-info-card p,
body.dark-mode .api-response,
body.dark-mode .email-summary-card small {
    color: #AFC2D8 !important;
}
body.dark-mode .email-summary-card strong {
    color: #9CCBFF !important;
}
body.dark-mode .email-summary-card span {
    background: rgba(124,184,247,.12) !important;
    color: #EAF4FF !important;
}
body.dark-mode .status-ok {
    background: rgba(34,197,94,.18) !important;
    color: #BBF7D0 !important;
    border-color: rgba(34,197,94,.32) !important;
}
body.dark-mode .status-error {
    background: rgba(239,68,68,.18) !important;
    color: #FECACA !important;
    border-color: rgba(239,68,68,.32) !important;
}

/* ==========================================================
   Login premium GestiónAuto
   ========================================================== */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background:
        #B55353;
}

.login-body::before {
    width: 460px;
    height: 460px;
    left: -170px;
    bottom: -180px;
    background: rgba(245,162,61,.14);
}

.login-body::after {
    width: 420px;
    height: 420px;
    right: -160px;
    top: -150px;
    background: rgba(9,94,186,.13);
}

.login-body > form.login-shell {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100vw - 48px));
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr);
    gap: 24px;
    align-items: stretch;
}

.login-showcase,
.login-card {
    min-height: 650px;
    border: 1px solid rgba(217,231,244,.96);
    border-radius: 34px;
    background: rgba(255,255,255,.90);
    box-shadow: 0 28px 74px rgba(9,94,186,.13);
    backdrop-filter: blur(18px);
}

.login-showcase {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 42px;
    background:
        #F4F9FE;
    color: #fff;
}

.login-showcase::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        var(--ga-blue-logo);
    pointer-events: none;
}

.login-showcase::after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    right: -120px;
    bottom: -140px;
    border-radius: 999px;
    border: 58px solid rgba(255,255,255,.10);
    pointer-events: none;
}

.login-showcase-content {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.login-showcase-logo {
    display: block;
    width: min(260px, 72%);
    height: auto;
    margin: 0 0 34px;
    filter: drop-shadow(0 14px 24px rgba(0,0,0,.20));
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.login-showcase-kicker {
    width: max-content;
    margin-bottom: 14px;
    padding: 8px 13px;
    border: 1px solid rgba(255,255,255,.36);
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    color: rgba(255,255,255,.92);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.login-showcase h2 {
    margin: 0;
    max-width: 560px;
    color: #fff;
    font-size: clamp(32px, 4.1vw, 52px);
    line-height: 1.02;
    letter-spacing: -.045em;
}

.login-showcase p {
    margin: 18px 0 0;
    max-width: 490px;
    color: rgba(255,255,255,.82);
    font-size: 16px;
}

.login-benefits {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 34px;
}

.login-benefit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 18px;
    background: rgba(255,255,255,.13);
    color: rgba(255,255,255,.96);
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}

.login-benefit-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    border-radius: 13px;
    background: rgba(255,255,255,.92);
    color: var(--ga-blue-logo);
}

.login-benefit-icon svg,
.login-pill-icon svg,
.login-input-icon svg,
.login-password-toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: block;
}

.login-card {
    position: relative;
    width: 100% !important;
    padding: 42px 40px 36px;
    text-align: left;
    overflow: hidden;
}

.login-card::before {
    height: 7px;
    background: var(--ga-blue-logo);
}

.login-card-header {
    text-align: center;
}

.login-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-bottom: 18px;
    padding: 8px 14px;
    background: var(--ga-orange);
    color: var(--ga-blue-dark);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}

.login-pill-icon {
    display: inline-flex;
    color: var(--ga-blue-logo);
}

.login-card .login-logo {
    max-width: 218px;
    margin: 2px auto 20px;
}

.login-card .login-title {
    margin: 4px 0 8px;
    color: var(--ga-blue-dark);
    font-size: clamp(26px, 2.6vw, 34px);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.login-card .login-subtitle {
    margin: 0 0 16px;
    color: #5F7287;
    font-size: 15px;
}

.login-card .login-feature-strip {
    margin: 0 auto 20px;
    max-width: 390px;
    text-align: center;
    border-color: rgba(217,231,244,.95);
}

.login-security-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0 0 22px;
    padding: 12px 14px;
    border: 1px solid rgba(217,231,244,.95);
    border-radius: 17px;
    background: #FFFFFF;
    color: #5F7287;
    font-size: 13px;
    font-weight: 650;
}

.login-field {
    margin-bottom: 16px;
}

.login-field .form-label {
    color: var(--ga-blue-dark);
    font-size: 13px;
    font-weight: 850;
}

.login-input-wrap {
    position: relative;
}

.login-input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    color: #6B8BAD;
    pointer-events: none;
}

.login-card .form-control.login-input {
    min-height: 52px;
    padding: 13px 50px 13px 48px;
    border: 1px solid #CFE0F0;
    border-radius: 17px;
    background: rgba(255,255,255,.98);
    color: var(--ga-text);
    font-size: 15px;
    box-shadow: 0 10px 24px rgba(9,94,186,.045);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-card .form-control.login-input:focus {
    border-color: var(--ga-blue);
    box-shadow: 0 0 0 4px rgba(40,116,196,.14), 0 12px 28px rgba(9,94,186,.07);
    outline: 0;
}

.login-card .form-control.login-input::placeholder {
    color: #9AAEC2;
}

.login-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 13px;
    background: #EEF6FC;
    color: var(--ga-blue-dark);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .18s ease, transform .18s ease, color .18s ease;
}

.login-password-toggle:hover {
    background: var(--ga-blue-soft);
    color: var(--ga-blue-logo);
}

.login-submit {
    min-height: 54px;
    margin-top: 8px;
    border-radius: 17px;
    background: var(--ga-blue-logo);
    color: #fff;
    font-size: 15px;
    box-shadow: 0 16px 30px rgba(9,94,186,.24);
}

.login-submit:hover {
    background: var(--ga-blue-logo);
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(9,94,186,.28);
}

.login-submit.is-loading {
    opacity: .88;
    cursor: wait;
}

.login-card .message,
.login-card .validation-message {
    display: block;
    margin-top: 16px;
}

.login-card .message-error {
    position: relative;
    padding: 13px 14px 13px 42px;
    border: 1px solid #F5B8B8;
    border-radius: 16px;
    background: #FFF3F3;
    color: #9D3434;
    line-height: 1.35;
}

.login-card .message-error::before {
    content: "!";
    position: absolute;
    left: 14px;
    top: 12px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #D45D5D;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
}

.login-shell .login-footer {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0;
    padding: 0 10px;
    color: #61778F;
}

.login-shell .ga-footer-logo {
    width: 82px;
    margin-top: 6px;
}

@media (max-width: 980px) {
    .login-body > form.login-shell {
        grid-template-columns: 1fr;
        width: min(560px, calc(100vw - 32px));
    }

    .login-showcase {
        min-height: auto;
        padding: 28px;
        align-items: flex-start;
    }

    .login-showcase-logo {
        width: 190px;
        margin-bottom: 20px;
    }

    .login-showcase h2 {
        font-size: 30px;
    }

    .login-benefits {
        grid-template-columns: 1fr;
        margin-top: 20px;
    }

    .login-card {
        min-height: auto;
    }
}

@media (max-width: 560px) {
    .login-body {
        padding: 18px;
        align-items: flex-start;
    }

    .login-body > form.login-shell {
        width: 100%;
        gap: 16px;
    }

    .login-showcase {
        padding: 22px;
        border-radius: 26px;
    }

    .login-showcase-logo {
        width: 160px;
        margin-bottom: 16px;
    }

    .login-showcase h2 {
        font-size: 25px;
    }

    .login-showcase p {
        font-size: 14px;
    }

    .login-benefit {
        padding: 11px 12px;
        font-size: 13px;
    }

    .login-card {
        padding: 30px 22px 26px;
        border-radius: 26px;
    }

    .login-card .login-logo {
        max-width: 185px;
    }

    .login-card .login-title {
        font-size: 25px;
    }

    .login-security-note {
        font-size: 12.5px;
    }

    .login-card .form-control.login-input {
        min-height: 50px;
    }
}

/* Seguridad de contraseñas y recuperación */
.login-forgot-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 14px auto 4px;
    color: var(--ga-blue, #095EBA);
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
}

.login-forgot-link:hover {
    text-decoration: underline;
}

.password-access-shell {
    grid-template-columns: minmax(320px, 520px) !important;
    justify-content: center;
}

.password-access-card {
    min-height: auto !important;
    width: 100%;
}

.password-back-link {
    width: 100%;
    margin-top: 12px;
}

.password-card {
    max-width: 760px;
    margin: 0 auto;
}

.password-alert {
    margin-bottom: 18px;
}

.password-policy-box {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: 18px;
    border: 1px solid rgba(40, 116, 196, .22);
    background: #F4F9FE;
    color: var(--ga-text, #1f2a44);
}

.password-policy-box strong {
    color: var(--ga-blue, #095EBA);
    font-size: 14px;
}

.password-policy-box span {
    color: var(--ga-muted, #61708a);
    font-size: 13px;
    line-height: 1.45;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 8px;
}

.compact-form-row {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.checkbox-panel {
    padding: 13px 15px;
    border: 1px solid rgba(40, 116, 196, .16);
    border-radius: 16px;
    background: rgba(248, 251, 255, .8);
}

.checkbox-panel label {
    font-weight: 800;
    color: var(--ga-text, #1f2a44);
}

.btn-warning-ga {
    background: #FFF3DF;
    color: #9A5A08;
    border: 1px solid rgba(245, 162, 61, .45);
}

.btn-warning-ga:hover {
    background: #FFE8C4;
    color: #754000;
}

.sidebar-link[data-icon="lock"]::before {
    content: "";
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 9V7A5 5 0 0 0 7 7v2H5v12h14V9h-2ZM9 7a3 3 0 0 1 6 0v2H9V7Zm8 12H7v-8h10v8Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 9V7A5 5 0 0 0 7 7v2H5v12h14V9h-2ZM9 7a3 3 0 0 1 6 0v2H9V7Zm8 12H7v-8h10v8Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

body.ga-dark .password-policy-box,
body.dark-mode .password-policy-box,
html[data-theme="dark"] .password-policy-box {
    background: #0F1D30;
    border-color: rgba(117, 177, 239, .25);
    color: #ECF4FF;
}

body.ga-dark .password-policy-box strong,
body.dark-mode .password-policy-box strong,
html[data-theme="dark"] .password-policy-box strong {
    color: #9ECAFF;
}

body.ga-dark .password-policy-box span,
body.dark-mode .password-policy-box span,
html[data-theme="dark"] .password-policy-box span {
    color: #C7D6EA;
}

body.ga-dark .checkbox-panel,
body.dark-mode .checkbox-panel,
html[data-theme="dark"] .checkbox-panel {
    background: rgba(15, 33, 58, .82);
    border-color: rgba(117, 177, 239, .18);
}

body.ga-dark .checkbox-panel label,
body.dark-mode .checkbox-panel label,
html[data-theme="dark"] .checkbox-panel label {
    color: #ECF4FF;
}

body.ga-dark .login-forgot-link,
body.dark-mode .login-forgot-link,
html[data-theme="dark"] .login-forgot-link {
    color: #9ECAFF;
}

@media (max-width: 560px) {
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .password-card {
        padding: 22px 18px;
    }
}


/* =========================================================
   Pulido final UX/UI GestiónAuto
   ========================================================= */
.page-title-polished {
    align-items: flex-start;
}

.form-card {
    position: relative;
    overflow: hidden;
}

.form-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--ga-blue-logo);
    opacity: .75;
}

.form-section-title {
    display: grid;
    gap: 4px;
    padding: 0 0 14px;
    margin: 0 0 18px;
    border-bottom: 1px solid rgba(40, 116, 196, .13);
}

.form-section-title-spaced {
    margin-top: 22px;
}

.form-section-title span {
    color: var(--ga-blue-dark, #095EBA);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .01em;
}

.form-section-title p {
    margin: 0;
    color: var(--ga-muted, #64748B);
    font-size: 13.5px;
    line-height: 1.45;
}

.form-control::placeholder {
    color: #9BAAC0;
}

.form-control,
.btn,
.card,
.admin-grid,
.video-player {
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.card:hover {
    box-shadow: 0 14px 36px rgba(15, 79, 147, .08);
}

.btn:focus-visible,
.form-control:focus-visible,
a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(245, 162, 61, .35);
    outline-offset: 2px;
}

.topbar-profile-chip,
.sidebar-profile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    text-decoration: none;
}

.topbar-profile-chip {
    min-height: 34px;
    padding: 7px 12px;
    background: rgba(40, 116, 196, .08);
    color: var(--ga-blue-dark, #095EBA);
    border: 1px solid rgba(40, 116, 196, .16);
}

.topbar-profile-chip:hover {
    background: rgba(245, 162, 61, .16);
    color: var(--ga-orange-dark, #D87D0A);
}

.sidebar-profile-link {
    margin-top: 8px;
    padding: 7px 10px;
    background: rgba(255, 255, 255, .68);
    border: 1px solid rgba(40, 116, 196, .13);
    color: var(--ga-blue-dark, #095EBA);
    font-size: 12px;
}

.sidebar-profile-link:hover {
    background: rgba(245, 162, 61, .13);
    color: var(--ga-orange-dark, #D87D0A);
}

.sidebar-link[data-icon="profile"]::before {
    content: "";
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0-5-5 5 5 0 0 0 5 5Zm0 2c-4.42 0-8 2.02-8 4.5V20h16v-1.5c0-2.48-3.58-4.5-8-4.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0-5-5 5 5 0 0 0 5 5Zm0 2c-4.42 0-8 2.02-8 4.5V20h16v-1.5c0-2.48-3.58-4.5-8-4.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Tablas y acciones administrativas */
.admin-grid {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(15, 79, 147, .06);
}

.admin-grid th {
    font-size: 12px;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.admin-grid td {
    vertical-align: middle;
}

.grid-actions,
.admin-grid td:last-child {
    gap: 7px;
    flex-wrap: wrap;
}

.grid-actions {
    display: flex;
}

.admin-grid .btn-small {
    margin: 2px 2px 2px 0;
}

.admin-grid a:not(.btn),
.history-table a:not(.btn) {
    font-weight: 800;
}

.admin-grid .aspNetDisabled,
.btn.aspNetDisabled,
.btn[disabled] {
    opacity: .58;
    cursor: not-allowed;
}

/* Mensajes y estados */
.validation-message,
span[id$="lblMensaje"] {
    display: inline-block;
    margin-top: 12px;
}

.message-warning,
.badge-warning {
    background: #FFF7E8;
    color: #9A5A08;
    border: 1px solid rgba(245, 162, 61, .32);
}

.badge-info {
    background: #EAF4FF;
    color: #095EBA;
    border: 1px solid rgba(40, 116, 196, .22);
}

/* Overlay de procesamiento */
.ga-processing-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(7, 18, 36, .34);
    backdrop-filter: blur(5px);
}

body.ga-is-processing .ga-processing-overlay {
    display: flex;
}

.ga-processing-card {
    display: grid;
    justify-items: center;
    gap: 8px;
    min-width: 240px;
    padding: 24px 28px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(40, 116, 196, .16);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
    color: var(--ga-text, #1E293B);
}

.ga-processing-card small {
    color: var(--ga-muted, #64748B);
}

.ga-spinner {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 4px solid rgba(40, 116, 196, .18);
    border-top-color: var(--ga-blue, #176CC1);
    animation: gaSpin .75s linear infinite;
}

@keyframes gaSpin { to { transform: rotate(360deg); } }

.btn.is-loading,
.login-submit.is-loading {
    position: relative;
    pointer-events: none;
    opacity: .82;
}

/* Perfil */
.profile-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    background: #F4F9FE;
}

.profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 28px;
    display: inline-grid;
    place-items: center;
    background: var(--ga-blue-logo);
    color: #fff;
    font-size: 28px;
    font-weight: 950;
    box-shadow: 0 14px 32px rgba(15, 79, 147, .18);
}

.profile-summary h2 {
    margin: 3px 0 4px;
    color: var(--ga-blue-dark, #0F4F93);
    font-size: clamp(24px, 3vw, 34px);
}

.profile-summary p {
    margin: 0 0 12px;
    color: var(--ga-muted, #64748B);
    font-weight: 700;
}

.profile-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.profile-data-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.profile-data-list div {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(40, 116, 196, .10);
}

.profile-data-list div:last-child {
    border-bottom: 0;
}

.profile-data-list dt {
    color: var(--ga-muted, #64748B);
    font-weight: 800;
}

.profile-data-list dd {
    margin: 0;
    color: var(--ga-text, #1E293B);
    font-weight: 800;
}

.profile-metrics-card {
    margin-bottom: 18px;
}

.profile-progress-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0 8px;
    color: var(--ga-muted, #64748B);
    font-weight: 800;
}

.profile-progress-row strong {
    color: var(--ga-blue-dark, #095EBA);
}

/* Páginas de error */
.error-body {
    padding: 24px;
}

.error-shell {
    width: min(560px, 100%);
}

.error-card {
    text-align: center;
    padding: 38px 34px;
}

.error-logo {
    width: 190px;
    max-width: 80%;
    margin-bottom: 18px;
}

.error-code {
    display: inline-flex;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(245, 162, 61, .16);
    color: var(--ga-orange-dark, #D87D0A);
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.error-card h1 {
    margin: 14px 0 10px;
    color: var(--ga-blue-dark, #0F4F93);
}

.error-card p {
    color: var(--ga-muted, #64748B);
    line-height: 1.55;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 22px 0 18px;
}

.error-card footer {
    color: var(--ga-muted, #64748B);
    font-weight: 800;
    font-size: 13px;
}

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

    .topbar-profile-chip {
        display: none;
    }
}

@media (max-width: 640px) {
    .profile-hero {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .profile-data-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .page-title {
        align-items: stretch;
    }

    .page-title .btn,
    .page-title a.btn {
        width: 100%;
        text-align: center;
    }

    .admin-grid,
    .admin-grid tbody,
    .admin-grid tr,
    .admin-grid td {
        display: block;
        width: 100%;
    }

    .admin-grid thead,
    .admin-grid th {
        display: none;
    }

    .admin-grid tr {
        margin-bottom: 14px;
        border: 1px solid rgba(40, 116, 196, .14);
        border-radius: 18px;
        overflow: hidden;
        background: var(--ga-card, #fff);
        box-shadow: 0 10px 24px rgba(15, 79, 147, .06);
    }

    .admin-grid td {
        border-bottom: 1px solid rgba(40, 116, 196, .08);
        padding: 12px 14px;
    }

    .admin-grid td:last-child {
        border-bottom: 0;
    }

    .ga-processing-card {
        width: calc(100% - 42px);
    }
}

/* Modo oscuro: pulido final */
body.dark-mode .form-section-title,
body.ga-dark .form-section-title,
html[data-theme="dark"] .form-section-title {
    border-bottom-color: rgba(158, 202, 255, .18);
}

body.dark-mode .form-section-title span,
body.ga-dark .form-section-title span,
html[data-theme="dark"] .form-section-title span,
body.dark-mode .profile-summary h2,
body.ga-dark .profile-summary h2,
html[data-theme="dark"] .profile-summary h2,
body.dark-mode .profile-progress-row strong,
body.ga-dark .profile-progress-row strong,
html[data-theme="dark"] .profile-progress-row strong {
    color: #9ECAFF;
}

body.dark-mode .form-section-title p,
body.ga-dark .form-section-title p,
html[data-theme="dark"] .form-section-title p,
body.dark-mode .profile-summary p,
body.ga-dark .profile-summary p,
html[data-theme="dark"] .profile-summary p,
body.dark-mode .profile-data-list dt,
body.ga-dark .profile-data-list dt,
html[data-theme="dark"] .profile-data-list dt,
body.dark-mode .profile-progress-row,
body.ga-dark .profile-progress-row,
html[data-theme="dark"] .profile-progress-row {
    color: #C7D6EA;
}

body.dark-mode .profile-data-list div,
body.ga-dark .profile-data-list div,
html[data-theme="dark"] .profile-data-list div {
    border-bottom-color: rgba(158, 202, 255, .12);
}

body.dark-mode .profile-data-list dd,
body.ga-dark .profile-data-list dd,
html[data-theme="dark"] .profile-data-list dd,
body.dark-mode .ga-processing-card,
body.ga-dark .ga-processing-card,
html[data-theme="dark"] .ga-processing-card {
    color: #ECF4FF;
}

body.dark-mode .profile-hero,
body.ga-dark .profile-hero,
html[data-theme="dark"] .profile-hero {
    background: #0F1D30;
}

body.dark-mode .topbar-profile-chip,
body.ga-dark .topbar-profile-chip,
html[data-theme="dark"] .topbar-profile-chip,
body.dark-mode .sidebar-profile-link,
body.ga-dark .sidebar-profile-link,
html[data-theme="dark"] .sidebar-profile-link {
    background: rgba(158, 202, 255, .10);
    border-color: rgba(158, 202, 255, .18);
    color: #CFE6FF;
}

body.dark-mode .ga-processing-card,
body.ga-dark .ga-processing-card,
html[data-theme="dark"] .ga-processing-card {
    background: rgba(15, 33, 58, .96);
    border-color: rgba(158, 202, 255, .18);
}

body.dark-mode .ga-processing-card small,
body.ga-dark .ga-processing-card small,
html[data-theme="dark"] .ga-processing-card small {
    color: #C7D6EA;
}

body.dark-mode .message-warning,
body.dark-mode .badge-warning,
body.ga-dark .message-warning,
body.ga-dark .badge-warning,
html[data-theme="dark"] .message-warning,
html[data-theme="dark"] .badge-warning {
    background: rgba(245, 162, 61, .15);
    color: #FFD79C;
    border-color: rgba(245, 162, 61, .28);
}

body.dark-mode .badge-info,
body.ga-dark .badge-info,
html[data-theme="dark"] .badge-info {
    background: rgba(84, 160, 255, .17);
    color: #BFDFFF;
    border-color: rgba(84, 160, 255, .25);
}

@media print {
    .sidebar,
    .desktop-topbar,
    .mobile-topbar,
    .breadcrumbs,
    .ga-footer,
    .certificate-actions-bar,
    .notification-panel,
    .ga-modal-overlay,
    .ga-processing-overlay {
        display: none !important;
    }

    .main-shell,
    .container {
        margin: 0 !important;
        width: 100% !important;
    }

    .certificate-card {
        box-shadow: none !important;
    }
}

/* Profesionalización final de módulos */
.page-title-actions,
.report-actions,
.alternative-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.status-borrador,
.badge-draft {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #CBD5E1;
}

.status-publicado,
.badge-published {
    background: #EAF6FF;
    color: #095EBA;
    border: 1px solid rgba(9, 94, 186, .18);
}

.status-archivado,
.badge-archived {
    background: #FFF4E5;
    color: #B45F06;
    border: 1px solid rgba(245, 162, 61, .25);
}

.edit-preview-thumb,
.video-thumb-admin,
.support-image-current img {
    max-width: 140px;
    max-height: 86px;
    object-fit: contain;
    border-radius: 14px;
    border: 1px solid rgba(9, 94, 186, .12);
    background: #FFFFFF;
    padding: 6px;
}

.support-image-current {
    margin-top: 10px;
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    font-size: .82rem;
    color: var(--ga-muted, #64748B);
}

.video-progress-card {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.video-progress-card > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.progress-mini {
    height: 10px;
    border-radius: 999px;
    background: rgba(9, 94, 186, .10);
    overflow: hidden;
}

.progress-mini > div {
    height: 100%;
    border-radius: 999px;
    background: var(--ga-orange);
    transition: width .25s ease;
}

.question-image-chip {
    display: inline-flex;
    margin: 4px 6px 6px 0;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(9, 94, 186, .09);
    color: #095EBA;
    font-size: .78rem;
    font-weight: 700;
}

.alternative-line {
    margin: 3px 0;
}

.ga-file-upload::-webkit-file-upload-button {
    border: 0;
    border-radius: 999px;
    background: #095EBA;
    color: #fff;
    padding: 8px 12px;
    margin-right: 10px;
    cursor: pointer;
}

body.dark-mode .status-borrador,
body.ga-dark .status-borrador,
html[data-theme="dark"] .status-borrador,
body.dark-mode .badge-draft,
body.ga-dark .badge-draft,
html[data-theme="dark"] .badge-draft {
    background: rgba(148, 163, 184, .15);
    color: #CBD5E1;
    border-color: rgba(203, 213, 225, .18);
}

body.dark-mode .status-publicado,
body.ga-dark .status-publicado,
html[data-theme="dark"] .status-publicado,
body.dark-mode .badge-published,
body.ga-dark .badge-published,
html[data-theme="dark"] .badge-published,
body.dark-mode .question-image-chip,
body.ga-dark .question-image-chip,
html[data-theme="dark"] .question-image-chip {
    background: rgba(84, 160, 255, .16);
    color: #CFE6FF;
    border-color: rgba(84, 160, 255, .25);
}

body.dark-mode .status-archivado,
body.ga-dark .status-archivado,
html[data-theme="dark"] .status-archivado,
body.dark-mode .badge-archived,
body.ga-dark .badge-archived,
html[data-theme="dark"] .badge-archived {
    background: rgba(245, 162, 61, .14);
    color: #FFD79C;
    border-color: rgba(245, 162, 61, .25);
}

body.dark-mode .edit-preview-thumb,
body.dark-mode .video-thumb-admin,
body.dark-mode .support-image-current img,
body.ga-dark .edit-preview-thumb,
body.ga-dark .video-thumb-admin,
body.ga-dark .support-image-current img,
html[data-theme="dark"] .edit-preview-thumb,
html[data-theme="dark"] .video-thumb-admin,
html[data-theme="dark"] .support-image-current img {
    background: rgba(255,255,255,.92);
    border-color: rgba(158, 202, 255, .22);
}

@media (max-width: 760px) {
    .page-title-actions,
    .report-actions {
        width: 100%;
        align-items: stretch;
    }
    .page-title-actions .btn,
    .report-actions .btn,
    .report-actions input[type="submit"] {
        width: 100%;
        justify-content: center;
    }
}

.btn-outline-ga {
    background: rgba(255,255,255,.75);
    color: #095EBA;
    border: 1px solid rgba(9, 94, 186, .22);
    box-shadow: none;
}
.btn-outline-ga:hover { background: rgba(9, 94, 186, .08); transform: translateY(-1px); }
body.dark-mode .btn-outline-ga,
body.ga-dark .btn-outline-ga,
html[data-theme="dark"] .btn-outline-ga {
    background: rgba(84, 160, 255, .10);
    color: #CFE6FF;
    border-color: rgba(84, 160, 255, .25);
}

/* Cierre automático por inactividad */
.ga-idle-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(9, 31, 58, .42);
    backdrop-filter: blur(8px);
}

.ga-idle-overlay.is-open {
    display: flex;
}

.ga-idle-modal {
    width: min(440px, 100%);
    border-radius: 28px;
    border: 1px solid rgba(9, 94, 186, .18);
    background: #FFFFFF;
    box-shadow: 0 28px 70px rgba(9, 31, 58, .22);
    padding: 26px;
    text-align: center;
}

.ga-idle-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: var(--ga-blue-logo);
    font-size: 1.75rem;
}

.ga-idle-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: #095EBA;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ga-idle-modal h2 {
    margin: 0 0 10px;
    color: #064A92;
    font-size: 1.45rem;
}

.ga-idle-modal p {
    margin: 0 0 14px;
    color: #4E6683;
    line-height: 1.55;
}

.ga-idle-countdown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    margin: 4px auto 20px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(245, 162, 61, .16);
    color: #8C4C00;
    font-weight: 900;
}

.ga-idle-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

body.dark-mode .ga-idle-overlay,
body.ga-dark .ga-idle-overlay,
html[data-theme="dark"] .ga-idle-overlay {
    background: rgba(2, 8, 23, .72);
}

body.dark-mode .ga-idle-modal,
body.ga-dark .ga-idle-modal,
html[data-theme="dark"] .ga-idle-modal {
    background: #0F1D30;
    border-color: rgba(158, 202, 255, .22);
    box-shadow: 0 28px 70px rgba(0, 0, 0, .42);
}

body.dark-mode .ga-idle-modal h2,
body.ga-dark .ga-idle-modal h2,
html[data-theme="dark"] .ga-idle-modal h2 {
    color: #EAF5FF;
}

body.dark-mode .ga-idle-modal p,
body.ga-dark .ga-idle-modal p,
html[data-theme="dark"] .ga-idle-modal p {
    color: #C9DAEC;
}

body.dark-mode .ga-idle-kicker,
body.ga-dark .ga-idle-kicker,
html[data-theme="dark"] .ga-idle-kicker {
    color: #9ECAFF;
}

body.dark-mode .ga-idle-countdown,
body.ga-dark .ga-idle-countdown,
html[data-theme="dark"] .ga-idle-countdown {
    background: rgba(245, 162, 61, .18);
    color: #FFD79C;
}

/* Permisos por grupo */
.permission-editor {
    margin: 18px 0 20px;
    padding: 20px;
    border-radius: 24px;
    border: 1px solid rgba(9, 94, 186, .16);
    background: #0F1D30;
}

.permission-editor-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.permission-editor-header h2 {
    margin: 4px 0 6px;
    color: #064A92;
    font-size: 1.15rem;
}

.permission-editor-header p {
    margin: 0;
    color: #5B708A;
    line-height: 1.55;
}

.permission-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(245, 162, 61, .18);
    color: #8C4C00;
    font-size: .78rem;
    font-weight: 900;
    white-space: nowrap;
}

.permission-check-list ul,
ul.permission-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.permission-check-list li {
    margin: 0;
}

.permission-check-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border-radius: 16px;
    border: 1px solid rgba(9, 94, 186, .14);
    background: rgba(255, 255, 255, .78);
    color: #0B3767;
    font-weight: 800;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.permission-check-list input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #095EBA;
}

.permission-check-list label:hover {
    transform: translateY(-1px);
    border-color: rgba(9, 94, 186, .28);
    box-shadow: 0 10px 22px rgba(9, 31, 58, .08);
}

.access-denied-card {
    width: min(720px, 100%);
    margin: 48px auto;
    padding: 42px;
    text-align: center;
    border-radius: 32px;
    border: 1px solid rgba(9, 94, 186, .16);
    background: #F4F9FE;
    box-shadow: 0 24px 60px rgba(9, 31, 58, .12);
}

.access-denied-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 26px;
    background: var(--ga-blue-logo);
    font-size: 2rem;
}

.access-denied-card h1 {
    margin: 10px 0;
    color: #064A92;
    font-size: clamp(2rem, 4vw, 3rem);
}

.access-denied-card p {
    margin: 0 auto 24px;
    max-width: 560px;
    color: #526A86;
    line-height: 1.65;
}

.access-denied-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

body.dark-mode .permission-editor,
body.ga-dark .permission-editor,
html[data-theme="dark"] .permission-editor {
    border-color: rgba(158, 202, 255, .20);
    background: var(--ga-blue-logo);
}

body.dark-mode .permission-editor-header h2,
body.ga-dark .permission-editor-header h2,
html[data-theme="dark"] .permission-editor-header h2,
body.dark-mode .access-denied-card h1,
body.ga-dark .access-denied-card h1,
html[data-theme="dark"] .access-denied-card h1 {
    color: #EAF5FF;
}

body.dark-mode .permission-editor-header p,
body.ga-dark .permission-editor-header p,
html[data-theme="dark"] .permission-editor-header p,
body.dark-mode .access-denied-card p,
body.ga-dark .access-denied-card p,
html[data-theme="dark"] .access-denied-card p {
    color: #C9DAEC;
}

body.dark-mode .permission-check-list label,
body.ga-dark .permission-check-list label,
html[data-theme="dark"] .permission-check-list label,
body.dark-mode .access-denied-card,
body.ga-dark .access-denied-card,
html[data-theme="dark"] .access-denied-card {
    background: #0F1D30;
    border-color: rgba(158, 202, 255, .18);
    color: #EAF5FF;
}

@media (max-width: 720px) {
    .permission-editor-header {
        flex-direction: column;
    }

    .access-denied-card {
        margin: 24px auto;
        padding: 28px 20px;
    }
}


/* ==========================================================
   Ajuste solicitado: diseño sin degradados
   ========================================================== */
body,
.login-body,
.app-body,
.ga-page,
.main-content {
    background: #F4F9FE !important;
}

.login-body::before,
.login-body::after,
.login-showcase::before,
.login-showcase::after {
    background: transparent !important;
}

.login-showcase,
.sidebar,
.app-sidebar,
.side-panel {
    background: #0F4F93 !important;
}

.topbar,
.app-topbar,
.login-card,
.card,
.page-hero,
.form-card,
.ga-card,
.panel,
.section-card,
.dashboard-card,
.metric-card,
.empty-state,
.table-card,
.profile-card,
.notification-panel {
    background: #FFFFFF !important;
}

.btn-primary-ga,
.btn-primary,
.button-primary,
input[type=submit].btn-primary-ga,
.ga-button-primary {
    background: #095EBA !important;
}

.btn-secondary-ga,
.btn-warning,
.button-warning,
.ga-button-warning {
    background: #F5A23D !important;
}

.btn-danger,
.button-danger,
.ga-button-danger {
    background: #B55353 !important;
}

.login-card::before,
.page-hero::before,
.card::before,
.certificate-card::before,
.ga-accent-line,
.progress-bar,
.video-progress-bar {
    background: #095EBA !important;
}

.login-pill,
.feature-pill,
.user-chip,
.badge-soft,
.info-soft {
    background: #EEF6FC !important;
}

body.dark-mode,
.dark-mode .main-content,
.dark-mode .app-body {
    background: #0D1828 !important;
}

.dark-mode .topbar,
.dark-mode .app-topbar,
.dark-mode .login-card,
.dark-mode .card,
.dark-mode .page-hero,
.dark-mode .form-card,
.dark-mode .ga-card,
.dark-mode .panel,
.dark-mode .section-card,
.dark-mode .dashboard-card,
.dark-mode .metric-card,
.dark-mode .empty-state,
.dark-mode .table-card,
.dark-mode .profile-card,
.dark-mode .notification-panel {
    background: #0F1D30 !important;
}

/* ==========================================================
   Corrección de contraste posterior a diseño sin degradados
   - Sidebar claro para mejorar lectura y logo
   - Encabezados con fondo claro, sin bloques azules pesados
   - Íconos de Mi perfil y Cambiar contraseña visibles
   ========================================================== */
.sidebar,
.app-sidebar,
.side-panel {
    background: #FFFFFF !important;
    color: #16324F !important;
    border-right: 1px solid #D9E7F4 !important;
    box-shadow: 12px 0 34px rgba(9, 94, 186, .08) !important;
}

.sidebar-brand {
    border-bottom: 1px solid #D9E7F4 !important;
}

.sidebar-brand a {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.sidebar-brand img {
    filter: drop-shadow(0 6px 10px rgba(9, 94, 186, .10)) !important;
}

.sidebar-user-box,
.profile-card-mini {
    background: #F4F9FE !important;
    border: 1px solid #CFE1F1 !important;
    box-shadow: 0 8px 20px rgba(9, 94, 186, .06) !important;
}

.sidebar-user-box::before {
    background: #F5A23D !important;
    box-shadow: 0 0 0 5px rgba(245, 162, 61, .18) !important;
}

.sidebar-user-label,
.sidebar-section-label,
.sidebar-admin-label {
    color: #60758E !important;
}

.sidebar-user-name,
.sidebar-menu-group summary,
.sidebar-submenu > a,
.sidebar-admin-menu a,
.sidebar-link {
    color: #074785 !important;
}

.sidebar-user-role {
    background: #E9F3FC !important;
    color: #095EBA !important;
    border: 1px solid #CFE1F1 !important;
}

.sidebar-profile-link {
    background: #FFFFFF !important;
    border: 1px solid #CFE1F1 !important;
    color: #095EBA !important;
    box-shadow: 0 4px 12px rgba(9, 94, 186, .06) !important;
}

.sidebar-profile-link:hover {
    background: #FFF3DF !important;
    border-color: #F5C982 !important;
    color: #8A4A05 !important;
}

.sidebar-link {
    background: transparent !important;
    border: 1px solid transparent !important;
}

.sidebar-link::before,
.sidebar-submenu > a::before,
.sidebar-admin-menu a::before {
    background: #F4F9FE !important;
    border: 1px solid #CFE1F1 !important;
    color: #095EBA !important;
    box-shadow: 0 4px 10px rgba(9, 94, 186, .06) !important;
}

.sidebar-link:hover,
.sidebar-link.is-active,
.sidebar-menu-group summary:hover,
.sidebar-submenu > a:hover,
.sidebar-admin-menu a:hover {
    background: #EAF4FD !important;
    color: #095EBA !important;
    border-color: #CFE1F1 !important;
    transform: translateX(2px);
}

.sidebar-link.is-active {
    box-shadow: inset 4px 0 0 #F5A23D, 0 8px 18px rgba(9,94,186,.08) !important;
}

.sidebar-link.is-active::before {
    background: #FFF3DF !important;
    color: #C97912 !important;
    border-color: #F5C982 !important;
}

.sidebar-link[data-icon="profile"]::before,
.sidebar-link[data-icon="lock"]::before {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    flex: 0 0 24px !important;
    display: inline-grid !important;
    place-items: center !important;
    border-radius: 10px !important;
    -webkit-mask: none !important;
    mask: none !important;
    background: #F4F9FE !important;
    color: #095EBA !important;
    font-size: 13px !important;
}

.sidebar-link[data-icon="profile"]::before { content: "👤" !important; }
.sidebar-link[data-icon="lock"]::before { content: "🔒" !important; }

.sidebar-logout {
    background: #FFF5F5 !important;
    color: #A94C4C !important;
    border: 1px solid #F5CFCF !important;
}

.sidebar-logout:hover {
    background: #FFECEC !important;
    color: #8F3F3F !important;
}

.page-title,
.page-hero,
.dashboard-title,
.hero-card {
    background: #FFFFFF !important;
    border: 1px solid #D9E7F4 !important;
    color: #16324F !important;
    box-shadow: 0 12px 28px rgba(9, 94, 186, .07) !important;
}

.page-title::before,
.page-hero::before {
    background: #095EBA !important;
}

.page-title h1,
.page-title h2,
.page-title h3,
.page-hero h1,
.page-hero h2,
.dashboard-title h1,
.dashboard-title h2 {
    color: #074785 !important;
}

.page-title p,
.page-hero p,
.dashboard-title p {
    color: #60758E !important;
}

.dashboard-hero h2,
.metric-card h2,
.metric-card h3,
.dashboard-card h2,
.dashboard-card h3 {
    color: #074785 !important;
}

.dashboard-stat,
.metric-card,
.report-metric {
    background: #F8FCFF !important;
    border-color: #D9E7F4 !important;
}

.desktop-status,
.topbar-profile-chip,
.theme-toggle,
.notification-bell {
    background: #F4F9FE !important;
    border-color: #D9E7F4 !important;
    color: #074785 !important;
}

/* Modo oscuro: mantiene contraste alto sin degradados */
body.dark-mode .sidebar,
body.dark-mode .app-sidebar,
body.dark-mode .side-panel {
    background: #0F1D30 !important;
    border-right-color: rgba(158, 202, 255, .18) !important;
    color: #EAF5FF !important;
}

body.dark-mode .sidebar-user-box,
body.dark-mode .profile-card-mini {
    background: #152942 !important;
    border-color: rgba(158, 202, 255, .18) !important;
}

body.dark-mode .sidebar-user-label,
body.dark-mode .sidebar-section-label,
body.dark-mode .sidebar-admin-label {
    color: #AFC2D8 !important;
}

body.dark-mode .sidebar-user-name,
body.dark-mode .sidebar-menu-group summary,
body.dark-mode .sidebar-submenu > a,
body.dark-mode .sidebar-admin-menu a,
body.dark-mode .sidebar-link {
    color: #EAF5FF !important;
}

body.dark-mode .sidebar-link::before,
body.dark-mode .sidebar-submenu > a::before,
body.dark-mode .sidebar-admin-menu a::before,
body.dark-mode .sidebar-link[data-icon="profile"]::before,
body.dark-mode .sidebar-link[data-icon="lock"]::before {
    background: #203A5B !important;
    border-color: rgba(158, 202, 255, .20) !important;
    color: #9ECAFF !important;
}

body.dark-mode .sidebar-link:hover,
body.dark-mode .sidebar-link.is-active,
body.dark-mode .sidebar-menu-group summary:hover,
body.dark-mode .sidebar-submenu > a:hover,
body.dark-mode .sidebar-admin-menu a:hover {
    background: #203A5B !important;
    color: #FFFFFF !important;
    border-color: rgba(158, 202, 255, .22) !important;
}

body.dark-mode .page-title,
body.dark-mode .page-hero,
body.dark-mode .dashboard-title,
body.dark-mode .hero-card {
    background: #0F1D30 !important;
    border-color: rgba(158, 202, 255, .18) !important;
    color: #EAF5FF !important;
}

body.dark-mode .page-title h1,
body.dark-mode .page-title h2,
body.dark-mode .page-title h3,
body.dark-mode .page-hero h1,
body.dark-mode .page-hero h2 {
    color: #EAF5FF !important;
}

body.dark-mode .page-title p,
body.dark-mode .page-hero p {
    color: #C9DAEC !important;
}

/* ==========================================================
   Ajustes finales: tablas sin rojo + material de apoyo en videos
   ========================================================== */
.admin-grid th,
.history-table th {
    background: #095EBA !important;
    color: #FFFFFF !important;
}

.admin-grid th:first-child { border-top-left-radius: 16px; }
.admin-grid th:last-child { border-top-right-radius: 16px; }

.btn-danger-ga {
    background: #C05A5A !important;
    color: #FFFFFF !important;
}
.btn-danger-ga:hover { background: #A94848 !important; }

.support-upload-box,
.material-current,
.material-support-card {
    border: 1px solid #CFE1F1;
    background: #F8FCFF;
    border-radius: 16px;
    padding: 14px;
}

.material-current {
    margin-bottom: 10px;
    color: #4F647D;
    font-weight: 700;
}

.material-current a,
.material-link-grid {
    color: #095EBA !important;
    font-weight: 900;
    text-decoration: none;
}

.material-current a:hover,
.material-link-grid:hover {
    color: #C97912 !important;
}

.material-support-card {
    margin: 16px 0 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.material-support-card span {
    display: inline-block;
    margin-bottom: 4px;
    color: #095EBA;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.material-support-card strong {
    display: block;
    color: #074785;
    font-size: 1rem;
}

.material-support-card small {
    display: block;
    margin-top: 4px;
    color: #60758E;
    font-weight: 700;
}

body.dark-mode .admin-grid th,
body.dark-mode .history-table th {
    background: #0B5CAD !important;
    color: #FFFFFF !important;
}

body.dark-mode .support-upload-box,
body.dark-mode .material-current,
body.dark-mode .material-support-card {
    background: #152942 !important;
    border-color: rgba(158, 202, 255, .18) !important;
    color: #EAF5FF !important;
}

body.dark-mode .material-support-card strong,
body.dark-mode .material-support-card span,
body.dark-mode .material-current a,
body.dark-mode .material-link-grid {
    color: #9ECAFF !important;
}

body.dark-mode .material-support-card small {
    color: #C9DAEC !important;
}

@media (max-width: 720px) {
    .material-support-card {
        align-items: stretch;
        flex-direction: column;
    }
    .material-support-card .btn {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================
   Materiales múltiples por video
   ========================================================== */
.material-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.material-support-list {
    align-items: flex-start;
}

.material-admin-grid {
    margin-top: 12px;
    box-shadow: none !important;
}

.material-admin-grid th {
    font-size: .78rem;
}

body.dark-mode .material-buttons .btn {
    border-color: rgba(158, 202, 255, .32) !important;
}

@media (max-width: 720px) {
    .material-buttons {
        justify-content: stretch;
        flex-direction: column;
        width: 100%;
    }
}

/* ==========================================================
   Corrección modo oscuro: tarjetas de actividad del perfil
   ========================================================== */
body.dark-mode .profile-metrics-card,
body.ga-dark .profile-metrics-card,
html[data-theme="dark"] .profile-metrics-card {
    background: #132337 !important;
    border-color: rgba(158, 202, 255, .22) !important;
    box-shadow: 0 20px 46px rgba(0, 0, 0, .24) !important;
}

body.dark-mode .profile-metrics-card .section-title-row h2,
body.ga-dark .profile-metrics-card .section-title-row h2,
html[data-theme="dark"] .profile-metrics-card .section-title-row h2 {
    color: #F1F7FF !important;
}

body.dark-mode .profile-metrics-card .section-title-row p,
body.ga-dark .profile-metrics-card .section-title-row p,
html[data-theme="dark"] .profile-metrics-card .section-title-row p {
    color: #C9DAEC !important;
}

body.dark-mode .profile-stats .dashboard-stat,
body.dark-mode .profile-metrics-card .dashboard-stat,
body.ga-dark .profile-stats .dashboard-stat,
body.ga-dark .profile-metrics-card .dashboard-stat,
html[data-theme="dark"] .profile-stats .dashboard-stat,
html[data-theme="dark"] .profile-metrics-card .dashboard-stat {
    background: #0F1D30 !important;
    border: 1px solid rgba(158, 202, 255, .20) !important;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .20) !important;
}

body.dark-mode .profile-stats .dashboard-stat:hover,
body.dark-mode .profile-metrics-card .dashboard-stat:hover,
body.ga-dark .profile-stats .dashboard-stat:hover,
body.ga-dark .profile-metrics-card .dashboard-stat:hover,
html[data-theme="dark"] .profile-stats .dashboard-stat:hover,
html[data-theme="dark"] .profile-metrics-card .dashboard-stat:hover {
    background: #172B45 !important;
    border-color: rgba(245, 162, 61, .34) !important;
}

body.dark-mode .profile-stats .dashboard-stat span,
body.dark-mode .profile-metrics-card .dashboard-stat span,
body.ga-dark .profile-stats .dashboard-stat span,
body.ga-dark .profile-metrics-card .dashboard-stat span,
html[data-theme="dark"] .profile-stats .dashboard-stat span,
html[data-theme="dark"] .profile-metrics-card .dashboard-stat span {
    color: #C9DAEC !important;
}

body.dark-mode .profile-stats .dashboard-stat strong,
body.dark-mode .profile-metrics-card .dashboard-stat strong,
body.ga-dark .profile-stats .dashboard-stat strong,
body.ga-dark .profile-metrics-card .dashboard-stat strong,
html[data-theme="dark"] .profile-stats .dashboard-stat strong,
html[data-theme="dark"] .profile-metrics-card .dashboard-stat strong {
    color: #7CB8F7 !important;
}

body.dark-mode .profile-stats .dashboard-stat small,
body.dark-mode .profile-metrics-card .dashboard-stat small,
body.ga-dark .profile-stats .dashboard-stat small,
body.ga-dark .profile-metrics-card .dashboard-stat small,
html[data-theme="dark"] .profile-stats .dashboard-stat small,
html[data-theme="dark"] .profile-metrics-card .dashboard-stat small {
    color: #B8CBE0 !important;
}

body.dark-mode .profile-progress,
body.ga-dark .profile-progress,
html[data-theme="dark"] .profile-progress {
    background: #20334A !important;
    border: 1px solid rgba(158, 202, 255, .12) !important;
}

/* ==========================================================
   Corrección modo oscuro: tarjetas KPI del Dashboard
   Evita que los indicadores rápidos del Dashboard y del panel
   administrador hereden fondos claros en modo oscuro.
   ========================================================== */
body.dark-mode .dashboard-hero,
body.dark-mode .admin-command-center {
    background: #132337 !important;
    border-color: rgba(158, 202, 255, .22) !important;
    box-shadow: 0 20px 46px rgba(0, 0, 0, .24) !important;
}

body.dark-mode .dashboard-hero .dashboard-stat,
body.dark-mode .admin-command-center .dashboard-stat,
body.dark-mode .dashboard-stats-grid > .dashboard-stat,
body.dark-mode .dashboard-stats-grid > .metric-card,
body.dark-mode .dashboard-stats-grid > .report-metric {
    background: #0F1D30 !important;
    border: 1px solid rgba(158, 202, 255, .22) !important;
    color: #EAF5FF !important;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .22) !important;
}

body.dark-mode .dashboard-hero .dashboard-stat:hover,
body.dark-mode .admin-command-center .dashboard-stat:hover,
body.dark-mode .dashboard-stats-grid > .dashboard-stat:hover,
body.dark-mode .dashboard-stats-grid > .metric-card:hover,
body.dark-mode .dashboard-stats-grid > .report-metric:hover {
    background: #172B45 !important;
    border-color: rgba(245, 162, 61, .34) !important;
}

body.dark-mode .dashboard-hero .dashboard-stat span,
body.dark-mode .admin-command-center .dashboard-stat span,
body.dark-mode .dashboard-stats-grid > .dashboard-stat span,
body.dark-mode .dashboard-stats-grid > .metric-card span,
body.dark-mode .dashboard-stats-grid > .report-metric span {
    color: #C9DAEC !important;
}

body.dark-mode .dashboard-hero .dashboard-stat strong,
body.dark-mode .admin-command-center .dashboard-stat strong,
body.dark-mode .dashboard-stats-grid > .dashboard-stat strong,
body.dark-mode .dashboard-stats-grid > .metric-card strong,
body.dark-mode .dashboard-stats-grid > .report-metric strong {
    color: #7CB8F7 !important;
}

body.dark-mode .dashboard-hero .dashboard-stat small,
body.dark-mode .admin-command-center .dashboard-stat small,
body.dark-mode .dashboard-stats-grid > .dashboard-stat small,
body.dark-mode .dashboard-stats-grid > .metric-card small,
body.dark-mode .dashboard-stats-grid > .report-metric small {
    color: #B8CBE0 !important;
}

body.dark-mode .dashboard-hero p,
body.dark-mode .admin-command-center p {
    color: #C9DAEC !important;
}

body.dark-mode .dashboard-hero .progress-mini,
body.dark-mode .progress-hero {
    background: #20334A !important;
    border: 1px solid rgba(158, 202, 255, .12) !important;
}

/* ==========================================================
   Corrección final: Grupos y botones de Reportes
   - Permisos por grupo con contraste correcto en claro/oscuro
   - Botones de reportes legibles aunque estén deshabilitados
   ========================================================== */
.permission-editor {
    background: #F8FCFF !important;
    border: 1px solid #CFE1F1 !important;
    color: #16324F !important;
    box-shadow: 0 12px 28px rgba(9, 94, 186, .06) !important;
}

.permission-editor .section-kicker,
.permission-editor-header .section-kicker {
    color: #60758E !important;
}

.permission-editor-header h2 {
    color: #074785 !important;
}

.permission-editor-header p,
.permission-editor > .form-help,
.permission-editor small.form-help {
    color: #60758E !important;
}

.permission-check-list label {
    background: #FFFFFF !important;
    color: #074785 !important;
    border: 1px solid #CFE1F1 !important;
    box-shadow: 0 6px 16px rgba(9, 94, 186, .04) !important;
}

.permission-check-list label:hover {
    background: #EAF4FD !important;
    color: #095EBA !important;
    border-color: #BBD6F0 !important;
}

.permission-check-list input[type="checkbox"] {
    background: #FFFFFF !important;
    border-color: #BBD6F0 !important;
    accent-color: #095EBA !important;
}

.permission-badge {
    background: #FFF3DF !important;
    color: #8C4C00 !important;
    border: 1px solid #F5C982 !important;
}

body.dark-mode .permission-editor,
body.ga-dark .permission-editor,
html[data-theme="dark"] .permission-editor {
    background: #132337 !important;
    border-color: rgba(158, 202, 255, .22) !important;
    color: #EAF5FF !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .26) !important;
}

body.dark-mode .permission-editor .section-kicker,
body.dark-mode .permission-editor-header .section-kicker,
body.ga-dark .permission-editor .section-kicker,
body.ga-dark .permission-editor-header .section-kicker,
html[data-theme="dark"] .permission-editor .section-kicker,
html[data-theme="dark"] .permission-editor-header .section-kicker {
    color: #9ECAFF !important;
}

body.dark-mode .permission-editor-header h2,
body.ga-dark .permission-editor-header h2,
html[data-theme="dark"] .permission-editor-header h2 {
    color: #F1F7FF !important;
}

body.dark-mode .permission-editor-header p,
body.dark-mode .permission-editor > .form-help,
body.dark-mode .permission-editor small.form-help,
body.ga-dark .permission-editor-header p,
body.ga-dark .permission-editor > .form-help,
body.ga-dark .permission-editor small.form-help,
html[data-theme="dark"] .permission-editor-header p,
html[data-theme="dark"] .permission-editor > .form-help,
html[data-theme="dark"] .permission-editor small.form-help {
    color: #C9DAEC !important;
}

body.dark-mode .permission-check-list label,
body.ga-dark .permission-check-list label,
html[data-theme="dark"] .permission-check-list label {
    background: #0F1D30 !important;
    color: #EAF5FF !important;
    border-color: rgba(158, 202, 255, .22) !important;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .18) !important;
}

body.dark-mode .permission-check-list label:hover,
body.ga-dark .permission-check-list label:hover,
html[data-theme="dark"] .permission-check-list label:hover {
    background: #203A5B !important;
    color: #FFFFFF !important;
    border-color: rgba(245, 162, 61, .38) !important;
}

body.dark-mode .permission-check-list input[type="checkbox"],
body.ga-dark .permission-check-list input[type="checkbox"],
html[data-theme="dark"] .permission-check-list input[type="checkbox"] {
    background: #0B1626 !important;
    border-color: rgba(158, 202, 255, .34) !important;
    accent-color: #7CB8F7 !important;
}

body.dark-mode .permission-badge,
body.ga-dark .permission-badge,
html[data-theme="dark"] .permission-badge {
    background: rgba(245, 162, 61, .16) !important;
    color: #FFD79C !important;
    border-color: rgba(245, 162, 61, .34) !important;
}

/* Botones de Reportes: contraste estable en modo oscuro */
.report-actions .btn,
.report-actions input[type="submit"] {
    border-radius: 14px !important;
    font-weight: 900 !important;
}

body.dark-mode .report-actions .btn-primary-ga,
body.dark-mode .report-actions input[type="submit"].btn-primary-ga,
body.ga-dark .report-actions .btn-primary-ga,
body.ga-dark .report-actions input[type="submit"].btn-primary-ga,
html[data-theme="dark"] .report-actions .btn-primary-ga,
html[data-theme="dark"] .report-actions input[type="submit"].btn-primary-ga {
    background: #0B6FCC !important;
    border: 1px solid rgba(158, 202, 255, .28) !important;
    color: #FFFFFF !important;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .22) !important;
}

body.dark-mode .report-actions .btn-secondary-ga,
body.dark-mode .report-actions input[type="submit"].btn-secondary-ga,
body.ga-dark .report-actions .btn-secondary-ga,
body.ga-dark .report-actions input[type="submit"].btn-secondary-ga,
html[data-theme="dark"] .report-actions .btn-secondary-ga,
html[data-theme="dark"] .report-actions input[type="submit"].btn-secondary-ga {
    background: #F5A23D !important;
    border: 1px solid #F5C982 !important;
    color: #1A1208 !important;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .20) !important;
}

body.dark-mode .report-actions .btn:hover,
body.dark-mode .report-actions input[type="submit"]:hover,
body.ga-dark .report-actions .btn:hover,
body.ga-dark .report-actions input[type="submit"]:hover,
html[data-theme="dark"] .report-actions .btn:hover,
html[data-theme="dark"] .report-actions input[type="submit"]:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

body.dark-mode .report-actions .btn[disabled],
body.dark-mode .report-actions input[type="submit"][disabled],
body.dark-mode .report-actions .aspNetDisabled,
body.ga-dark .report-actions .btn[disabled],
body.ga-dark .report-actions input[type="submit"][disabled],
body.ga-dark .report-actions .aspNetDisabled,
html[data-theme="dark"] .report-actions .btn[disabled],
html[data-theme="dark"] .report-actions input[type="submit"][disabled],
html[data-theme="dark"] .report-actions .aspNetDisabled {
    background: #203A5B !important;
    border: 1px solid rgba(158, 202, 255, .22) !important;
    color: #BFD0E2 !important;
    opacity: 1 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* =========================================================
   Reorganización Intranet / Módulo Capacitaciones
   ========================================================= */
.login-body {
    background: #EEF4FB !important;
}

.sidebar-brand a,
.mobile-brand {
    cursor: pointer;
}

.sidebar-module-label {
    margin-top: 18px !important;
    color: var(--ga-blue-dark) !important;
    background: rgba(23,108,193,.07);
    border: 1px solid rgba(23,108,193,.12);
    border-radius: 999px;
    padding: 7px 12px !important;
}

.sidebar-submodule-label {
    margin-top: 12px !important;
    font-size: 11px !important;
    letter-spacing: .08em !important;
    opacity: .92;
}

.sidebar-admin-menu .sidebar-link {
    padding-left: 18px;
}

.sidebar-link[data-icon="home"]::before { content: "⌂" !important; }
.sidebar-link[data-icon="training"]::before { content: "▣" !important; }
.sidebar-link[data-icon="folder"]::before { content: "▤" !important; }
.sidebar-link[data-icon="history"]::before { content: "◷" !important; }
.sidebar-link[data-icon="reports"]::before { content: "▥" !important; }
.sidebar-link[data-icon="mail"]::before { content: "✉" !important; }

.intranet-page-title {
    margin-bottom: 18px;
}

.intranet-module-highlight {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .85fr);
    gap: 22px;
    align-items: center;
    margin-bottom: 22px;
    border-left: 6px solid var(--ga-blue);
}

.intranet-module-highlight h2 {
    margin: 4px 0 8px;
    color: var(--ga-blue-dark);
    font-size: 28px;
}

.intranet-module-highlight p {
    color: var(--ga-muted);
    margin: 0 0 18px;
    line-height: 1.55;
}

.intranet-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.intranet-modules-section {
    margin-top: 22px;
}

.intranet-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

.intranet-module-card {
    position: relative;
    display: block;
    min-height: 158px;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.intranet-module-card h3 {
    color: var(--ga-blue-dark);
    margin: 18px 0 8px;
    font-size: 20px;
}

.intranet-module-card p {
    margin: 0;
    color: var(--ga-muted);
    line-height: 1.45;
}

.intranet-module-card.module-active:hover {
    transform: translateY(-2px);
    border-color: rgba(23,108,193,.42);
    box-shadow: 0 12px 28px rgba(15, 79, 147, .12);
}

.intranet-module-card.module-soon {
    opacity: .78;
    background: #F8FAFC;
}

.module-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
}

.module-status.module-active {
    background: rgba(21,128,61,.11);
    color: var(--ga-success);
}

.module-status.module-soon {
    background: rgba(100,116,139,.12);
    color: var(--ga-muted);
}

.intranet-quick-panel {
    margin-top: 22px;
}

.intranet-admin-summary {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.intranet-admin-summary span {
    background: #F8FAFC;
    border: 1px solid var(--ga-border);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--ga-muted);
}

.intranet-admin-summary strong {
    color: var(--ga-blue-dark);
}

.module-anchor-section {
    margin-top: 20px;
}

.module-title-row {
    margin-bottom: 14px;
}

.module-title-row h2 {
    color: var(--ga-blue-dark);
    margin: 0;
}

.module-title-row p {
    margin: 5px 0 0;
    color: var(--ga-muted);
}

body.dark-mode .sidebar-module-label {
    color: #D7E9FF !important;
    background: rgba(96,165,250,.12) !important;
    border-color: rgba(96,165,250,.2) !important;
}

body.dark-mode .intranet-module-highlight,
body.dark-mode .intranet-module-card,
body.dark-mode .intranet-quick-panel {
    background: #111827 !important;
    border-color: rgba(96,165,250,.22) !important;
    box-shadow: none !important;
}

body.dark-mode .intranet-module-highlight h2,
body.dark-mode .intranet-module-card h3,
body.dark-mode .module-title-row h2,
body.dark-mode .intranet-admin-summary strong {
    color: #D7E9FF !important;
}

body.dark-mode .intranet-module-highlight p,
body.dark-mode .intranet-module-card p,
body.dark-mode .module-title-row p {
    color: #B6C4D6 !important;
}

body.dark-mode .intranet-module-card.module-soon,
body.dark-mode .intranet-admin-summary span {
    background: #0F172A !important;
    color: #B6C4D6 !important;
    border-color: rgba(148,163,184,.24) !important;
}

body.dark-mode .module-status.module-active {
    background: rgba(34,197,94,.16) !important;
    color: #86EFAC !important;
}

body.dark-mode .module-status.module-soon {
    background: rgba(148,163,184,.15) !important;
    color: #CBD5E1 !important;
}

@media (max-width: 860px) {
    .intranet-module-highlight {
        grid-template-columns: 1fr;
    }

    .intranet-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 560px) {
    .intranet-stats-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Módulo Departamento TI */
.sidebar-link[data-icon="ti"]::before { content: "TI" !important; font-size: 10px; font-weight: 900; }
.sidebar-link[data-icon="inventory"]::before { content: "▦" !important; }
.module-construction-card {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    padding: 28px;
    border-left: 6px solid var(--ga-blue-logo);
}
.module-construction-icon {
    width: 74px;
    height: 74px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    background: var(--ga-blue-soft);
    border: 1px solid rgba(9,94,186,.14);
    font-size: 32px;
}
.module-construction-body h2 { margin: 10px 0 8px; color: var(--ga-blue-dark); }
.module-construction-body p { margin: 0 0 18px; color: var(--ga-muted); line-height: 1.65; }
.construction-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.construction-feature-grid > div {
    padding: 14px;
    border-radius: 16px;
    background: var(--ga-surface-soft);
    border: 1px solid var(--ga-border);
}
.construction-feature-grid strong { display: block; color: var(--ga-blue-dark); margin-bottom: 4px; }
.construction-feature-grid small { color: var(--ga-muted); line-height: 1.45; }
body.dark-mode .module-construction-card,
body.dark-mode .construction-feature-grid > div {
    background: #182435 !important;
    border-color: #2B405A !important;
}
body.dark-mode .module-construction-icon {
    background: #20324A !important;
    border-color: #345371 !important;
}
body.dark-mode .module-construction-body h2,
body.dark-mode .construction-feature-grid strong { color: #EAF3FF !important; }
body.dark-mode .module-construction-body p,
body.dark-mode .construction-feature-grid small { color: #B8C7D8 !important; }
@media (max-width: 900px) {
    .module-construction-card { grid-template-columns: 1fr; }
    .construction-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .construction-feature-grid { grid-template-columns: 1fr; }
}

/* ==========================================================
   Menú lateral contraíble por módulos
   ========================================================== */
.sidebar-nav {
    gap: 8px !important;
}

.sidebar-menu-group {
    margin: 6px 0 8px;
    border: 1px solid #D9E7F4;
    border-radius: 18px;
    background: #F8FCFF;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(9, 94, 186, .045);
}

.sidebar-admin-menu {
    display: block !important;
    margin-top: 8px !important;
}

.sidebar-admin-group {
    margin-top: 8px;
}

.sidebar-group-toggle {
    width: 100%;
    min-height: 46px;
    padding: 12px 13px;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    color: #074785;
    font-family: inherit;
    font-weight: 900;
    text-align: left;
    letter-spacing: .01em;
    transition: background .18s ease, color .18s ease;
}

.sidebar-group-toggle:hover {
    background: #EAF4FD;
    color: #095EBA;
}

.sidebar-group-title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.sidebar-group-title::before {
    content: "▦";
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    background: #FFFFFF;
    border: 1px solid #CFE1F1;
    color: #095EBA;
    box-shadow: 0 4px 10px rgba(9,94,186,.06);
    font-size: 12px;
}

.sidebar-menu-group[data-menu-group="intranet"] .sidebar-group-title::before { content: "⌂"; }
.sidebar-menu-group[data-menu-group="capacitaciones"] .sidebar-group-title::before { content: "▣"; }
.sidebar-menu-group[data-menu-group="admin-capacitaciones"] .sidebar-group-title::before { content: "⚙"; }
.sidebar-menu-group[data-menu-group="admin-general"] .sidebar-group-title::before { content: "◎"; }
.sidebar-menu-group[data-menu-group="departamento-ti"] .sidebar-group-title::before { content: "TI"; font-size: 10px; font-weight: 950; }

.sidebar-group-chevron {
    width: 24px;
    height: 24px;
    min-width: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #FFFFFF;
    border: 1px solid #CFE1F1;
    color: #095EBA;
    font-weight: 950;
    line-height: 1;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.sidebar-menu-group.is-open .sidebar-group-chevron {
    transform: rotate(180deg);
    background: #FFF3DF;
    border-color: #F5C982;
    color: #C97912;
}

.sidebar-group-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 8px;
    opacity: .15;
    transition: max-height .24s ease, opacity .18s ease, padding .18s ease;
}

.sidebar-menu-group.is-open .sidebar-group-content {
    max-height: 720px;
    opacity: 1;
    padding: 0 8px 9px;
}

.sidebar-group-content .sidebar-link,
.sidebar-admin-menu .sidebar-group-content .sidebar-link {
    min-height: 40px !important;
    padding: 9px 11px !important;
    margin-top: 4px;
    border-radius: 14px !important;
}

.sidebar-group-content .sidebar-link::before,
.sidebar-admin-menu .sidebar-group-content .sidebar-link::before {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    border-radius: 9px !important;
    font-size: 12px !important;
}

.sidebar-menu-group:has(.sidebar-link.is-active) {
    border-color: #B9D6EF;
    background: #F4FAFF;
}

.sidebar-menu-group:has(.sidebar-link.is-active) .sidebar-group-toggle {
    color: #095EBA;
}

.sidebar-menu-group:has(.sidebar-link.is-active) .sidebar-group-title::before {
    background: #FFF3DF !important;
    border-color: #F5C982 !important;
    color: #C97912 !important;
}

/* Compatibilidad para navegadores sin :has(): la clase is-open seguirá mostrando el grupo activo mediante JS. */
.sidebar-logout {
    margin-top: 10px !important;
}

body.dark-mode .sidebar-menu-group {
    background: #13243A !important;
    border-color: rgba(158, 202, 255, .18) !important;
    box-shadow: none !important;
}

body.dark-mode .sidebar-group-toggle {
    color: #EAF5FF !important;
}

body.dark-mode .sidebar-group-toggle:hover {
    background: #203A5B !important;
    color: #FFFFFF !important;
}

body.dark-mode .sidebar-group-title::before,
body.dark-mode .sidebar-group-chevron {
    background: #203A5B !important;
    border-color: rgba(158, 202, 255, .22) !important;
    color: #9ECAFF !important;
    box-shadow: none !important;
}

body.dark-mode .sidebar-menu-group.is-open .sidebar-group-chevron,
body.dark-mode .sidebar-menu-group:has(.sidebar-link.is-active) .sidebar-group-title::before {
    background: rgba(245, 162, 61, .16) !important;
    border-color: rgba(245, 162, 61, .36) !important;
    color: #FFD08A !important;
}

body.dark-mode .sidebar-menu-group:has(.sidebar-link.is-active) {
    background: #172B45 !important;
    border-color: rgba(158, 202, 255, .28) !important;
}

@media (max-width: 860px) {
    .sidebar-menu-group {
        border-radius: 16px;
    }
    .sidebar-group-toggle {
        min-height: 48px;
    }
}


/* ==========================================================
   MEJORA VISIBILIDAD PASSWORD
   Botón mostrar/ocultar contraseña reutilizable
   ========================================================== */
.password-field-wrap {
    position: relative;
    width: 100%;
}

.password-field-wrap .form-control.password-input,
.password-field-wrap .form-control[type="password"],
.password-field-wrap .form-control[type="text"] {
    padding-right: 54px !important;
}

.password-visibility-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 1px solid #D5E7F6;
    border-radius: 13px;
    background: #F4FAFF;
    color: #095EBA;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 2;
    transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.password-visibility-toggle:hover,
.password-visibility-toggle:focus-visible {
    background: #EAF5FF;
    border-color: #9CCAF0;
    color: #074E9B;
    box-shadow: 0 0 0 4px rgba(40,116,196,.12);
    outline: 0;
}

.password-visibility-toggle svg,
.login-password-toggle svg {
    width: 19px;
    height: 19px;
    display: block;
    fill: currentColor;
}

.password-eye-closed {
    display: none;
}

.password-visibility-toggle.is-visible .password-eye-open {
    display: none;
}

.password-visibility-toggle.is-visible .password-eye-closed {
    display: inline-flex;
}

.login-input-wrap .password-visibility-toggle.login-password-toggle {
    border: 0;
}

body.dark-mode .password-visibility-toggle {
    background: #203A5B !important;
    border-color: rgba(158,202,255,.26) !important;
    color: #EAF5FF !important;
}

body.dark-mode .password-visibility-toggle:hover,
body.dark-mode .password-visibility-toggle:focus-visible {
    background: #284B73 !important;
    border-color: rgba(245,162,61,.45) !important;
    color: #FFD08A !important;
    box-shadow: 0 0 0 4px rgba(245,162,61,.14) !important;
}

/* ==========================================================
   ACCIONES COMPACTAS EN GRILLAS
   Reemplaza grupos de botones por selector + aplicar.
   ========================================================== */
.grid-actions-cell {
    min-width: 230px;
}

.grid-action-combo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.grid-action-select {
    min-width: 160px;
    height: 42px !important;
    padding: 0 36px 0 12px !important;
    font-size: 13px !important;
    font-weight: 700;
    border-radius: 14px !important;
}

.grid-action-apply {
    height: 42px;
    min-width: 76px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.usuarios-grid .grid-action-combo .btn {
    margin: 0 !important;
}

body.dark-mode .grid-action-select {
    background-color: #0F2136 !important;
    color: #EAF5FF !important;
    border-color: rgba(158,202,255,.28) !important;
}

body.dark-mode .grid-action-select option {
    background: #0F2136;
    color: #EAF5FF;
}

@media (max-width: 900px) {
    .grid-actions-cell {
        min-width: 100%;
    }

    .grid-action-combo {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .grid-action-select,
    .grid-action-apply {
        width: 100%;
    }
}

/* ==========================================================
   Footer institucional y permisos agrupados por módulo
   ========================================================== */
.ga-footer-dev {
    margin-top: 3px;
    color: #4E6680;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .015em;
}

.permission-module-card {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #CFE1F1;
    border-radius: 20px;
    background: #FFFFFF;
    box-shadow: 0 8px 20px rgba(9, 94, 186, .045);
}

.permission-module-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #E2EEF8;
}

.permission-module-kicker {
    display: inline-flex;
    margin-bottom: 5px;
    color: #5E748C;
    font-size: .75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.permission-module-header h3 {
    margin: 0 0 4px;
    color: #064A92;
    font-size: 1rem;
    font-weight: 900;
}

.permission-module-header p {
    margin: 0;
    color: #60758E;
    line-height: 1.45;
    font-size: .9rem;
}

.permission-module-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid #F5C982;
    background: #FFF3DF;
    color: #8C4C00;
    font-size: .75rem;
    font-weight: 900;
    white-space: nowrap;
}

.permission-module-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
}

.permission-option-card {
    min-height: 74px;
    padding: 12px 13px;
    border-radius: 16px;
    border: 1px solid #D7E6F4;
    background: #F8FCFF;
    transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.permission-option-card:hover {
    transform: translateY(-1px);
    border-color: #BBD6F0;
    background: #EAF4FD;
    box-shadow: 0 10px 20px rgba(9, 94, 186, .06);
}

.permission-option {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #074785;
    font-weight: 900;
}

.permission-option input[type="checkbox"] {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    accent-color: #095EBA;
}

.permission-option label {
    cursor: pointer;
}

.permission-option-card small {
    display: block;
    margin: 7px 0 0 26px;
    color: #60758E;
    line-height: 1.35;
    font-size: .78rem;
}

body.dark-mode .ga-footer-dev,
body.ga-dark .ga-footer-dev,
html[data-theme="dark"] .ga-footer-dev {
    color: #9ECAFF !important;
}

body.dark-mode .permission-module-card,
body.ga-dark .permission-module-card,
html[data-theme="dark"] .permission-module-card {
    background: #0F1D30 !important;
    border-color: rgba(158, 202, 255, .20) !important;
    box-shadow: 0 14px 28px rgba(0, 0, 0, .18) !important;
}

body.dark-mode .permission-module-header,
body.ga-dark .permission-module-header,
html[data-theme="dark"] .permission-module-header {
    border-bottom-color: rgba(158, 202, 255, .16) !important;
}

body.dark-mode .permission-module-kicker,
body.ga-dark .permission-module-kicker,
html[data-theme="dark"] .permission-module-kicker {
    color: #9ECAFF !important;
}

body.dark-mode .permission-module-header h3,
body.ga-dark .permission-module-header h3,
html[data-theme="dark"] .permission-module-header h3,
body.dark-mode .permission-option,
body.ga-dark .permission-option,
html[data-theme="dark"] .permission-option {
    color: #EAF5FF !important;
}

body.dark-mode .permission-module-header p,
body.ga-dark .permission-module-header p,
html[data-theme="dark"] .permission-module-header p,
body.dark-mode .permission-option-card small,
body.ga-dark .permission-option-card small,
html[data-theme="dark"] .permission-option-card small {
    color: #C9DAEC !important;
}

body.dark-mode .permission-module-count,
body.ga-dark .permission-module-count,
html[data-theme="dark"] .permission-module-count {
    background: rgba(245, 162, 61, .16) !important;
    color: #FFD79C !important;
    border-color: rgba(245, 162, 61, .34) !important;
}

body.dark-mode .permission-option-card,
body.ga-dark .permission-option-card,
html[data-theme="dark"] .permission-option-card {
    background: #132337 !important;
    border-color: rgba(158, 202, 255, .18) !important;
}

body.dark-mode .permission-option-card:hover,
body.ga-dark .permission-option-card:hover,
html[data-theme="dark"] .permission-option-card:hover {
    background: #203A5B !important;
    border-color: rgba(245, 162, 61, .34) !important;
}

body.dark-mode .permission-option input[type="checkbox"],
body.ga-dark .permission-option input[type="checkbox"],
html[data-theme="dark"] .permission-option input[type="checkbox"] {
    accent-color: #7CB8F7 !important;
}

@media (max-width: 760px) {
    .permission-module-header {
        flex-direction: column;
    }

    .permission-module-list {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   Asignación de grupos desde Usuarios
   ========================================================== */
.user-group-checks-wrap {
    padding: 12px;
    border: 1px solid #D7E6F4;
    border-radius: 18px;
    background: #F8FCFF;
}

.user-group-checks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.user-group-checks input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #095EBA;
    margin-right: 8px;
    vertical-align: middle;
}

.user-group-checks label {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #D7E6F4;
    border-radius: 14px;
    background: #FFFFFF;
    color: #074785;
    font-weight: 900;
    cursor: pointer;
}

body.dark-mode .user-group-checks-wrap,
body.ga-dark .user-group-checks-wrap,
html[data-theme="dark"] .user-group-checks-wrap {
    background: #0F1D30 !important;
    border-color: rgba(158, 202, 255, .20) !important;
}

body.dark-mode .user-group-checks label,
body.ga-dark .user-group-checks label,
html[data-theme="dark"] .user-group-checks label {
    background: #132640 !important;
    border-color: rgba(158, 202, 255, .20) !important;
    color: #EAF5FF !important;
}


.user-group-checks {
    list-style: none;
    margin: 0;
    padding: 0;
}

.user-group-checks li {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #D7E6F4;
    border-radius: 14px;
    background: #FFFFFF;
}

.user-group-checks li label {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

body.dark-mode .user-group-checks li,
body.ga-dark .user-group-checks li,
html[data-theme="dark"] .user-group-checks li {
    background: #132640 !important;
    border-color: rgba(158, 202, 255, .20) !important;
}

/* ==========================================================
   Inicio.aspx - dashboard general modular de la intranet
   Alcance: solo clases usadas por la pantalla Inicio.aspx.
   ========================================================== */
.ga-home-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 148px;
}

.ga-home-hero-text {
    max-width: 780px;
}

.ga-home-hero-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 210px;
    padding: 18px 20px;
}

.ga-home-hero-brand img {
    display: block;
    width: min(210px, 100%);
    height: auto;
}

.ga-home-section {
    margin-bottom: 22px;
}

.ga-beta-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin: -6px 0 22px;
    border: 1px solid #F3C27D;
    border-left: 5px solid var(--ga-orange);
    border-radius: 18px;
    background: #FFF8EF;
    color: #334155;
    box-shadow: 0 8px 18px rgba(245, 162, 61, .08);
}

.ga-beta-badge {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: #FFFFFF;
    border: 1px solid #F3C27D;
    color: var(--ga-orange-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ga-beta-banner p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #4B5563;
}

.ga-home-panel .section-title-row,
.ga-home-modules-section .section-title-row,
.ga-home-quick-panel .section-title-row,
.ga-home-news-section .section-title-row {
    margin-bottom: 18px;
}

.ga-home-panel .section-title-row h2,
.ga-home-modules-section .section-title-row h2,
.ga-home-quick-panel .section-title-row h2,
.ga-home-news-section .section-title-row h2 {
    margin: 0;
    color: var(--ga-blue-dark);
    font-size: 22px;
    letter-spacing: -.03em;
}

.ga-home-panel .section-title-row p,
.ga-home-modules-section .section-title-row p,
.ga-home-quick-panel .section-title-row p {
    margin: 6px 0 0;
    color: var(--ga-muted);
}

.ga-home-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.ga-home-stat-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 126px;
    padding: 18px;
    border: 1px solid var(--ga-border);
    border-radius: 20px;
    background: #FFFFFF;
}

.ga-home-round-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    font-size: 24px;
    font-weight: 900;
}

.ga-home-icon-blue { background: rgba(9,94,186,.10); color: var(--ga-blue); }
.ga-home-icon-orange { background: rgba(245,162,61,.16); color: var(--ga-orange-dark); }
.ga-home-icon-green { background: rgba(21,128,61,.12); color: var(--ga-success); }
.ga-home-icon-purple { background: rgba(124,58,237,.12); color: #6D28D9; }
.ga-home-icon-teal { background: rgba(15,118,110,.12); color: #0F766E; }

.ga-home-stat-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ga-home-stat-body strong {
    color: var(--ga-blue);
    font-size: 27px;
    line-height: 1;
    letter-spacing: -.04em;
}

.ga-home-stat-body span {
    color: var(--ga-blue-dark);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
}

.ga-home-stat-body a,
.ga-home-muted-action {
    margin-top: 8px;
    color: var(--ga-blue);
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}

.ga-home-muted-action {
    color: var(--ga-muted);
}

.ga-home-module-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.ga-home-module-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 305px;
    padding: 22px 16px 16px;
    border: 1px solid var(--ga-border);
    border-radius: 20px;
    background: #FFFFFF;
    text-align: center;
}

.ga-home-module-card h3 {
    margin: 14px 0 8px;
    color: var(--ga-blue-dark);
    font-size: 18px;
    line-height: 1.2;
}

.ga-home-module-card p {
    flex: 1;
    margin: 0 0 14px;
    color: var(--ga-muted);
    font-size: 14px;
    line-height: 1.48;
}

.ga-home-module-card.module-soon {
    background: #F8FAFC;
}

.ga-home-module-card.module-soon h3,
.ga-home-module-card.module-soon p {
    opacity: .86;
}

.ga-home-module-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 38px;
    margin-top: 12px;
    padding: 8px 12px;
    border: 1px solid var(--ga-blue);
    border-radius: 10px;
    color: var(--ga-blue-dark);
    background: #FFFFFF;
    font-weight: 850;
    text-decoration: none;
}

.ga-home-module-button:hover {
    background: #F4F9FE;
}

.ga-home-module-button-disabled {
    border-color: var(--ga-border);
    color: var(--ga-muted);
    background: #F8FAFC;
}

.ga-home-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.ga-home-quick-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 72px;
    padding: 14px 12px;
    border: 1px solid var(--ga-border);
    border-radius: 16px;
    background: #F8FBFF;
    color: var(--ga-blue-dark);
    text-align: center;
    text-decoration: none;
}

.ga-home-quick-link span {
    color: var(--ga-blue);
    font-size: 21px;
    line-height: 1;
}

.ga-home-quick-link strong {
    color: var(--ga-blue-dark);
    font-size: 13.5px;
    line-height: 1.25;
}

.ga-home-quick-link:hover {
    border-color: rgba(9,94,186,.32);
    background: #FFFFFF;
}

.ga-home-admin-summary {
    margin-top: 16px;
}

.ga-home-news-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 22px;
}

.ga-home-empty-news,
.ga-home-activity-card {
    min-height: 190px;
    padding: 20px;
    border: 1px solid var(--ga-border);
    border-radius: 18px;
    background: #FFFFFF;
}

.ga-home-empty-news {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.ga-home-empty-news h3,
.ga-home-activity-card h3 {
    margin: 0 0 8px;
    color: var(--ga-blue-dark);
    font-size: 17px;
}

.ga-home-empty-news p {
    margin: 0 0 14px;
    color: var(--ga-muted);
    line-height: 1.45;
}

.ga-home-disabled-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border: 1px solid var(--ga-border);
    border-radius: 10px;
    color: var(--ga-blue-dark);
    font-weight: 850;
    background: #F8FAFC;
}

.ga-home-activity-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ga-home-activity-list li {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    color: var(--ga-muted);
    font-size: 14px;
}

.ga-home-activity-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #F4F9FE;
    color: var(--ga-blue);
}

.ga-home-activity-list strong {
    color: var(--ga-blue-dark);
    font-size: 13px;
    text-align: right;
}

body.dark-mode .ga-home-stat-card,
body.dark-mode .ga-home-module-card,
body.dark-mode .ga-home-empty-news,
body.dark-mode .ga-home-activity-card {
    background: #111827 !important;
    border-color: rgba(96,165,250,.22) !important;
}

body.dark-mode .ga-home-module-card.module-soon,
body.dark-mode .ga-home-quick-link,
body.dark-mode .ga-home-disabled-link,
body.dark-mode .ga-home-module-button-disabled {
    background: #0F172A !important;
    border-color: rgba(148,163,184,.24) !important;
}

body.dark-mode .ga-home-panel .section-title-row h2,
body.dark-mode .ga-home-modules-section .section-title-row h2,
body.dark-mode .ga-home-quick-panel .section-title-row h2,
body.dark-mode .ga-home-news-section .section-title-row h2,
body.dark-mode .ga-home-module-card h3,
body.dark-mode .ga-home-empty-news h3,
body.dark-mode .ga-home-activity-card h3,
body.dark-mode .ga-home-stat-body span,
body.dark-mode .ga-home-quick-link strong,
body.dark-mode .ga-home-activity-list strong,
body.dark-mode .ga-home-disabled-link {
    color: #D7E9FF !important;
}

body.dark-mode .ga-home-panel .section-title-row p,
body.dark-mode .ga-home-modules-section .section-title-row p,
body.dark-mode .ga-home-quick-panel .section-title-row p,
body.dark-mode .ga-home-module-card p,
body.dark-mode .ga-home-empty-news p,
body.dark-mode .ga-home-activity-list li,
body.dark-mode .ga-home-muted-action {
    color: #B6C4D6 !important;
}

body.dark-mode .ga-home-module-button {
    background: #132337 !important;
    color: #D7E9FF !important;
    border-color: rgba(96,165,250,.42) !important;
}

@media (max-width: 1180px) {
    .ga-home-stats-grid,
    .ga-home-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .ga-home-hero {
        align-items: flex-start;
    }

    .ga-home-hero-brand {
        display: none;
    }

    .ga-home-news-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .ga-beta-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .ga-home-stats-grid,
    .ga-home-module-grid,
    .ga-home-quick-grid {
        grid-template-columns: 1fr;
    }

    .ga-home-stat-card,
    .ga-home-empty-news {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .ga-home-activity-list li {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .ga-home-activity-list strong {
        grid-column: 2;
        text-align: left;
    }
}

/* ==========================================================
   Pulido Usuarios y Grupos - administración modular
   Alcance: Usuarios.aspx y GruposUsuarios.aspx
   ========================================================== */
.ga-admin-title-row {
    align-items: center;
}

.ga-admin-filter-card,
.ga-admin-list-card,
.ga-admin-edit-panel {
    position: relative;
}

.ga-list-heading {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(40, 116, 196, .12);
}

.ga-list-heading h2 {
    margin: 3px 0 4px;
    color: var(--ga-blue-dark, #095EBA);
    font-size: 20px;
}

.ga-list-heading p {
    margin: 0;
    color: var(--ga-muted, #64748B);
    font-size: 13.5px;
    line-height: 1.45;
}

.ga-admin-filter-row {
    align-items: end;
}

.ga-filter-actions {
    min-width: 190px;
}

.ga-form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 14px;
}

.ga-polished-grid .ga-user-main-cell,
.ga-polished-grid .ga-user-access-cell,
.ga-polished-grid .ga-group-main-cell {
    display: grid;
    gap: 4px;
    min-width: 170px;
}

.ga-polished-grid .ga-user-main-cell strong,
.ga-polished-grid .ga-user-access-cell strong,
.ga-polished-grid .ga-group-main-cell strong {
    color: var(--ga-blue-dark, #095EBA);
    font-weight: 950;
}

.ga-polished-grid .ga-user-main-cell small,
.ga-polished-grid .ga-user-access-cell small,
.ga-polished-grid .ga-group-main-cell small,
.ga-date-muted {
    color: var(--ga-muted, #64748B);
    font-size: 12.5px;
    font-weight: 700;
}

.ga-chip-list,
.ga-permission-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.ga-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #EAF4FF;
    color: #095EBA;
    border: 1px solid rgba(9, 94, 186, .18);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.ga-chip-muted {
    background: #F1F5F9;
    color: #64748B;
    border-color: rgba(100, 116, 139, .18);
}

.ga-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
    white-space: nowrap;
}

.ga-status-ok {
    background: #DCFCE7;
    color: #166534;
    border: 1px solid rgba(22, 101, 52, .16);
}

.ga-status-info {
    background: #EAF4FF;
    color: #095EBA;
    border: 1px solid rgba(9, 94, 186, .18);
}

.ga-status-warning {
    background: #FFF7E8;
    color: #9A5A08;
    border: 1px solid rgba(245, 162, 61, .32);
}

.ga-status-muted {
    background: #F1F5F9;
    color: #64748B;
    border: 1px solid rgba(100, 116, 139, .18);
}

.ga-group-users-cell {
    display: grid;
    gap: 8px;
    min-width: 160px;
}

.ga-integrantes-combo {
    min-width: 160px;
    height: 38px !important;
    font-size: 12.5px !important;
    font-weight: 800;
    border-radius: 12px !important;
}

.permission-module-side {
    display: grid;
    gap: 8px;
    justify-items: end;
    flex: 0 0 auto;
}

.permission-module-actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.permission-module-actions .btn-small {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
}

.ga-permission-summary {
    margin: 14px 0 8px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(9, 94, 186, .14);
    background: #F8FCFF;
    color: var(--ga-muted, #64748B);
    font-size: 13.5px;
}

.ga-permission-summary strong {
    color: var(--ga-blue-dark, #095EBA);
}

body.dark-mode .ga-list-heading,
body.ga-dark .ga-list-heading,
html[data-theme="dark"] .ga-list-heading {
    border-bottom-color: rgba(158, 202, 255, .16) !important;
}

body.dark-mode .ga-list-heading h2,
body.ga-dark .ga-list-heading h2,
html[data-theme="dark"] .ga-list-heading h2,
body.dark-mode .ga-polished-grid .ga-user-main-cell strong,
body.dark-mode .ga-polished-grid .ga-user-access-cell strong,
body.dark-mode .ga-polished-grid .ga-group-main-cell strong,
body.ga-dark .ga-polished-grid .ga-user-main-cell strong,
body.ga-dark .ga-polished-grid .ga-user-access-cell strong,
body.ga-dark .ga-polished-grid .ga-group-main-cell strong,
html[data-theme="dark"] .ga-polished-grid .ga-user-main-cell strong,
html[data-theme="dark"] .ga-polished-grid .ga-user-access-cell strong,
html[data-theme="dark"] .ga-polished-grid .ga-group-main-cell strong,
body.dark-mode .ga-permission-summary strong,
body.ga-dark .ga-permission-summary strong,
html[data-theme="dark"] .ga-permission-summary strong {
    color: #9ECAFF !important;
}

body.dark-mode .ga-list-heading p,
body.dark-mode .ga-polished-grid .ga-user-main-cell small,
body.dark-mode .ga-polished-grid .ga-user-access-cell small,
body.dark-mode .ga-polished-grid .ga-group-main-cell small,
body.dark-mode .ga-date-muted,
body.dark-mode .ga-permission-summary,
body.ga-dark .ga-list-heading p,
body.ga-dark .ga-polished-grid .ga-user-main-cell small,
body.ga-dark .ga-polished-grid .ga-user-access-cell small,
body.ga-dark .ga-polished-grid .ga-group-main-cell small,
body.ga-dark .ga-date-muted,
body.ga-dark .ga-permission-summary,
html[data-theme="dark"] .ga-list-heading p,
html[data-theme="dark"] .ga-polished-grid .ga-user-main-cell small,
html[data-theme="dark"] .ga-polished-grid .ga-user-access-cell small,
html[data-theme="dark"] .ga-polished-grid .ga-group-main-cell small,
html[data-theme="dark"] .ga-date-muted,
html[data-theme="dark"] .ga-permission-summary {
    color: #C7D6EA !important;
}

body.dark-mode .ga-chip,
body.ga-dark .ga-chip,
html[data-theme="dark"] .ga-chip {
    background: rgba(84, 160, 255, .16) !important;
    color: #CFE6FF !important;
    border-color: rgba(84, 160, 255, .25) !important;
}

body.dark-mode .ga-chip-muted,
body.ga-dark .ga-chip-muted,
html[data-theme="dark"] .ga-chip-muted,
body.dark-mode .ga-status-muted,
body.ga-dark .ga-status-muted,
html[data-theme="dark"] .ga-status-muted {
    background: rgba(148, 163, 184, .15) !important;
    color: #CBD5E1 !important;
    border-color: rgba(203, 213, 225, .18) !important;
}

body.dark-mode .ga-status-ok,
body.ga-dark .ga-status-ok,
html[data-theme="dark"] .ga-status-ok {
    background: rgba(34, 197, 94, .14) !important;
    color: #BBF7D0 !important;
    border-color: rgba(34, 197, 94, .24) !important;
}

body.dark-mode .ga-status-info,
body.ga-dark .ga-status-info,
html[data-theme="dark"] .ga-status-info {
    background: rgba(84, 160, 255, .16) !important;
    color: #CFE6FF !important;
    border-color: rgba(84, 160, 255, .25) !important;
}

body.dark-mode .ga-status-warning,
body.ga-dark .ga-status-warning,
html[data-theme="dark"] .ga-status-warning {
    background: rgba(245, 162, 61, .15) !important;
    color: #FFD79C !important;
    border-color: rgba(245, 162, 61, .28) !important;
}

body.dark-mode .ga-permission-summary,
body.ga-dark .ga-permission-summary,
html[data-theme="dark"] .ga-permission-summary {
    background: #0F1D30 !important;
    border-color: rgba(158, 202, 255, .20) !important;
}

@media (max-width: 920px) {
    .ga-admin-title-row {
        align-items: stretch;
    }

    .ga-admin-title-row .btn {
        width: 100%;
        justify-content: center;
    }

    .permission-module-side {
        justify-items: start;
        width: 100%;
    }

    .permission-module-actions {
        justify-content: flex-start;
    }
}

body.dark-mode .ga-beta-banner {
    background: #2A241B;
    border-color: #8A5A1F;
    border-left-color: var(--ga-orange);
    color: #E5E7EB;
    box-shadow: none;
}

body.dark-mode .ga-beta-badge {
    background: #1F2937;
    border-color: #8A5A1F;
    color: #FDBA74;
}

body.dark-mode .ga-beta-banner p {
    color: #D1D5DB;
}


/* Modo mantenimiento corporativo */
.maintenance-body {
    margin: 0;
    min-height: 100vh;
    background: #F4F7FB;
    color: #1F2937;
    font-family: "Segoe UI", Arial, sans-serif;
}
.maintenance-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 18px;
    box-sizing: border-box;
}
.maintenance-card {
    width: min(620px, 100%);
    background: #FFFFFF;
    border: 1px solid #D9E5F2;
    border-radius: 24px;
    box-shadow: 0 18px 42px rgba(15, 42, 79, .14);
    padding: 34px;
    text-align: center;
}
.maintenance-logo-wrap {
    width: 128px;
    height: 72px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
}
.maintenance-logo-wrap img { max-width: 110px; max-height: 52px; object-fit: contain; }
.maintenance-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: #FFF7ED;
    color: #B45309;
    border: 1px solid #FED7AA;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.maintenance-card h1 {
    margin: 16px 0 10px;
    color: #0F2A4F;
    font-size: clamp(28px, 4vw, 38px);
}
.maintenance-message {
    margin: 0 auto 22px;
    max-width: 500px;
    color: #475569;
    line-height: 1.65;
    font-size: 16px;
}
.maintenance-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 24px;
}
.maintenance-info-grid div {
    border: 1px solid #E2E8F0;
    background: #F8FAFC;
    border-radius: 16px;
    padding: 14px;
    text-align: left;
}
.maintenance-info-grid strong { display: block; color: #0F2A4F; margin-bottom: 4px; }
.maintenance-info-grid span { color: #64748B; font-size: 13px; }
.maintenance-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.maintenance-admin-note {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #BFDBFE;
    background: #EFF6FF;
    color: #1D4ED8;
    text-align: left;
}
.maintenance-admin-note strong,
.maintenance-admin-note span,
.maintenance-admin-note a { display: block; }
.maintenance-admin-note span { margin: 4px 0 8px; color: #315B8F; }
.maintenance-footer {
    margin-top: 18px;
    color: #64748B;
    font-size: 13px;
    text-align: center;
}
.ga-maintenance-admin-card { padding: 24px; }
.ga-maintenance-admin-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}
.ga-maintenance-admin-head h2 { margin: 4px 0 6px; color: var(--ga-blue); }
.ga-maintenance-admin-head p { margin: 0; color: var(--ga-muted); }
.ga-maintenance-status {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
    font-size: 12px;
    border: 1px solid transparent;
}
.ga-maintenance-status-on { background: #FFF7ED; color: #B45309; border-color: #FED7AA; }
.ga-maintenance-status-off { background: #ECFDF5; color: #047857; border-color: #BBF7D0; }
.ga-maintenance-alert {
    border: 1px solid #D9E5F2;
    background: #F8FAFC;
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 18px;
}
.ga-maintenance-alert strong { color: var(--ga-blue); }
.ga-maintenance-alert p { margin: 4px 0 0; color: var(--ga-muted); }
.ga-maintenance-form-row { margin-bottom: 14px; }
.ga-maintenance-switch-panel { max-width: 720px; }
body.dark-mode .maintenance-body { background: #0F172A; color: #E5E7EB; }
body.dark-mode .ga-maintenance-admin-card,
body.dark-mode .ga-maintenance-alert { background: #111827; border-color: #334155; }
body.dark-mode .ga-maintenance-admin-head h2,
body.dark-mode .ga-maintenance-alert strong { color: #E5E7EB; }
body.dark-mode .ga-maintenance-admin-head p,
body.dark-mode .ga-maintenance-alert p { color: #CBD5E1; }
@media (max-width: 640px) {
    .maintenance-card { padding: 26px 20px; border-radius: 20px; }
    .maintenance-info-grid { grid-template-columns: 1fr; }
    .ga-maintenance-admin-head { flex-direction: column; }
}

/* ==========================================================
   Corrección responsive: scroll táctil en celular y tablet
   - Evita que el layout lateral o contenedores con alto fijo bloqueen
     el desplazamiento vertical del documento.
   - Mantiene el menú lateral móvil con scroll propio cuando está abierto.
   ========================================================== */
html,
body {
    min-height: 100% !important;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    touch-action: pan-y pinch-zoom !important;
    overscroll-behavior-y: auto;
}

body.app-body,
body.login-body,
body.maintenance-body {
    position: static !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

#form1 {
    min-height: 100vh;
    height: auto !important;
    overflow: visible !important;
}

.main-shell {
    min-height: 100vh;
    height: auto !important;
    overflow: visible !important;
}

.main-shell .container,
.container {
    height: auto !important;
    overflow: visible !important;
}

@supports (min-height: 100dvh) {
    #form1,
    .main-shell {
        min-height: 100dvh;
    }
}

@media (max-width: 980px) {
    html,
    body,
    body.app-body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        touch-action: pan-y pinch-zoom !important;
    }

    .main-shell {
        margin-left: 0 !important;
        min-height: 100vh;
        height: auto !important;
        overflow: visible !important;
    }

    @supports (min-height: 100dvh) {
        .main-shell {
            min-height: 100dvh;
        }
    }

    .main-shell .container,
    .container {
        overflow: visible !important;
        padding-bottom: 90px;
    }

    .mobile-topbar {
        position: sticky;
        top: 0;
        z-index: 80;
        touch-action: auto !important;
    }

    .sidebar {
        height: 100vh;
        max-height: 100vh;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y !important;
    }

    @supports (height: 100dvh) {
        .sidebar {
            height: 100dvh;
            max-height: 100dvh;
        }
    }

    .sidebar-checkbox:not(:checked) ~ .sidebar-overlay {
        display: none !important;
        pointer-events: none !important;
    }

    .sidebar-checkbox:checked ~ .sidebar-overlay {
        display: block !important;
        pointer-events: auto !important;
        touch-action: auto !important;
    }
}

@media (max-width: 640px) {
    .login-body {
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }

    .login-body > form.login-shell,
    .login-body > form {
        margin: 0 auto;
        height: auto !important;
        overflow: visible !important;
    }
}

/* Historial de correos del sistema */
.ga-status-error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid rgba(153, 27, 27, .18);
}

.ga-inline-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 9px 12px;
    border-radius: 14px;
    background: #F8FCFF;
    border: 1px solid rgba(9, 94, 186, .14);
    color: #64748B;
    font-size: 13px;
    font-weight: 800;
}

body.dark-mode .ga-status-error,
body.ga-dark .ga-status-error,
html[data-theme="dark"] .ga-status-error {
    background: rgba(239, 68, 68, .14) !important;
    color: #FECACA !important;
    border-color: rgba(239, 68, 68, .24) !important;
}

body.dark-mode .ga-inline-summary,
body.ga-dark .ga-inline-summary,
html[data-theme="dark"] .ga-inline-summary {
    background: #0F1D30 !important;
    border-color: rgba(158, 202, 255, .20) !important;
    color: #C7D6EA !important;
}
