@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary:        #1a56db;
    --primary-dark:   #1240a0;
    --primary-light:  #3b82f6;
    --accent:         #0891b2;
    --accent-light:   #22d3ee;
    --success:        #10b981;
    --warning:        #f59e0b;
    --danger:         #ef4444;
    --bg:             #0f172a;
    --bg-2:           #0e2a50;
    --card:           #1e293b;
    --card-bg:        #1e293b;
    --card-border:    rgba(255,255,255,.08);
    --white:          #ffffff;
    --gray-400:       #94a3b8;
    --gray-500:       #64748b;
    --gray-600:       #475569;
    --text:           #f8fafc;
    --text-primary:   #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted:     #94a3b8;
    --radius:         14px;
    --shadow:         0 4px 24px rgba(0,0,0,.35);
    --transition:     all .22s cubic-bezier(.4,0,.2,1);
    --surface:        rgba(255,255,255,.04);
    --border:         rgba(255,255,255,.08);
}

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

html, body {
    height: 100%;
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* ── Background glow ─────────────────────────────────────── */
.bg-glow {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% -10%, rgba(26,86,219,.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 110%, rgba(8,145,178,.12) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

/* ── Header ──────────────────────────────────────────────── */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 66px;
    background: rgba(15,23,42,.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--card-border);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.app-logo {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--white);
    text-decoration: none;
    text-transform: uppercase;
}

.app-logo span {
    background: linear-gradient(90deg, var(--white), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .85rem;
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
    background: rgba(255,255,255,.07);
    color: var(--white);
}

.nav-item.active { color: var(--accent-light); }

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--card-border);
    border-radius: 40px;
    padding: .3rem .9rem .3rem .3rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.user-info { line-height: 1.2; }

.user-name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--white);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-badge {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .12rem .5rem;
    border-radius: 20px;
}

.badge-admin      { background: rgba(26,86,219,.2);  color: #93c5fd; }
.badge-instructor { background: rgba(8,145,178,.2);  color: #67e8f9; }
.badge-aprendiz   { background: rgba(16,185,129,.2); color: #6ee7b7; }

.btn-logout {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem 1rem;
    border-radius: 8px;
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(239,68,68,.2);
    color: #fca5a5;
    font-family: 'Outfit', sans-serif;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(239,68,68,.2);
    border-color: rgba(239,68,68,.4);
    color: #fff;
}

/* ── Main layout ─────────────────────────────────────────── */
.app-main {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem 4rem;
}

/* ── Welcome banner ──────────────────────────────────────── */
.welcome-banner {
    background: linear-gradient(135deg, rgba(26,86,219,.25) 0%, rgba(8,145,178,.18) 100%);
    border: 1px solid rgba(26,86,219,.3);
    border-radius: var(--radius);
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.welcome-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.welcome-text p {
    font-size: .9rem;
    color: var(--text-muted);
    margin-top: .25rem;
}

.welcome-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-light);
}

/* ── Stats row ───────────────────────────────────────────── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: rgba(255,255,255,.15);
    transform: translateY(-2px);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.blue   { background: rgba(26,86,219,.18);  color: #93c5fd; }
.stat-icon.cyan   { background: rgba(8,145,178,.18);  color: #67e8f9; }
.stat-icon.green  { background: rgba(16,185,129,.18); color: #6ee7b7; }
.stat-icon.amber  { background: rgba(245,158,11,.18); color: #fcd34d; }
.stat-icon.purple { background: rgba(139,92,246,.18); color: #c4b5fd; }
.stat-icon.red    { background: rgba(239,68,68,.18);  color: #fca5a5; }

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
}

.stat-label {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: .2rem;
}

/* ── Section title ───────────────────────────────────────── */
.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 1rem;
}

/* ── Cards grid ──────────────────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.cards-grid.grid-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.cards-grid.grid-1 { grid-template-columns: 1fr; }

/* ── Dashboard card ──────────────────────────────────────── */
.dash-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dash-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
    opacity: 0;
    transition: opacity .3s;
}

.dash-card:hover {
    border-color: rgba(255,255,255,.18);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.dash-card:hover::before { opacity: 1; }

.dash-card.blue::before  { background: var(--primary); }
.dash-card.cyan::before  { background: var(--accent); }
.dash-card.green::before { background: var(--success); }
.dash-card.amber::before { background: var(--warning); }
.dash-card.red::before   { background: var(--danger); }

/* ── Card FEATURED (admin) ───────────────────────────────── */
.dash-card--featured {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    background: linear-gradient(135deg, rgba(26,86,219,.22) 0%, rgba(8,145,178,.15) 100%);
    border-color: rgba(26,86,219,.4);
    padding: 2rem 2.5rem;
}

.dash-card--featured:hover {
    border-color: rgba(26,86,219,.65);
    box-shadow: 0 8px 32px rgba(26,86,219,.25);
}

.dash-card--featured .card-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: rgba(26,86,219,.25);
    border: 1px solid rgba(26,86,219,.35);
    flex-shrink: 0;
}

.dash-card--featured .card-body { flex: 1; }

.dash-card--featured .card-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-light);
    flex-shrink: 0;
}

