:root {
    --primaer: #b52b36;
    --primaer-dunkel: #74111a;
    --primaer-hell: #f3d9d7;
    --hintergrund: #fbf5f4;
    --flaeche: #ffffff;
    --flaeche-gedeckt: #f5e8e7;
    --rand: #e3cecc;
    --textfarbe: #332527;
    --schatten: rgba(116, 17, 26, .14);
    --ueberlagerung: rgba(51, 37, 39, .52);
}

* { box-sizing: border-box; font-family: system-ui, sans-serif; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--hintergrund); color: var(--textfarbe); }
a { color: var(--primaer-dunkel); }
a:hover { color: var(--primaer); }
button { font: inherit; }

.artikelbild { width: 100%; height: 96px; object-fit: cover; margin-bottom: .5rem; border-radius: 3px; }
.manual-header { justify-content: space-between; padding-inline: 1.5rem; }
.manual-header h1 { font-size: 1.2rem; }
.manual-header-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .55rem; }
.manual-backlink { color: var(--flaeche); }
.manual-loginlink { padding: .45rem .65rem; border: 1px solid rgba(255,255,255,.7); border-radius: 4px; color: var(--flaeche); font-size: .8rem; font-weight: 750; text-decoration: none; }
.manual-loginlink:hover { color: var(--primaer-dunkel); background: var(--flaeche); }
.manual-page { max-width: 920px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.manual-page h2 { margin: 0 0 .75rem; color: var(--primaer-dunkel); font-size: 2rem; }
.manual-section { margin-top: 2rem; padding: 1.25rem; border: 1px solid var(--rand); border-left: 5px solid var(--primaer); background: var(--flaeche); box-shadow: 3px 3px 10px var(--schatten); }
.manual-section h3 { margin-top: 0; color: var(--primaer-dunkel); }
.tutorial-page { max-width: 980px; }
.tutorial-page h2 { margin-top: 0; }
.tutorial-page h3 { color: var(--primaer-dunkel); }
.tutorial-page li { margin: .45rem 0; line-height: 1.5; }
.tutorial-navigation { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.25rem; }
.tutorial-navigation-bottom { margin: 1.5rem 0 0; }
.tutorial-back-button { display: inline-flex; align-items: center; padding: .55rem .75rem; border: 1px solid var(--primaer); border-radius: 4px; color: var(--primaer-dunkel); background: var(--flaeche); font-size: .8rem; font-weight: 750; text-decoration: none; }
.tutorial-back-button:hover { color: var(--flaeche); background: var(--primaer); }
.tutorial-notfall { margin: 1rem 0 1.5rem; padding: 1rem 1.15rem; border: 2px solid var(--primaer); border-radius: 5px; color: var(--primaer-dunkel); background: var(--primaer-hell); }
.tutorial-notfall strong { display: block; margin-bottom: .25rem; }
.tutorial-video { width: 100%; aspect-ratio: 16 / 9; border: 0; background: #1f1718; }
.tutorial-video-wrap { margin: 1rem 0 .5rem; overflow: hidden; border-radius: 5px; background: #1f1718; }
.tutorial-meta, .tutorial-source { color: #68595b; font-size: .82rem; line-height: 1.5; }
.tutorial-source { margin-top: .65rem; }
.tutorial-source a { overflow-wrap: anywhere; }
.tutorial-checklist { padding-left: 1.3rem; }
.tutorial-two-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.tutorial-decision { padding: 1rem; border: 1px solid var(--rand); border-radius: 5px; background: var(--flaeche-gedeckt); }
.tutorial-decision h3 { margin-top: 0; }
.tutorial-warning { padding: .85rem 1rem; border-left: 4px solid #a01d29; background: #fff0ef; }
.tutorial-related { margin-top: 2rem; padding: 1.25rem; border: 1px solid var(--rand); border-left: 5px solid var(--primaer); background: var(--flaeche-gedeckt); }
.tutorial-related h3 { margin: 0 0 .8rem; }
.tutorial-related-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .65rem; }
.tutorial-related-link { display: flex; flex-direction: column; gap: .2rem; padding: .75rem; border: 1px solid var(--rand); color: var(--primaer-dunkel); background: var(--flaeche); text-decoration: none; }
.tutorial-related-link:hover { border-color: var(--primaer); background: #fff; }
.tutorial-related-link span { color: #705f61; font-size: .78rem; line-height: 1.4; }
.willi-wizard { max-width: 820px; padding: 1.25rem; border: 1px solid var(--rand); border-top: 6px solid var(--primaer); border-radius: 6px; background: var(--flaeche); box-shadow: 3px 3px 10px var(--schatten); }
.willi-question, .willi-result { padding: 1rem; border: 1px solid var(--rand); background: var(--flaeche-gedeckt); }
.willi-question h3, .willi-result h3 { margin: 0 0 .55rem; color: var(--primaer-dunkel); }
.willi-description { margin: 0 0 1rem; line-height: 1.5; }
.willi-options { display: grid; gap: .65rem; margin-top: 1.1rem; }
.willi-option { padding: .8rem 1rem; border: 1px solid var(--primaer); border-radius: 4px; color: var(--primaer-dunkel); background: var(--flaeche); font-weight: 700; text-align: left; cursor: pointer; }
.willi-option:hover, .willi-option:focus-visible { color: var(--flaeche); background: var(--primaer); }
.willi-result-emergency { border-color: #a01d29; background: #fff0ef; }
.willi-result-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .65rem; margin-top: 1rem; }
.willi-result-links .tutorial-related-link { display: block; }
.willi-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.willi-disclaimer { margin: 1rem 0 0; color: #705f61; font-size: .78rem; line-height: 1.45; }
@media (max-width: 640px) { .tutorial-page { padding-inline: 1rem; } }
.manual-code { overflow-x: auto; margin: 1rem 0 0; padding: 1rem; color: #fdf4f2; background: #3c1f23; border-radius: 4px; font-size: .82rem; line-height: 1.5; }
.access-panel input, .access-panel select { width: 100%; margin: .25rem 0 .7rem; padding: .55rem .65rem; border: 1px solid var(--rand); color: var(--textfarbe); background: var(--flaeche); }
.access-panel select[multiple] { min-height: 6rem; }
.access-panel fieldset { margin: 1rem 0; padding: .8rem; border: 1px solid var(--rand); }
.access-panel legend { padding: 0 .35rem; color: var(--primaer-dunkel); font-weight: 700; }
.export-columns { display: flex; flex-wrap: wrap; gap: .45rem .8rem; margin: .7rem 0; }
.export-columns label { display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .5rem; border: 1px solid var(--rand); border-radius: 4px; background: var(--hintergrund); font-size: .78rem; }
.export-columns input { width: auto; margin: 0; }
.set-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.file-list { margin: .75rem 0 1rem; padding-left: 1.2rem; }
.set-ampel { display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; font-weight: 700; }
.set-ampel > span:first-child { flex: 0 0 .8rem; width: .8rem; min-width: .8rem; height: .8rem; min-height: .8rem; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0,0,0,.08); }
.ampel-gruen > span:first-child { background: #16803c; }
.ampel-orange > span:first-child { background: #e58b19; }
.ampel-gelb > span:first-child { background: #e3b21a; }
.ampel-rot > span:first-child { background: #b3132d; }
.read-only-note { color: var(--text-muted); font-size: .8rem; }
.ampel-legende { display: flex; flex-wrap: wrap; gap: .8rem; margin: .8rem 0; font-size: .76rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1rem 0; }
.inline-form input { flex: 1 1 180px; margin: 0; }
.inline-form button { flex: 0 0 auto; }
@media (max-width: 640px) { .manual-header { height: auto; gap: .75rem; align-items: flex-start; flex-direction: column; } .manual-header-actions { justify-content: flex-start; } .manual-page { padding-inline: 1rem; } }

.site-header {
    height: 64px;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .5rem 1rem;
    margin: 0;
    background: var(--primaer);
    color: var(--flaeche);
}
.site-header h1 { margin: 0; font-size: 1.45rem; font-weight: 700; }
.site-brand-link { color: inherit; text-decoration: none; }
.site-brand-link:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.menu-toggle {
    display: none;
    padding: 0;
    border: 0;
    color: var(--flaeche);
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
}

.app-shell { display: flex; height: calc(100vh - 112px); min-height: 460px; }
.sidebar {
    width: 280px;
    flex: 0 0 280px;
    overflow-y: auto;
    background: var(--flaeche);
    border-right: 1px solid var(--rand);
}
.topic-list, .topics { list-style: none; padding: 0; margin: 0; }
.subject-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    border: 0;
    border-bottom: 1px solid var(--rand);
    color: var(--textfarbe);
    background: var(--flaeche-gedeckt);
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}
.subject-button:hover, .subject.is-open .subject-button { background: var(--primaer-hell); }
.subject-toggle {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: var(--primaer-dunkel);
    font-size: 16px;
    line-height: 18px;
}
.subject-button:hover .subject-toggle { color: var(--flaeche); background: var(--primaer); }
.topic-button {
    width: 100%;
    padding: .5rem 2rem;
    border: 0;
    color: var(--textfarbe);
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.topic-link { display: block; text-decoration: none; }
.topic-group-label { padding: .6rem 2rem .25rem; color: #806e70; font-size: .62rem; font-weight: 800; letter-spacing: .04em; line-height: 1.35; text-transform: uppercase; }
.topic-button:hover, .topic-button.is-active { color: var(--primaer-dunkel); background: var(--primaer-hell); }
.topic-button.is-active { border-left: 4px solid var(--primaer); padding-left: calc(2rem - 4px); font-weight: 700; }

.content { flex: 1; min-width: 0; padding: 1.5rem; overflow-y: auto; }
.topic-title { margin-bottom: 1.25rem; }
.topic-title h2 { margin: 0 0 .55rem; color: var(--primaer-dunkel); font-size: 1.15rem; }
.topic-title p { max-width: 720px; margin: .35rem 0; line-height: 1.5; }
.document-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.public-tutorials { grid-column: 1 / -1; margin-top: .4rem; padding-top: 1.25rem; border-top: 1px solid var(--rand); }
.public-tutorials h3 { margin: 0 0 .45rem; color: var(--primaer-dunkel); }
.public-tutorials-intro { max-width: 760px; margin: 0; color: #705f61; line-height: 1.5; }
.public-tutorials .tutorial-grid { margin-top: 1rem; }
.tutorial-card { color: inherit; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.tutorial-card:hover { border-color: var(--primaer); box-shadow: 0 5px 14px var(--schatten); transform: translateY(-1px); }
.tutorial-card:focus-visible { outline: 3px solid var(--primaer-hell); outline-offset: 2px; }
.tutorial-card h3 { margin-top: 0; }
.tutorial-card p { color: #766668; }
.card {
    min-height: 198px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .75rem;
    padding: .75rem .75rem .75rem 1rem;
    border: 1px solid var(--rand);
    border-left: 6px solid var(--primaer);
    border-radius: 6px;
    background: var(--flaeche);
    box-shadow: 4px 4px 10px var(--schatten);
}
.card-content { display: flex; flex-direction: column; min-width: 0; }
.doc-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: .5rem;
    color: var(--primaer-dunkel);
    background: var(--primaer-hell);
    font-size: .8rem;
    font-weight: 800;
}
.card h3 { margin: .3rem 0; font-size: 1rem; }
.card p { margin: 0; flex: 1; font-size: .85rem; }
.card a { margin-top: .5rem; font-weight: 700; text-decoration: none; }
.card-tag {
    align-self: start;
    color: var(--primaer-dunkel);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .08em;
    writing-mode: vertical-rl;
}

.site-footer {
    height: 48px;
    padding: .75rem 1rem;
    border-top: 1px solid var(--rand);
    background: var(--flaeche);
    text-align: center;
}
.site-footer nav { display: flex; justify-content: center; gap: 1.5rem; }
.site-footer a { color: var(--primaer-dunkel); font-size: .9rem; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.is-hidden { display: none !important; }
.auth-screen {
    min-height: 100%;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, var(--hintergrund), #f1dddd);
}
.content > .auth-screen { min-height: calc(100vh - 160px); margin: -1.5rem; }
.auth-card {
    width: min(100%, 460px);
    padding: 2.2rem;
    border: 1px solid var(--rand);
    border-top: 6px solid var(--primaer);
    background: var(--flaeche);
    box-shadow: 0 18px 44px var(--schatten);
}
.auth-brand { display: flex; align-items: center; gap: .7rem; color: var(--primaer-dunkel); font-weight: 700; }
.auth-mark { display: grid; place-items: center; width: 32px; height: 32px; color: #fff; background: var(--primaer); font-size: 1.4rem; font-weight: 400; }
.auth-kicker, .panel-kicker { margin: 2.5rem 0 .55rem; color: var(--primaer); font-size: .68rem; font-weight: 800; letter-spacing: .16em; }
.auth-card h1 { margin: 0 0 .5rem; color: var(--primaer-dunkel); font-size: 2rem; }
.auth-intro { margin: 0 0 1.5rem; color: #6c5b5d; font-size: .92rem; }
.auth-card label { display: block; margin: 1rem 0 .35rem; color: var(--textfarbe); font-size: .82rem; font-weight: 700; }
.auth-card input { width: 100%; padding: .7rem .75rem; border: 1px solid var(--rand); border-radius: 4px; color: var(--textfarbe); background: #fff; }
.auth-card input:focus { outline: 3px solid var(--primaer-hell); border-color: var(--primaer); }
.method-tabs { display: flex; gap: .4rem; margin-top: 1.2rem; border-bottom: 1px solid var(--rand); }
.method-tab { padding: .55rem .7rem; border: 0; border-bottom: 3px solid transparent; color: #786a6c; background: transparent; font-size: .78rem; cursor: pointer; }
.method-tab.is-active { color: var(--primaer-dunkel); border-color: var(--primaer); font-weight: 700; }
.auth-submit, .primary-small { border: 0; border-radius: 4px; color: #fff; background: var(--primaer); font-weight: 700; cursor: pointer; }
.auth-submit { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-top: 1.35rem; padding: .75rem 1rem; }
.auth-submit:hover, .primary-small:hover { background: var(--primaer-dunkel); }
.auth-cancel { width: 100%; margin-top: .55rem; padding: .55rem; border: 1px solid var(--rand); color: var(--primaer-dunkel); background: transparent; font-size: .78rem; cursor: pointer; }
.auth-cancel:hover { background: var(--primaer-hell); }
.auth-keycloak { width: 100%; margin-top: .55rem; padding: .65rem; border: 1px solid var(--primaer); border-radius: 4px; color: var(--primaer-dunkel); background: #fff; font-weight: 700; cursor: pointer; }
.auth-keycloak:hover { background: var(--primaer-hell); }
.auth-error { min-height: 1.25rem; margin: .7rem 0 0; color: #a01d29; font-size: .82rem; }
.demo-access { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--rand); color: #725f62; font-size: .76rem; }
.demo-access summary { color: var(--primaer-dunkel); cursor: pointer; font-weight: 700; }
.demo-access p { margin: .7rem 0; }
.demo-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.demo-accounts button { padding: .55rem; border: 1px solid var(--rand); color: var(--textfarbe); background: var(--flaeche); text-align: left; cursor: pointer; }
.demo-accounts button:hover { border-color: var(--primaer); background: var(--primaer-hell); }
.demo-accounts strong, .demo-accounts span { display: block; }
.demo-accounts strong { color: var(--primaer-dunkel); font-size: .74rem; }
.demo-accounts span { overflow: hidden; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.demo-access small { display: block; margin-top: .75rem; }

.user-bar { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.user-summary { display: flex; flex-direction: column; align-items: flex-end; font-size: .72rem; line-height: 1.2; }
.user-summary span { color: #f5cbcc; }
.logout-button { padding: .45rem .65rem; border: 1px solid rgba(255,255,255,.45); border-radius: 3px; color: #fff; background: transparent; font-size: .75rem; cursor: pointer; }
.logout-button:hover { background: rgba(255,255,255,.12); }
.set-card { min-height: 190px; padding: 1rem; border: 1px solid var(--rand); border-left: 6px solid var(--primaer); border-radius: 6px; background: var(--flaeche); box-shadow: 4px 4px 10px var(--schatten); }
.set-card-top { display: flex; align-items: center; justify-content: space-between; }
.set-icon { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; background: var(--primaer); font-size: 1.35rem; }
.set-card h3 { margin: 1rem 0 .7rem; color: var(--primaer-dunkel); font-size: 1rem; }
.set-card p { margin: .25rem 0; font-size: .82rem; }
.set-date { margin-top: .9rem !important; color: #79686a; font-size: .75rem !important; }
.status-pill, .role-badge { display: inline-block; padding: .25rem .45rem; border-radius: 999px; font-size: .63rem; font-weight: 800; }
.status-pill.is-ready { color: #176b53; background: #d9f0e8; }
.status-pill.is-due { color: #8e4e17; background: #f7e3c7; }
.empty-state { padding: 1rem; border: 1px dashed var(--rand); color: #705f61; }
.access-panel { grid-column: 1 / -1; padding: 1.1rem; border: 1px solid var(--rand); border-left: 6px solid var(--primaer); border-radius: 6px; background: var(--flaeche); box-shadow: 4px 4px 10px var(--schatten); }
.access-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.access-panel-header h3 { margin: 0; color: var(--primaer-dunkel); }
.panel-kicker { margin: 0 0 .3rem; }
.primary-small { padding: .6rem .8rem; font-size: .78rem; }
.room-list { display: grid; gap: .65rem; }
.room-accordion { border: 1px solid var(--rand); border-left: 5px solid #278563; border-radius: 5px; background: var(--flaeche); }
.room-accordion.is-inactive { border-left-color: #b66a22; background: #fffaf3; }
.room-accordion summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; cursor: pointer; list-style: none; }
.room-accordion summary::-webkit-details-marker { display: none; }
.room-accordion summary::before { content: '＋'; flex: 0 0 auto; color: var(--primaer); font-weight: 800; }
.room-accordion[open] summary::before { content: '−'; }
.room-accordion summary > span:first-of-type { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.room-accordion summary strong { color: var(--primaer-dunkel); }
.room-accordion summary small { margin-top: .2rem; color: #806e70; }
.room-accordion-body { padding: 0 1rem 1rem 2.55rem; border-top: 1px solid var(--rand); }
.room-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .55rem; margin-top: .8rem; }
.room-meta div { padding: .65rem; background: var(--flaeche-gedeckt); }
.room-meta strong, .room-meta span { display: block; }
.room-meta strong { color: #806e70; font-size: .65rem; text-transform: uppercase; }
.room-meta span { margin-top: .2rem; color: var(--primaer-dunkel); font-weight: 700; }
.room-notes { margin: .8rem 0 0; color: #705f61; font-size: .78rem; }

.landing-page { background: #fffaf8; }
.landing-header, .landing-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem max(1rem, calc((100% - 1180px) / 2)); }
.landing-header { border-bottom: 1px solid var(--rand); background: rgba(255,255,255,.86); }
.landing-brand { display: flex; align-items: center; gap: .65rem; color: var(--primaer-dunkel); font-size: 1.1rem; font-weight: 800; text-decoration: none; }
.landing-cross { position: relative; display: inline-block; width: 2rem; height: 2rem; background: linear-gradient(to bottom, transparent 0 30%, var(--primaer) 30% 70%, transparent 70%), linear-gradient(to right, transparent 0 30%, var(--primaer) 30% 70%, transparent 70%); }
.landing-login, .landing-secondary { color: var(--primaer-dunkel); font-size: .82rem; font-weight: 750; text-decoration: none; }
.landing-hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; max-width: 1180px; margin: 0 auto; padding: 6rem max(1rem, 3vw) 5rem; align-items: center; }
.landing-kicker, .tutorial-category { margin: 0 0 .75rem; color: var(--primaer); font-size: .7rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.landing-hero h1 { max-width: 720px; margin: 0; color: var(--primaer-dunkel); font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: .98; letter-spacing: -.045em; }
.landing-lead { max-width: 650px; margin: 1.5rem 0 0; color: #6c5b5d; font-size: 1.1rem; line-height: 1.6; }
.landing-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 2rem; }
.landing-primary { padding: .8rem 1rem; border-radius: 4px; color: #fff; background: var(--primaer); font-weight: 750; text-decoration: none; }
.landing-primary:hover { color: #fff; background: var(--primaer-dunkel); }
.landing-hero-card { display: flex; flex-direction: column; gap: .35rem; padding: 1.5rem; border: 1px solid var(--rand); border-top: 7px solid var(--primaer); background: #fff; box-shadow: 8px 12px 0 var(--primaer-hell); }
.landing-number { color: var(--primaer); font-size: 5.2rem; font-weight: 850; line-height: .9; }
.landing-hero-card strong { color: var(--primaer-dunkel); font-size: 1.25rem; }
.landing-hero-card span { color: #705f61; }
.landing-hero-card small { margin-top: 1rem; color: #806f71; line-height: 1.45; }
.landing-section { max-width: 1180px; margin: 0 auto; padding: 2rem max(1rem, 3vw) 5rem; }
.landing-section h2 { margin: 0; color: var(--primaer-dunkel); font-size: clamp(2rem, 4vw, 3.2rem); }
.landing-copy { max-width: 680px; color: #6c5b5d; line-height: 1.55; }
.tutorial-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: .85rem; margin-top: 2rem; }
.tutorial-card { display: grid; grid-template-columns: 42px 1fr; gap: .8rem; min-height: 135px; padding: 1rem; border: 1px solid var(--rand); border-left: 5px solid var(--primaer); background: #fff; }
.tutorial-number { color: var(--primaer); font-size: 1.2rem; font-weight: 850; }
.tutorial-card h3 { margin: 0 0 .5rem; color: var(--primaer-dunkel); font-size: 1rem; }
.tutorial-card p:last-child { margin: 0; color: #766668; font-size: .82rem; line-height: 1.45; }
.tutorial-category { margin-bottom: .35rem; font-size: .58rem; letter-spacing: .09em; }
.landing-footer { justify-content: center; border-top: 1px solid var(--rand); color: #786a6c; font-size: .8rem; }
.landing-footer a { color: var(--primaer-dunkel); text-decoration: none; }
@media (max-width: 760px) { .landing-hero { grid-template-columns: 1fr; padding-top: 4rem; } .landing-hero-card { max-width: 320px; } .landing-footer { flex-wrap: wrap; } }

.landing-minimal-content {
    grid-column: 1 / -1;
    min-height: calc(100vh - 190px);
    display: grid;
    place-items: center;
    padding: 2rem;
    background: #fcf9f8;
}
.landing-minimal-entry {
    display: grid;
    justify-items: center;
    gap: 1.6rem;
    padding: 2.5rem;
    color: inherit;
    text-align: center;
    text-decoration: none;
}
.landing-minimal-entry:focus-visible {
    outline: 3px solid var(--primaer-hell);
    outline-offset: 6px;
}
.landing-minimal-mark {
    width: clamp(13rem, 34vw, 25rem);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1.5rem 4rem rgba(116, 17, 26, .16);
}
.landing-minimal-cross {
    position: relative;
    display: block;
    width: 48%;
    height: 48%;
}
.landing-minimal-cross::before,
.landing-minimal-cross::after {
    content: '';
    position: absolute;
    border-radius: .35rem;
    background: #c8102e;
}
.landing-minimal-cross::before {
    top: 36%;
    left: 0;
    width: 100%;
    height: 28%;
}
.landing-minimal-cross::after {
    top: 0;
    left: 36%;
    width: 28%;
    height: 100%;
}
.landing-minimal-title {
    margin: 0;
    color: var(--primaer-dunkel);
    font-size: clamp(2.4rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: -.045em;
}
.landing-minimal-entry:hover .landing-minimal-title { color: var(--primaer); }
.landing-willi-fab {
    position: fixed;
    right: clamp(1rem, 3vw, 2rem);
    bottom: clamp(1rem, 3vw, 2rem);
    z-index: 10;
    display: grid;
    place-items: center;
    width: 3.7rem;
    height: 3.7rem;
    border: 3px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: var(--primaer);
    box-shadow: 0 .65rem 1.5rem rgba(116, 17, 26, .28);
    text-decoration: none;
    transition: transform .15s ease, background-color .15s ease;
}
.landing-willi-fab svg { width: 1.75rem; height: 1.75rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.landing-willi-fab svg path + path { fill: currentColor; stroke: none; }
.landing-willi-fab:hover, .landing-willi-fab:focus-visible { color: #fff; background: var(--primaer-dunkel); transform: translateY(-3px); }
.landing-willi-fab:focus-visible { outline: 3px solid var(--primaer-hell); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .landing-willi-fab { transition: none; } }
.table-wrap { overflow-x: auto; margin-top: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: .78rem; }
th, td { padding: .7rem .55rem; border-bottom: 1px solid var(--rand); text-align: left; vertical-align: middle; }
th { color: #755f62; font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; }
td small { display: block; margin-top: .15rem; color: #806e70; font-size: .68rem; }
.table-action { padding: .35rem .5rem; border: 1px solid var(--rand); color: var(--primaer-dunkel); background: #fff; font-size: .7rem; cursor: pointer; }
.table-action:hover { border-color: var(--primaer); background: var(--primaer-hell); }
.role-actions { min-width: 260px; white-space: nowrap; }
.role-select { max-width: 115px; margin-right: .25rem; padding: .32rem; border: 1px solid var(--rand); color: var(--textfarbe); background: #fff; font-size: .7rem; }
.role-select:focus { outline: 2px solid var(--primaer-hell); border-color: var(--primaer); }
.table-action:disabled, .role-select:disabled { cursor: not-allowed; opacity: .5; }
.role-adm { color: #fff; background: var(--primaer-dunkel); }
.role-schulleitung { color: #6d261e; background: #f3d5b9; }
.role-sani { color: #176b53; background: #d9f0e8; }
.role-fl { color: #4a3d83; background: #e4def8; }
.role-kollege { color: #315c86; background: #dceaf7; }
.role-user { color: #655a5d; background: #ece8e8; }
.permission-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .65rem 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--rand); }
.permission-legend span { display: flex; align-items: flex-start; gap: .45rem; color: #705f61; font-size: .72rem; }
.permission-legend .role-badge { flex: 0 0 auto; }
.text-button { padding: 0; border: 0; color: var(--primaer-dunkel); background: transparent; font-size: .78rem; cursor: pointer; text-decoration: underline; }
.reset-request { margin-top: .8rem; padding: .8rem; border: 1px solid var(--rand); background: var(--flaeche-gedeckt); }
.reset-request label { margin-top: 0; }
.reset-request select, .security-panel select { width: 100%; padding: .55rem; border: 1px solid var(--rand); background: #fff; }
.secondary-small { padding: .55rem .7rem; border: 1px solid var(--primaer); border-radius: 4px; color: var(--primaer-dunkel); background: #fff; font-size: .75rem; font-weight: 700; cursor: pointer; }
.secondary-small:hover { color: #fff; background: var(--primaer); }
.reset-result, .security-result { overflow-wrap: anywhere; margin: .6rem 0 0; color: var(--primaer-dunkel); font-size: .72rem; }
.security-list { margin: .75rem 0 1rem; padding-left: 1.1rem; color: #705f61; font-size: .76rem; }
.security-list li { margin: .35rem 0; }
.security-list strong, .security-list span { display: block; }
.security-list strong { color: var(--primaer-dunkel); }
.security-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; grid-column: 1 / -1; }
.security-panel { padding: 1.1rem; border: 1px solid var(--rand); border-left: 6px solid var(--primaer); border-radius: 6px; background: var(--flaeche); box-shadow: 4px 4px 10px var(--schatten); }
.security-panel h3 { margin: 0 0 .6rem; color: var(--primaer-dunkel); }
.security-panel p:not(.panel-kicker):not(.security-result) { min-height: 2.8rem; margin: .4rem 0 1rem; color: #705f61; font-size: .8rem; }
.security-panel label { display: block; margin: .7rem 0 .3rem; font-size: .75rem; font-weight: 700; }
.security-panel input { width: 100%; padding: .55rem; border: 1px solid var(--rand); }
.security-panel form .primary-small { margin-top: .8rem; }
.secret-code { display: block; min-height: 2.4rem; margin-bottom: .8rem; padding: .7rem; color: var(--primaer-dunkel); background: var(--primaer-hell); font-size: .82rem; letter-spacing: .13em; }
.reset-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.set-card-link { display: block; width: 100%; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.set-card-link h3 { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .18em; transition: text-decoration-color .15s ease; }
.set-card-link:hover h3 { text-decoration-color: var(--primaer); }
.attention-panel, .success-panel { margin-bottom: 1rem; padding: 1rem 1.1rem; border: 1px solid #e7b4ae; border-left: 5px solid var(--primaer); background: #fff8f7; }
.attention-panel h3 { margin: 0 0 .5rem; color: var(--primaer-dunkel); }
.attention-panel ul { margin: 0; padding-left: 1.1rem; color: #6d5557; font-size: .82rem; line-height: 1.55; }
.success-panel { border-color: #b9ddcf; border-left-color: #278563; color: #23684f; background: #f4fbf8; }
.detail-summary { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.detail-summary div { padding: .8rem; border: 1px solid var(--rand); background: var(--flaeche-gedeckt); }
.detail-summary strong, .detail-summary span { display: block; }
.detail-summary strong { color: var(--primaer-dunkel); font-size: 1.2rem; }
.detail-summary span { margin-top: .2rem; color: #766668; font-size: .7rem; }
.medida-lookup { margin-bottom: 1rem; padding: .9rem; border: 1px dashed var(--rand); background: #fffdfc; }
.medida-lookup h3 { margin: 0 0 .3rem; color: var(--primaer-dunkel); font-size: .95rem; }
.medida-lookup p { color: #766668; font-size: .78rem; line-height: 1.45; }
.medida-lookup input { flex: 1; min-width: 220px; padding: .55rem; border: 1px solid var(--rand); }
.medida-lookup .set-actions { align-items: center; }
.export-columns { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin: .6rem 0; }
.export-columns label { color: #705f61; font-size: .75rem; }
.export-columns input { accent-color: var(--primaer); }
.tool-edit, .tool-delete, .shopping-edit, .shopping-delete { margin: .1rem; }
@media (max-width: 640px) { .detail-summary { grid-template-columns: 1fr; } .medida-lookup .set-actions { align-items: stretch; flex-direction: column; } }

@media (max-width: 768px) {
    body { display: flex; flex-direction: column; min-height: 100vh; }
    .site-header h1 { font-size: 1.3rem; }
    .menu-toggle { display: block; }
    .app-shell { position: relative; flex: 1; height: calc(100vh - 112px); }
    .sidebar {
        position: fixed;
        z-index: 900;
        top: 64px;
        bottom: 48px;
        left: 0;
        width: 260px;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 2px 0 8px var(--schatten);
    }
    .sidebar.is-open { transform: translateX(0); }
    .content { width: 100%; padding: 1rem; }
    .document-grid { grid-template-columns: 1fr; }
    .document-grid, .access-panel { min-width: 0; }
    .table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; }
    .access-panel-header { align-items: flex-start; flex-direction: column; }
    .access-panel-header .set-actions { width: 100%; }
    .access-panel-header .primary-small, .access-panel-header .table-action { width: 100%; }
    .subject-button, .topic-button { padding-top: 1rem; padding-bottom: 1rem; font-size: 1rem; }
    .topic-button.is-active { padding-left: calc(1rem - 4px); }
    .site-footer { flex-shrink: 0; }
}

@media (max-width: 560px) {
    .auth-card { padding: 1.5rem; }
    .demo-accounts { grid-template-columns: 1fr; }
    .user-summary { display: none; }
    .access-panel { padding: .75rem; }
    .access-panel-header { align-items: flex-start; flex-direction: column; }
    .access-panel input, .access-panel select, .access-panel textarea { max-width: 100%; }
    .set-actions { align-items: stretch; flex-direction: column; }
    .set-actions > input, .set-actions > select, .set-actions > button { width: 100%; min-width: 0; }
    .table-action, .primary-small { min-height: 2.35rem; }
    .topic-title h2 { font-size: 1rem; }
    .room-accordion summary { align-items: flex-start; padding: .75rem; }
    .room-accordion-body { padding: 0 .75rem .75rem 2.15rem; }
    .room-accordion summary .status-pill { flex: 0 0 auto; }
    th, td { padding: .55rem .35rem; }
}
