/* ─── Streicherklassen-Portal: Stylesheet ─── */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,700;1,9..144,400&display=swap');

:root {
    --accent: #8B2635;
    --accent-hover: #7a1f2c;
    --dark: #2C2825;
    --dark-soft: #4A3F38;
    --accent-gradient: linear-gradient(135deg, #8B2635, #A63446, #C44D5E);
    --dark-gradient: linear-gradient(135deg, #2C2825, #4A3F38);
    --bg: #FDFBF7;
    --bg-soft: #F8F5F1;
    --bg-chip: #E8E4DF;
    --bg-hover: #FDF6F7;
    --border: #DDD8D3;
    --border-soft: #EFEBE7;
    --text: #2C2825;
    --text-dim: #5C5650;
    --muted: #8C8580;
    --muted-light: #A09A94;
    --disabled: #C4B8B0;
    --radius: 12px;
    --radius-lg: 16px;
    --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
    --font-display: 'Fraunces', Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

body.entry-bg {
    background: linear-gradient(180deg, #FDFBF7, #F3EFEA);
    min-height: 100vh;
}

.app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
}
.app--admin,
.app--wide {
    max-width: 1100px;
}
.app--narrow {
    max-width: 480px;
}

/* ─── Navigation ─── */
.nav {
    background: var(--dark);
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav__label {
    font-size: 10px;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}
.nav__title {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    margin-top: 2px;
}
.nav__actions { display: flex; gap: 8px; }
.nav__btn {
    padding: 9px 14px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    font-family: inherit;
}
.nav__btn--ghost {
    padding: 9px 12px;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    border-radius: 9px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}
.nav__btn--ghost:hover { background: rgba(255,255,255,0.18); }

/* ─── Entry Screen ─── */
.entry {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: linear-gradient(180deg, #FDFBF7, #F3EFEA);
}
.entry__logo { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.entry__title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 500;
    margin: 0 0 4px;
    text-align: center;
}
.entry__subtitle { color: var(--muted); font-size: 14px; margin: 0 0 36px; }
.entry__buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 340px;
}
.role-btn {
    padding: 20px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
    text-decoration: none;
}
.role-btn--primary { background: var(--accent); color: #fff; }
.role-btn--secondary { background: #fff; color: var(--text); border: 1.5px solid var(--border); }
.role-btn--admin { background: var(--dark); color: #fff; }
.role-btn__sub { font-size: 12px; font-weight: 400; opacity: 0.8; margin-top: 4px; display: block; }
.role-btn--secondary .role-btn__sub { color: var(--muted); opacity: 1; }
.entry__footer {
    margin-top: 40px;
    font-size: 11px;
    color: var(--muted-light);
    text-align: center;
    line-height: 1.6;
}

/* ─── Hero cards ─── */
.hero {
    background: var(--accent-gradient);
    border-radius: var(--radius-lg);
    padding: 24px;
    color: #fff;
    margin-bottom: 24px;
}
.hero__year {
    font-size: 11px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}
.hero__name {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 500;
}
.hero__meta { display: flex; gap: 12px; font-size: 13px; opacity: 0.85; }

.hero--dark {
    background: var(--dark-gradient);
}
.hero--dark .hero__icon {
    font-size: 32px;
    margin-bottom: 6px;
    opacity: 0.6;
}
.hero--dark .hero__title {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
}
.hero--dark .hero__serial {
    font-size: 14px;
    opacity: 0.6;
    font-family: monospace;
}
.hero--dark .hero__side { text-align: right; }
.hero--dark .hero__row { display: flex; justify-content: space-between; align-items: flex-start; }
.hero--dark .hero__info { font-size: 12px; opacity: 0.5; margin-top: 6px; }
.hero--dark .hero__pin { font-size: 11px; opacity: 0.4; margin-top: 4px; font-family: monospace; }

/* ─── Buttons ─── */
.btn {
    padding: 12px 16px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled {
    background: var(--disabled);
    cursor: not-allowed;
}
.btn--block { display: block; width: 100%; text-align: center; }
.btn--secondary { background: var(--bg-chip); color: var(--text-dim); }
.btn--secondary:hover { background: #d8d3ce; }
.btn--dark { background: var(--dark); }
.btn--dark:hover { background: #1a1715; }

.link {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.link:hover { color: var(--accent-hover); }

.scan-btn {
    width: 100%;
    padding: 14px;
    background: #fff;
    border: 1.5px solid var(--border-soft);
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-family: inherit;
    transition: border-color 0.15s;
}
.scan-btn:hover { border-color: var(--accent); }
.scan-btn__text { font-size: 14px; font-weight: 500; color: var(--text); }
.scan-btn__icon { font-size: 18px; }

/* ─── Filter Tags ─── */
.filters { margin-bottom: 20px; }
.filters__row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.filters__row:last-child { margin-bottom: 0; }
.chip {
    padding: 6px 14px;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    background: var(--bg-chip);
    color: var(--text-dim);
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
}
.chip--active { background: var(--accent); color: #fff; }
.chip--all-active { background: var(--dark); color: #fff; }
.chip--size {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 11px;
    background: #fff;
    border: 1.5px solid var(--border);
    color: var(--muted);
}
.chip--size.chip--active {
    background: var(--bg-hover);
    border-color: var(--accent);
    color: var(--accent);
}

/* ─── Badges ─── */
.badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    display: inline-block;
    background: var(--bg-chip);
    color: var(--text-dim);
}
.badge--success { background: #D4EDDA; color: #2D6A4F; }
.badge--warning { background: #FFF3CD; color: #856404; }
.badge--accent { background: var(--accent); color: #fff; }

/* ─── Slot Card ─── */
.group-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    margin-top: 20px;
}
.group-label:first-child { margin-top: 0; }

.slot {
    width: 100%;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    margin-bottom: 5px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    transition: border-color 0.15s;
    text-decoration: none;
    color: inherit;
    font-family: inherit;
}
.slot:hover { border-color: var(--accent); }
.slot--disabled { cursor: default; opacity: 0.55; }
.slot--disabled:hover { border-color: var(--border-soft); }
.slot__top { font-size: 12px; color: var(--muted-light); margin-bottom: 2px; }
.slot__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.slot__serial {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    font-family: monospace;
}
.slot__arrow { color: var(--accent); font-size: 16px; }

/* ─── Tabs ─── */
.tabs {
    display: flex;
    gap: 4px;
    padding: 0 20px;
    margin-bottom: 20px;
    overflow-x: auto;
}
.tab {
    padding: 8px 14px;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    background: var(--bg-chip);
    color: var(--text-dim);
    font-family: inherit;
    text-decoration: none;
}
.tab--active { background: var(--accent); color: #fff; }

/* ─── Grids ─── */
.problem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.problem-tile {
    padding: 16px 14px;
    background: #fff;
    border: 1.5px solid var(--border-soft);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
    font-family: inherit;
    color: inherit;
}
.problem-tile:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}
.problem-tile__icon { font-size: 20px; margin-bottom: 6px; }
.problem-tile__label { font-size: 13px; font-weight: 500; color: var(--text); }

.parent-problem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}
.parent-problem-grid .problem-tile { padding: 18px 14px; }
.parent-problem-grid .problem-tile__icon { font-size: 22px; margin-bottom: 8px; }

/* ─── Size-Grid ─── */
.size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}
.size-tile {
    padding: 18px 8px;
    background: #fff;
    border: 1.5px solid var(--border-soft);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    font-family: inherit;
    transition: all 0.15s;
}
.size-tile:hover { border-color: var(--accent); background: var(--bg-hover); }
.size-tile--current { opacity: 0.4; cursor: default; background: var(--bg-soft); }

/* ─── Request / History Cards ─── */
.card {
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    margin-bottom: 8px;
}
.card__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.card__title { font-size: 13px; font-weight: 500; color: var(--text); }
.card__meta { font-size: 12px; color: var(--muted); }
.card__desc { font-size: 13px; color: var(--text-dim); margin-top: 6px; line-height: 1.4; }
.card__actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-soft);
}
.select--inline {
    width: auto;
    padding: 6px 10px;
    font-size: 12px;
    flex: 0 0 auto;
}

/* ─── Info-Box ─── */
.info-box {
    background: var(--bg-soft);
    border-radius: var(--radius);
    padding: 14px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
    text-align: center;
}
.info-box--inline {
    text-align: left;
    margin-bottom: 20px;
}

/* ─── Forms ─── */
.field { margin-bottom: 16px; }
.field__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.input, .textarea, .select {
    width: 100%;
    padding: 12px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    outline: none;
    font-family: inherit;
    line-height: 1.5;
    box-sizing: border-box;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); }
.textarea { resize: vertical; min-height: 80px; }
.input--pin {
    text-align: center;
    font-family: monospace;
    font-size: 22px;
    letter-spacing: 0.4em;
    padding: 14px;
}
.input--serial {
    text-align: center;
    font-family: monospace;
    font-size: 15px;
    letter-spacing: 0.05em;
    padding: 14px;
}

.error { color: #922; font-size: 13px; text-align: center; margin-top: 12px; }
.hint { font-size: 11px; color: var(--muted-light); margin-top: 4px; }

/* ─── Modal ─── */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(28,24,20,0.65);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}
.modal.is-open { display: flex; }
.modal__panel {
    background: var(--bg);
    border-radius: 20px;
    padding: 28px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.modal__close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
}
.modal__title {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--text);
}
.modal__subtitle { color: var(--muted); font-size: 13px; margin: 0 0 20px; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.breadcrumb__icon { font-size: 18px; }
.breadcrumb__main { font-size: 14px; font-weight: 600; color: var(--text); }
.breadcrumb__sep { color: var(--muted-light); }
.breadcrumb__sel { font-size: 13px; font-weight: 500; color: var(--accent); }

.option-list { display: flex; flex-direction: column; gap: 6px; }
.option {
    padding: 14px 16px;
    background: #fff;
    border: 1.5px solid var(--border-soft);
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
    transition: all 0.15s;
}
.option:hover { border-color: var(--accent); background: var(--bg-hover); }
.option__label { font-size: 14px; font-weight: 500; color: var(--text); }
.option__detail { font-size: 12px; color: var(--muted); margin-top: 2px; }
.option__arrow { color: var(--accent); font-size: 16px; flex-shrink: 0; }

.pill-info {
    background: #F0EDE9;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal__actions { display: flex; gap: 10px; margin-top: 8px; }
.modal__actions .btn { flex: 1; text-align: center; }

.size-swap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.size-swap__col { text-align: center; }
.size-swap__label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.size-swap__val { font-size: 20px; font-weight: 600; color: var(--text); }
.size-swap__val--new { color: var(--accent); }
.size-swap__arrow { font-size: 24px; color: var(--accent); }

/* ─── Toast ─── */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: #fff;
    padding: 14px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 90vw;
    animation: slideUp 0.3s ease;
}
.toast__check { color: #6BCB77; font-size: 18px; }
.toast--error { background: #922; }
.toast--error .toast__check { color: #fff; }

/* ─── Scanner Modal ─── */
.scanner-stage {
    background: #1C1814;
    border-radius: 14px;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}
.scanner-stage video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.scanner-frame {
    width: 160px;
    height: 160px;
    border: 3px solid rgba(255,255,255,0.8);
    border-radius: 12px;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.35);
}
.scanner-line {
    position: absolute;
    left: -10px;
    right: -10px;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
    animation: scanLine 2s ease-in-out infinite;
}
.scanner-status {
    position: absolute;
    bottom: 10px;
    left: 16px;
    right: 16px;
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    text-align: center;
    z-index: 3;
    background: rgba(0,0,0,0.45);
    padding: 6px 10px;
    border-radius: 6px;
}

/* ─── Animations ─── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes scanLine {
    0% { top: 10%; }
    50% { top: 85%; }
    100% { top: 10%; }
}

/* ─── Admin-spezifisch (breitere Layouts) ─── */
.admin-layout { padding: 24px; }
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.admin-header h1 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 500;
    margin: 0;
    color: var(--text);
}
.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1.5px solid var(--border-soft);
    padding-bottom: 0;
    overflow-x: auto;
}
.admin-tab {
    padding: 10px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: -1.5px;
}
.admin-tab--active { color: var(--accent); border-bottom-color: var(--accent); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}
.stat-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 20px;
}
.stat-card__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 600;
}
.stat-card__value {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 500;
    color: var(--text);
    margin-top: 6px;
}
.stat-card--accent .stat-card__value { color: var(--accent); }

.table-wrap {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}
table.data {
    width: 100%;
    border-collapse: collapse;
}
.data th, .data td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
    font-size: 13px;
}
.data th {
    background: var(--bg-soft);
    font-weight: 600;
    color: var(--text-dim);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.data tr:last-child td { border-bottom: none; }
.data tr:hover td { background: var(--bg-soft); }

.form-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}
.form-card h3 {
    font-family: var(--font-display);
    margin: 0 0 16px;
    font-size: 16px;
    color: var(--text);
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.icon-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
}
.icon-btn--danger { color: #922; }

/* ─── Wizard (§3.2 Onboarding) ─── */
.wizard-header {
    margin-bottom: 20px;
}
.wizard-header h1 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 500;
    margin: 0 0 6px;
    color: var(--text);
}
.wizard-sub {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}
.wizard-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 30px;
    background: var(--bg-chip);
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}
.wizard-step--active {
    background: var(--accent);
    color: #fff;
}
.wizard-step--done {
    background: #D4EDDA;
    color: #2D6A4F;
}
.wizard-step__num {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
}
.wizard-step:not(.wizard-step--active):not(.wizard-step--done) .wizard-step__num {
    background: rgba(0,0,0,0.08);
}
.wizard-card {
    padding: 28px;
}
.wizard-card h3 {
    font-size: 20px;
    margin-top: 0;
}
.wizard-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-soft);
    justify-content: flex-end;
    flex-wrap: wrap;
}
.wizard-actions .btn--secondary:first-child {
    margin-right: auto;
}

/* ─── Provider-Tile (Cloud-Auswahl §3.2) ─── */
.provider-tile {
    display: block;
    padding: 16px;
    background: #fff;
    border: 2px solid var(--border-soft);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}
.provider-tile:hover { border-color: var(--muted); }
.provider-tile input[type="radio"] {
    position: absolute;
    top: 14px;
    right: 14px;
}
.provider-tile--active {
    border-color: var(--accent);
    background: var(--bg-hover);
}
.provider-tile__label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 4px;
    padding-right: 24px;
}
.provider-tile__hint {
    font-size: 12px;
    color: var(--muted);
}

/* ─── Utility ─── */
.center { text-align: center; }
.section { padding: 20px; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* Details (kollabierbare Sektionen) */
details.collapsible {
    margin-top: 24px;
}
details.collapsible > summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 16px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}
details.collapsible > summary::-webkit-details-marker { display: none; }
details.collapsible > summary::after {
    content: '▾';
    color: var(--muted);
    transition: transform 0.2s;
}
details.collapsible[open] > summary::after { transform: rotate(180deg); }

/* ─── Hero: Schüler-Zuordnung (Lehrer, clientseitig) ─── */
.hero__student,
.hero__no-student {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.hero__student-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
}
.hero__student-name {
    font-family: var(--font-display);
    font-size: 18px;
    color: #fff;
    margin-top: 2px;
    flex: 1;
}
.btn--ghost-light {
    background: rgba(255,255,255,0.12);
    color: #fff;
    padding: 7px 12px;
    font-size: 12px;
}
.btn--ghost-light:hover {
    background: rgba(255,255,255,0.22);
}

/* ─── Vollständigkeits-Bar (§4.5) ─── */
.completeness {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.completeness__left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
}
.completeness__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.completeness--incomplete {
    background: #FFF8E5;
    color: #6B5A1F;
}
.completeness--incomplete .completeness__dot { background: #D4A017; }
.completeness--complete {
    background: #E7F5E9;
    color: #2D6A4F;
}
.completeness--complete .completeness__dot { background: #2D6A4F; }
.completeness__btn {
    padding: 9px 16px !important;
    font-size: 13px;
}

/* ─── Slot-Card (mit Namens-Anzeige, Tools) ─── */
.slot--card {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    cursor: default;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    margin-bottom: 5px;
    transition: border-color 0.15s;
}
.slot--card:hover { border-color: var(--border); }
.slot--card.slot--unassigned {
    border: 1.5px dashed var(--border);
    background: #FCFAF6;
}
.slot--card.slot--disabled {
    opacity: 0.55;
}
.slot__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px 0;
}
.slot__tools {
    display: flex;
    gap: 2px;
}
.slot__tool {
    padding: 4px 8px !important;
    font-size: 14px !important;
    color: var(--muted) !important;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 6px;
}
.slot__tool:hover {
    background: var(--bg-chip);
    color: var(--accent) !important;
}
.slot__name-row {
    padding: 4px 14px 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    font-family: var(--font-display);
    min-height: 24px;
}
.slot__name-row.is-empty {
    font-family: var(--font-body);
    font-style: italic;
    font-weight: 400;
    color: var(--muted-light);
    font-size: 13px;
}
.slot__body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px 12px;
    text-decoration: none;
    color: inherit;
}
a.slot__body { cursor: pointer; }
a.slot__body:hover .slot__serial { color: var(--accent); }

/* ─── Aside-Block (Sidebar-Gruppe) ─── */
.aside-block {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 16px;
}
.aside-block__title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 10px;
}

/* ─── Detail-Layout Mobile-Defaults (werden auf Desktop überschrieben) ─── */
.detail-topbar {
    padding: 20px 20px 0;
}
.detail-layout {
    padding: 0 20px 24px;
}
.detail-layout .hero {
    margin-bottom: 20px;
}
.tab-content {
    /* Auf Mobile keine Extra-Klasse nötig */
}
/* Klassen-Layout auf Mobile: flach statt grid */
.class-layout__aside .filters {
    margin-bottom: 0;
}

/* ════════════════════════════════════════════════
   RESPONSIVE: Desktop-Layouts (>= 900px)
   Mobile-First Basis bleibt erhalten; Desktop-Breakpoint
   weitet Lehrer-/Admin-Ansichten auf volle Breite aus.
   ════════════════════════════════════════════════ */

@media (min-width: 900px) {

    /* Breitere Container */
    .app--wide,
    .app--admin {
        max-width: 1200px;
        padding: 0 12px;
    }

    /* Nav mit mehr Padding und größerer Typo */
    .app--wide .nav,
    .app--admin .nav {
        padding: 18px 28px;
        border-radius: 0 0 var(--radius) var(--radius);
    }
    .app--wide .nav__label,
    .app--admin .nav__label {
        font-size: 11px;
    }
    .app--wide .nav__title,
    .app--admin .nav__title {
        font-size: 16px;
    }

    /* Page-Container innerhalb .app--wide */
    .app--wide .section {
        padding: 28px;
    }

    /* Hero breiter und prominenter */
    .app--wide .hero {
        padding: 36px 40px;
        margin-bottom: 32px;
    }
    .app--wide .hero__name {
        font-size: 32px;
    }
    .app--wide .hero__meta {
        font-size: 15px;
    }

    /* ─── Lehrer: Klassenübersicht als Grid ─── */
    .class-layout {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 28px;
        align-items: start;
    }
    .class-layout__aside {
        position: sticky;
        top: 88px;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    .class-layout__main {
        min-width: 0;
    }

    /* Filter in der Sidebar statt horizontal */
    .class-layout__aside .filters {
        margin-bottom: 0;
        background: #fff;
        border: 1px solid var(--border-soft);
        border-radius: var(--radius);
        padding: 16px;
    }
    .class-layout__aside .filters__row {
        flex-direction: column;
        align-items: stretch;
    }
    .class-layout__aside .chip {
        text-align: left;
    }

    /* Slots in einem mehrspaltigen Grid */
    .slot-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 10px;
    }
    .slot-grid .slot {
        margin-bottom: 0;
    }

    /* Gruppentrenner füllen die volle Breite des Grids */
    .group-label {
        grid-column: 1 / -1;
        margin-top: 16px;
    }
    .group-label:first-child {
        margin-top: 0;
    }

    /* ─── Lehrer: Instrument-Detail 2-spaltig ─── */
    .detail-layout {
        display: grid;
        grid-template-columns: 360px 1fr;
        gap: 28px;
        align-items: start;
        padding: 0 28px 40px;
    }
    .detail-layout__aside {
        position: sticky;
        top: 88px;
    }
    .detail-layout__main {
        min-width: 0;
    }
    .detail-layout .hero {
        padding: 28px;
        margin-bottom: 16px;
    }
    .detail-layout .tabs {
        padding: 0;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }

    /* Mehr Spalten für Problem-Tiles auf Desktop */
    .problem-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 10px;
    }
    .problem-tile {
        padding: 20px 16px;
    }

    /* Größen-Grid auf Desktop etwas ruhiger */
    .size-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    /* Eltern-Problem-Grid behält nur 2 Spalten, aber etwas breiter darstellbar */
    .parent-problem-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    /* Entry-Screen: zentriert mit mehr Luft */
    .entry__buttons {
        max-width: 420px;
    }

    /* Parent bleibt schmal und zentriert */
    .app--narrow {
        max-width: 560px;
    }

    /* Admin: Tabellen großzügiger */
    .admin-layout {
        padding: 32px;
    }
    .admin-header h1 {
        font-size: 28px;
    }
    .data th, .data td {
        padding: 14px 20px;
    }
    .stat-card__value {
        font-size: 36px;
    }

    /* Back-Link-Bar im Detail */
    .detail-topbar {
        padding: 20px 28px 0;
    }

    /* Tabs auf Desktop als Pills mit mehr Padding */
    .detail-layout .tab {
        padding: 10px 18px;
        font-size: 13px;
    }

    /* Größere Touchtargets für Desktop-Maus bleiben trotzdem angenehm */
    .role-btn {
        padding: 24px 20px;
    }
}

@media (min-width: 1280px) {
    .app--wide,
    .app--admin {
        padding: 0 20px;
    }

    /* Klassenübersicht: noch breitere Aside */
    .class-layout {
        grid-template-columns: 300px 1fr;
        gap: 36px;
    }

    /* Detail-Hero etwas breiter */
    .detail-layout {
        grid-template-columns: 400px 1fr;
        gap: 36px;
    }

    .problem-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* ─── Tablet-Breakpoint (640–900px): Kompromiss zwischen Mobile und Desktop ─── */
@media (min-width: 640px) and (max-width: 899.98px) {
    .app--wide,
    .app--admin {
        max-width: 720px;
    }
    .slot-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .slot-grid .slot { margin-bottom: 0; }
    .group-label { grid-column: 1 / -1; }
    .problem-grid { grid-template-columns: repeat(3, 1fr); }
}

