/* ============================================
   CURSO JUSTICIA JUVENIL - Standalone Design
   No external dependencies
   ============================================ */

:root {
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Lexend Deca', 'Inter', sans-serif;

    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-dark: #1e40af;

    --success: #16a34a;
    --success-light: #f0fdf4;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --warning: #f59e0b;
    --warning-light: #fffbeb;

    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-sidebar: #f1f5f9;
    --text: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);

    --radius: 8px;
    --radius-lg: 12px;
    --header-h: 60px;
    --sidebar-w: 280px;
    --transition: 200ms ease;
}

/* ---- Dark Mode ---- */
.dark {
    --primary: #60a5fa;
    --primary-hover: #93bbfd;
    --primary-light: #1e293b;
    --primary-dark: #93c5fd;
    --success: #4ade80;
    --success-light: #14291e;
    --danger: #f87171;
    --danger-light: #2d1515;
    --warning: #fbbf24;
    --warning-light: #2d2410;
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --bg-sidebar: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
    --border-light: #1e293b;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.2);
    --shadow: 0 1px 3px rgba(0,0,0,.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,.3);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.4);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    transition: background var(--transition), color var(--transition);
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
    margin-bottom: .5em;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
p { margin-bottom: 1rem; }
ul, ol { margin-bottom: 1rem; padding-left: 1.5em; }
li { margin-bottom: .35em; }
strong { font-weight: 600; }

/* ---- Layout ---- */
.container { max-width: 900px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.header {
    position: sticky; top: 0; z-index: 200;
    height: var(--header-h);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center;
    transition: background var(--transition), border-color var(--transition);
}
.header .container { display: flex; align-items: center; justify-content: space-between; max-width: 100%; }
.header-left { display: flex; align-items: center; gap: .75rem; }
.header-right { display: flex; align-items: center; gap: .5rem; }
.logo { display: flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 600; font-family: var(--font-heading); font-size: .95rem; }
.logo img { height: 32px; }
.logo span { display: block; }
.logo .logo-sub { font-size: .7rem; font-weight: 400; color: var(--text-secondary); }

.icon-btn {
    width: 38px; height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    font-size: .95rem;
}
.icon-btn:hover { background: var(--bg-alt); color: var(--text); border-color: var(--primary); }

/* Sidebar + Main Layout */
.layout {
    display: flex;
    min-height: calc(100vh - var(--header-h));
}
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    overflow-y: auto;
    transition: background var(--transition), border-color var(--transition);
}
.main {
    flex: 1;
    min-width: 0;
    padding: 2rem 2rem 4rem;
}

/* Sidebar Nav */
.sidebar-back {
    display: block;
    padding: .85rem 1.25rem;
    font-size: .85rem;
    font-weight: 500;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
}
.sidebar-back:hover { background: var(--primary-light); }
.sidebar-back i { margin-right: .4rem; }

