/* alentó Denkraum — gemeinsames CSS */

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

/* Schriften */
@font-face {
    font-family: 'Galiscka';
    src: url('GALISCKA_Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Acherus';
    src: url('AcherusFeral-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

:root {
    --braun:        #6B5F3E;
    --braun-dark:   #4A3F2A;
    --braun-light:  #C4B48A;
    --creme:        #F5F0E8;
    --creme-dark:   #EDE5D6;
    --text:         #2C2416;
    --text-muted:   #7A6E5A;
    --border:       #D6CCB8;
    --white:        #ffffff;
    --radius:       10px;
    --error-bg:     #FDF2EC;
    --error:        #8B3A1A;

    --font-titel:   'Galiscka', Georgia, serif;
    --font-body:    'Acherus', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    font-family: var(--font-body);
    background: var(--creme);
    color: var(--text);
    min-height: 100vh;
}

h1, h2, h3, .phase-titel, .card-title, .page-title,
.abschluss-titel, .modus-title {
    font-family: var(--font-titel);
}

/* Navigation */
.nav {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 96px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo { display: flex; align-items: center; gap: 0.75rem; }
.nav-logo img { height: 54px; width: auto; }

.nav-product {
    font-size: 1.05rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--braun-light);
    font-weight: 500;
    padding-left: 0.75rem;
    border-left: 1px solid var(--border);
    font-family: var(--font-body);
}

.nav-right { display: flex; align-items: center; gap: 1.25rem; }

.nav-user { font-size: 0.88rem; color: var(--text-muted); font-family: var(--font-body); }
.nav-user strong { color: var(--text); font-weight: 500; }

.btn-logout {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-family: var(--font-body);
    transition: all 0.15s;
}
.btn-logout:hover { color: var(--braun); border-color: var(--braun-light); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.25rem;
    border-radius: 6px;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
    transition: all 0.15s;
    text-decoration: none;
}

.btn-primary { background: var(--braun); color: var(--white); }
.btn-primary:hover { background: var(--braun-dark); }

.btn-secondary {
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--braun-light); color: var(--braun); }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--braun); border-color: var(--border); }

/* Alerts */
.alert {
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
    font-family: var(--font-body);
}
.alert-error { background: var(--error-bg); color: var(--error); border: 1px solid #E8C4B0; }
.alert-info  { background: var(--creme); color: var(--text-muted); border: 1px solid var(--border); }

/* Responsive */
@media (max-width: 600px) {
    .nav { padding: 0 1rem; }
    .nav-product { display: none; }
}

/* ─── Reflexionsprozess ─────────────────────────────────── */

.rfx-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.progress-bar-wrap {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-steps { display: flex; gap: 0.35rem; flex: 1; }

.progress-step {
    height: 4px;
    flex: 1;
    border-radius: 2px;
    background: var(--creme-dark);
    transition: background 0.3s;
}
.progress-step.done   { background: var(--braun-light); }
.progress-step.active { background: var(--braun); }

.progress-label {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.phase-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 1.5rem;
    animation: fadeSlide 0.3s ease;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.phase-header {
    background: var(--braun);
    color: var(--white);
    padding: 1.25rem 1.75rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.phase-meta { display: flex; flex-direction: column; gap: 0.25rem; }

.phase-nr {
    font-family: var(--font-body);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.7;
}

.phase-titel {
    font-family: var(--font-titel);
    font-size: 1.3rem;
    font-weight: normal;
}

.phase-ziel {
    font-family: var(--font-body);
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 0.2rem;
}

.timer-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    min-width: 80px;
}

.timer-display {
    font-family: var(--font-body);
    font-size: 1.8rem;
    font-variant-numeric: tabular-nums;
    font-weight: 300;
    letter-spacing: 0.05em;
    line-height: 1;
}
.timer-display.warning { color: #FFD0A0; }
.timer-display.over    { color: #FFAAAA; }

.timer-btn {
    font-family: var(--font-body);
    font-size: 0.7rem;
    background: rgba(255,255,255,0.15);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.timer-btn:hover { background: rgba(255,255,255,0.25); }

.phase-body { padding: 1.75rem; }

.datenschutz-hinweis {
    background: #FFFBF0;
    border: 1px solid #E8D9A0;
    border-radius: 7px;
    padding: 0.9rem 1.1rem;
    font-family: var(--font-body);
    font-size: 0.84rem;
    color: #6B5A20;
    margin-bottom: 1.5rem;
}

.hinweis-box {
    background: var(--creme);
    border-left: 3px solid var(--braun-light);
    border-radius: 0 6px 6px 0;
    padding: 0.8rem 1rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.55;
}

.hinweis-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--braun-light);
    font-weight: 600;
    display: block;
    margin-bottom: 0.3rem;
}

.fragen-titel {
    font-family: var(--font-body);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--braun-light);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.fragen-liste {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.fragen-liste li {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text);
}

.fragen-liste li::before {
    content: '→';
    color: var(--braun-light);
    flex-shrink: 0;
    margin-top: 0.05em;
}

.dok-section {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    margin-top: 0.25rem;
}

.dok-titel {
    font-family: var(--font-body);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--braun-light);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.dok-felder { display: flex; flex-direction: column; gap: 0.75rem; }

.dok-feld label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.dok-feld textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--text);
    background: var(--creme);
    resize: vertical;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
    line-height: 1.5;
}
.dok-feld textarea:focus { border-color: var(--braun); background: var(--white); }

.phase-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--border);
    background: var(--creme);
}

