/* ==========================================================================
   Spezifische Komponenten: Workbook Schulverweigerung
   ========================================================================== */

/* 1. Die Schul-Landkarte (Modul 5) */
.schul-landkarte-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.landkarte-card {
    background: #FAFBF9;
    border: 1.5px solid #D9E5E0;
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.2s ease;
}

.landkarte-card:hover {
    border-color: #CBAF7A;
}

.landkarte-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 0.9em;
    color: #2F3E36;
}

.landkarte-slider-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.landkarte-score {
    font-weight: 800;
    font-size: 0.95em;
    color: #6F8C7A;
    min-width: 28px;
    text-align: right;
}

/* 2. Die Reintegrationsleiter (Modul 8) */
.reintegration-ladder {
    display: flex;
    flex-direction: column-reverse; /* Stufe 1 unten, Stufe 6 oben */
    gap: 12px;
    margin: 25px 0;
    position: relative;
}

.ladder-step {
    background: #FAFBF9;
    border: 2px solid #D9E5E0;
    border-left: 6px solid #6F8C7A;
    border-radius: 6px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    cursor: pointer;
}

.ladder-step:hover {
    border-color: #CBAF7A;
    transform: translateX(4px);
}

.ladder-step.is-current {
    background: #ffffff;
    border-color: #2F3E36;
    border-left: 8px solid #CBAF7A;
    box-shadow: 0 4px 12px rgba(47, 62, 54, 0.1);
}

.ladder-step-num {
    font-size: 0.8em;
    font-weight: 800;
    color: #CBAF7A;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.ladder-step-title {
    font-size: 1em;
    font-weight: 700;
    color: #2F3E36;
}

.ladder-step-badge {
    font-size: 0.75em;
    padding: 4px 10px;
    border-radius: 20px;
    background: #E0E7E3;
    color: #2F3E36;
    font-weight: 600;
}

.ladder-step.is-current .ladder-step-badge {
    background: #2F3E36;
    color: #ffffff;
}

/* 3. Entscheidungs-Ampel für den 7:15 Uhr Notfall-Morgen */
.morgen-ampel-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.morgen-ampel-card {
    padding: 18px;
    border-radius: 8px;
    border: 2px solid transparent;
    text-align: center;
}

.morgen-ampel-card.is-green {
    background: #eaf3ed;
    border-color: #6F8C7A;
    color: #2F3E36;
}

.morgen-ampel-card.is-yellow {
    background: #fcf6e8;
    border-color: #d1a856;
    color: #5c4314;
}

.morgen-ampel-card.is-red {
    background: #fdf2f2;
    border-color: #c94a4a;
    color: #631b1b;
}

.morgen-ampel-card h4 {
    margin: 0 0 8px 0;
    font-size: 1.05em;
}

.morgen-ampel-card p {
    font-size: 0.85em;
    line-height: 1.45;
    margin: 0;
}
/* ==========================================================================
   Tages-Belastungsdiagramm (Modul 3)
   ========================================================================== */