.card-body { flex: 1; }

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: .3rem;
}

.card-desc {
    font-size: .85rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.card-arrow {
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
}

.dash-card:hover .card-arrow { color: var(--accent-light); transform: translateX(4px); }

.card-tag {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .75rem;
    font-weight: 600;
    padding: .2rem .6rem;
    border-radius: 20px;
    background: rgba(16,185,129,.15);
    color: #6ee7b7;
    margin-top: .5rem;
}

.card-tag.soon {
    background: rgba(100,116,139,.15);
    color: var(--gray-400);
}

/* ── Role sections ───────────────────────────────────────── */
.role-section { display: none; }
body.role-admin       .role-section.admin       { display: block; }
body.role-instructor  .role-section.instructor  { display: block; }
body.role-aprendiz    .role-section.aprendiz    { display: block; }

/* ── Toast ───────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.toast {
    padding: .85rem 1.25rem;
    border-radius: 12px;
    background: #1e293b;
    color: #fff;
    font-size: .88rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    opacity: 0;
    transform: translateX(110%);
    transition: all .3s cubic-bezier(.68,-.55,.265,1.55);
    min-width: 240px;
}

.toast.show { opacity: 1; transform: translateX(0); }
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger);  }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .app-main { padding: 1.5rem 1rem 3rem; }
    .header-nav { display: none; }
    .app-header { padding: 0 1rem; }
    .user-name { max-width: 100px; }
    .dash-card--featured { flex-direction: column; padding: 1.5rem; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr; }
    .cards-grid { grid-template-columns: 1fr; }
    .user-pill { padding: .3rem .6rem .3rem .3rem; }
    .btn-logout span { display: none; }
}

/* ── Ficha / Programa banner (aprendiz) ───────────────────── */
.ficha-banner {
    background: linear-gradient(135deg, rgba(6,182,212,.12) 0%, rgba(79,70,229,.12) 100%);
    border: 1px solid rgba(6,182,212,.25);
    border-radius: 18px;
    padding: 1.6rem 2rem;
    margin-bottom: .75rem;
    position: relative;
    overflow: hidden;
}
.ficha-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6,182,212,.06), rgba(79,70,229,.06));
    pointer-events: none;
}
.ficha-banner-programa {
    font-size: 1.55rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.02em;
    line-height: 1.2;
    margin-bottom: .6rem;
}
.ficha-banner-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .6rem;
}
.ficha-banner-num {
    font-size: .88rem;
    color: rgba(255,255,255,.75);
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 999px;
    padding: .28rem .75rem;
}
.ficha-banner-num strong {
    color: #22d3ee;
    font-weight: 800;
    font-size: 1rem;
}
.ficha-banner-jornada {
    font-size: .78rem;
    font-weight: 600;
    color: rgba(255,255,255,.6);
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    padding: .25rem .65rem;
    text-transform: capitalize;
}
.ficha-banner-estado {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-radius: 999px;
    padding: .22rem .6rem;
}
.ficha-banner-estado.activa   { background: rgba(16,185,129,.2); color: #6ee7b7; border: 1px solid rgba(16,185,129,.3); }
.ficha-banner-estado.inactiva { background: rgba(148,163,184,.1); color: #94a3b8; border: 1px solid rgba(148,163,184,.2); }
.ficha-banner-codigo {
    margin-top: .45rem;
    font-size: .75rem;
    color: rgba(255,255,255,.4);
    letter-spacing: .03em;
}

/* ── Modo día (light theme override) ─────────────────────── */
html[data-theme="light"] {
    --bg:             #f1f5f9;
    --bg-2:           #e0f2fe;
    --card:           #ffffff;
    --card-bg:        #ffffff;
    --card-border:    rgba(0,0,0,.1);
    --text:           #0f172a;
    --text-primary:   #0f172a;
    --text-secondary: #475569;
    --text-muted:     #64748b;
    --shadow:         0 4px 24px rgba(0,0,0,.10);
    --surface:        #ffffff;
    --border:         #e2e8f0;
}
html[data-theme="light"] body { background: var(--bg); color: var(--text); }
html[data-theme="light"] .bg-glow {
    background:
        radial-gradient(ellipse 80% 60% at 20% -10%, rgba(26,86,219,.07) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 110%, rgba(8,145,178,.05) 0%, transparent 55%);
}
html[data-theme="light"] .app-header {
    background: rgba(248,250,252,.92);
    border-bottom: 1px solid rgba(0,0,0,.08);
}
html[data-theme="light"] .app-logo span {
    background: linear-gradient(90deg, #0f172a, #0891b2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
html[data-theme="light"] .nav-item { color: #475569; }
html[data-theme="light"] .nav-item:hover,
html[data-theme="light"] .nav-item.active { background: rgba(0,0,0,.05); color: #0f172a; }
html[data-theme="light"] .nav-item.active { color: var(--accent); }
html[data-theme="light"] .user-pill {
    background: rgba(0,0,0,.05);
    border-color: rgba(0,0,0,.1);
}
html[data-theme="light"] .user-name { color: #0f172a; }
html[data-theme="light"] .stat-card { background: #fff; border-color: #e2e8f0; }
html[data-theme="light"] .stat-value { color: #0f172a; }
html[data-theme="light"] .stat-label { color: #64748b; }
html[data-theme="light"] .section-title { color: #64748b; }
html[data-theme="light"] .dash-card { background: #fff; border-color: #e2e8f0; }
html[data-theme="light"] .dash-card-title { color: #0f172a; }
html[data-theme="light"] .dash-card-sub   { color: #64748b; }
html[data-theme="light"] .ficha-banner {
    background: linear-gradient(135deg, rgba(6,182,212,.08) 0%, rgba(79,70,229,.08) 100%);
    border-color: rgba(6,182,212,.2);
}
html[data-theme="light"] .ficha-banner-programa { color: #0f172a; }
html[data-theme="light"] .ficha-banner-num      { color: #334155; background: rgba(0,0,0,.06); border-color: rgba(0,0,0,.1); }
html[data-theme="light"] .ficha-banner-jornada  { color: #475569; background: rgba(0,0,0,.04); border-color: rgba(0,0,0,.08); }
html[data-theme="light"] .ficha-banner-codigo   { color: #94a3b8; }

/* Íconos de stat en modo claro: más saturados y visibles */
html[data-theme="light"] .stat-icon.blue   { background: rgba(26,86,219,.12);  color: #1a56db; }
html[data-theme="light"] .stat-icon.cyan   { background: rgba(8,145,178,.12);  color: #0891b2; }
html[data-theme="light"] .stat-icon.green  { background: rgba(16,185,129,.12); color: #059669; }
html[data-theme="light"] .stat-icon.amber  { background: rgba(245,158,11,.12); color: #d97706; }
html[data-theme="light"] .stat-icon.purple { background: rgba(139,92,246,.12); color: #7c3aed; }
html[data-theme="light"] .stat-icon.red    { background: rgba(239,68,68,.12);  color: #dc2626; }

/* Hover de stat-card en modo claro */
html[data-theme="light"] .stat-card:hover { border-color: rgba(0,0,0,.18); }

/* Card icon en modo claro (dash-card featured) */
html[data-theme="light"] .dash-card--featured .card-icon { border-color: rgba(0,0,0,.1); }

/* Texto de Welcome en modo claro */
html[data-theme="light"] .welcome-text h1 { color: #0f172a; }
html[data-theme="light"] .welcome-text p  { color: #334155; }

/* Header en modo claro: íconos de control */
html[data-theme="light"] #theme-toggle-btn { color: rgba(15,23,42,.65); }

/* Textos de cards en modo claro (usan var(--white) que es blanco) */
html[data-theme="light"] .card-title        { color: #0f172a; }
html[data-theme="light"] .card-desc         { color: #475569; }
html[data-theme="light"] .card-arrow        { color: #94a3b8; }
html[data-theme="light"] .card-tag          { background: rgba(16,185,129,.12); color: #059669; }
html[data-theme="light"] .card-tag.soon     { background: rgba(100,116,139,.1);  color: #64748b; }
html[data-theme="light"] .section-divider   { color: #64748b; }
html[data-theme="light"] .section-title     { color: #64748b; }

/* Progress bar en modo claro */
html[data-theme="light"] .progress-bar-bg   { background: #e2e8f0; }

/* Dashboard aprendiz: cursos y actividades en modo claro */
html[data-theme="light"] .course-name       { color: #0f172a; }
html[data-theme="light"] .course-sub        { color: #64748b; }
html[data-theme="light"] .pct-label         { color: #0f172a; }

/* ════════════════════════════════════════════════════════
   Aprendiz — Fichas con cursos
════════════════════════════════════════════════════════ */
.apr-ficha-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.apr-ficha-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid var(--border);
}

.apr-ficha-num {
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -.01em;
}

.apr-ficha-prog {
    font-size: .82rem;
    color: var(--text-muted);
    margin-top: .15rem;
}

.apr-ficha-inst {
    font-size: .76rem;
    color: #818cf8;
    margin-top: .25rem;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.apr-ficha-estado {
    font-size: .7rem;
    font-weight: 700;
    padding: .18rem .55rem;
    border-radius: 20px;
    text-transform: capitalize;
}
.apr-ficha-estado.activa   { background: rgba(16,185,129,.15); color: #34d399; border: 1px solid rgba(16,185,129,.25); }
.apr-ficha-estado.inactiva { background: rgba(148,163,184,.1); color: #94a3b8; border: 1px solid rgba(148,163,184,.2); }
.apr-ficha-jornada {
    font-size: .7rem;
    color: var(--text-muted);
    background: rgba(255,255,255,.05);
    padding: .18rem .5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

/* Buscador de cursos por ficha */
.apr-ficha-search-wrap {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .45rem .75rem;
    margin-bottom: .75rem;
}
.apr-ficha-search {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: .83rem;
    color: var(--text);
    font-family: inherit;
}
.apr-ficha-search::placeholder { color: var(--text-muted); }
.apr-ficha-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: .1rem;
    line-height: 1;
    display: flex;
    align-items: center;
}
.apr-ficha-search-clear:hover { color: var(--text); }

/* Lista de cursos */
.apr-ficha-cursos {
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.apr-ficha-curso-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 12px;
    padding: .85rem 1rem;
    text-decoration: none;
    color: var(--text);
    transition: all .18s ease;
}
.apr-ficha-curso-row:hover {
    background: rgba(255,255,255,.06);
    border-color: rgba(6,182,212,.35);
    transform: translateX(3px);
}

.apr-curso-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.apr-curso-body {
    flex: 1;
    min-width: 0;
}

.apr-curso-titulo {
    font-weight: 700;
    font-size: .9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: .15rem;
}

.apr-curso-meta {
    font-size: .76rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .3rem;
    margin-bottom: .3rem;
}

.apr-curso-disp {
    font-size: .75rem;
    font-weight: 600;
    color: #a78bfa;
}

.apr-curso-progress-wrap {
    height: 4px;
    background: rgba(255,255,255,.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: .25rem;
}
.apr-curso-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width .5s;
}
.apr-curso-pct {
    font-size: .72rem;
    color: var(--text-muted);
}

/* Sin resultados */
.apr-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: .85rem;
    text-align: center;
}

/* Light mode */
html[data-theme="light"] .apr-ficha-section  { background: #fff; border-color: #e2e8f0; }
html[data-theme="light"] .apr-ficha-header   { border-color: #e2e8f0; }
html[data-theme="light"] .apr-ficha-num      { color: #0f172a; }
html[data-theme="light"] .apr-ficha-prog     { color: #64748b; }
html[data-theme="light"] .apr-ficha-inst     { color: #6366f1; }
html[data-theme="light"] .apr-ficha-jornada  { background: #f1f5f9; border-color: #e2e8f0; color: #475569; }
html[data-theme="light"] .apr-ficha-search-wrap { background: #f8fafc; border-color: #e2e8f0; }
html[data-theme="light"] .apr-ficha-search   { color: #0f172a; }
html[data-theme="light"] .apr-ficha-search::placeholder { color: #94a3b8; }
html[data-theme="light"] .apr-ficha-curso-row { background: #f8fafc; border-color: #e2e8f0; }
html[data-theme="light"] .apr-ficha-curso-row:hover { background: #f0f9ff; border-color: #0891b2; }
html[data-theme="light"] .apr-curso-titulo   { color: #0f172a; }
html[data-theme="light"] .apr-curso-meta     { color: #64748b; }
html[data-theme="light"] .apr-curso-progress-wrap { background: #e2e8f0; }