.abschluss-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    margin-top: 1.5rem;
    text-align: center;
}

.abschluss-titel {
    font-family: var(--font-titel);
    font-size: 1.5rem;
    color: var(--braun-dark);
    font-weight: normal;
    margin-bottom: 0.5rem;
}

.abschluss-sub {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 2rem;
}

.abschluss-zusammenfassung {
    text-align: left;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
}

.zusammenfassung-block { margin-bottom: 1.25rem; }

.zusammenfassung-phase {
    font-family: var(--font-body);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--braun-light);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.zusammenfassung-feld {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.zusammenfassung-inhalt {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    background: var(--creme);
    border-radius: 5px;
    padding: 0.5rem 0.75rem;
    white-space: pre-wrap;
    line-height: 1.5;
}

.abschluss-aktionen {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

@media (max-width: 600px) {
    .rfx-wrap { padding: 1rem 0.75rem 3rem; }
    .phase-header { flex-direction: column; gap: 0.75rem; }
    .timer-block { flex-direction: row; align-items: center; min-width: unset; }
    .timer-display { font-size: 1.4rem; }
    .phase-footer { flex-direction: column; gap: 0.75rem; }
    .phase-footer .btn { width: 100%; justify-content: center; }
}

/* ─── Print-Layout ──────────────────────────────────────── */

.print-only { display: none; }
.no-print   { display: block; }

@media print {

    /* Alles ausblenden ausser Druckdokument */
    .no-print,
    .nav,
    .progress-bar-wrap,
    .phase-card,
    #phaseContainer { display: none !important; }

    .print-only { display: block !important; }

    body {
        background: #fff !important;
        font-family: 'Acherus', Arial, sans-serif;
        color: #2C2416;
        margin: 0;
        padding: 0;
    }

    /* Seitenränder */
    @page {
        margin: 18mm 20mm 22mm 20mm;
        size: A4;
    }

    /* Dokument */
    .print-doc {
        width: 100%;
        max-width: 100%;
    }

    /* Header — Logo zentriert */
    .print-header {
        text-align: center;
        padding-bottom: 10mm;
        border-bottom: none;
    }

    .print-logo {
        max-height: 20mm;
        width: auto;
        max-width: 60mm;
    }

    /* Adresszeile rechts */
    .print-meta {
        display: flex;
        justify-content: flex-end;
        margin-top: 8mm;
        margin-bottom: 12mm;
    }

    .print-meta-right {
        text-align: right;
        border-bottom: 0.5pt solid #2C2416;
        padding-bottom: 2mm;
    }

    .print-meta-line {
        font-size: 9pt;
        color: #2C2416;
    }

    /* Haupttitel */
    .print-titel {
        font-family: 'Galiscka', Georgia, serif;
        font-size: 16pt;
        font-weight: bold;
        color: #2C2416;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 8mm;
    }

    /* Info-Zeile Datum/Modus */
    .print-info-row {
        display: flex;
        gap: 20mm;
        margin-bottom: 6mm;
    }

    .print-info-label {
        font-size: 7pt;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: #7A6E5A;
        margin-bottom: 1mm;
    }

    .print-info-val {
        font-size: 10pt;
        color: #2C2416;
    }

    /* Trennlinie */
    .print-trennlinie {
        border: none;
        border-top: 0.5pt solid #D6CCB8;
        margin: 6mm 0;
    }

    /* Inhaltsblöcke */
    .print-block {
        margin-bottom: 7mm;
        page-break-inside: avoid;
    }

    .print-phase {
        font-size: 7pt;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: #C4B48A;
        font-weight: 600;
        margin-bottom: 2mm;
    }

    .print-feld-label {
        font-size: 8pt;
        color: #7A6E5A;
        margin-bottom: 1mm;
        margin-top: 3mm;
    }

    .print-feld-inhalt {
        font-size: 10pt;
        color: #2C2416;
        line-height: 1.5;
        background: #F5F0E8;
        border-radius: 3pt;
        padding: 3mm 4mm;
        white-space: pre-wrap;
    }

    /* Footer */
    .print-footer {
        position: fixed;
        bottom: 8mm;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 7.5pt;
        color: #7A6E5A;
        border-top: 0.5pt solid #D6CCB8;
        padding-top: 3mm;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4mm;
    }

    .print-footer-logo {
        height: 5mm;
        width: auto;
    }
}
