/* =============================================
   Systemchen – Globales App CSS
   ============================================= */

:root {
    --green-dark: #2d5016;
    --green: #4a7c23;
    --green-light: #7ab648;
    --brown: #6b4226;
    --brown-light: #a67c52;
    --cream: #faf6ee;
    --cream-dark: #f0e8d8;
    --text: #2c2c2c;
    --text-light: #5a5a5a;
    --white: #ffffff;
    --red: #c0392b;
    --red-light: #fdecea;
    --blue: #2980b9;
    --blue-light: #ebf5fb;
    --orange: #e67e22;
    --orange-light: #fef5e7;
    --shadow: rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

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

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--cream);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    line-height: 1.3;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* App Header */
.app-header {
    background: var(--green-dark);
    color: var(--white);
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header-logo {
    font-family: 'Lora', serif;
    font-size: 1.3rem;
    color: var(--white);
    text-decoration: none;
}

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

.app-header-nav a {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    font-weight: 600;
}

.app-header-nav a:hover { color: var(--white); text-decoration: none; }

.app-header-user {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.app-header-user .user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.app-header-user .user-role {
    font-size: 0.75rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--green);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--green-dark);
    text-decoration: none;
}

.btn-secondary {
    background: var(--cream-dark);
    color: var(--text);
}
.btn-secondary:hover { background: #e5dcc8; text-decoration: none; }

.btn-danger {
    background: var(--red);
    color: var(--white);
}
.btn-danger:hover { background: #a93226; text-decoration: none; }

.btn-sm {
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--green);
    color: var(--green);
}
.btn-outline:hover {
    background: var(--green);
    color: var(--white);
    text-decoration: none;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 2px 10px var(--shadow);
}

/* Forms */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid var(--cream-dark);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--green);
}

/* Passwort anzeigen (app/js/password-toggle.js) */
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 3rem; }
.pw-toggle {
    position: absolute;
    top: 50%;
    right: 0.4rem;
    transform: translateY(-50%);
    width: 2.4rem;
    height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
}
.pw-toggle:hover { color: var(--green); background: var(--cream); }
.pw-toggle:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }

/* Tables */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow);
}

th, td {
    padding: 0.8rem 1rem;
    text-align: left;
}

th {
    background: var(--green-dark);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
}

tr:nth-child(even) {
    background: var(--cream);
}

