/* ============================================================================
 * Artimedia_CBA - Identidad Corporativa Oficial Banco de Instructores SENA
 * Paleta: Midnight Navy (#07101f / #0f1d32 / #132238) + Emerald SENA (#007a33 / #39A900)
 * + Royal Blue Pill (#1565c0) + Amber Active (#f59e0b)
 * ============================================================================ */

:root {
    --bi-bg: #07101f;
    --bi-surface: #0f1d32;
    --bi-card: #132238;
    --bi-card-hover: #172a45;
    --bi-border: rgba(148, 163, 184, 0.18);
    --bi-border-strong: rgba(148, 163, 184, 0.28);
    --sena-emerald: #007a33;
    --sena-emerald-mid: #06893a;
    --sena-green: #39A900;
    --sena-green-bright: #22c55e;
    --sena-royal: #1565c0;
    --sena-royal-dark: #0d47a1;
    --sena-sky: #60a5fa;
    --sena-amber: #f59e0b;
    --sena-orange: #ea580c;
    --sena-navy: #00324D;
    --text-white: #ffffff;
    --text-light: #e2e8f0;
    --text-muted: #94a3b8;
    --radius-xl: 20px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

html {
    overflow-x: hidden;
    max-width: 100%;
    -webkit-text-size-adjust: 100%;
}

body.app-body,
body.sena-bi-page,
body.portal-body {
    background: radial-gradient(circle at 12% 8%, rgba(57, 169, 0, 0.08), transparent 38%),
                radial-gradient(circle at 88% 92%, rgba(21, 101, 192, 0.12), transparent 44%),
                var(--bi-bg);
    color: var(--text-light);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100%;
}

img, video, canvas, svg {
    max-width: 100%;
}

body.portal-body {
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

/* ==================== NAVBAR FLOTANTE OSCURA (BANCO DE INSTRUCTORES) ==================== */
.bi-nav-wrap {
    padding: 0.75rem 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 1040;
    background: linear-gradient(180deg, rgba(7, 16, 31, 0.96) 70%, rgba(7, 16, 31, 0) 100%);
}

.sena-navbar {
    background: var(--bi-surface);
    border: 1px solid var(--bi-border);
    border-radius: 18px;
    padding: 0.55rem 1.25rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    max-width: 1360px;
    margin: 0 auto;
}

.sena-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff !important;
    text-decoration: none;
    padding: 0;
}

.sena-navbar .brand-logo {
    height: 36px;
    width: auto;
    filter: brightness(1.15) saturate(1.25);
}

.brand-sep {
    width: 1px;
    height: 28px;
    background: rgba(148, 163, 184, 0.25);
}

.sena-navbar .brand-title {
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff;
    display: block;
}

.sena-navbar .brand-title span {
    color: var(--sena-green-bright);
}

.sena-navbar .brand-sub {
    font-size: 0.66rem;
    font-weight: 500;
    color: var(--text-muted);
    display: block;
}

/* Pastilla azul rey del rol activo (exacta a "Instructores" en la captura) */
.bi-role-pill-main {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: #ffffff !important;
    border-radius: 50px;
    padding: 0.42rem 1.05rem;
    font-size: 0.84rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(21, 101, 192, 0.4);
}

.sena-nav-link {
    color: #cbd5e1 !important;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.45rem 0.9rem !important;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: var(--transition);
    text-decoration: none;
}

.sena-nav-link:hover,
.sena-nav-link.active {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff !important;
}

.sena-navbar .dropdown-menu {
    background: var(--bi-card);
    border: 1px solid var(--bi-border-strong);
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
    padding: 0.45rem;
    margin-top: 0.5rem;
}

.sena-navbar .dropdown-item {
    border-radius: 9px;
    font-size: 0.84rem;
    font-weight: 500;
    padding: 0.52rem 0.85rem;
    color: #e2e8f0;
}

.sena-navbar .dropdown-item:hover,
.sena-navbar .dropdown-item.active {
    background: rgba(57, 169, 0, 0.18);
    color: #86efac;
    font-weight: 600;
}

.sena-navbar .dropdown-divider {
    border-color: var(--bi-border);
}

.sena-navbar .dropdown-item i {
    width: 18px;
    color: var(--sena-green-bright);
}

/* Botones circulares derecha (exactos a la captura: campana, descarga verde, manual, iniciales) */
.bi-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.bi-circle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bi-card);
    border: 1px solid var(--bi-border-strong);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
}

.bi-circle-btn:hover {
    background: #1f3150;
    color: #ffffff;
    border-color: rgba(96, 165, 250, 0.5);
}

.bi-circle-btn.btn-circle-green {
    background: #16a34a;
    border-color: #22c55e;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
}

.bi-circle-btn.btn-circle-green:hover {
    background: #15803d;
    transform: translateY(-1px);
}

.bi-avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #162844;
    border: 1px solid rgba(96, 165, 250, 0.35);
    color: var(--sena-sky);
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
}

.sena-btn-exit {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
}

.sena-btn-exit:hover {
    background: rgba(239, 68, 68, 0.28);
    color: #ffffff !important;
}

/* ==================== HERO BANNER VERDE ESMERALDA SENA (EXACTO A LA CAPTURA) ==================== */
.bi-hero-wrap {
    max-width: 1360px;
    width: 100%;
    margin: 1rem auto 0;
    padding: 0 1.25rem;
}

