/* ==========================================================
   ICT-Lernpass – Portal-Stylesheet
   ========================================================== */
:root {
    --bg: #f4f6fa;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e3e8ef;
    --text: #0f172a;
    --muted: #5b6475;
    --primary: #1d4ed8;
    --primary-600: #1e40af;
    --primary-50: #eef3ff;
    --success: #15803d;
    --success-bg: #e8f7ee;
    --danger: #b91c1c;
    --danger-bg: #fdecec;
    --info-bg: #eaf2ff;
    --warn: #b45309;
    --warn-bg: #fff6e5;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 16px rgba(15, 23, 42, .05);
    --topbar-h: 64px;
    --sidebar-w: 260px;
    --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0e1320;
        --surface: #161c2c;
        --surface-2: #1b2234;
        --border: #283149;
        --text: #e6eaf2;
        --muted: #9aa4b8;
        --primary: #6d9bff;
        --primary-600: #8fb2ff;
        --primary-50: #1c2742;
        --success: #4ade80;
        --success-bg: #12301f;
        --danger: #f87171;
        --danger-bg: #3a1719;
        --info-bg: #182640;
        --warn: #fbbf24;
        --warn-bg: #33270f;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; font-weight: 650; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 5px; border-radius: 5px; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.icon { flex-shrink: 0; vertical-align: middle; }

/* ---------- Topbar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 30;
    height: var(--topbar-h);
    display: flex; align-items: center; gap: 12px;
    padding: 0 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand small { display: block; font-weight: 400; font-size: .75rem; color: var(--muted); line-height: 1.1; }
.topbar-spacer { flex: 1; }
.icon-btn.nav-toggle { display: none; }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; padding: 0;
    border: 0; border-radius: var(--radius-sm);
    background: transparent; color: var(--muted);
    cursor: pointer; font-size: 1.4rem; line-height: 1;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.icon-btn.danger:hover { color: var(--danger); }

.usermenu { position: relative; }
.usermenu-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 10px 4px 4px; border: 1px solid transparent; border-radius: 999px;
    background: transparent; color: var(--text); cursor: pointer; font: inherit; text-align: left;
}
.usermenu-btn:hover { background: var(--surface-2); border-color: var(--border); }
.usermenu-name { font-weight: 600; font-size: .9rem; line-height: 1.2; }
.usermenu-name small { display: block; font-weight: 400; color: var(--muted); font-size: .75rem; }
.dropdown {
    display: none; position: absolute; right: 0; top: calc(100% + 6px);
    min-width: 200px; padding: 6px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.usermenu.open .dropdown { display: block; }
.dropdown a, .dropdown button {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 8px 10px; border: 0; border-radius: 6px; background: none;
    color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); text-decoration: none; }
.dropdown form { margin: 0; }

.avatar {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--primary-50); color: var(--primary);
    font-weight: 700; font-size: .8rem; letter-spacing: .02em;
}
.avatar-lg { width: 48px; height: 48px; font-size: 1rem; }
.avatar-xl { width: 64px; height: 64px; font-size: 1.3rem; }

/* ---------- Shell / Sidebar ---------- */
.shell { display: flex; min-height: calc(100vh - var(--topbar-h)); }
.sidebar {
    position: sticky; top: var(--topbar-h);
    width: var(--sidebar-w); flex-shrink: 0;
    height: calc(100vh - var(--topbar-h)); overflow-y: auto;
    padding: 16px 12px;
    background: var(--surface); border-right: 1px solid var(--border);
}
.nav-section { margin-bottom: 18px; }
.nav-title { padding: 0 10px 6px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; margin-bottom: 2px; border-radius: var(--radius-sm);
    color: var(--text); font-weight: 500;
}
.nav-link:hover { background: var(--surface-2); text-decoration: none; }
.nav-link.active { background: var(--primary-50); color: var(--primary); }
.nav-link .icon { color: var(--muted); }
.nav-link.active .icon { color: var(--primary); }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-dot {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 7px;
    background: color-mix(in srgb, var(--c) 14%, transparent);
}
.nav-dot .icon, .nav-link.active .nav-dot .icon { color: var(--c); }
.nav-check { color: var(--success); display: inline-flex; }
.nav-check .icon { color: var(--success); }
.nav-empty { display: block; padding: 4px 10px; color: var(--muted); font-size: .88rem; }
.nav-backdrop { display: none; }

/* ---------- Content ---------- */
.content { flex: 1; min-width: 0; padding: 28px 32px 16px; display: flex; flex-direction: column; gap: 20px; }
.content > .footer { margin-top: auto; }
.footer { padding: 16px 0 4px; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--border); }

.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-header h1 { margin: 0; }
.page-header p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; }
.page-actions form { margin: 0; }

.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px 22px; box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }
.card.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.card.empty .icon { color: var(--muted); margin-bottom: 8px; }
.card.empty h2, .card.empty h3 { color: var(--text); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
    font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer;
    transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); }