tr:hover {
    background: var(--cream-dark);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.alert-error {
    background: var(--red-light);
    color: var(--red);
    border: 1px solid rgba(192, 57, 43, 0.2);
}

.alert-success {
    background: #eafaf1;
    color: #1e8449;
    border: 1px solid rgba(30, 132, 73, 0.2);
}

.alert-info {
    background: var(--blue-light);
    color: var(--blue);
    border: 1px solid rgba(41, 128, 185, 0.2);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-admin { background: var(--red-light); color: var(--red); }
.badge-teacher { background: var(--blue-light); color: var(--blue); }
.badge-student { background: var(--orange-light); color: var(--orange); }
.badge-active { background: #eafaf1; color: #1e8449; }
.badge-inactive { background: var(--cream-dark); color: var(--text-light); }

/* Layout */
.app-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

.page-title {
    font-size: 1.8rem;
    color: var(--green-dark);
    margin-bottom: 1.5rem;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
}

.login-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    text-align: center;
}

.login-card h1 {
    color: var(--green-dark);
    margin-bottom: 0.3rem;
    font-size: 2rem;
}

.login-card .login-subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.login-card .form-group {
    text-align: left;
}

.login-card .btn {
    width: 100%;
    padding: 0.8rem;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.login-footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.login-footer a {
    color: var(--green);
}

/* Responsive */
@media (max-width: 900px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   Anmeldung (alle Rollen) – im Stil der Startseite
   ============================================= */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem 1rem;
    background:
        linear-gradient(135deg, rgba(45, 80, 22, 0.88) 0%, rgba(74, 124, 35, 0.78) 100%),
        url('../img/hero_waldschule_teich.jpg') center / cover no-repeat;
}
.auth-card {
    background: var(--white);
    border-radius: 18px;
    padding: 2.5rem 2.25rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.auth-brand { text-align: center; margin-bottom: 1.6rem; }
.auth-brand a { color: var(--green-dark); text-decoration: none; }
.auth-brand h1 { font-size: 2rem; color: var(--green-dark); margin-bottom: 0.2rem; }
.auth-brand p { color: var(--text-light); font-family: 'Lora', Georgia, serif; font-style: italic; }
.auth-card .form-group { text-align: left; }
.auth-card .btn-block { width: 100%; padding: 0.8rem; font-size: 1.05rem; margin-top: 0.4rem; }
.auth-steps { display: flex; gap: 6px; justify-content: center; margin: -0.6rem 0 1.2rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.auth-steps span { padding: 3px 10px; border-radius: 999px; background: var(--cream-dark); color: var(--text-light); font-weight: 700; }
.auth-steps span.now { background: var(--green); color: #fff; }
.auth-code { font-size: 1.8rem; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }
.auth-note { font-size: 0.85rem; color: var(--text-light); line-height: 1.55; margin-top: 1.2rem; text-align: center; }
.auth-links { margin-top: 1.4rem; text-align: center; font-size: 0.9rem; }
.auth-links a { color: var(--green); font-weight: 600; }
.auth-legal { margin-top: 1.2rem; text-align: center; font-size: 0.85rem; }
.auth-legal a { color: rgba(255,255,255,0.85); margin: 0 0.4rem; }
.btn-link { background: none; border: none; color: var(--green); font-weight: 700; cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
.practice-banner { background: var(--orange-light); color: #8a4b0f; border-bottom: 2px solid var(--orange); padding: 0.5rem 1rem; text-align: center; font-weight: 700; font-size: 0.9rem; }
@media print {
    .no-print, .app-header, .legal-footer, #sc-feedback-btn { display: none !important; }
    body { background: #fff; }
    .print-sheet { box-shadow: none !important; }
}

/* =============================================
   Icons (Lucide, lokales Sprite app/img/icons.svg)
   ============================================= */
.icon {
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.2em;
    flex-shrink: 0;
    display: inline-block;
}
.icon-sm { width: 1em; height: 1em; vertical-align: -0.125em; }
.icon-lg { width: 1.5em; height: 1.5em; vertical-align: -0.35em; }
.icon-xl { width: 2em; height: 2em; vertical-align: -0.5em; }
.icon-2xl { width: 2.6em; height: 2.6em; }
.btn .icon { margin-right: 0.35em; }
.btn-icon .icon { margin-right: 0; }
.admin-ui .alert { display: flex; gap: 0.6rem; align-items: flex-start; }
.alert > .icon { margin-top: 0.2em; }

/* =============================================
   Lehrer*innen- und Admin-Oberflaeche (body.admin-ui)
   Ein Layout fuer beide: Kopfzeile, Seitentitel, Karten, Tabellen, Formulare.
   ============================================= */
.admin-ui {
    --bg: #f5f4ef;
    --surface: #ffffff;
    --surface-2: #f8f7f3;
    --border: #e4e1d8;
    --border-strong: #d3cfc2;
    --muted: #5f6368;
    --focus: #4a7c23;
    --r: 10px;
    background: var(--bg);
    font-size: 15px;
    display: flex;
    flex-direction: column;
}
.admin-ui h1, .admin-ui h2, .admin-ui h3, .admin-ui h4 { font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif; font-weight: 800; }
.admin-ui :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.admin-ui .legal-footer { margin-top: auto; }

.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; padding: 0.5rem 1rem; z-index: 200; }
.skip-link:focus { left: 1rem; top: 0.5rem; }

/* --- Kopfzeile --- */
.topbar { background: var(--green-dark); color: #fff; position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 0 rgba(0,0,0,0.08); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 0 1.25rem; height: 58px; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; color: #fff; font-family: 'Lora', Georgia, serif; font-size: 1.2rem; font-weight: 600; white-space: nowrap; }
.brand:hover { text-decoration: none; color: #fff; }
.brand-icon { width: 1.35em; height: 1.35em; color: #a8d47c; }
.brand-tag { font-family: 'Nunito', sans-serif; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; background: rgba(255,255,255,0.16); padding: 0.15rem 0.5rem; border-radius: 999px; }
.topbar-collapse { flex: 1; display: flex; align-items: center; gap: 1rem; min-width: 0; }
.topnav { display: flex; gap: 0.15rem; flex: 1; }
.topnav a { display: inline-flex; align-items: center; gap: 0.45rem; color: rgba(255,255,255,0.82); font-weight: 700; font-size: 0.92rem; padding: 0.5rem 0.8rem; border-radius: 8px; white-space: nowrap; }
.topnav a:hover { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; }
.topnav a.is-active { background: rgba(255,255,255,0.16); color: #fff; }
.topnav .icon { opacity: 0.9; }
.topbar-right { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
.nav-toggle { display: none; margin-left: auto; background: transparent; border: 1px solid rgba(255,255,255,0.35); color: #fff; border-radius: 8px; width: 40px; height: 40px; align-items: center; justify-content: center; cursor: pointer; }
.nav-toggle .icon { width: 1.4em; height: 1.4em; }

.btn-practice { background: var(--orange); color: #fff; display: inline-flex; align-items: center; }
.btn-practice:hover, .btn-practice.is-active { background: #cf6d17; color: #fff; text-decoration: none; }

.user-menu { position: relative; }
.user-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; color: #fff; font-weight: 700; font-size: 0.92rem; padding: 0.45rem 0.7rem; border-radius: 8px; user-select: none; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover, .user-menu[open] > summary { background: rgba(255,255,255,0.12); }
.user-menu-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: var(--r); box-shadow: 0 10px 30px rgba(0,0,0,0.14); padding: 0.35rem; z-index: 120; }
.user-menu-head { padding: 0.55rem 0.75rem 0.6rem; border-bottom: 1px solid var(--border); margin-bottom: 0.3rem; display: flex; flex-direction: column; }
.user-menu-head span { font-size: 0.78rem; color: var(--muted); }
.user-menu-panel a { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.75rem; border-radius: 6px; color: var(--text); font-weight: 600; }
.user-menu-panel a:hover { background: var(--surface-2); text-decoration: none; }

@media (max-width: 1020px) {
    .topbar-inner { height: auto; min-height: 58px; flex-wrap: wrap; gap: 0; }
    .nav-toggle { display: inline-flex; }
    .topbar-collapse { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; padding: 0.4rem 0 0.9rem; gap: 0.6rem; }
    .topbar.is-open .topbar-collapse { display: flex; }
    .topnav { flex-direction: column; }
    .topnav a { padding: 0.7rem 0.8rem; }
    .topbar-right { margin-left: 0; flex-direction: column; align-items: stretch; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 0.7rem; }
    .topbar-right .btn-practice { justify-content: center; padding: 0.6rem; }
    .user-menu-panel { position: static; margin-top: 0.4rem; box-shadow: none; }
}

/* --- Seite --- */
.page { width: 100%; max-width: 1240px; margin: 0 auto; padding: 1.75rem 1.25rem 2.5rem; flex: 1 0 auto; }
.page-narrow { max-width: 720px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.admin-ui .page-title { font-size: 1.6rem; color: var(--green-dark); margin: 0; display: flex; align-items: center; gap: 0.55rem; line-height: 1.25; }
.page-title .icon { color: var(--green); width: 1.05em; height: 1.05em; }
.page-lead { color: var(--muted); margin-top: 0.3rem; max-width: 70ch; }
.page-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.back-link { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 700; font-size: 0.9rem; margin-bottom: 0.4rem; }

/* --- Karten --- */
.admin-ui .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: 0 1px 2px rgba(0,0,0,0.04); padding: 1.25rem 1.4rem; }
.card + .card, .section + .section { margin-top: 1.25rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.card-title { font-size: 1.1rem; color: var(--text); margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.card-title .icon { color: var(--green); }
.card-sub { color: var(--muted); font-size: 0.88rem; }
.card-flush { padding: 0 !important; overflow: hidden; }
.card-flush > .card-head { padding: 1rem 1.4rem 0; }
.card-foot { display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.card-danger { border-color: rgba(192, 57, 43, 0.35) !important; }
.section { margin-bottom: 1.5rem; }
.section-title { font-size: 1.15rem; color: var(--text); margin-bottom: 0.7rem; display: flex; align-items: center; gap: 0.5rem; }
.mt { margin-top: 1.25rem; }

.cols { display: grid; gap: 1.25rem; }
.cols + .cols, .cols + .card, .card + .cols { margin-top: 1.25rem; }
.cols > .card + .card { margin-top: 0; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 900px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-main { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

/* Kennzahlen */
.stat { display: flex; align-items: center; gap: 1rem; }
.stat-icon { width: 46px; height: 46px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #edf5e6; color: var(--green); flex-shrink: 0; }
.stat-icon .icon { width: 1.4em; height: 1.4em; }
.stat-value { font-size: 1.7rem; font-weight: 800; line-height: 1.1; color: var(--text); }
.stat-label { color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.stat-blue .stat-icon { background: var(--blue-light); color: var(--blue); }
.stat-orange .stat-icon { background: var(--orange-light); color: #b9600f; }
.stat-brown .stat-icon { background: #f4ece4; color: var(--brown); }
a.stat-link { color: inherit; display: block; }
a.stat-link:hover { text-decoration: none; border-color: var(--border-strong); }

/* Listen */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0; border-top: 1px solid var(--border); }
.list > li:first-child { border-top: 0; padding-top: 0; }
.list-main { flex: 1; min-width: 0; }
.list-meta { color: var(--muted); font-size: 0.85rem; }
.icon-bubble { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--green); flex-shrink: 0; }
.quick-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.admin-ui .quick-actions .btn { justify-content: flex-start; }

/* --- Buttons --- */
.admin-ui .btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; padding: 0.55rem 1.1rem; font-size: 0.92rem; line-height: 1.3; border: 1px solid transparent; white-space: nowrap; }
.admin-ui .btn-sm { padding: 0.35rem 0.75rem; font-size: 0.85rem; }
.admin-ui .btn-primary:hover { color: #fff; }
.admin-ui .btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.admin-ui .btn-secondary:hover { background: var(--surface-2); }
.admin-ui .btn-ghost { background: transparent; color: var(--text); }
.admin-ui .btn-ghost:hover { background: var(--surface-2); text-decoration: none; }
.admin-ui .btn-danger-outline { background: var(--surface); border-color: rgba(192,57,43,0.45); color: var(--red); }
.admin-ui .btn-danger-outline:hover { background: var(--red-light); text-decoration: none; }
.admin-ui .btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-icon { width: 34px; height: 34px; padding: 0 !important; border-radius: 8px; background: transparent; border: 1px solid transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font: inherit; }
.btn-icon:hover { background: var(--surface-2); border-color: var(--border); color: var(--text); text-decoration: none; }
.btn-icon.danger:hover { background: var(--red-light); border-color: rgba(192,57,43,0.3); color: var(--red); }
.btn-icon .icon { width: 1.15rem; height: 1.15rem; }

/* --- Tabellen --- */
.admin-ui .table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.admin-ui .card .table-wrap { border: 0; border-radius: 0; margin: 0 -1.4rem; }
.admin-ui .card-flush .table-wrap { margin: 0; }
.admin-ui table { width: 100%; border-collapse: collapse; background: transparent; box-shadow: none; border-radius: 0; overflow: visible; font-size: 0.92rem; }
.admin-ui th, .admin-ui td { padding: 0.65rem 1rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.admin-ui .card th:first-child, .admin-ui .card td:first-child { padding-left: 1.4rem; }
.admin-ui .card th:last-child, .admin-ui .card td:last-child { padding-right: 1.4rem; }
.admin-ui th { background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.admin-ui tr { background: transparent; }
.admin-ui tbody tr:nth-child(even) { background: #fbfaf7; }
.admin-ui tbody tr:hover { background: #f2f6ee; }
.admin-ui tbody tr:last-child td { border-bottom: 0; }
.admin-ui td.num, .admin-ui th.num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-ui td.center, .admin-ui th.center { text-align: center; }
.admin-ui td.actions, .admin-ui th.actions { text-align: right; white-space: nowrap; width: 1%; }
.admin-ui td.nowrap { white-space: nowrap; }
.admin-ui td.wrap { white-space: pre-wrap; max-width: 420px; }
.admin-ui td.check, .admin-ui th.check { width: 1%; }
.admin-ui table.table-plain th { background: transparent; }
.row-actions { display: inline-flex; gap: 0.15rem; align-items: center; justify-content: flex-end; }
.row-actions form { display: inline-flex; margin: 0; }
.admin-ui tr.row-danger, .admin-ui tr.row-danger:nth-child(even) { background: #fff6f5; }
.table-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; flex-wrap: wrap; padding: 0.8rem 1.4rem; border-top: 1px solid var(--border); background: var(--surface-2); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.strong { font-weight: 800; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.9em; }
.admin-ui code { font-family: ui-monospace, Consolas, monospace; font-size: 0.88em; background: var(--surface-2); border: 1px solid var(--border); padding: 0 0.3rem; border-radius: 4px; }

/* Aufklapp-Menue in Tabellenzeilen */
.popover { position: relative; display: inline-block; }
.popover > summary { list-style: none; }
.popover > summary::-webkit-details-marker { display: none; }
.popover-panel { position: absolute; right: 0; top: calc(100% + 4px); z-index: 50; min-width: 250px; background: #fff; border: 1px solid var(--border); border-radius: var(--r); box-shadow: 0 10px 30px rgba(0,0,0,0.14); padding: 0.8rem; text-align: left; white-space: normal; }
.popover-panel form { display: flex; gap: 0.4rem; align-items: center; }
.popover-panel .stack { display: flex; flex-direction: column; gap: 0.5rem; }
.popover-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; margin-bottom: 0.4rem; }

/* --- Formulare --- */
.admin-ui .form-group { margin-bottom: 1rem; }
.admin-ui .form-group label, .admin-ui .label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 0.3rem; color: var(--text); }
.admin-ui .form-control { border: 1px solid var(--border-strong); border-radius: 8px; padding: 0.55rem 0.8rem; font-size: 0.95rem; }
.admin-ui .form-control:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(74,124,35,0.15); }
.admin-ui .form-control-sm { padding: 0.35rem 0.6rem; font-size: 0.88rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-actions { display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.4rem; }
.form-hint { font-size: 0.84rem; color: var(--muted); margin-top: 0.3rem; line-height: 1.5; }
.form-inline { display: flex; gap: 0.5rem; align-items: flex-end; flex-wrap: wrap; }
.admin-ui .form-inline .form-group { margin: 0; flex: 1; min-width: 180px; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.8rem; align-items: end; }
.admin-ui .filters .form-group { margin: 0; }

/* Schalter (an/aus) */
.switch { display: inline-flex; align-items: center; gap: 0.55rem; background: none; border: 0; padding: 0.2rem; cursor: pointer; font: inherit; font-weight: 700; font-size: 0.88rem; color: var(--text); }
.switch-track { width: 42px; height: 24px; border-radius: 999px; background: #cfcabd; position: relative; transition: background 0.2s; flex-shrink: 0; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.25); transition: left 0.2s; }
.switch[aria-checked="true"] .switch-track { background: var(--green); }
.switch[aria-checked="true"] .switch-track::after { left: 21px; }
.switch.is-partial .switch-track { background: #b7d39a; }
.switch.is-partial .switch-track::after { left: 12px; }

/* --- Abzeichen / Status --- */
.admin-ui .badge { display: inline-flex; align-items: center; gap: 0.3rem; text-transform: none; letter-spacing: 0; font-size: 0.78rem; padding: 0.15rem 0.55rem; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.admin-ui .badge .icon { width: 0.95em; height: 0.95em; vertical-align: -0.1em; }
.badge-success { background: #e6f4ea; color: #1e7b3c; }
.badge-danger { background: var(--red-light); color: var(--red); }
.badge-info { background: var(--blue-light); color: #1f6b9c; }
.badge-warning { background: var(--orange-light); color: #a6560c; }
.badge-neutral { background: #eeece6; color: var(--muted); }
.yes { color: #1e7b3c; font-weight: 700; white-space: nowrap; }
.no { color: var(--red); font-weight: 700; white-space: nowrap; }
.dots { display: inline-flex; gap: 0.2rem; vertical-align: middle; }
.dot { width: 1.4rem; height: 1.4rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #eeece6; color: var(--muted); }
.dot .icon { width: 0.85rem; height: 0.85rem; }
.dot-done { background: #e6f4ea; color: #1e7b3c; }
.stars { color: #c98a0b; display: inline-flex; gap: 1px; white-space: nowrap; }
.stars .icon { width: 0.95em; height: 0.95em; }
.chip { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; font-weight: 700; padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); white-space: nowrap; }
.mod-chip { color: var(--mod, var(--green)); background: #fff; border-color: var(--mod, var(--green)); }

/* --- Meldungen --- */
.admin-ui .alert { font-weight: 600; border-radius: 8px; padding: 0.8rem 1rem; margin-bottom: 1.1rem; }
.admin-ui .alert ul { margin: 0.3rem 0 0 1.2rem; font-weight: 400; }
.alert-warning { background: var(--orange-light); color: #8a4b0f; border: 1px solid rgba(230,126,34,0.3); }

/* --- Tabs / Segmente --- */
.tabs { display: flex; gap: 0.2rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.6rem 1rem; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.is-active { color: var(--green-dark); border-bottom-color: var(--green); }
.tabs .count { background: var(--red); color: #fff; font-size: 0.72rem; border-radius: 999px; padding: 0 0.45rem; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 1rem; }
.segmented a { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.85rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 700; font-size: 0.86rem; }
.segmented a:hover { text-decoration: none; background: var(--surface-2); }
.segmented a.is-active { background: var(--green); border-color: var(--green); color: #fff; }

/* Leerer Zustand */
.empty-state { text-align: center; padding: 1.6rem 1rem; color: var(--muted); }
.empty-state .icon { color: #b9b4a6; margin-bottom: 0.5rem; }
.empty-state p { margin-bottom: 0.8rem; }
.empty-state p:last-child { margin-bottom: 0; }

/* Fortschrittsbalken */
.bar { height: 8px; background: #eeece6; border-radius: 4px; overflow: hidden; min-width: 80px; }
.bar > span { display: block; height: 100%; border-radius: 4px; background: var(--green); }
.bar-mid > span { background: var(--orange); }
.bar-low > span { background: var(--red); }

/* Zeitstrahl */
.timeline { position: relative; padding-left: 1.6rem; }
.timeline::before { content: ''; position: absolute; left: 0.45rem; top: 0.3rem; bottom: 0.3rem; width: 2px; background: var(--border); }
.timeline-date { position: relative; font-weight: 800; margin: 1.2rem 0 0.5rem; }
.timeline-date:first-child { margin-top: 0; }
.timeline-date::before { content: ''; position: absolute; left: -1.43rem; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; border-radius: 50%; background: var(--green); border: 2px solid #fff; }
.timeline-event { display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; padding: 0.45rem 0; border-bottom: 1px dashed var(--border); font-size: 0.92rem; }
.timeline-event .time { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 3rem; }

/* Diagramme */
.chart { width: 100%; height: 260px; display: block; }
.chart-lg { height: 350px; }
.legend { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; }
.legend-item { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; cursor: pointer; border: 1px solid var(--c, #999); background: #fff; user-select: none; font-family: inherit; color: var(--text); }
.legend-item.off { opacity: 0.35; }
.legend-swatch { width: 10px; height: 10px; border-radius: 50%; background: var(--c, #999); }

/* Chat (aeltere Module) */
.chat-thread { display: flex; flex-direction: column; gap: 0.6rem; }
.bubble { max-width: 80%; padding: 0.6rem 0.9rem; border-radius: 12px; font-size: 0.92rem; }
.bubble-student { background: var(--blue-light); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble-open { border-left: 3px solid var(--red); }
.bubble-teacher { background: #eaf6ee; align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble-meta { font-size: 0.75rem; color: var(--muted); margin-top: 0.15rem; }
.reply-form { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
.reply-form .form-control { flex: 1; }

/* Modul-Kacheln (Uebungsmodus) */
.module-tile { display: flex; flex-direction: column; gap: 0.5rem; border-top: 4px solid var(--mod, var(--green)) !important; }
.tile-icon { width: 44px; height: 44px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--mod, var(--green)); background: var(--mod-light, #edf5e6); flex-shrink: 0; }
.tile-icon .icon { width: 1.5em; height: 1.5em; }
.tile-icon-sm { width: 32px; height: 32px; border-radius: 8px; }
.tile-icon-sm .icon { width: 1.15em; height: 1.15em; }
.module-tile h3 { font-size: 1.1rem; margin: 0.2rem 0 0; }
.module-tile p { color: var(--muted); font-size: 0.9rem; flex: 1; }
.module-tile .meta { font-size: 0.82rem; color: var(--muted); }
.module-tile .btn { align-self: flex-start; }
.is-inactive { opacity: 0.75; }
.mod-name { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; }

/* Personen-Kopf */
.person { display: flex; align-items: center; gap: 0.9rem; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem; flex-shrink: 0; }

/* Definitionsliste */
.dl { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 0; margin: 0; }
.dl dt, .dl dd { padding: 0.6rem 0; border-top: 1px solid var(--border); margin: 0; }
.dl dt { font-weight: 700; }
.dl dt:first-of-type, .dl dd:first-of-type { border-top: 0; }

/* Zugangsdaten zum Ausdrucken */
.cred-sheet { background: #fff; border: 2px dashed var(--green-light); border-radius: var(--r); padding: 1.25rem 1.4rem; margin-bottom: 1.5rem; }
.cred-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.8rem; margin-top: 1rem; }
.cred-card { border: 1px solid var(--border); border-radius: 10px; padding: 0.8rem 1rem; break-inside: avoid; page-break-inside: avoid; }
.cred-card .n { font-weight: 800; font-size: 1.1rem; color: var(--green-dark); display: flex; align-items: center; gap: 0.4rem; }
.cred-card .k { font-size: 0.8rem; color: var(--muted); }
.cred-card dl { display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.6rem; margin-top: 0.4rem; }
.cred-card dt { font-size: 0.8rem; color: var(--muted); }
.cred-card dd { font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; font-weight: 700; margin: 0; }
.cred-card .u { font-size: 0.7rem; color: var(--muted); margin-top: 0.4rem; word-break: break-all; }

.legal-footer { text-align: center; font-size: 0.85rem; color: #5a5a5a; padding: 1.5rem 1rem 2rem; }

@media print {
    .topbar, .skip-link { display: none !important; }
    body.print-creds .page > *:not(.cred-sheet) { display: none !important; }
    .cred-sheet { border: none; padding: 0; }
    .cred-card { border: 1px solid #999; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }
form.inline { display: inline-flex; margin: 0; }
.btn-icon.is-on { color: var(--green); }
details.details-block { display: block; }
details.details-block > summary { list-style: none; display: inline-flex; }
details.details-block > summary::-webkit-details-marker { display: none; }
details.details-block[open] { background: var(--surface); }
details.details-block .table-wrap { border: 1px solid var(--border) !important; border-radius: var(--r) !important; margin: 0.8rem 0 0 !important; }
.card-body-pad { padding: 1.2rem 1.4rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.auth-leaf { color: var(--green); width: 0.95em; height: 0.95em; vertical-align: -0.12em; }
@media (max-width: 1400px) and (min-width: 1021px) {
    .topbar-inner { gap: 1rem; }
    .topnav .icon { display: none; }
    .topnav a { padding: 0.5rem 0.55rem; }
    .user-menu-name { max-width: 110px; }
}
@media (max-width: 480px) {
    .brand-tag { font-size: 0.6rem; padding: 0.1rem 0.4rem; }
    .brand { font-size: 1.05rem; }
    .topbar-inner { padding: 0 1rem; }
}
.class-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; margin: -0.4rem 0 1.25rem; }
.class-switch .segmented { margin: 0; }
.seg-count { font-size: 0.75rem; opacity: 0.75; font-weight: 700; }
.status-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; max-width: 340px; }
.unpublished { display: flex; gap: 0.4rem; align-items: flex-start; background: var(--orange-light); color: #8a4b0f; border: 1px solid rgba(230,126,34,0.35); border-radius: 8px; padding: 0.4rem 0.6rem; font-size: 0.82rem; line-height: 1.4; }
.unpublished .icon { margin-top: 0.1em; color: var(--orange); }
.level-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.level-seg { display: inline-grid; grid-template-columns: repeat(3, 12rem); border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; background: var(--surface); }
.level-seg button { border: 0; border-left: 1px solid var(--border-strong); background: transparent; padding: 0.5rem 0.85rem; cursor: pointer; font: inherit; color: var(--text); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; line-height: 1.2; min-width: 0; height: 3.4rem; text-align: left; }
.level-seg .lv, .level-seg .ln { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .level-seg { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; } }
.level-seg button:first-child { border-left: 0; }
.level-seg button:hover { background: var(--surface-2); }
.level-seg .lv { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.level-seg .ln { font-weight: 700; font-size: 0.92rem; }
.level-seg button.is-on { background: #e6f1dc; }
.level-seg button.is-current { background: var(--green); color: #fff; }
.level-seg button.is-current .lv { color: rgba(255,255,255,0.85); }
.level-seg button:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.saved-note { display: inline-flex; align-items: center; gap: 0.3rem; color: #1e7b3c; font-weight: 700; font-size: 0.85rem; animation: saved-fade 3s ease forwards; }
@keyframes saved-fade { 0%, 70% { opacity: 1; } 100% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .saved-note { animation: none; } }

/* Logo: Filz-Erde + Vektor-Schriftzug (brandLogo()) */
.brand-logo-lockup { display: inline-flex; align-items: center; gap: 0.45rem; }
.brand-logo-lockup .brand-erde { height: 38px; width: auto; display: block; }
.brand-logo-lockup .brand-wort { height: 24px; width: auto; display: block; }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; text-decoration: none; margin: 0; line-height: 0; }
.auth-logo .auth-erde { width: 132px; height: auto; display: block; }
.auth-logo .auth-wort { width: 220px; height: auto; display: block; }
/* Kopfzeile Lehrer*innen/Admin: blassgrün, passend zum Filzlogo */
.topbar { background: #eaf4e2; color: #1f3d12; box-shadow: 0 1px 0 #d3e6c4, 0 4px 14px rgba(45, 80, 22, 0.06); }
.brand, .brand:hover { color: #1f3d12; }
.brand-tag { background: #d3e6c4; color: #1f3d12; }
.topnav a { color: #2d5016; }
.topnav a:hover { background: rgba(45, 80, 22, 0.08); color: #1f3d12; }
.topnav a.is-active { background: #ffffff; color: #1f3d12; box-shadow: 0 1px 3px rgba(45, 80, 22, 0.15); }
.nav-toggle { border-color: rgba(45, 80, 22, 0.35); color: #1f3d12; }
.user-menu > summary { color: #1f3d12; }
.user-menu > summary:hover, .user-menu[open] > summary { background: rgba(45, 80, 22, 0.08); }
@media (max-width: 1020px) { .topbar-right { border-top-color: #d3e6c4; } }
/* ---------- Module: Level mit Sternen + Tooltip ---------- */
.level-seg { overflow: visible; }
.level-seg .lvl-wrap { position: relative; display: flex; }
.level-seg .lvl-wrap + .lvl-wrap button { border-left: 1px solid var(--border-strong); }
.level-seg .lvl-wrap:first-child button { border-radius: 9px 0 0 9px; }
.level-seg .lvl-wrap:last-child button { border-radius: 0 9px 9px 0; }
.level-seg button { align-items: center; text-align: center; min-width: 7.2rem; gap: 0.15rem; padding: 0.55rem 0.9rem; }
.level-seg .lvl-wrap button { border-left: 0; }
.lv-stars { display: inline-flex; gap: 1px; color: #c98a0b; }
.lv-stars .icon { width: 1.05rem; height: 1.05rem; }
.level-seg button.is-current .lv-stars { color: #ffd76a; }
.level-seg .lv { font-size: 0.85rem; text-transform: none; letter-spacing: 0; color: inherit; font-weight: 800; }
.level-seg .soon { font-size: 0.7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.level-seg button.is-soon:not(.is-current) { color: var(--muted); background: repeating-linear-gradient(135deg, #f6f5f1 0 6px, #efede7 6px 12px); }
.level-seg button.is-soon:not(.is-current) .lv-stars { color: #c9c3b4; }
.level-seg button.is-soon.is-current { background: #7c8f6c; }
.level-seg button.is-current .soon { color: rgba(255,255,255,0.85); }

.tip {
    position: absolute; z-index: 60; left: 50%; bottom: calc(100% + 10px); transform: translate(-50%, 4px);
    width: max-content; max-width: 280px; padding: 0.7rem 0.85rem; border-radius: 12px;
    background: #1f2d1a; color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    font-size: 0.85rem; line-height: 1.45; text-align: left; white-space: normal;
    opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.tip::after { content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 7px solid transparent; border-top-color: #1f2d1a; }
.tip strong { display: block; font-size: 0.95rem; margin-bottom: 0.2rem; color: #d8f0c2; }
.tip span { display: block; }
.tip em { display: flex; gap: 0.35rem; align-items: center; margin-top: 0.4rem; font-style: normal; font-weight: 700; color: #ffd76a; }
.lvl-wrap:hover .tip, .lvl-wrap:focus-within .tip, .lvl-wrap.tip-open .tip { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.mod-link { color: inherit; display: inline-flex; align-items: center; gap: 0.4rem; }
.mod-link:hover { text-decoration: none; }
.mod-link:hover .mod-name { text-decoration: underline; }
.mod-info { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .tip { transition: none; } }

/* ---------- Module: Steckbrief-Karten ---------- */
.mod-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.mod-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.04); transition: transform 0.15s, box-shadow 0.15s; }
.mod-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 12px 28px rgba(45, 80, 22, 0.12); }
.mod-card-pic { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; background: var(--tint, #eef5e8); background-size: cover; background-position: center; }
.mod-card-pic img { width: 62%; height: auto; max-height: 92%; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0,0,0,0.12)); }
.mod-card-icon { width: 5.5rem; height: 5.5rem; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--mod); }
.mod-card-icon .icon { width: 2.8rem; height: 2.8rem; }
.mod-card-body { display: flex; flex-direction: column; gap: 0.45rem; padding: 1.1rem 1.3rem 1.3rem; flex: 1; }
.mod-card-title { font-size: 1.25rem; font-weight: 800; }
.mod-card-short { color: var(--muted); font-size: 0.92rem; flex: 1; }
.mod-card-meta { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 700; color: var(--text); }
.mod-card-more { display: inline-flex; align-items: center; gap: 0.25rem; font-weight: 800; color: var(--green); font-size: 0.9rem; margin-top: 0.2rem; }
.mod-card .badge { align-self: flex-start; }

/* ---------- Steckbrief-Seite ---------- */
.mod-hero { display: grid; grid-template-columns: 260px 1fr; gap: 1.6rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 1.4rem; margin-bottom: 1.25rem; }
.mod-hero-pic { aspect-ratio: 1; border-radius: 20px; background: var(--tint, #eef5e8); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; }
.mod-hero-pic img { width: 88%; height: auto; filter: drop-shadow(0 10px 18px rgba(0,0,0,0.14)); }
.mod-hero h1 { font-size: 2rem; color: var(--green-dark); margin: 0 0 0.3rem; }
.mod-hero .lead { color: var(--muted); font-size: 1.05rem; margin-bottom: 0.9rem; }
.mod-facts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.mod-fact { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.88rem; font-weight: 700; }
.mod-fact .icon { color: var(--green); }
.mod-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.mod-level { border: 1px solid var(--border); border-radius: 16px; padding: 1rem 1.1rem; background: var(--surface-2); }
.mod-level h3 { font-size: 1.02rem; margin: 0.3rem 0 0.3rem; }
.mod-level p { font-size: 0.9rem; color: var(--muted); margin: 0; }
.mod-level.is-soon { background: repeating-linear-gradient(135deg, #f8f7f3 0 8px, #f1efe9 8px 16px); }
.mod-level .lv-stars .icon { width: 1.1rem; height: 1.1rem; }
.curr-list { list-style: none; margin: 0; padding: 0; }
.curr-list li { display: grid; grid-template-columns: 150px 1fr; gap: 0.3rem 1rem; padding: 0.75rem 0; border-top: 1px solid var(--border); }
.curr-list li:first-child { border-top: 0; padding-top: 0; }
.curr-grade { font-weight: 800; }
.curr-grade small { display: block; font-weight: 600; color: var(--muted); }
.curr-text { font-size: 0.93rem; }
.src-list { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.35rem; }
.src-list a { overflow-wrap: anywhere; }
.curr-src { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }
.act-groups { display: grid; gap: 1rem; }
.act-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.45rem; }
.act-list li { display: flex; align-items: center; gap: 0.55rem; padding: 0.45rem 0.6rem; border-radius: 10px; background: var(--surface-2); font-size: 0.9rem; font-weight: 600; }
.act-list .icon-bubble { width: 30px; height: 30px; background: #fff; }
.act-level-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 800; margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.4rem; }
.tip-box { display: flex; gap: 0.9rem; align-items: flex-start; background: #f0f7e9; border: 1px solid #d4e8c2; border-radius: 16px; padding: 1rem 1.2rem; }
.tip-box .icon-bubble { background: #fff; width: 42px; height: 42px; }
@media (max-width: 860px) {
    .mod-hero { grid-template-columns: 1fr; }
    .mod-hero-pic { max-width: 240px; }
    .mod-levels { grid-template-columns: 1fr; }
    .curr-list li { grid-template-columns: 1fr; }
}

.practice-felt { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; border-radius: 14px; background: var(--tint); margin-bottom: 0.3rem; }
.practice-felt img { height: 88%; width: auto; filter: drop-shadow(0 8px 14px rgba(0,0,0,0.12)); }
/* Level-Knöpfe gleich breit, Sterne oben */
.level-seg { grid-template-columns: repeat(3, 9.5rem); }
.level-seg .lvl-wrap button { flex: 1; width: 100%; height: auto; min-height: 3.8rem; align-items: center; justify-content: center; text-align: center; }
.level-seg .lv { overflow: visible; }
@media (max-width: 760px) { .level-seg { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Freischalt-Tabelle auf Tablet/Handy als gestapelte Zeilen */
@media (max-width: 1020px) {
    .mod-table thead { display: none; }
    .mod-table, .mod-table tbody, .mod-table tr, .mod-table td { display: block; width: 100%; }
    .mod-table tr { padding: 0.9rem 1.2rem; border-bottom: 1px solid var(--border); }
    .admin-ui .mod-table td { border: 0; padding: 0.35rem 0 !important; text-align: left; }
    .admin-ui .mod-table td.actions { width: auto; }
    .mod-table td[data-label]::before { content: attr(data-label); display: block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 0.3rem; }
    .mod-table .level-seg { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .status-stack { max-width: none; }
}
.admin-ui .table-wrap.table-wrap-visible { overflow: visible; }
.practice-felt { aspect-ratio: auto; height: 170px; }
.practice-felt img { height: 150px; }
.card-flush:has(.table-wrap-visible) { overflow: visible !important; }

/* --- Ergebnisse: Status je Kind, Modul und Level (pages/teacher/results.php, overview.php) --- */
.st { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.6rem; border-radius: 999px; border: 1px solid transparent; font-size: 0.8rem; font-weight: 700; white-space: nowrap; line-height: 1.25; }
.st .icon { width: 1em; height: 1em; flex-shrink: 0; }
.st-done { background: #e6f4ea; color: #1b6631; border-color: #b7dcc2; }
.st-help { background: #fdeee3; color: #9a3d0a; border-color: #f0c3a1; }
.st-active { background: #eaf3fa; color: #1c5f8c; border-color: #bfd8ea; }
.st-none { background: transparent; color: #6b6e72; border-color: #dcd8cc; border-style: dashed; font-weight: 600; }
a.st:hover { text-decoration: none; box-shadow: 0 0 0 2px rgba(45, 80, 22, 0.18); }
.st.is-current { box-shadow: 0 0 0 2px currentColor; }
.st-sm { font-size: 0.74rem; padding: 0.1rem 0.45rem; }

.st-legend { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.6rem 1.2rem; margin-bottom: 1.25rem; }
.st-legend-items { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.st-rules { font-size: 0.88rem; }
.st-rules > summary { cursor: pointer; color: var(--green-dark); font-weight: 700; display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0; }
.st-rules ul { margin: 0.4rem 0 0 1.2rem; max-width: 80ch; color: var(--text); line-height: 1.55; }
.st-rules li + li { margin-top: 0.25rem; }

.st-summary { list-style: none; margin: 0; padding: 0.2rem 1.4rem 1rem; display: grid; gap: 0.45rem; }
.st-summary li { display: grid; grid-template-columns: minmax(14rem, 22rem) minmax(80px, 160px) 1fr; gap: 0.8rem; align-items: center; font-size: 0.9rem; }
.st-summary-name { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; }
.st-summary-text { color: var(--text); }
.st-bar { display: flex; height: 0.65rem; border-radius: 999px; overflow: hidden; background: #eeece6; width: 100%; }
.st-bar > span { display: block; height: 100%; border: 0; padding: 0; }
.st-bar > .st-done { background: #3d9b5a; }
.st-bar > .st-help { background: #e07b39; }
.st-bar > .st-active { background: #5aa1d0; }
.st-bar > .st-none { background: #dcd8cc; }
@media (max-width: 760px) {
    .st-summary li { grid-template-columns: 1fr; gap: 0.25rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border); }
    .st-summary li:last-child { border-bottom: 0; }
}

.admin-ui .matrix-wrap { border-top: 1px solid var(--border); }
.admin-ui .matrix-wrap:focus-visible { outline-offset: -2px; }
.admin-ui table.matrix { width: auto; min-width: 100%; }
.admin-ui .matrix th, .admin-ui .matrix td { padding: 0.4rem 0.45rem; }
.admin-ui .matrix th.mx-mod { text-align: center; border-left: 1px solid var(--border); text-transform: none; letter-spacing: 0; font-size: 0.85rem; color: var(--text); }
.mx-mod-in { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.admin-ui .matrix th.mx-lvl { text-transform: none; letter-spacing: 0; font-size: 0.76rem; white-space: nowrap; }
.mx-lvl span { display: block; color: var(--text); font-weight: 700; font-size: 0.82rem; }
.admin-ui .matrix .mx-name { position: sticky; left: 0; z-index: 2; background: var(--surface); min-width: 9rem; max-width: 15rem; box-shadow: inset -1px 0 0 var(--border); }
.admin-ui .matrix thead .mx-name { background: var(--surface-2); vertical-align: bottom; }
.admin-ui .matrix tbody tr:nth-child(even) .mx-name { background: #fbfaf7; }
.admin-ui .matrix tbody tr:hover .mx-name { background: #f2f6ee; }
.admin-ui .matrix tbody th.mx-name { text-transform: none; letter-spacing: 0; font-size: 0.92rem; }
.admin-ui .matrix tbody .mx-name a { font-weight: 800; color: var(--text); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0.35rem 0; }
.admin-ui .matrix tbody .mx-name a:hover { color: var(--green-dark); }
.mx-cell { min-width: 7.6rem; }
.mx-cell .st { display: flex; width: 100%; min-height: 2.25rem; padding: 0.3rem 0.55rem; font-size: 0.78rem; }
@media (max-width: 640px) { .admin-ui .matrix .mx-name { min-width: 7rem; max-width: 9rem; } }

/* Detail eines Kindes */
.st-overview { list-style: none; margin: 0; padding: 0; }
.st-overview li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.6rem 0; border-top: 1px solid var(--border); }
.st-overview li:first-child { border-top: 0; padding-top: 0; }
.st-overview-mod { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; color: var(--text); min-width: 14rem; border-radius: 8px; padding: 0.15rem 0.3rem; }
.st-overview-mod.is-current { background: var(--surface-2); box-shadow: 0 0 0 1px var(--border-strong); }
.st-overview-levels { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.st-overview-levels .st { min-height: 2.1rem; }
.runs-intro { padding: 0 1.4rem 0.9rem; }
.runs-intro p + p { margin-top: 0.35rem; }
.st-why { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-weight: 600; }
.admin-ui tr.row-interim, .admin-ui tr.row-interim:nth-child(even) { background: #f6f5f1; color: var(--muted); }
.admin-ui tr.row-interim .badge { font-weight: 600; }
.admin-ui .run-detail { margin-top: 4px; max-width: 46ch; line-height: 1.35; }

/* Uebersicht: Ergebnisse je Klasse */
.class-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 1rem; }
.class-result { border: 1px solid var(--border); border-radius: var(--r); padding: 0.85rem 1rem; background: var(--surface-2); }
.class-result-title { font-size: 1rem; margin: 0 0 0.5rem; display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.class-result-title a { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--green-dark); }
.class-result-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); column-gap: 1.6rem; }
.class-result-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.2rem 0.6rem; padding: 0.35rem 0; border-top: 1px solid var(--border); font-size: 0.9rem; }

.class-result-list a { flex: 1 1 14rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.1rem 0.6rem; color: var(--text); min-width: 0; }
.class-result-list a:hover { text-decoration: none; color: var(--green-dark); }
.class-result-mod { display: inline-flex; align-items: center; gap: 0.4rem; min-width: 0; flex: 1 1 10rem; }
.class-result-mod .icon { color: var(--green); flex-shrink: 0; }
.class-result-num { white-space: nowrap; }
/* Letzte Aktivitaet: lange Ergebnis-Texte duerfen umbrechen (Handy) */
.admin-ui .list-main .badge { white-space: normal; }
.list-main { overflow-wrap: anywhere; }

/* Zeitstrahl Kinder x Zeit (results.php) */
.sub-title { font-size: 0.98rem; margin: 0; display: flex; align-items: center; gap: 0.45rem; color: var(--text); }
.sub-title .icon { color: var(--green); }
.mx-title { padding: 0.9rem 1.4rem 0.6rem; border-top: 1px solid var(--border); }
.tl-section { padding: 0.9rem 1.4rem 1rem; border-top: 1px solid var(--border); }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 0.4rem; }
.segmented-sm { margin: 0; }
.segmented-sm a { padding: 0.25rem 0.7rem; font-size: 0.84rem; }
.tl-legend { list-style: none; margin: 0 0 0.6rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; font-size: 0.84rem; }
.tl-legend li { display: inline-flex; align-items: center; gap: 0.35rem; }
.tl-icon { width: 1.05rem; height: 1.05rem; flex-shrink: 0; overflow: visible; }
.tl-wrap { overflow-x: auto; }
.tl-wrap:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tl-svg { display: block; width: 100%; min-width: 640px; max-width: 1200px; height: auto; font-family: 'Nunito', sans-serif; }
.tl-row { fill: #fff; }
.tl-row-alt { fill: #faf9f5; }
.tl-grid { stroke: #ebe8df; stroke-width: 1; }
.tl-grid-major { stroke: #d6d2c6; }
.tl-tick { font-size: 12px; fill: #5f6368; font-weight: 700; }
.tl-name { font-size: 13.5px; font-weight: 800; fill: #2c2c2c; }
.tl-name-idle { fill: #8a8d90; font-weight: 600; font-style: italic; }
a:hover > .tl-name, a:focus > .tl-name { fill: var(--green-dark); text-decoration: underline; }
.tl-dur { stroke-width: 3; stroke-linecap: round; opacity: 0.35; }
.tl-check { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tl-goal .tl-mark { fill: #2f8a4c; } .tl-goal .tl-dur { stroke: #2f8a4c; }
.tl-step .tl-mark { fill: #3b86bd; } .tl-step .tl-dur { stroke: #3b86bd; }
.tl-fail .tl-mark { fill: #d9702c; } .tl-fail .tl-dur { stroke: #d9702c; }
.tl-stop .tl-mark { fill: #fff; stroke: #7d7f82; stroke-width: 2.2; } .tl-stop .tl-dur { stroke: #9a9c9f; }
.tl-svg a:hover .tl-mark, .tl-svg a:focus .tl-mark { stroke: #1f3d12; stroke-width: 2.5; }
.tl-empty { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0; }
.tl-table { margin-top: 0.5rem; font-size: 0.88rem; }
.tl-table > summary { cursor: pointer; color: var(--green-dark); font-weight: 700; display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0; }
.admin-ui .tl-table .table-wrap { margin: 0.5rem 0 0; border: 1px solid var(--border); border-radius: var(--r); max-height: 420px; overflow: auto; }
.admin-ui .card .tl-table th:first-child, .admin-ui .card .tl-table td:first-child { padding-left: 1rem; }
.tl-key { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 700; }
/* Zeitfenster-Regler unter dem Zeitstrahl (app/js/timeline.js) */
.tl-brush { max-width: 1200px; margin: 0.5rem 0 0.3rem; padding-left: calc(182 / 960 * 100%); box-sizing: border-box; }
.tl-brush-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.3rem 0.8rem; font-size: 0.88rem; min-height: 2rem; }
.tl-brush-lbl { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.tl-brush-lbl .icon { color: var(--green); }
.tl-brush-out { font-variant-numeric: tabular-nums; }
.tl-brush-track { position: relative; height: 34px; margin-top: 0.2rem; }
.tl-brush-dens { position: absolute; left: 0; right: 0; top: 9px; height: 16px; border-radius: 8px; background: #f1efe8; overflow: hidden; }
.tl-brush-dens i { position: absolute; top: 3px; width: 2px; height: 10px; margin-left: -1px; background: #9aa08f; border-radius: 1px; }
.tl-brush-band { position: absolute; top: 7px; height: 20px; border: 2px solid var(--green); border-radius: 9px; background: rgba(122, 182, 72, 0.22); box-sizing: border-box; cursor: grab; touch-action: none; z-index: 1; }
.tl-brush-band.is-drag { cursor: grabbing; background: rgba(122, 182, 72, 0.34); }
.tl-brush-track input[type=range] { position: absolute; left: 0; top: 0; width: 100%; height: 34px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; z-index: 2; }
.tl-brush-track input[type=range]::-webkit-slider-runnable-track { background: none; border: 0; height: 34px; }
.tl-brush-track input[type=range]::-moz-range-track { background: none; border: 0; }
.tl-brush-track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 18px; height: 30px; margin-top: 2px; border-radius: 6px; background: #fff; border: 2px solid var(--green-dark); box-shadow: 0 1px 3px rgba(0,0,0,.25); cursor: ew-resize; }
.tl-brush-track input[type=range]::-moz-range-thumb { pointer-events: auto; width: 14px; height: 26px; border-radius: 6px; background: #fff; border: 2px solid var(--green-dark); box-shadow: 0 1px 3px rgba(0,0,0,.25); cursor: ew-resize; }
.tl-brush-track input[type=range]:focus-visible { outline: none; }
.tl-brush-track input[type=range]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--focus, #2d5016); outline-offset: 1px; }
.tl-brush-track input[type=range]:focus-visible::-moz-range-thumb { outline: 3px solid var(--focus, #2d5016); outline-offset: 1px; }
.tl-brush-ends { display: flex; justify-content: space-between; font-size: 0.76rem; }
.tl-table tr[hidden] { display: none; }
@media (max-width: 700px) { .tl-brush { padding-left: 0; } }

/* Rueckmeldungen: Auswertung (includes/feedback_list.php) */
.fb-kpis { margin-bottom: 1.2rem; }
.fb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.2rem 2rem; }
.fb-grid .sub-title { margin-bottom: 0.5rem; }
.fb-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.fb-bars li { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr auto; gap: 0.6rem; align-items: center; font-size: 0.88rem; }
.fb-bar-label { min-width: 0; overflow-wrap: anywhere; }
.fb-bar-label .stars { color: #d9902c; }
.fb-bar { height: 0.6rem; border-radius: 999px; background: #eeece6; overflow: hidden; }
.fb-bar > span { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.fb-bar-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fb-screens { margin-top: 0.5rem; }
.fb-texts-title { margin: 1.5rem 0 0.5rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }
.fb-words { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-bottom: 0.9rem; }
.fb-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1rem; }
.fb-group { border: 1px solid var(--border); border-radius: var(--r); padding: 0.8rem 1rem; background: var(--surface-2); }
.fb-group-title { font-size: 0.95rem; margin: 0 0 0.2rem; display: flex; gap: 0.5rem; align-items: baseline; }
.fb-quotes { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.fb-quotes blockquote { margin: 0 0 0.15rem; padding-left: 0.7rem; border-left: 3px solid var(--green-light); font-size: 0.92rem; overflow-wrap: anywhere; }
.fb-group details > summary { cursor: pointer; color: var(--green-dark); font-weight: 700; font-size: 0.88rem; margin-top: 0.6rem; }
@media (max-width: 640px) { .fb-bars li { grid-template-columns: 1fr auto; } .fb-bars .fb-bar { grid-column: 1 / -1; grid-row: 2; } }

/* Befragung */
.sv-waves { margin-top: 0; }
.sv-wave { border: 1px solid var(--border); border-radius: var(--r); padding: 1rem; background: var(--surface-2); min-width: 0; }
.sv-wave-title { font-size: 1rem; margin: 0 0 0.8rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.sv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 6.5rem), 1fr)); gap: 0.5rem; margin: 0 0 0.6rem; }
.sv-stats > div { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.7rem; min-width: 0; }
.sv-stats dt { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.sv-stats dd { margin: 0; font-size: 1.1rem; line-height: 1.25; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sv-meta { margin: 0 0 0.6rem; }
.sv-plan { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0 0 0.6rem; font-weight: 600; }
.sv-plan .icon { flex: 0 0 auto; margin-top: 0.15em; }
.sv-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.admin-ui .sv-actions .btn { white-space: normal; text-align: left; max-width: 100%; }
.sv-export { margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid var(--border); }
.sv-create { margin-top: 0.8rem; }
.sv-create > summary { cursor: pointer; font-weight: 700; color: var(--green-dark); font-size: 0.9rem; }
.sv-create form { margin-top: 0.6rem; }
.sv-foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1rem 1.5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.sv-foot-block { min-width: 0; }
.sv-done { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0; }
.sv-done .icon { color: var(--green); flex-shrink: 0; margin-top: 0.15rem; }
/* Befragung: Live-Uebersicht */
.svl-time { margin: 0 0 0.6rem; }
.svl-block .card-title { margin-bottom: 0.8rem; }
.svl-item { padding: 0.8rem 0; border-top: 1px solid var(--border); min-width: 0; }
.svl-item:first-of-type { border-top: 0; padding-top: 0; }
.svl-q { font-weight: 700; margin: 0 0 0.5rem; overflow-wrap: anywhere; }
.svl-row { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; align-items: flex-end; }
.svl-mean { display: flex; flex-direction: column; min-width: 7rem; }
.svl-mean strong { font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--green-dark); }
.svl-bars { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 3px; flex: 1 1 260px; max-width: 460px; }
.svl-bar { display: grid; grid-template-rows: 3.2rem auto auto; text-align: center; font-size: 0.75rem; font-variant-numeric: tabular-nums; position: relative; }
.svl-bar .svl-fill { align-self: end; display: block; background: var(--green); border-radius: 3px 3px 0 0; min-height: 0; }
.svl-bar .svl-c { font-weight: 700; min-height: 1em; }
.svl-bar .svl-k { color: var(--muted); border-top: 1px solid var(--border); }
.svl-opts { list-style: none; margin: 0 0 0.3rem; padding: 0; display: grid; gap: 0.3rem; }
.svl-opts li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(60px, 160px) 2.2rem; gap: 0.6rem; align-items: center; }
.svl-o { overflow-wrap: anywhere; font-size: 0.9rem; }
.svl-ob { height: 0.8rem; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.svl-ob span { display: block; height: 100%; background: var(--green); }
.svl-on { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.svl-groupstats dd .small { font-weight: 600; }
.svl-chart { display: flex; flex-wrap: wrap; gap: 1.2rem 1.6rem; margin-top: 0.4rem; }
.svl-group { margin: 0; flex: 1 1 200px; max-width: 360px; min-width: 0; }
.svl-plot { display: flex; align-items: flex-end; gap: 2px; height: 10rem; padding-top: 1.3rem; border-bottom: 1px solid var(--muted);
  background: linear-gradient(to top, transparent calc(50% - 0.5px), var(--border) calc(50% - 0.5px), var(--border) calc(50% + 0.5px), transparent calc(50% + 0.5px)) bottom / 100% calc(100% - 1.3rem) no-repeat; }
.svl-col { flex: 1 1 0; min-width: 0; height: 100%; position: relative; cursor: default; }
.svl-col:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.svl-col:hover .svl-b, .svl-col:focus-visible .svl-b { background: var(--green-dark); }
.svl-v { position: absolute; left: -2px; right: -2px; text-align: center; font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; padding-bottom: 2px; }
.svl-b { position: absolute; left: 0; right: 0; bottom: 0; background: var(--green); border-radius: 4px 4px 0 0; }
.svl-ids { display: flex; gap: 2px; font-size: 0.72rem; color: var(--muted); }
.svl-ids span { flex: 1 1 0; text-align: center; }
.svl-group figcaption { font-size: 0.85rem; font-weight: 700; margin-top: 0.2rem; overflow-wrap: anywhere; }