.bi-hero-banner {
    position: relative;
    background: linear-gradient(125deg, #007331 0%, #06893a 52%, #00662a 100%);
    border-radius: 22px;
    padding: 2.3rem 2.6rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.bi-hero-banner::before {
    content: "";
    position: absolute;
    right: 12%;
    top: -45%;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    border: 42px solid rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.bi-hero-banner::after {
    content: "";
    position: absolute;
    left: 22%;
    bottom: -60%;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    pointer-events: none;
}

.bi-hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.bi-hero-greeting {
    color: #ffffff;
    font-size: 2.15rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin: 0 0 0.35rem 0;
    line-height: 1.12;
}

.bi-hero-lead {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.35rem 0;
}

.bi-hero-desc {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.9rem;
    margin: 0 0 1.15rem 0;
    line-height: 1.45;
}

.bi-conv-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #ffffff;
    padding: 0.42rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(6px);
}

.bi-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: #0f1d32;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50px;
    padding: 0.68rem 1.45rem;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(7, 16, 31, 0.35);
}

.bi-hero-cta:hover {
    background: #172b47;
    transform: translateY(-2px);
}

.bi-hero-visual {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bi-hero-emblem {
    background: rgba(15, 29, 50, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.35rem 1.75rem;
    text-align: center;
    min-width: 240px;
}

.bi-hero-emblem img {
    height: 58px;
    filter: brightness(0) invert(1);
    margin-bottom: 0.65rem;
}

@media (max-width: 900px) {
    .bi-hero-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.6rem 1.35rem;
    }
    .bi-hero-greeting { font-size: 1.6rem; }
    .bi-hero-visual { width: 100%; }
    .bi-hero-emblem { width: 100%; }
}

/* ==================== CONTENIDO PRINCIPAL OSCURO ==================== */
.app-container {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    padding: 1.6rem 1.25rem 2.75rem;
    flex: 1;
}

.page-title {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.3px;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 1.4rem;
}

/* ==================== TARJETAS KPI OSCURAS ==================== */
.kpi-card {
    background: var(--bi-surface);
    border-radius: 16px;
    padding: 1.2rem 1.3rem;
    border: 1px solid var(--bi-border);
    border-left: 4px solid var(--sena-sky);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    height: 100%;
}

.kpi-card:hover {
    transform: translateY(-2px);
    background: var(--bi-card);
    border-color: var(--bi-border-strong);
}

.kpi-card.kpi-navy   { border-left-color: #60a5fa; }
.kpi-card.kpi-blue   { border-left-color: #38bdf8; }
.kpi-card.kpi-orange { border-left-color: #f59e0b; }
.kpi-card.kpi-green  { border-left-color: #22c55e; }

.kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.18rem;
    flex-shrink: 0;
}

.kpi-navy .kpi-icon   { background: rgba(59, 130, 246, 0.18); color: #60a5fa; }
.kpi-blue .kpi-icon   { background: rgba(56, 189, 248, 0.18); color: #38bdf8; }
.kpi-orange .kpi-icon { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }
.kpi-green .kpi-icon  { background: rgba(34, 197, 94, 0.18); color: #4ade80; }

.kpi-value {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.1;
    color: #ffffff;
}

.kpi-blue .kpi-value   { color: #38bdf8; }
.kpi-orange .kpi-value { color: #fbbf24; }
.kpi-green .kpi-value  { color: #4ade80; }

.kpi-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 0.22rem;
}

/* ==================== CARDS, TABLAS, BOTONES, FORMULARIOS OSCUROS ==================== */
.card-sena,
.form-section-card,
.enroll-context-bar,
.enroll-action-bar {
    background: var(--bi-surface);
    border: 1px solid var(--bi-border);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    color: var(--text-light);
}

.card-sena {
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.card-sena .card-header {
    background: var(--bi-card);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.95rem 1.3rem;
    border-bottom: 1px solid var(--bi-border);
}

.card-sena .card-body {
    background: var(--bi-surface);
    color: var(--text-light);
}

/* Tablas oscuras de alto contraste */
.table-sena,
.table {
    --bs-table-bg: transparent;
    --bs-table-color: #e2e8f0;
    --bs-table-border-color: rgba(148, 163, 184, 0.15);
    --bs-table-hover-bg: rgba(96, 165, 250, 0.08);
    --bs-table-hover-color: #ffffff;
    color: #e2e8f0;
}

.table-sena thead th {
    background: #132238;
    color: #94a3b8;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.45px;
    font-weight: 700;
    border-bottom: 1px solid var(--bi-border-strong);
    padding: 0.85rem 0.75rem;
    white-space: nowrap;
}

.table-sena tbody td {
    vertical-align: middle;
    font-size: 0.85rem;
    padding: 0.8rem 0.75rem;
    color: #e2e8f0;
}

/* Sobrescribir utilidades claras de Bootstrap en tema oscuro para mantener contraste perfecto */
.app-body .bg-light,
.app-body .bg-white {
    background-color: #132238 !important;
    color: #e2e8f0 !important;
    border-color: var(--bi-border) !important;
}

.app-body .text-dark { color: #f8fafc !important; }
.app-body .text-muted,
.app-body .text-secondary { color: #94a3b8 !important; }
.app-body code { color: #86efac; background: rgba(34, 197, 94, 0.1); padding: 0.1rem 0.35rem; border-radius: 6px; }
.app-body .border { border-color: var(--bi-border) !important; }
.app-body .border-bottom,
.app-body .border-top { border-color: var(--bi-border) !important; }

/* Inputs y Selects oscuros legibles */
.form-control,
.form-select,
.clean-input,
.clean-select {
    background-color: #0b1628;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 10px;
    font-size: 0.86rem;
    color: #f8fafc;
    padding: 0.54rem 0.85rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus,
.clean-input:focus,
.clean-select:focus {
    background-color: #0e1c33;
    border-color: #22c55e;
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(34, 197, 94, 0.2);
}

.form-control[readonly],
.clean-input[readonly],
.form-control:disabled,
.form-select:disabled,
.clean-input:disabled,
.clean-select:disabled {
    background-color: #132238 !important;
    color: #cbd5e1 !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    opacity: 0.88 !important;
    cursor: not-allowed;
}

.form-select option {
    background-color: #0f1d32;
    color: #f8fafc;
}

.form-control::placeholder {
    text-transform: none !important;
    color: #64748b !important;
    font-size: 0.81rem !important;
    font-weight: 400 !important;
    opacity: 0.9 !important;
}

/* Modales oscuros */
.modal-content {
    background: var(--bi-surface);
    color: #e2e8f0;
    border: 1px solid var(--bi-border-strong);
    border-radius: 18px;
}

.modal-header.modal-sena {
    background: linear-gradient(135deg, #007a33 0%, #06893a 100%);
    color: #ffffff;
    border-bottom: none;
}

.modal-header.modal-navy {
    background: #132238;
    color: #ffffff;
    border-bottom: 1px solid var(--bi-border);
}

.modal-footer {
    border-top: 1px solid var(--bi-border);
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Botones */
.btn-sena {
    background: linear-gradient(135deg, #16a34a 0%, #007a33 100%);
    color: #ffffff;
    border: none;
    font-weight: 700;
    border-radius: 50px;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.32);
}

.btn-sena:hover {
    background: linear-gradient(135deg, #15803d 0%, #00662a 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(34, 197, 94, 0.42);
}

.btn-navy {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: #ffffff;
    border: none;
    font-weight: 700;
    border-radius: 50px;
    transition: var(--transition);
}

.btn-navy:hover {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-orange {
    background: #d97706;
    color: #ffffff;
    border: none;
    font-weight: 700;
    border-radius: 50px;
}

.btn-orange:hover {
    background: #b45309;
    color: #ffffff;
}

.btn-light {
    background: #1a2d4a;
    color: #e2e8f0;
    border-color: var(--bi-border-strong);
}

.btn-light:hover {
    background: #22395c;
    color: #ffffff;
}

.app-footer {
    background: var(--bi-surface);
    border-top: 1px solid var(--bi-border);
    color: var(--text-muted);
    padding: 1.15rem 1.5rem;
    text-align: center;
    font-size: 0.8rem;
}

.app-footer strong {
    color: #ffffff;
}

/* ==================== BADGES DE ESTADO ==================== */
.badge-status-approved   { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); font-weight: 700; padding: 0.4em 0.8em; border-radius: 50px; }
.badge-status-review     { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); font-weight: 700; padding: 0.4em 0.8em; border-radius: 50px; }
.badge-status-observed   { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); font-weight: 700; padding: 0.4em 0.8em; border-radius: 50px; }
.badge-status-rejected   { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); font-weight: 700; padding: 0.4em 0.8em; border-radius: 50px; }
.badge-status-progress   { background: rgba(234, 179, 8, 0.18); color: #fde047; border: 1px solid rgba(234, 179, 8, 0.35); font-weight: 700; padding: 0.4em 0.8em; border-radius: 50px; }
.badge-status-registered { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.35); font-weight: 700; padding: 0.4em 0.8em; border-radius: 50px; }

/* ==================== MATRÍCULA ESTUDIANTIL & STEPPER OSCURO ==================== */
.enroll-shell {
    max-width: 1000px;
    margin: 0 auto;
}

.enroll-context-bar {
    padding: 1rem 1.35rem;
    margin-bottom: 1.4rem;
}

.modern-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    margin: 0 auto 1.75rem;
    padding: 0 0.5rem;
}

.modern-stepper::before {
    content: "";
    position: absolute;
    top: 17px;
    left: 42px;
    right: 42px;
    height: 3px;
    background: #233754;
    z-index: 0;
}

.m-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #64748b;
    flex: 1;
    transition: var(--transition);
}

.m-step-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bi-card);
    border: 2px solid #475569;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
    transition: var(--transition);
}

.m-step.completed .m-step-dot {
    background: #22c55e;
    border-color: #22c55e;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
}

.m-step.active .m-step-dot {
    background: var(--bi-card);
    border: 2.5px solid #f59e0b;
    color: #fbbf24;
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.16);
}

.m-step.orange .m-step-dot {
    background: var(--bi-card);
    border: 2.5px solid #f97316;
    color: #fb923c;
    box-shadow: 0 0 0 5px rgba(249, 115, 22, 0.18);
}

.m-step-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.25;
}

.m-step.active .m-step-title { color: #ffffff; font-weight: 700; }
.m-step.completed .m-step-title { color: #4ade80; }
.m-step.orange .m-step-title { color: #fb923c; font-weight: 700; }
.modern-stepper.all-done::before { background: linear-gradient(90deg, #22c55e, #4ade80); }

.form-section-card {
    padding: 1.45rem 1.65rem;
    margin-bottom: 1.15rem;
}

.form-section-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.15rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--bi-border);
}

.section-badge-num {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    flex-shrink: 0;
}

.sec-navy   .section-badge-num { background: rgba(59, 130, 246, 0.18); color: #60a5fa; }
.sec-blue   .section-badge-num { background: rgba(56, 189, 248, 0.18); color: #38bdf8; }
.sec-orange .section-badge-num { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }
.sec-green  .section-badge-num { background: rgba(34, 197, 94, 0.18); color: #4ade80; }

.form-section-title { font-size: 0.98rem; font-weight: 700; color: #ffffff; margin: 0; }
.form-section-desc  { font-size: 0.76rem; color: var(--text-muted); margin: 0.12rem 0 0; }
.clean-label { font-size: 0.76rem; font-weight: 600; color: #cbd5e1; margin-bottom: 0.34rem; display: block; }
.clean-label .req { color: #f87171; margin-left: 2px; }

.enroll-action-bar {
    padding: 1rem 1.4rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Slots de documentos oscuros */
.doc-slot {
    border: 1px solid var(--bi-border);
    border-radius: 14px;
    padding: 1.05rem 1.25rem;
    background: var(--bi-card);
    margin-bottom: 0.85rem;
    transition: var(--transition);
}
.doc-slot.unlocked { border-color: rgba(96, 165, 250, 0.45); background: #152742; }
.doc-slot.uploaded { border-color: rgba(34, 197, 94, 0.45); background: rgba(22, 163, 74, 0.08); }
.doc-slot.rejected { border-color: rgba(239, 68, 68, 0.55); background: rgba(239, 68, 68, 0.09); }
.doc-slot.locked   { opacity: 0.55; background: #0d182b; }

/* Tarjetas de grupo seleccionables oscuras */
.grupo-card {
    border: 1.5px solid var(--bi-border-strong);
    border-radius: 16px;
    padding: 1.2rem 1.25rem;
    background: var(--bi-card);
    color: #e2e8f0;
    cursor: pointer;
    transition: var(--transition);
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.grupo-card .grupo-badge {
    white-space: normal;
    text-align: left;
    line-height: 1.25;
    max-width: 100%;
}
.grupo-card:hover {
    border-color: #22c55e;
    background: #172b47;
    transform: translateY(-2px);
}
.grupo-card.selected {
    border-color: #22c55e;
    background: rgba(22, 163, 74, 0.14);
    box-shadow: 0 8px 22px rgba(34, 197, 94, 0.22);
}
.grupo-card .check-mark {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 0.72rem;
}
.grupo-card.selected .check-mark {
    background: #22c55e;
    border-color: #22c55e;
    color: #ffffff;
}

/* ==================== RUTA DE PROCESO ESTILO BANCO DE INSTRUCTORES SENA ==================== */
.sena-bi-alert {
    background: var(--bi-card);
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-left: 4px solid #22c55e;
    color: #e2e8f0;
    border-radius: 14px;
    padding: 0.95rem 2.5rem 0.95rem 1.15rem;
    position: relative;
}

.sena-bi-alert .btn-close {
    position: absolute;
    top: 0.95rem;
    right: 0.95rem;
    font-size: 0.72rem;
}

.sena-bi-shell {
    background: var(--bi-surface);
    color: #f8fafc;
    border-radius: 22px;
    padding: 2rem 2.1rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.38);
    border: 1px solid var(--bi-border);
}

.sena-bi-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sena-bi-heading { font-size: 1.5rem; font-weight: 800; color: #ffffff; margin: 0; letter-spacing: -0.3px; }

.sena-bi-tabs {
    background: #17253d;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 50px;
    padding: 0.28rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.sena-bi-tab {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.42rem 1rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    transition: var(--transition);
}
.sena-bi-tab.active { background: #1f3150; color: #ffffff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.sena-bi-tab:hover  { color: #ffffff; }
.sena-bi-count { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; border-radius: 50px; padding: 0.08rem 0.48rem; font-size: 0.72rem; font-weight: 700; }

.sena-bi-card {
    background: var(--bi-card);
    border: 1px solid var(--bi-border-strong);
    border-radius: 16px;
    padding: 1.75rem 1.85rem 1.35rem;
}

.sena-bi-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.85rem; }

.sena-bi-logo-box {
    width: 48px; height: 48px; border-radius: 12px;
    background: #0b1628; border: 1px solid rgba(148, 163, 184, 0.25);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sena-bi-logo-box img { height: 28px; width: auto; filter: brightness(1.15) saturate(1.25); }

.sena-bi-pill { display: inline-block; padding: 0.22rem 0.78rem; border-radius: 50px; font-size: 0.74rem; font-weight: 700; margin-bottom: 0.55rem; }
.sena-bi-pill.pill-blue  { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.sena-bi-pill.pill-green { background: rgba(34, 197, 94, 0.22); color: #4ade80; }
.sena-bi-pill.pill-amber { background: rgba(245, 158, 11, 0.22); color: #fbbf24; }
.sena-bi-pill.pill-red   { background: rgba(239, 68, 68, 0.22); color: #f87171; }

.sena-bi-title { color: #ffffff; font-size: 1.28rem; font-weight: 800; margin: 0 0 0.3rem 0; line-height: 1.25; }
.sena-bi-meta  { color: #94a3b8; font-size: 0.86rem; line-height: 1.5; margin: 0; }
.sena-bi-date  { color: #94a3b8; font-size: 0.8rem; white-space: nowrap; }

.sena-bi-route { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0.5rem 0 1.85rem; position: relative; }
.bi-node { position: relative; padding-right: 1rem; }
.bi-node-line { position: absolute; top: 13px; left: 28px; right: 0; height: 3px; background: #475569; z-index: 0; }
.bi-node:last-child .bi-node-line { display: none; }
.bi-node.done .bi-node-line { background: #22c55e; }
.bi-node.yellow .bi-node-line { background: #eab308; }
.bi-node.current .bi-node-line { background: #f97316; }

.bi-node-dot {
    position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin-bottom: 0.75rem;
    font-size: 0.78rem; background: var(--bi-card); border: 2px solid #64748b; color: transparent;
}
.bi-node.done .bi-node-dot { background: #22c55e; border-color: #22c55e; color: #ffffff; box-shadow: 0 0 12px rgba(34, 197, 94, 0.35); }
.bi-node.current .bi-node-dot { background: var(--bi-card); border: 2.5px solid #f97316; color: #fb923c; box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.22); }
.bi-node.current .bi-node-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #f97316; }
.bi-node.yellow .bi-node-dot { background: #eab308; border: 2.5px solid #facc15; color: #0f172a; box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.24); }
.bi-node.warn .bi-node-dot { background: var(--bi-card); border: 2.5px solid #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2); }
.bi-node.warn .bi-node-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }

.bi-node-title { font-size: 0.88rem; font-weight: 700; color: #e2e8f0; margin-bottom: 0.15rem; }
.bi-node.pending .bi-node-title { color: #94a3b8; }
.bi-node-sub { font-size: 0.78rem; color: #94a3b8; }
.bi-node.done .bi-node-sub { color: #4ade80; font-weight: 600; }
.bi-node.current .bi-node-sub { color: #fb923c; font-weight: 600; }
.bi-node.yellow .bi-node-sub { color: #facc15; font-weight: 600; }
.bi-node.warn .bi-node-sub { color: #f87171; font-weight: 600; }

.sena-bi-divider { border: none; border-top: 1px solid rgba(148, 163, 184, 0.16); margin: 0 0 1.15rem 0; }
.sena-bi-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.sena-bi-status-msg { color: #94a3b8; font-size: 0.85rem; display: flex; align-items: center; gap: 0.55rem; }
.sena-bi-detail-link { color: #60a5fa; font-size: 0.88rem; font-weight: 700; text-decoration: none; background: transparent; border: none; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; }
.sena-bi-detail-link:hover { color: #93c5fd; }
.sena-bi-detail-panel { margin-top: 1.35rem; padding-top: 1.35rem; border-top: 1px dashed rgba(148, 163, 184, 0.22); }
.sena-bi-info-box { background: var(--bi-surface); border: 1px solid var(--bi-border); border-radius: 12px; padding: 1.1rem 1.2rem; height: 100%; font-size: 0.82rem; color: #cbd5e1; }
.sena-bi-info-box strong { color: #ffffff; }

/* ==================== PORTAL / LOGIN / ACCESO ESTUDIANTES OSCURO ==================== */
.portal-wrapper { width: 100%; max-width: 1080px; position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.portal-header { text-align: center; margin-bottom: 1.85rem; }
.logo-row {
    display: inline-flex; align-items: center; gap: 1.15rem;
    background: var(--bi-surface); padding: 0.65rem 1.6rem; border-radius: 50px;
    border: 1px solid var(--bi-border-strong); margin-bottom: 1.1rem;
}
.logo-sena { height: 42px; width: auto; filter: brightness(1.15) saturate(1.25); }
.header-divider { width: 1px; height: 28px; background: rgba(148, 163, 184, 0.3); }
.header-sena-label { color: #ffffff; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; text-align: left; line-height: 1.25; }
.header-sena-label span { color: var(--sena-green-bright); display: block; font-size: 0.74rem; font-weight: 500; }
.portal-title { color: #ffffff; font-size: 2.25rem; font-weight: 900; letter-spacing: -0.6px; margin-bottom: 0.4rem; }
.portal-title span { color: var(--sena-green-bright); }
.portal-subtitle { color: #94a3b8; font-size: 0.95rem; max-width: 680px; margin: 0 auto; line-height: 1.5; }

.modules-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; width: 100%; }
@media (max-width: 820px) { .modules-grid { grid-template-columns: 1fr; max-width: 500px; } }

.module-card {
    background: var(--bi-surface);
    border: 1px solid var(--bi-border-strong);
    border-radius: 20px;
    padding: 2rem 1.9rem;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.4);
    display: flex; flex-direction: column; justify-content: space-between;
    transition: var(--transition);
    border-top: 4px solid var(--sena-green-bright);
    color: #e2e8f0;
}
.module-card:hover { transform: translateY(-4px); background: var(--bi-card); }
.card-sena-green { border-top-color: #22c55e; }
.card-sena-blue  { border-top-color: #1976d2; }

.module-badge {
    align-self: flex-start; padding: 0.32rem 0.85rem; border-radius: 50px;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    margin-bottom: 1.05rem; display: inline-flex; align-items: center; gap: 0.4rem;
}
.badge-green { background: rgba(34, 197, 94, 0.18); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.35); }
.badge-blue  { background: rgba(59, 130, 246, 0.18); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.35); }

.icon-circle {
    width: 56px; height: 56px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.55rem; margin-bottom: 1rem; color: #fff;
}
.icon-green { background: linear-gradient(135deg, #007a33 0%, #16a34a 100%); }
.icon-navy  { background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%); }

.module-name { font-size: 1.3rem; font-weight: 800; color: #ffffff; margin-bottom: 0.3rem; }
.module-tagline { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; margin-bottom: 0.75rem; }
.module-features { list-style: none; padding: 0; margin: 0 0 1.5rem 0; display: flex; flex-direction: column; gap: 0.5rem; }
.module-features li { font-size: 0.84rem; color: #cbd5e1; display: flex; align-items: center; gap: 0.6rem; }

.btn-enter {
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    width: 100%; padding: 0.84rem 1.2rem; border-radius: 50px;
    font-size: 0.92rem; font-weight: 700; text-decoration: none;
    transition: var(--transition); border: none; cursor: pointer;
}
.btn-enter-green { background: linear-gradient(135deg, #16a34a 0%, #007a33 100%); color: #fff; box-shadow: 0 6px 16px rgba(22, 163, 74, 0.35); }
.btn-enter-green:hover { background: linear-gradient(135deg, #15803d 0%, #00662a 100%); transform: translateY(-2px); color: #fff; }
.btn-enter-navy  { background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%); color: #fff; box-shadow: 0 6px 16px rgba(21, 101, 192, 0.35); }
.btn-enter-navy:hover  { background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%); transform: translateY(-2px); color: #fff; }

.portal-footer { margin-top: 2rem; text-align: center; color: #64748b; font-size: 0.8rem; line-height: 1.55; }
.portal-footer strong { color: #cbd5e1; }

@media (max-width: 768px) {
    .sena-bi-shell { padding: 1.35rem 1.15rem; }
    .sena-bi-card { padding: 1.25rem; }
    .sena-bi-route { grid-template-columns: 1fr; gap: 1.1rem; }
    .bi-node-line { display: none; }
    .modern-stepper::before { left: 20px; right: 20px; }
    .m-step-title { font-size: 0.66rem; }
    .form-section-card { padding: 1.15rem 1rem; }
}

/* ==================== DATATABLES 2 · TEMA OSCURO SENA CBA ==================== */
.card-sena .dt-container,
.form-section-card .dt-container {
    padding: 1rem 1.25rem 1.1rem;
    color: #e2e8f0;
}

.dt-container .row.mt-2 {
    margin-top: 0.65rem !important;
    margin-bottom: 0.5rem !important;
}

.dt-container .dt-layout-start,
.dt-container .dt-layout-end {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.dt-container .dt-length label,
.dt-container .dt-search label {
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0;
}

.dt-container .dt-length select.form-select,
.dt-container .dt-search input.form-control {
    background-color: #0b1628 !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
    color: #f1f5f9 !important;
    border-radius: 10px !important;
    font-size: 0.82rem !important;
    padding: 0.36rem 0.75rem !important;
    min-height: 36px;
}

.dt-container .dt-length select.form-select {
    padding-right: 1.9rem !important;
    width: auto;
    cursor: pointer;
}

.dt-container .dt-search input.form-control {
    min-width: 220px;
}

.dt-container .dt-search input.form-control::placeholder {
    color: rgba(148, 163, 184, 0.6) !important;
}

.dt-container .dt-length select.form-select:focus,
.dt-container .dt-search input.form-control:focus {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2) !important;
    outline: none;
}

/* Botones de exportación (Excel, CSV, PDF, Imprimir) */
.dt-container .dt-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.dt-container .dt-buttons .btn-group {
    gap: 0.35rem;
}

.dt-container .dt-buttons .dt-btn-sena {
    background: #132238 !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
    border-radius: 9px !important;
    font-size: 0.76rem !important;
    font-weight: 600 !important;
    padding: 0.35rem 0.72rem !important;
    transition: var(--transition);
}

.dt-container .dt-buttons .dt-btn-sena:hover {
    background: #1d3252 !important;
    color: #ffffff !important;
    border-color: rgba(96, 165, 250, 0.5) !important;
}

.dt-container .dt-buttons .dt-btn-excel {
    color: #4ade80 !important;
    border-color: rgba(34, 197, 94, 0.35) !important;
}
.dt-container .dt-buttons .dt-btn-excel:hover {
    background: rgba(22, 163, 74, 0.24) !important;
    border-color: #22c55e !important;
    color: #bbf7d0 !important;
}

.dt-container .dt-buttons .dt-btn-pdf {
    color: #fca5a5 !important;
    border-color: rgba(239, 68, 68, 0.32) !important;
}
.dt-container .dt-buttons .dt-btn-pdf:hover {
    background: rgba(239, 68, 68, 0.22) !important;
    border-color: #ef4444 !important;
    color: #fecaca !important;
}

/* Tabla interna DataTables */
table.dataTable {
    border-collapse: collapse !important;
    width: 100% !important;
    margin-top: 0.45rem !important;
    margin-bottom: 0.45rem !important;
}

table.dataTable > thead > tr > th,
table.dataTable > thead > tr > td {
    background-color: #0b1628 !important;
    color: #94a3b8 !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22) !important;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

table.dataTable > tbody > tr > td {
    background-color: transparent !important;
    color: #e2e8f0 !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
    vertical-align: middle;
}

table.dataTable.table-hover > tbody > tr:hover > * {
    background-color: rgba(34, 197, 94, 0.06) !important;
    box-shadow: none !important;
}

table.dataTable td.dt-empty {
    text-align: center;
    padding: 2rem 1rem !important;
    color: #94a3b8 !important;
    font-size: 0.88rem;
}

/* Información inferior y Paginación */
.dt-container .dt-info {
    color: #94a3b8;
    font-size: 0.8rem;
    padding-top: 0.35rem;
}

.dt-container .dt-paging .pagination {
    gap: 0.28rem;
    margin-bottom: 0;
}

.dt-container .dt-paging .page-link {
    background-color: #0b1628;
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #cbd5e1;
    border-radius: 9px !important;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 34px;
    text-align: center;
    padding: 0.32rem 0.62rem;
    transition: var(--transition);
}

.dt-container .dt-paging .page-link:hover {
    background-color: #162844;
    border-color: rgba(96, 165, 250, 0.45);
    color: #ffffff;
}

.dt-container .dt-paging .page-item.active .page-link {
    background: linear-gradient(135deg, #16a34a 0%, #007a33 100%);
    border-color: #22c55e;
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(22, 163, 74, 0.35);
}

.dt-container .dt-paging .page-item.disabled .page-link {
    background-color: rgba(11, 22, 40, 0.55);
    border-color: rgba(148, 163, 184, 0.12);
    color: #475569;
}

@media (max-width: 768px) {
    .dt-container .dt-search input.form-control {
        min-width: 0;
        width: 100%;
    }
}

/* ==================== SISTEMA RESPONSIVE INTEGRAL (MÓVIL, TABLET Y ESCRITORIO) ==================== */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.chart-box-responsive {
    position: relative;
    width: 100%;
    min-height: 240px;
}

.sena-navbar .navbar-toggler {
    padding: 0.4rem 0.65rem;
    border-radius: 10px;
    border-color: rgba(148, 163, 184, 0.35) !important;
    background: rgba(19, 34, 56, 0.75);
}

.sena-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(34, 197, 94, 0.25);
}

/* Tablets y pantallas medianas (<= 991.98px) */
@media (max-width: 991.98px) {
    .bi-nav-wrap {
        padding: 0.55rem 0.75rem 0;
    }

    .sena-navbar {
        border-radius: 14px;
        padding: 0.5rem 0.85rem;
    }

    .sena-navbar .navbar-collapse {
        margin-top: 0.65rem;
        padding-top: 0.65rem;
        border-top: 1px solid var(--bi-border);
    }

    .sena-navbar .navbar-nav {
        gap: 0.25rem !important;
        width: 100%;
    }

    .sena-nav-link {
        width: 100%;
        padding: 0.6rem 0.9rem !important;
        border-radius: 12px;
        min-height: 42px;
    }

    .sena-navbar .dropdown-menu {
        background: #0b1628;
        border: 1px solid var(--bi-border);
        box-shadow: none;
        margin-top: 0.25rem;
        margin-bottom: 0.35rem;
    }

    .sena-navbar .dropdown-item {
        padding: 0.6rem 0.9rem;
    }

    .bi-nav-actions {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--bi-border);
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .bi-nav-actions .sena-btn-exit {
        margin-left: auto;
        padding: 0.45rem 1.05rem;
    }

    .bi-hero-wrap {
        padding: 0 0.75rem;
        margin-top: 0.75rem;
    }

    .app-container {
        padding: 1.15rem 0.85rem 2.25rem;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .sena-bi-shell {
        padding: 1.4rem 1.15rem;
        border-radius: 18px;
    }
}

/* Móviles grandes y tablets pequeñas (<= 767.98px) */
@media (max-width: 767.98px) {
    body.portal-body {
        justify-content: flex-start;
        padding: 1rem 0.75rem 1.75rem;
    }

    .portal-header {
        margin-bottom: 1.25rem;
    }

    .portal-title {
        font-size: clamp(1.6rem, 6.5vw, 2.05rem);
    }

    .portal-subtitle {
        font-size: 0.86rem;
    }

    .logo-row {
        padding: 0.5rem 1rem;
        gap: 0.75rem;
        max-width: 100%;
    }

    .logo-sena {
        height: 34px;
    }

    .header-sena-label {
        font-size: 0.76rem;
    }

    .module-card {
        padding: 1.45rem 1.25rem;
        border-radius: 16px;
    }

    .module-name {
        font-size: 1.15rem;
    }

    .bi-hero-banner {
        border-radius: 16px;
        padding: 1.35rem 1.15rem;
        gap: 1.1rem;
    }

    .bi-hero-greeting {
        font-size: clamp(1.35rem, 5.5vw, 1.75rem);
    }

    .bi-hero-lead {
        font-size: 0.94rem;
    }

    .bi-hero-desc {
        font-size: 0.84rem;
        margin-bottom: 0.9rem;
    }

    /* Timeline vertical limpia en proceso.php */
    .sena-bi-route {
        grid-template-columns: 1fr;
        gap: 0;
        padding-left: 0.25rem;
    }

    .sena-bi-route .bi-node {
        display: grid;
        grid-template-columns: 36px 1fr;
        grid-template-rows: auto auto;
        column-gap: 0.75rem;
        padding: 0 0 1.25rem 0;
    }

    .sena-bi-route .bi-node:last-child {
        padding-bottom: 0;
    }

    .sena-bi-route .bi-node-dot {
        grid-row: 1 / span 2;
        margin-bottom: 0;
        align-self: start;
    }

    .sena-bi-route .bi-node-line {
        display: block !important;
        position: absolute;
        top: 28px;
        left: 13px;
        bottom: 0;
        right: auto;
        width: 3px;
        height: auto;
    }

    .sena-bi-route .bi-node:last-child .bi-node-line {
        display: none !important;
    }

    .sena-bi-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .sena-bi-heading {
        font-size: 1.25rem;
    }

    .sena-bi-tabs {
        width: 100%;
        flex-wrap: wrap;
        border-radius: 14px;
        padding: 0.35rem;
        justify-content: flex-start;
    }

    .sena-bi-tab {
        font-size: 0.76rem;
        padding: 0.38rem 0.75rem;
    }

    .sena-bi-card {
        padding: 1.15rem 1rem;
    }

    .sena-bi-card-head {
        margin-bottom: 1.25rem;
    }

    .sena-bi-title {
        font-size: 1.08rem;
    }

    .sena-bi-date {
        white-space: normal;
        font-size: 0.76rem;
    }

    .sena-bi-footer {
        flex-direction: column;
        align-items: stretch;
    }

    /* DataTables 2 compacto y apilado en móvil */
    .card-sena .dt-container,
    .form-section-card .dt-container {
        padding: 0.85rem 0.75rem;
    }

    .dt-container .dt-layout-row {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.55rem;
    }

    .dt-container .dt-layout-cell {
        width: 100%;
        justify-content: space-between;
    }

    .dt-container .dt-layout-start,
    .dt-container .dt-layout-end {
        width: 100%;
        justify-content: space-between;
    }

    .dt-container .dt-search,
    .dt-container .dt-search label {
        width: 100%;
    }

    .dt-container .dt-buttons {
        width: 100%;
    }

    .dt-container .dt-buttons .dt-btn-sena {
        flex: 1 1 auto;
        text-align: center;
        padding: 0.38rem 0.55rem !important;
    }

    .dt-container .dt-paging .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .dt-container .dt-info {
        text-align: center;
        width: 100%;
    }

    .table-sena thead th,
    .table-sena tbody td {
        padding: 0.62rem 0.55rem;
        font-size: 0.8rem;
    }

    .card-sena .card-header {
        padding: 0.8rem 0.95rem;
        font-size: 0.86rem;
    }

    .card-sena .card-body {
        padding: 1rem !important;
    }

    .enroll-context-bar {
        padding: 0.9rem 1rem;
    }

    .enroll-action-bar {
        padding: 0.95rem 1rem;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .enroll-action-bar .btn {
        width: 100%;
    }

    .doc-slot {
        padding: 0.9rem 0.95rem;
    }

    .form-section-head {
        gap: 0.65rem;
        margin-bottom: 0.95rem;
        padding-bottom: 0.7rem;
    }

    .form-section-title {
        font-size: 0.92rem;
    }

    /* Modales cómodos en móvil */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        border-radius: 15px;
    }

    .modal-body.p-4,
    .modal-body {
        padding: 1rem !important;
    }

    .modal-footer {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .modal-footer .btn {
        flex: 1 1 auto;
    }
}

/* Teléfonos pequeños (<= 575.98px) */
@media (max-width: 575.98px) {
    .sena-navbar .brand-logo {
        height: 30px;
    }

    .sena-navbar .brand-title {
        font-size: 0.88rem;
    }

    .sena-navbar .brand-sub {
        font-size: 0.6rem;
    }

    .app-container {
        padding: 0.95rem 0.65rem 1.85rem;
    }

    .bi-nav-wrap,
    .bi-hero-wrap {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .bi-hero-cta {
        width: 100%;
        justify-content: center;
    }

    /* KPIs de 2 columnas (col-6) súper legibles en teléfonos */
    .kpi-card {
        padding: 0.85rem 0.78rem;
        gap: 0.65rem;
        border-radius: 13px;
    }

    .kpi-card > div:last-child {
        min-width: 0;
    }

    .kpi-icon {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    .kpi-value {
        font-size: 1.25rem;
    }

    .kpi-label {
        font-size: 0.64rem;
        line-height: 1.25;
        word-break: break-word;
    }

    /* Stepper de 5 pasos en teléfonos de 360px */
    .modern-stepper {
        padding: 0;
        margin-bottom: 1.25rem;
    }

    .modern-stepper::before {
        top: 14px;
        left: 18px;
        right: 18px;
    }

    .m-step-dot {
        width: 28px;
        height: 28px;
        font-size: 0.72rem;
        margin-bottom: 0.35rem;
    }

    .m-step-title {
        font-size: 0.6rem;
        padding: 0 2px;
    }

    .page-title {
        font-size: 1.15rem;
    }

    .page-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    .app-footer {
        padding: 0.9rem 0.75rem;
        font-size: 0.73rem;
        line-height: 1.5;
    }

    .sena-bi-alert {
        padding: 0.8rem 2.2rem 0.8rem 0.9rem;
        font-size: 0.82rem;
    }
}

/* Mejoras táctiles para dispositivos sin hover (smartphones y tablets) */
@media (pointer: coarse) {
    .form-control,
    .form-select,
    .clean-input,
    .clean-select {
        min-height: 42px;
        font-size: 16px;
    }

    .form-control-sm,
    .form-select-sm {
        min-height: 38px;
        font-size: 0.9rem;
    }

    .form-check-input {
        width: 1.2em;
        height: 1.2em;
    }

    .btn-sm {
        min-height: 34px;
    }
}