.sidebar-progress {
    padding: .85rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.sidebar-progress .progress-label {
    font-size: .7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .04em; color: var(--text-secondary); margin-bottom: .35rem;
}
.sidebar-progress .progress-track {
    height: 5px; background: var(--border); border-radius: 3px; overflow: hidden;
}
.sidebar-progress .progress-fill {
    height: 100%; background: var(--primary); border-radius: 3px;
    transition: width 300ms ease;
}

.sidebar-label {
    font-size: .65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: var(--text-secondary);
    padding: 1rem 1.25rem .4rem; display: block;
}
.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li a {
    display: flex; align-items: center; gap: .5rem;
    padding: .55rem 1.25rem;
    font-size: .835rem;
    color: var(--text-secondary);
    border-left: 3px solid transparent;
    transition: all var(--transition);
}
.sidebar-nav li a:hover { color: var(--text); background: rgba(0,0,0,.03); }
.dark .sidebar-nav li a:hover { background: rgba(255,255,255,.04); }
.sidebar-nav li a.spy-active {
    color: var(--primary);
    font-weight: 600;
    background: var(--primary-light);
    border-left-color: var(--primary);
}
.sidebar-nav li a i { width: 18px; text-align: center; font-size: .8rem; flex-shrink: 0; }

/* Mobile sidebar */
@media (max-width: 1023px) {
    .sidebar {
        position: fixed;
        top: var(--header-h); left: 0;
        z-index: 150;
        transform: translateX(-100%);
        transition: transform 300ms ease;
        box-shadow: none;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    .sidebar-overlay {
        display: none;
        position: fixed; inset: 0;
        top: var(--header-h);
        background: rgba(0,0,0,.4);
        z-index: 140;
    }
    .sidebar-overlay.show { display: block; }
    .main { padding: 1.25rem 1rem 3rem; }
    .sidebar-toggle { display: flex; }
}
@media (min-width: 1024px) {
    .sidebar-toggle { display: none; }
    .sidebar-overlay { display: none !important; }
}

/* ---- Hero ---- */
.hero {
    background: linear-gradient(135deg, #1e3a5f 0%, var(--primary) 100%);
    color: #fff;
    padding: 2.5rem 0;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero > * { position: relative; z-index: 1; }
.hero .badge {
    display: inline-block;
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(4px);
    padding: .3em .9em;
    border-radius: 2rem;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: .75rem;
}
.hero h1 { color: #fff; font-size: 1.8rem; margin-bottom: .5rem; }
.hero .subtitle { opacity: .9; font-size: 1.05rem; margin-bottom: 1rem; max-width: 650px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-meta .meta-item {
    display: flex; align-items: center; gap: .35rem;
    font-size: .8rem; opacity: .85;
    background: rgba(255,255,255,.1);
    padding: .3em .7em; border-radius: var(--radius);
}
@media (max-width: 640px) {
    .hero { padding: 1.5rem 0; }
    .hero h1 { font-size: 1.4rem; }
}

/* ---- Cards ---- */
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: background var(--transition), border-color var(--transition);
}
.card h4 { margin-bottom: .5rem; }
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.card-hover:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    transition: all var(--transition);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    padding: .6em 1.3em;
    font-size: .9rem; font-weight: 500; font-family: var(--font-body);
    border: none; border-radius: var(--radius); cursor: pointer;
    transition: all var(--transition);
    text-decoration: none; line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-secondary { background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-success { background: var(--success); color: #fff; }
.btn-lg { padding: .75em 1.6em; font-size: 1rem; }
.btn-sm { padding: .4em 1em; font-size: .825rem; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; margin-bottom: 1.25rem; border-radius: var(--radius); border: 1px solid var(--border); }
table {
    width: 100%; border-collapse: collapse;
    font-size: .875rem;
}
thead { background: var(--bg-alt); }
th { font-weight: 600; text-align: left; padding: .75rem 1rem; border-bottom: 2px solid var(--border); white-space: nowrap; }
td { padding: .65rem 1rem; border-bottom: 1px solid var(--border-light); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-alt); }

/* ---- Alerts ---- */
.alert {
    padding: 1rem 1.25rem; border-radius: var(--radius);
    font-size: .9rem; margin-bottom: 1.25rem;
    display: flex; align-items: flex-start; gap: .6rem;
}
.alert i { margin-top: .15em; flex-shrink: 0; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border: 1px solid rgba(37,99,235,.15); }
.alert-success { background: var(--success-light); color: var(--success); border: 1px solid rgba(22,163,74,.15); }
.alert-warning { background: var(--warning-light); color: #92400e; border: 1px solid rgba(245,158,11,.15); }

/* ---- Accordion ---- */
.accordion { margin-bottom: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-item:last-child { border-bottom: none; }
.accordion-btn {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    padding: .9rem 1.25rem; background: var(--bg); border: none;
    font-family: var(--font-body); font-size: .9rem; font-weight: 600;
    color: var(--text); cursor: pointer;
    transition: background var(--transition);
    text-align: left;
}
.accordion-btn:hover { background: var(--bg-alt); }
.accordion-btn::after {
    content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    font-size: .7rem; color: var(--text-secondary);
    transition: transform var(--transition);
}
.accordion-btn.active::after { transform: rotate(180deg); }
.accordion-body {
    max-height: 0; overflow: hidden;
    transition: max-height 300ms ease, padding 300ms ease;
    padding: 0 1.25rem;
    font-size: .9rem;
}
.accordion-body.open {
    max-height: 800px;
    padding: .75rem 1.25rem 1rem;
}

/* ---- Sections ---- */
.curso-section {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-light);
}
.curso-section:last-of-type { border-bottom: none; }
.section-title {
    display: flex; align-items: center; gap: .5rem;
    margin-bottom: .35rem;
}
.section-title i { color: var(--primary); font-size: .9em; }
.section-subtitle { color: var(--text-secondary); font-size: .95rem; margin-bottom: 1.5rem; }

/* ---- Welcome Metrics ---- */
.welcome-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: .75rem;
    margin: 1.25rem 0;
}
.welcome-metric {
    text-align: center; padding: 1rem .75rem;
    background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: var(--radius);
}
.welcome-metric .metric-number {
    font-family: var(--font-heading); font-size: 1.8rem;
    font-weight: 700; color: var(--primary); line-height: 1;
}
.welcome-metric .metric-label {
    font-size: .75rem; color: var(--text-secondary); margin-top: .25rem;
}

/* ---- Lesson Intro ---- */
.lesson-intro {
    background: var(--bg-alt); border-left: 4px solid var(--primary);
    border-radius: var(--radius); padding: 1rem 1.25rem;
    margin-bottom: 1.25rem; font-size: .92rem;
}

/* ---- Video Placeholder ---- */
.video-placeholder {
    position: relative; aspect-ratio: 16/9;
    background: linear-gradient(135deg, #1e3a5f 0%, var(--primary) 50%, #3b82f6 100%);
    border-radius: var(--radius-lg);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #fff; overflow: hidden; margin-bottom: 1.25rem;
}
.video-placeholder::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(0,0,0,.2);
}
.video-placeholder > * { position: relative; z-index: 1; }
.video-placeholder .play-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: rgba(255,255,255,.2); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: .75rem;
    border: 2px solid rgba(255,255,255,.35);
}
.video-placeholder .video-title {
    font-family: var(--font-heading); font-size: 1rem;
    font-weight: 600; text-align: center; padding: 0 1.5rem;
}
.video-placeholder .video-badge {
    font-size: .7rem; background: rgba(255,255,255,.18);
    padding: .2em .7em; border-radius: 2rem; margin-top: .5rem;
}

/* ---- Activity Placeholder ---- */
.activity-placeholder {
    border: 2px dashed var(--primary);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem; text-align: center;
    background: var(--primary-light);
    margin-bottom: 1.25rem;
}
.activity-placeholder .activity-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: .75rem; }
.activity-placeholder h4 { color: var(--primary-dark); }
.activity-placeholder p { color: var(--text-secondary); max-width: 500px; margin: 0 auto .75rem; font-size: .9rem; }

/* ---- Infographic Placeholder ---- */
.infographic-placeholder {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem; text-align: center;
    background: var(--bg-alt);
    margin-bottom: 1.25rem;
}
.infographic-placeholder i { font-size: 2rem; color: var(--text-secondary); margin-bottom: .5rem; display: block; }
.infographic-placeholder h5 { margin-bottom: .25rem; }
.infographic-placeholder p { color: var(--text-secondary); font-size: .85rem; margin: 0; }

/* ---- Pre-Test ---- */
.pretest-container { counter-reset: pretest-q; }
.pretest-question {
    background: var(--bg-alt); border-radius: var(--radius-lg);
    padding: 1.25rem; margin-bottom: .75rem;
    border: 1px solid var(--border);
    transition: border-color var(--transition);
}
.pretest-question.answered-correct { border-color: var(--success); background: var(--success-light); }
.pretest-question.answered-incorrect { border-color: var(--danger); background: var(--danger-light); }
.pretest-question .question-text {
    font-weight: 500; margin-bottom: .85rem;
    counter-increment: pretest-q; font-size: .92rem;
}
.pretest-question .question-text::before {
    content: counter(pretest-q) ". "; font-weight: 700; color: var(--primary);
}
.pretest-options { display: flex; gap: .6rem; flex-wrap: wrap; }
.pretest-options .btn-option,
.eval-options .btn-option {
    flex: 1; min-width: 110px;
    padding: .55em 1.2em;
    border: 2px solid var(--border); border-radius: var(--radius);
    background: var(--bg); color: var(--text);
    font-weight: 500; font-size: .9rem; font-family: var(--font-body);
    cursor: pointer; transition: all var(--transition);
    text-align: center;
}
.pretest-options .btn-option:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-light); }
.pretest-options .btn-option:disabled { cursor: default; opacity: .7; }
.pretest-options .btn-option.selected-correct { border-color: var(--success); background: var(--success); color: #fff; }
.pretest-options .btn-option.selected-incorrect { border-color: var(--danger); background: var(--danger); color: #fff; }
.pretest-options .btn-option.reveal-correct,
.eval-options .btn-option.locked.reveal-correct {
    border-color: var(--success); background: var(--success-light);
    color: var(--success); font-weight: 700;
}

.pretest-feedback {
    margin-top: .75rem; padding: .6rem .85rem;
    border-radius: var(--radius); font-size: .85rem;
    display: none;
}
.pretest-feedback.show { display: flex; align-items: flex-start; gap: .4rem; }
.pretest-feedback.correct { background: var(--success-light); color: var(--success); border-left: 3px solid var(--success); }
.pretest-feedback.incorrect { background: var(--danger-light); color: var(--danger); border-left: 3px solid var(--danger); }

/* ---- Evaluation ---- */
.eval-container { counter-reset: eval-q; }
.eval-question {
    background: var(--bg-alt); border-radius: var(--radius-lg);
    padding: 1.25rem; margin-bottom: .75rem;
    border: 2px solid var(--border);
    transition: border-color var(--transition);
}
.eval-question .question-text {
    font-weight: 500; margin-bottom: .85rem;
    counter-increment: eval-q; font-size: .92rem;
}
.eval-question .question-text::before {
    content: counter(eval-q) ". "; font-weight: 700; color: var(--primary);
}
.eval-options { display: flex; gap: .6rem; flex-wrap: wrap; }
.eval-options .btn-option:hover:not(.locked) { border-color: var(--primary); background: var(--primary-light); }
.eval-options .btn-option.selected { border-color: var(--primary); background: var(--primary); color: #fff; }
.eval-options .btn-option.locked { cursor: default; }
.eval-options .btn-option.locked.result-correct { border-color: var(--success); background: var(--success); color: #fff; }
.eval-options .btn-option.locked.result-incorrect { border-color: var(--danger); background: var(--danger); color: #fff; }

.eval-rules {
    background: var(--primary-light); border-left: 4px solid var(--primary);
    border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.5rem;
}
.eval-rules h5 { color: var(--primary-dark); margin-bottom: .5rem; }
.eval-rules ul { list-style: none; padding: 0; margin: 0; }
.eval-rules ul li { padding: .15rem 0; font-size: .88rem; }
.eval-rules ul li i { width: 18px; color: var(--primary); margin-right: .3rem; }

.eval-result {
    display: none; border-radius: var(--radius-lg);
    padding: 2rem; text-align: center; margin-top: 1rem;
}
.eval-result.show { display: block; }
.eval-result.passed { background: var(--success-light); border: 2px solid var(--success); }
.eval-result.failed { background: var(--danger-light); border: 2px solid var(--danger); }
.eval-result .result-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.eval-result.passed .result-icon { color: var(--success); }
.eval-result.failed .result-icon { color: var(--danger); }
.eval-result .result-score {
    font-family: var(--font-heading); font-size: 2rem;
    font-weight: 700; margin-bottom: .25rem;
}

.eval-attempts-count { font-size: .85rem; color: var(--text-secondary); margin-bottom: 1rem; }

/* ---- Profile Selector ---- */
.profile-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem; margin-bottom: 1.5rem;
}
.profile-card {
    border: 2px solid var(--border); border-radius: var(--radius-lg);
    padding: 1.5rem 1rem; text-align: center;
    cursor: pointer; transition: all var(--transition);
    background: var(--bg);
}
.profile-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.profile-card.active { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.profile-card .profile-icon { font-size: 2rem; color: var(--primary); margin-bottom: .5rem; }
.profile-card h5 { margin-bottom: .15rem; font-size: .95rem; }
.profile-card p { font-size: .78rem; color: var(--text-secondary); margin: 0; }

/* ---- Module Status ---- */
.module-status {
    display: inline-flex; align-items: center; gap: .3em;
    font-size: .72rem; font-weight: 600; padding: .25em .6em;
    border-radius: 4px; text-transform: uppercase; letter-spacing: .03em;
}
.module-status.status-available { background: var(--primary-light); color: var(--primary); }
.module-status.status-completed { background: var(--success-light); color: var(--success); }

/* ---- Dashboard Progress ---- */
.progress-track {
    height: 10px; background: var(--border); border-radius: 5px; overflow: hidden;
}
.progress-fill {
    height: 100%; background: var(--primary); border-radius: 5px;
    transition: width 400ms ease; font-size: 0; min-width: 0;
}
.progress-labels {
    display: flex; justify-content: space-between;
    font-size: .8rem; color: var(--text-secondary); margin-top: .4rem;
}

/* ---- Module Nav ---- */
.module-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 2rem 0; gap: 1rem; flex-wrap: wrap;
}
.module-nav .btn { min-width: 170px; }

/* ---- Mobile Progress Pill ---- */
.mobile-progress-pill {
    display: none; position: fixed;
    bottom: 1rem; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: #fff;
    padding: .4em 1em; border-radius: 2rem;
    font-size: .78rem; font-weight: 600;
    box-shadow: var(--shadow-md); z-index: 100;
}
@media (max-width: 1023px) { .mobile-progress-pill { display: block; } }

/* ---- Footer ---- */
.footer {
    background: var(--bg-alt); border-top: 1px solid var(--border);
    padding: 1.5rem 0; text-align: center;
    font-size: .82rem; color: var(--text-secondary);
    transition: background var(--transition);
}
.footer img { height: 26px; margin-bottom: .4rem; opacity: .7; }

/* ---- Text Center ---- */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .pretest-options, .eval-options { flex-direction: column; }
    .pretest-options .btn-option, .eval-options .btn-option { min-width: unset; }
    .module-nav { flex-direction: column; }
    .module-nav .btn { width: 100%; }
    .profile-grid { grid-template-columns: repeat(2, 1fr); }
    .welcome-metrics { grid-template-columns: repeat(2, 1fr); }
    .hero-meta { gap: .5rem; }
    .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .profile-grid { grid-template-columns: 1fr; }
}