.belastung-chart-container {
    background: #ffffff;
    border: 1.5px solid var(--color-border, #D9E5E0);
    border-radius: 8px;
    padding: 20px 20px 15px 20px;
    margin: 20px 0;
    box-shadow: 0 4px 14px rgba(47, 62, 54, 0.05);
}

.chart-legend {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.8em;
    color: var(--color-text-muted, #666);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot-green { background: #6F8C7A; }
.dot-yellow { background: #d1a856; }
.dot-red { background: #c94a4a; }

.belastung-svg-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.belastung-curve-svg {
    width: 100%;
    min-width: 600px;
    height: 220px;
    display: block;
}

/* Hilfslinien & Raster */
.chart-grid-line {
    stroke-width: 1;
    stroke-dasharray: 4;
}

.line-red { stroke: rgba(201, 74, 74, 0.4); }
.line-yellow { stroke: rgba(209, 168, 86, 0.4); }
.line-green { stroke: rgba(111, 140, 122, 0.4); }
.line-base { stroke: #D9E5E0; stroke-width: 1.5; stroke-dasharray: none; }

.chart-axis-label {
    font-size: 10px;
    fill: #888888;
    font-family: sans-serif;
    font-weight: 500;
}

.chart-station-label {
    font-size: 11px;
    fill: #2F3E36;
    font-family: sans-serif;
    font-weight: 600;
}

/* Kurve & Fläche */
.belastung-curve-path {
    fill: none;
    stroke: #6F8C7A;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: d 0.25s ease, stroke 0.3s ease;
}

.belastung-area-path {
    fill: rgba(111, 140, 122, 0.15);
    transition: points 0.25s ease, fill 0.3s ease;
}

.belastung-point {
    fill: #6F8C7A;
    stroke: #ffffff;
    stroke-width: 2.5;
    transition: cy 0.25s ease, fill 0.3s ease;
}

/* Statusleiste unter dem Chart */
.chart-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #FAFBF9;
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 14px;
    font-size: 0.88em;
    color: #2F3E36;
    border: 1px solid #E0E7E3;
    flex-wrap: wrap;
    gap: 8px;
}

.chart-status-bar.is-danger {
    background: #fdf2f2;
    border-color: #c94a4a;
    color: #8c2525;
}

.chart-status-bar.is-warning {
    background: #fcf6e8;
    border-color: #d1a856;
    color: #6e4e16;
}

/* Schieberegler in der Tabelle */
.barometer-table td {
    vertical-align: middle;
}

.barometer-range-input {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #E0E7E3;
    border-radius: 3px;
    outline: none;
    margin: 6px 0;
}

.barometer-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2F3E36;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.1s ease;
}

.barometer-range-input::-webkit-slider-thumb:active {
    transform: scale(1.2);
}

.barometer-val-display {
    font-weight: 700;
    font-size: 0.95em;
    color: #2F3E36;
    white-space: nowrap;
}
/* ==========================================================================
   5-Säulen-Diagramm (Modul 4)
   ========================================================================== */

.saeulen-chart-container {
    background: #ffffff;
    border: 1.5px solid var(--color-border, #D9E5E0);
    border-radius: 8px;
    padding: 20px 20px 15px 20px;
    margin: 20px 0;
    box-shadow: 0 4px 14px rgba(47, 62, 54, 0.05);
}

.saeulen-svg-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.saeulen-svg {
    width: 100%;
    min-width: 520px;
    height: 240px;
    display: block;
}

/* Säulen-Führungsschacht im Hintergrund */
.saeule-track {
    fill: #f0f3f1;
    stroke: #e2e8e5;
    stroke-width: 1;
}

/* Dynamisch wachsende Säulenbalken */
.saeule-bar {
    fill: #6F8C7A;
    transition: height 0.3s cubic-bezier(0.2, 0.8, 0.3, 1),
                y 0.3s cubic-bezier(0.2, 0.8, 0.3, 1),
                fill 0.3s ease;
}

.saeule-bar.is-warning {
    fill: #d1a856;
}

.saeule-bar.is-danger {
    fill: #c94a4a;
}

/* Schwellenwert-Linie bei 7 */
.chart-threshold-line {
    stroke: #c94a4a;
    stroke-width: 1.5;
    stroke-dasharray: 4;
}

.chart-threshold-text {
    font-size: 10px;
    fill: #c94a4a;
    font-family: sans-serif;
    font-weight: 700;
}

/* Säulen-Zahlen & Beschriftungen */
.saeule-score-text {
    font-size: 13px;
    font-weight: 800;
    font-family: sans-serif;
    fill: #2F3E36;
    transition: y 0.3s cubic-bezier(0.2, 0.8, 0.3, 1), fill 0.3s ease;
}

.saeule-axis-title {
    font-size: 11px;
    font-weight: 700;
    font-family: sans-serif;
    fill: #2F3E36;
}

/* Tabelle & Regler */
.saeulen-table td {
    vertical-align: middle;
}

.saeule-range-input {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #E0E7E3;
    border-radius: 3px;
    outline: none;
    margin: 6px 0;
}

.saeule-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2F3E36;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.1s ease;
}

.saeule-range-input::-webkit-slider-thumb:active {
    transform: scale(1.2);
}

.saeule-num-display {
    font-weight: 800;
    font-size: 0.95em;
    color: #2F3E36;
    white-space: nowrap;
    text-align: center;
}
/* Trennlinie über den Balken */
.chart-threshold-group {
    pointer-events: none;
}

.chart-threshold-line {
    stroke: #c94a4a;
    stroke-width: 2;
    stroke-dasharray: 6 4;
    filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.8));
}

.chart-threshold-text {
    font-size: 11px;
    fill: #b32d2d;
    font-family: sans-serif;
    font-weight: 800;
    letter-spacing: 0.3px;
    /* Weißer Umriss, damit der Text über jedem roten/bunten Balken lesbar bleibt */
    paint-order: stroke fill;
    stroke: #ffffff;
    stroke-width: 3.5px;
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* ==========================================================================
   2D-Matrix: Nachmittags-Check (Modul 8)
   ========================================================================== */

.matrix-chart-container {
    background: #ffffff;
    border: 1.5px solid var(--color-border, #D9E5E0);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 14px rgba(47, 62, 54, 0.05);
}

.matrix-svg-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.matrix-svg {
    width: 100%;
    min-width: 480px;
    height: 320px;
    display: block;
}

.matrix-axis-line {
    stroke: #2F3E36;
    stroke-width: 2;
}

.matrix-grid-line {
    stroke: #CBAF7A;
    stroke-width: 1.5;
    stroke-dasharray: 4 4;
    opacity: 0.6;
}

.matrix-axis-title {
    font-size: 11px;
    font-family: sans-serif;
    font-weight: 700;
    fill: #2F3E36;
    letter-spacing: 0.5px;
}

.matrix-quadrant-label {
    font-size: 11px;
    font-family: sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.label-green { fill: #4E6657; }
.label-yellow { fill: #8c6a22; }
.label-orange { fill: #a86214; }
.label-red { fill: #b32d2d; }

/* Dynamischer Koordinaten-Punkt */
.matrix-point {
    fill: #2F3E36;
    stroke: #ffffff;
    stroke-width: 2.5;
    transition: cx 0.3s cubic-bezier(0.2, 0.8, 0.3, 1),
                cy 0.3s cubic-bezier(0.2, 0.8, 0.3, 1),
                fill 0.3s ease;
}

.matrix-pulse {
    fill: none;
    stroke: #2F3E36;
    stroke-width: 2;
    opacity: 0.4;
    transition: cx 0.3s cubic-bezier(0.2, 0.8, 0.3, 1),
                cy 0.3s cubic-bezier(0.2, 0.8, 0.3, 1),
                stroke 0.3s ease;
}

.matrix-point.is-green { fill: #6F8C7A; }
.matrix-pulse.is-green { stroke: #6F8C7A; }

.matrix-point.is-yellow { fill: #d1a856; }
.matrix-pulse.is-yellow { stroke: #d1a856; }

.matrix-point.is-orange { fill: #e67e22; }
.matrix-pulse.is-orange { stroke: #e67e22; }

.matrix-point.is-red { fill: #c94a4a; }
.matrix-pulse.is-red { stroke: #c94a4a; animation: pointWarnPulse 1.5s infinite; }

@keyframes pointWarnPulse {
    0% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.4); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

.matrix-range-input {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #E0E7E3;
    border-radius: 3px;
    outline: none;
    margin: 6px 0;
}

.matrix-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2F3E36;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.1s ease;
}

.matrix-range-input::-webkit-slider-thumb:active {
    transform: scale(1.2);
}
/* ==========================================================================
   Tagesform-Monitor & Lern-Akku (Modul 10)
   ========================================================================== */

.kapazitaet-monitor-container {
    background: #ffffff;
    border: 1.5px solid var(--color-border, #D9E5E0);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 14px rgba(47, 62, 54, 0.05);
}

.kapazitaet-visual-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 15px;
}

.kapazitaet-akku-card,
.fokus-fenster-card {
    background: #FAFBF9;
    border: 1.5px solid #D9E5E0;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
}

.kapazitaet-card-label {
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6F8C7A;
    margin-bottom: 12px;
}

/* Große horizontale Akku-Darstellung */
.kapazitaet-battery-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 6px 0 10px 0;
}

.kapazitaet-battery-shell {
    width: 140px;
    height: 48px;
    border: 3px solid #2F3E36;
    border-radius: 8px;
    padding: 3px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    background: #ffffff;
}

.kapazitaet-battery-pole {
    width: 6px;
    height: 18px;
    background: #2F3E36;
    border-radius: 0 3px 3px 0;
}

.kapazitaet-battery-fill {
    height: 100%;
    width: 0%;
    background: #6F8C7A;
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.2, 0.8, 0.3, 1), background-color 0.4s ease;
}

.kapazitaet-score-large {
    font-size: 1.4em;
    font-weight: 800;
    font-family: sans-serif;
    color: #2F3E36;
}

/* Fokus-Fenster Box */
.fokus-minuten-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin: 4px 0 8px 0;
}

.fokus-minuten-number {
    font-size: 2.2em;
    font-weight: 800;
    font-family: sans-serif;
    color: #2F3E36;
    line-height: 1;
}

.fokus-minuten-unit {
    font-size: 0.9em;
    font-weight: 600;
    color: #555555;
}

.fokus-status-hinweis {
    font-size: 0.85em;
    line-height: 1.45;
    color: #444444;
    margin: 0;
}

/* Farbdynamik für Akku & Status */
.kapazitaet-monitor-container.is-empty .kapazitaet-battery-fill { background: #c94a4a; }
.kapazitaet-monitor-container.is-empty .fokus-minuten-number { color: #c94a4a; }

.kapazitaet-monitor-container.is-low .kapazitaet-battery-fill { background: #d1a856; }
.kapazitaet-monitor-container.is-low .fokus-minuten-number { color: #d1a856; }

.kapazitaet-monitor-container.is-medium .kapazitaet-battery-fill { background: #6F8C7A; }
.kapazitaet-monitor-container.is-medium .fokus-minuten-number { color: #6F8C7A; }

.kapazitaet-monitor-container.is-high .kapazitaet-battery-fill { background: #2F3E36; }
.kapazitaet-monitor-container.is-high .fokus-minuten-number { color: #2F3E36; }

.kapazitaet-range-input {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #E0E7E3;
    border-radius: 3px;
    outline: none;
    margin: 6px 0;
}

.kapazitaet-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2F3E36;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.1s ease;
}

.kapazitaet-range-input::-webkit-slider-thumb:active {
    transform: scale(1.2);
}
/* ==========================================================================
   TOC: Gesperrte Module
   ========================================================================== */
.toc-item.is-locked-module {
    background: #fbfbfa;
    border-color: #e5e9e7;
    opacity: 0.85;
    position: relative;
    transition: all 0.2s ease;
}

.toc-item.is-locked-module:hover {
    border-color: var(--wb-gold, #CBAF7A);
    opacity: 1;
    transform: translateY(-2px);
}

.toc-item.is-locked-module strong {
    color: #555555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toc-lock-badge {
    font-size: 0.9em;
    filter: grayscale(0.2);
}

/* ==========================================================================
   Mitlaufendes Widget: Lesezeichen (oben rechts)
   ========================================================================== */
.wb-floating-bookmark {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 1000;
}

.wb-bookmark-btn {
    background: #ffffff;
    border: 1.5px solid #2F3E36;
    color: #2F3E36;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.82em;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(47, 62, 54, 0.12);
    transition: all 0.2s ease;
}

.wb-bookmark-btn:hover {
    background: #2F3E36;
    color: #ffffff;
    transform: translateY(-1px);
}

.wb-bookmark-btn.has-bookmark {
    border-color: #CBAF7A;
    color: #8c6a22;
    background: #fdfaf2;
}

.wb-bookmark-btn.has-bookmark:hover {
    background: #CBAF7A;
    color: #ffffff;
}

/* ==========================================================================
   Mitlaufendes Widget: Inhalt-Button (rechts am Bildschirmrand)
   ========================================================================== */
.wb-floating-nav {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 990;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
}

.wb-floating-nav.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.wb-floating-nav-btn {
    background: #2F3E36;
    color: #ffffff;
    border-radius: 24px;
    padding: 9px 16px;
    font-size: 0.85em;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 16px rgba(47, 62, 54, 0.2);
    transition: background 0.2s ease, transform 0.2s ease;
}

.wb-floating-nav-btn:hover {
    background: #3f5449;
    color: #ffffff;
    transform: scale(1.04);
}

@media (max-width: 600px) {
    .wb-floating-bookmark {
        top: 10px;
        right: 12px;
    }
    .wb-bookmark-btn span {
        display: none; /* Auf kleinen Handys nur das Icon anzeigen */
    }
    .wb-floating-nav {
        right: 14px;
        bottom: 70px;
    }
}
/* ==========================================================================
   Header- & Footer-Abstände für mitlaufende Widgets
   ========================================================================== */
:root {
    --wb-site-header-height: 70px;      /* Höhe des fixierten/sticky Headers */
    --wb-site-footer-bar-height: 75px;  /* Höhe des mitlaufenden Footer-Menüs */
}

/* 1. Lesezeichen-Stoffband (Ribbon) unterhalb des Headers platzieren */
.wb-bookmark-ribbon {
    top: var(--wb-site-header-height, 70px) !important;
    right: 35px !important;
    z-index: 9998 !important;
}

/* Toast-Nachricht für Lesezeichen-Aktionen (Hinspringen, Verschieben, Löschen) */
.wb-bookmark-toast {
    top: calc(var(--wb-site-header-height, 70px) + 55px) !important;
    right: 35px !important;
    z-index: 9999 !important;
}

/* 2. "Inhalt"-Button sicher ÜBER dem mitlaufenden Footer-Menü positionieren */
.wb-back-to-toc-btn {
    bottom: calc(var(--wb-site-footer-bar-height, 75px) + 16px + env(safe-area-inset-bottom, 0px)) !important;
    right: 25px !important;
    z-index: 9997 !important;
}

/* 3. Ausreichend Puffer am Seitenende, damit Inhalte nicht verdeckt werden */
.workbook-viewport {
    padding-bottom: calc(var(--wb-site-footer-bar-height, 75px) + 70px) !important;
}

/* 4. TOC: Gesperrte Module optisch abtönen */
.toc-item.is-locked-module {
    background: #fbfbfa;
    border-color: #e5e9e7;
    opacity: 0.88;
    position: relative;
    transition: all 0.2s ease;
}

.toc-item.is-locked-module:hover {
    border-color: var(--wb-gold, #CBAF7A);
    opacity: 1;
    transform: translateY(-2px);
}

.toc-item.is-locked-module strong {
    color: #555555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toc-lock-badge {
    font-size: 0.9em;
}

/* Responsive Anpassungen für Mobilgeräte */
@media (max-width: 768px) {
    :root {
        --wb-site-header-height: 60px;
        --wb-site-footer-bar-height: 70px;
    }

    .wb-bookmark-ribbon {
        top: var(--wb-site-header-height, 60px) !important;
        right: 15px !important;
        width: 30px !important;
        height: 44px !important;
    }

    .wb-bookmark-toast {
        top: calc(var(--wb-site-header-height, 60px) + 48px) !important;
        right: 15px !important;
        left: 15px !important;
        text-align: center !important;
    }

    .wb-back-to-toc-btn {
        bottom: calc(var(--wb-site-footer-bar-height, 70px) + 12px + env(safe-area-inset-bottom, 0px)) !important;
        right: 15px !important;
        padding: 8px 14px !important;
        font-size: 0.8em !important;
    }
}
/* ==========================================================================
   Druck-Ausgabe: Offizieller Schulstress- & Reintegrationsplan
   ========================================================================== */

/* Bildschirm-Ansicht: Text-Spiegelung unsichtbar halten */
.wb-print-value {
    display: none;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 12mm 15mm 15mm 15mm;
    }

    /* 1. Band 1 Selektor deaktivieren */
    #modul-7-content {
        display: none !important;
    }

    /* 2. Gesamte Web-UI & Modul-Umgebung ausblenden */
    body, .workbook-viewport {
        background: #ffffff !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #modul-12-print-section {
        display: block !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    #modul-12-print-section > * {
        display: none !important;
    }

    /* 3. Das Dokument als cleanes Briefpapier / Protokoll darstellen */
    #modul-12-print-section > #schulstress-plan-print {
        display: block !important;
        background: #ffffff !important;
        border: 1.5pt solid #2F3E36 !important;
        border-radius: 0 !important;
        padding: 16px 20px !important;
        margin: 0 !important;
        box-shadow: none !important;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
        color: #111111 !important;
    }

    /* Dokumenten-Kopfzeile */
    #schulstress-plan-print div[style*="border-bottom: 1.5px solid"] {
        border-bottom: 2pt solid #2F3E36 !important;
        padding-bottom: 6px !important;
        margin-bottom: 14px !important;
    }

    #schulstress-plan-print div[style*="border-bottom: 1.5px solid"] span:first-child {
        font-size: 13pt !important;
        font-weight: 800 !important;
        color: #2F3E36 !important;
        letter-spacing: 0.3px !important;
    }

    #schulstress-plan-print div[style*="border-bottom: 1.5px solid"] span:last-child {
        font-size: 9pt !important;
        color: #555555 !important;
    }

    /* 4. Formular-Inputs & Textareas im Druck durch sauberen Text ersetzen */
    #schulstress-plan-print input,
    #schulstress-plan-print textarea {
        display: none !important;
    }

    #schulstress-plan-print .wb-print-value {
        display: block !important;
        font-size: 9.5pt !important;
        line-height: 1.45 !important;
        color: #1a1a1a !important;
        white-space: pre-wrap !important; /* Bricht Zeilen & Absätze originalgetreu um */
        word-break: break-word !important;
        background: #fbfcfb !important;
        border: 1px solid #d9e2dc !important;
        border-left: 3.5pt solid #2F3E36 !important;
        padding: 6px 10px !important;
        margin-top: 3px !important;
        box-sizing: border-box !important;
    }

    #schulstress-plan-print .wb-print-value.is-empty {
        color: #888888 !important;
        font-style: italic !important;
        background: #fafafa !important;
        border-left-color: #cccccc !important;
    }

    /* 5. Abschnittsüberschriften */
    #schulstress-plan-print label {
        font-size: 8.5pt !important;
        font-weight: 800 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        color: #2F3E36 !important;
        margin-top: 8px !important;
        margin-bottom: 2px !important;
        display: block !important;
    }

    /* Vermeidet Seitenumbrüche mitten in einem Frageblock */
    #schulstress-plan-print div[style*="margin-bottom: 14px"] {
        margin-bottom: 10px !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* Leitsatz am Ende */
    #schulstress-plan-print div[style*="border-top: 1px dashed"] {
        border-top: 1pt solid #2F3E36 !important;
        margin-top: 12px !important;
        padding-top: 8px !important;
        page-break-inside: avoid !important;
    }

    #schulstress-plan-print div[style*="border-top: 1px dashed"] p {
        font-size: 9pt !important;
        line-height: 1.4 !important;
        color: #2F3E36 !important;
    }

    /* 6. Offizielle Fußzeile */
    #modul-12-print-section > .wb-print-footer {
        display: block !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        text-align: center !important;
        font-size: 7.5pt !important;
        color: #777777 !important;
        border-top: 0.5pt solid #bbbbbb !important;
        padding-top: 4px !important;
        font-family: sans-serif !important;
    }
}