@media (prefers-color-scheme: dark) { .btn-primary, .btn-primary:hover { color: #0b1020; } }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-link { border: 0; background: none; color: var(--muted); padding: 6px 0; font-weight: 500; }
.btn-link:hover { background: none; color: var(--text); text-decoration: underline; }
.btn-block { width: 100%; }
.btn:focus-visible, .icon-btn:focus-visible, .nav-link:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .module-card:focus-visible {
    outline: 2px solid var(--primary); outline-offset: 2px;
}

/* ---------- Alerts / Badges ---------- */
.alert { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid transparent; font-size: .93rem; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert-info { background: var(--info-bg); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 20%, transparent); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.badge-offen { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge-in_arbeit { background: var(--warn-bg); color: var(--warn); }
.badge-abgeschlossen { background: var(--success-bg); color: var(--success); }
.badge-error { background: var(--danger-bg); color: var(--danger); }
.chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: var(--primary-50); color: var(--primary); font-size: .8rem; font-weight: 600; }
.chip-ok { background: var(--success-bg); color: var(--success); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 8px; }

/* ---------- Progress ---------- */
.progress { --c: var(--primary); height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--c); border-radius: 999px; transition: width .4s ease; }
.row-progress { display: flex; align-items: center; gap: 10px; }
.row-progress .progress { flex: 1; }
.row-progress span:last-child { font-size: .85rem; color: var(--muted); min-width: 38px; text-align: right; }

/* ---------- Dashboard ---------- */
.welcome {
    display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
    padding: 26px 28px; border-radius: var(--radius);
    background:
        radial-gradient(1200px 200px at 0% 0%, color-mix(in srgb, var(--primary) 12%, transparent), transparent),
        var(--surface);
    border: 1px solid var(--border); box-shadow: var(--shadow);
}
.welcome h1 { margin: 2px 0 6px; }
.welcome p { margin: 0; max-width: 60ch; }
.eyebrow { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.eyebrow a { color: inherit; }
.next-card {
    --c: var(--primary);
    display: flex; flex-direction: column; gap: 8px;
    width: 280px; padding: 16px 18px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--c);
    color: var(--text);
}
.next-card:hover { text-decoration: none; border-color: var(--c); }
.next-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c); }
.next-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .88rem; color: var(--c); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.stat-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; background: var(--primary-50); color: var(--primary); }
.stat-value { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.stat-label { display: block; color: var(--muted); font-size: .85rem; }
.stat .progress { margin-top: 6px; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.dash-grid aside { display: flex; flex-direction: column; gap: 16px; }
.dash-grid aside .section-head { margin-bottom: -4px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-head h2 { margin: 0; }

.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.module-card {
    --c: var(--primary);
    display: flex; flex-direction: column;
    padding: 18px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
    color: var(--text); position: relative; overflow: hidden;
    transition: transform .15s ease, border-color .15s ease;
}
.module-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.module-card:hover { text-decoration: none; transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 45%, var(--border)); }
.module-card h3 { margin: 12px 0 4px; }
.module-card p { color: var(--muted); font-size: .9rem; flex: 1; margin-bottom: 14px; }
.module-top { display: flex; justify-content: space-between; align-items: flex-start; }
.module-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 11px;
    background: color-mix(in srgb, var(--c, var(--primary)) 14%, transparent); color: var(--c, var(--primary));
}
.module-icon.sm { width: 34px; height: 34px; border-radius: 9px; }
.module-icon.lg { width: 56px; height: 56px; border-radius: 14px; }
.module-foot { display: flex; align-items: center; gap: 10px; }
.module-foot .progress { flex: 1; }
.pct { font-size: .85rem; font-weight: 600; color: var(--muted); min-width: 36px; text-align: right; }

.news-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.news-item:first-child { padding-top: 0; }
.news-item:last-child { border-bottom: 0; padding-bottom: 0; }
.news-item h3 { margin: 0 0 2px; }
.news-meta { font-size: .78rem; color: var(--muted); margin: 0 0 6px; }
.news-body { font-size: .9rem; }

.profile-mini { display: flex; gap: 14px; align-items: center; }
.profile-mini strong, .profile-mini .muted { display: block; }

/* ---------- Module page ---------- */
.module-header {
    --c: var(--primary);
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    padding: 22px 24px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--c); box-shadow: var(--shadow);
}
.module-header h1 { margin: 2px 0 4px; }
.module-header p { margin: 0; }
.module-progress { width: 200px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.module-progress .progress { width: 100%; }
.module-progress .pct { font-size: 1.3rem; color: var(--text); }
.module-body { display: flex; flex-direction: column; gap: 20px; }
.lesson { display: flex; flex-direction: column; gap: 20px; }
.lesson ul { padding-left: 1.2em; }
.quiz fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 14px; }
.quiz legend { font-weight: 600; padding: 0 6px; }
.option { display: flex; gap: 10px; align-items: flex-start; padding: 7px 8px; border-radius: 6px; cursor: pointer; }
.option:hover { background: var(--surface-2); }
.option input { margin-top: 4px; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .88rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], select, textarea {
    width: 100%; padding: 9px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
    font: inherit; font-weight: 400;
}
input[type=color] { width: 100%; height: 40px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
textarea { resize: vertical; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.self-end { align-self: end; padding-bottom: 10px; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0; }
legend { font-weight: 600; font-size: .88rem; padding: 0 4px; }
.hint { font-size: .82rem; color: var(--muted); margin: 0; }
.inline-form { flex-direction: row; align-items: flex-end; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.inline-form label { flex: 1; }
form.inline { display: inline; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px; }
.filters input { flex: 1; min-width: 200px; }
.filters select { width: auto; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table.compact td { padding: 7px 10px; }
.table .actions { text-align: right; }
.row-inactive { opacity: .55; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell strong, .user-cell .muted { display: block; }

.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 16px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; }
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.profile-head h2 { margin: 0; }
.profile-head p { margin: 0; }
.steps { margin: 0; padding-left: 1.3em; }
.steps li { margin-bottom: 6px; }

.switch {
    display: inline-flex; align-items: center; gap: 8px;
    border: 0; background: none; padding: 0; cursor: pointer;
    font: inherit; font-size: .85rem; color: var(--muted);
}
.switch span {
    position: relative; width: 36px; height: 20px; border-radius: 999px;
    background: var(--border); transition: background .15s;
}
.switch span::after {
    content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
    background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.switch.on { color: var(--success); font-weight: 600; }
.switch.on span { background: var(--success); }
.switch.on span::after { transform: translateX(16px); }

/* ---------- Dialog ---------- */
.dialog {
    width: min(560px, calc(100vw - 32px));
    padding: 22px 24px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.dialog::backdrop { background: rgba(15, 23, 42, .45); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dialog-head h2 { margin: 0; }
.dialog-danger { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.dialog-danger form { margin: 0; }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-wrap {
    display: grid; grid-template-columns: 1.1fr 1fr;
    width: min(960px, 100%); min-height: 540px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow);
}
.login-hero {
    display: flex; align-items: flex-end;
    padding: 40px;
    color: #fff;
    background:
        radial-gradient(circle at 85% 10%, rgba(255,255,255,.18), transparent 40%),
        linear-gradient(145deg, #1e3a8a 0%, #1d4ed8 55%, #0f766e 120%);
}
.hero-inner h2 { font-size: 1.8rem; margin: 18px 0 10px; }
.hero-inner p { opacity: .9; max-width: 38ch; }
.hero-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.hero-list li { display: flex; align-items: center; gap: 10px; opacity: .95; }
.login-card { padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.login-card h1 { margin: 0; }
.login-card > .muted { margin: -8px 0 8px; }
.login-card.wide { width: min(640px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
.btn-ms {
    width: 100%; padding: 12px 16px; gap: 12px;
    background: var(--surface); border: 1px solid #8c8c8c; color: var(--text); font-size: 1rem;
}
.btn-ms:hover { background: var(--surface-2); }
.admin-login { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 6px; }
.admin-login summary { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: .9rem; list-style: none; }
.admin-login summary::-webkit-details-marker { display: none; }
.admin-login summary::after { content: "▾"; margin-left: auto; transition: transform .15s; }
.admin-login[open] summary::after { transform: rotate(180deg); }
.admin-login[open] summary { margin-bottom: 14px; }
.admin-login .alert { margin-bottom: 12px; }
.setup-wrap { width: 100%; display: flex; justify-content: center; }
.checklist { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 4px; }
.checklist .ok { color: var(--success); }
.checklist .fail { color: var(--danger); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .dash-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .icon-btn.nav-toggle { display: inline-flex; }
    .sidebar {
        position: fixed; left: 0; top: var(--topbar-h); z-index: 25;
        transform: translateX(-100%); transition: transform .2s ease;
        box-shadow: var(--shadow);
    }
    body.nav-open .sidebar { transform: none; }
    body.nav-open .nav-backdrop { display: block; position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 20; background: rgba(15,23,42,.35); }
    .content { padding: 20px 16px 12px; }
    .two-col { grid-template-columns: 1fr; }
    .usermenu-name { display: none; }
    .login-wrap { grid-template-columns: 1fr; }
    .login-hero { display: none; }
    .login-card { padding: 32px 22px; }
    .next-card { width: 100%; }
    .module-progress { width: 100%; align-items: stretch; }
}
@media (max-width: 520px) {
    .stats { grid-template-columns: 1fr; }
    .topbar { padding: 0 12px; }
    .brand small { display: none; }
}
