/* notfallkoffer.css
   Style angeglichen an Pages/Rechner.cshtml (Erbschaftsteuer-Rechner):
   Fixe linke Sidebar, cremefarbener Hintergrund, weiße Card-Formulare,
   grüne Akzentfarbe #89BA17, dunkles Anthrazit #3D4F51.
*/

:root {
    --hf-green: #89BA17;
    --hf-green-dark: #6F9612;
    --hf-green-darker: #5C7D0F;
    --hf-dark: #3D4F51;
    --hf-olive: #3D4F51;
    --hf-ink: #20282d;
    --hf-border: #e0dccf;
    --hf-cream: #f5f3ee;
    --hf-gray: #9a9a9a;
    --hf-light: #f7f7f7;
}

body {
    background: var(--hf-cream) !important;
}

/* Eigene Sidebar-Navigation ersetzt die Standard-Kopfzeile */
header {
    display: none !important;
}

.container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

main.pb-3 {
    padding: 0 !important;
}

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

/* ===== Sidebar ===== */
.lp-sidebar {
    width: 120px;
    background: rgba(61,79,81,0.95);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    box-shadow: 6px 0 60px 20px rgba(45,59,61,0.7);
}

    .lp-sidebar .s-logo img {
        width: 58px;
        height: auto;
        display: block;
    }

    .lp-sidebar .s-btm img {
        width: 72px;
        height: auto;
        display: block;
        margin-bottom: 8px;
    }

.sidebar-plus {
    display: none !important;
}

/* ===== Layout ===== */
.calc-wrap {
    position: relative;
    background: var(--hf-cream);
    min-height: 100vh;
    padding: 80px 6vw 80px calc(120px + 5vw);
}

.calc-brand,
.dots,
.corner {
    display: none !important;
}

.calc-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

/* Tablet + Mobile: Sidebar wird zur horizontalen Kopfleiste.
   Logo UND Steuerberatung-Schriftzug sind hochkant angelegte Bilder
   (für die vertikale Desktop-Sidebar) -> beide müssen gedreht werden,
   sonst wird das Logo zu einem winzigen, gestauchten Streifen. */
@media (max-width: 1024px) {
    .lp-sidebar {
        width: 100%;
        height: 68px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 24px;
        position: fixed;
        top: 0;
        left: 0;
        box-shadow: 0 2px 24px rgba(45,59,61,0.55);
        overflow: visible;
    }

        /* Beide Bilder sind hochkant und werden gedreht -> die gedrehte
           Grafik ist optisch breiter als ihre eigene Layout-Box und würde
           sonst am Viewport-Rand abgeschnitten. Die Margins auf den
           Wrapper-Divs schaffen den nötigen Platz (wie in der LP-Referenz). */
        .lp-sidebar .s-logo {
            margin-left: 16px;
        }

        .lp-sidebar .s-logo img {
            width: auto;
            height: 100px;
            transform: rotate(90deg);
            margin: 0;
        }

        .lp-sidebar .s-btm {
            margin-right: 80px;
        }

        .lp-sidebar .s-btm img {
            width: auto;
            height: 200px;
            transform: rotate(90deg);
            margin: 0;
        }

    .calc-wrap {
        padding: calc(68px + 32px) 6vw 56px 6vw;
    }

    .print-wrap {
        padding: calc(68px + 32px) 6vw 56px 6vw !important;
    }
}

@media (max-width: 600px) {
    .lp-sidebar {
        height: 58px;
        padding: 0 16px;
    }

        .lp-sidebar .s-logo img {
            height: 72px;
        }

        .lp-sidebar .s-btm img {
            height: 190px;
        }

    .calc-wrap {
        padding: calc(58px + 28px) 5vw 48px 5vw;
    }

    .print-wrap {
        padding: calc(58px + 28px) 5vw 48px 5vw !important;
    }
}

/* ===== Wizard-Kopf =====
   Gemeinsame Inhaltsbreite: alles (Titel, Kicker, Card, Navigation)
   bekommt dieselbe Breite und wird als Block zentriert. */
:root {
    --nk-content-width: 760px;
}

.wizard-top {
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 auto 22px;
    display: flex;
    max-width: var(--nk-content-width);
}

/* Sprung-Navigation zu einzelnen Steps (per JS eingefügt) */
.step-jump {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 auto 24px;
    max-width: var(--nk-content-width);
}

.step-jump-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    border-radius: 50%;
    border: 1px solid var(--hf-border);
    background: #fff;
    color: var(--hf-dark);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

    .step-jump-item:hover {
        border-color: var(--hf-green);
        color: var(--hf-green-dark);
    }

    .step-jump-item.active {
        background: var(--hf-green);
        border-color: var(--hf-green);
        color: #fff;
    }

    .step-jump-item.step-jump-overview {
        border-radius: 13px;
        width: auto;
        padding: 0 12px;
        margin-left: 8px;
        font-weight: 600;
    }

@media (max-width: 576px) {
    .step-jump {
        gap: 5px;
    }

    .step-jump-item {
        min-width: 22px;
        height: 22px;
        font-size: 11px;
    }
}

.wizard-stepinfo {
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--hf-dark);
}

.wizard-progress {
    flex: 1;
    height: 6px;
    background: #e7e3da;
    border-radius: 999px;
    overflow: hidden;
    max-width: 320px;
}

.wizard-bar {
    height: 100%;
    width: 0%;
    background: var(--hf-green);
}

.wiz-title {
    font-size: clamp(28px, 3.4vw, 42px);
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--hf-ink);
    line-height: 1.05;
    margin: 0 auto 6px;
    max-width: var(--nk-content-width);
}

.section-head {
    display: block;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--hf-green);
    margin: 0 auto 22px;
    max-width: var(--nk-content-width);
}

.section-text {
    font-size: 15px;
    margin: 0 auto 16px;
    max-width: var(--nk-content-width);
    font-weight: 600;
    color: var(--hf-dark);
}

/* ===== Formular-Card ===== */
.form-block {
    max-width: var(--nk-content-width);
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    padding: 36px 40px 32px;
    box-shadow: 0 18px 50px rgba(45,59,61,.10);
}

.field {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    align-items: center;
}

    .field label {
        width: 90px;
        font-weight: 700;
        color: var(--hf-dark);
    }

    .field input {
        flex: 1;
        background: #fff;
        border: 1px solid var(--hf-border);
        border-radius: 6px;
        padding: 8px 10px;
        outline: none;
    }

.field-inline {
    display: flex;
    gap: 16px;
    margin: 10px 0;
    align-items: center;
    flex-wrap: wrap;
}

    .field-inline > label:first-child {
        width: 260px;
        font-weight: 700;
        color: var(--hf-dark);
    }

.yn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calc-wrap .form-control,
.calc-wrap .form-select {
    border: 1px solid var(--hf-border);
    border-radius: 6px;
    background: #fff;
    color: var(--hf-ink);
}

    .calc-wrap .form-control:focus,
    .calc-wrap .form-select:focus {
        border-color: var(--hf-green);
        box-shadow: 0 0 0 .15rem rgba(137,186,23,.25);
    }

.form-label {
    color: var(--hf-dark);
    font-weight: 600;
}

.small-help {
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--hf-green);
    color: #6F9612;
    background: rgba(137,186,23,.10);
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
    cursor: help;
    user-select: none;
    visibility: visible;
}

.btn-add {
    background: var(--hf-green);
    color: #fff;
    border: 1px solid var(--hf-green);
    padding: 8px 18px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

    .btn-add:hover {
        background: var(--hf-green-dark);
        border-color: var(--hf-green-dark);
    }

    .btn-add:active {
        background: var(--hf-green-darker) !important;
        border-color: var(--hf-green-darker) !important;
    }

.wizard-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin: 22px auto 0;
    flex-wrap: wrap;
    max-width: var(--nk-content-width);
}

.btn-nav {
    padding: 10px 22px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .02em;
    border-radius: 4px;
    border: 1px solid var(--hf-border);
    background: #fff;
    text-decoration: none;
    color: var(--hf-dark);
    display: inline-block;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

    .btn-nav.primary {
        background: var(--hf-green);
        border-color: var(--hf-green);
        color: #fff;
    }

        .btn-nav.primary:hover {
            background: var(--hf-green-dark);
            border-color: var(--hf-green-dark);
            color: #fff;
        }

        .btn-nav.primary:active {
            background: var(--hf-green-darker);
            border-color: var(--hf-green-darker);
        }

    .btn-nav.ghost {
        background: transparent;
    }

.wizard-right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.disclaimer {
    margin: 20px auto 0;
    font-size: 12px;
    color: #7a7a7a;
    max-width: var(--nk-content-width);
}

@media (max-width: 576px) {
    .field {
        flex-direction: column;
        align-items: stretch;
    }

        .field label {
            width: auto;
        }

    .field-inline > label:first-child {
        width: auto;
    }

    .form-block {
        padding: 22px 20px;
    }

    .wizard-right {
        margin-left: 0;
        width: 100%;
    }
}

/* field-row */
.field-row {
    display: grid;
    grid-template-columns: 190px minmax(0, 320px) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.field-row .lbl {
    font-size: 13px;
    font-weight: 600;
    color: var(--hf-dark);
}

/* Control niemals breiter als 320px */
.field-row .form-control,
.field-row .form-select {
    width: 100%;
    max-width: 320px;
}

/* Ja/Nein Reihe (Radio) */
.yn-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.yn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--hf-dark);
    margin: 0;
}

/* Person-Block optisch etwas absetzen, aber clean */
.person-block {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--hf-border);
}

    .person-block:last-child {
        border-bottom: none;
    }

/* Mobile: gleiche Logik wie Rechner */
@media (max-width: 576px) {
    .field-row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "label label"
            "control help";
        row-gap: 6px;
    }

        .field-row .lbl {
            grid-area: label;
        }

        .field-row .form-control,
        .field-row .form-select,
        .field-row .yn-row {
            grid-area: control;
        }

        .field-row {
            grid-area: help;
            align-self: center;
        }

    .yn-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    .person-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 8px 0 14px;
    }

    .person-title {
        font-weight: 700;
        color: var(--hf-dark);
    }
}

.btn-remove, .btn-remove-person {
    background: transparent;
    border: 1px solid var(--hf-border);
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    font-size: 12px;
    color: var(--hf-dark);
}

    .btn-remove:hover, .btn-remove-person:hover {
        background: var(--hf-cream);
    }

.sub-head {
    font-weight: 800;
    font-size: 16px;
    color: var(--hf-dark);
    margin: 4px 0 2px;
}

.nk-sep {
    height: 1px;
    background: var(--hf-border);
    margin: 18px 0;
}

/* Fortschritts-Banner (Step1) */
.nk-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    background: rgba(137,186,23,.10);
    border: 1px solid var(--hf-green);
    border-radius: 8px;
    padding: 10px 14px;
    margin: 0 auto 18px;
    max-width: var(--nk-content-width);
    font-size: 14px;
    color: var(--hf-dark);
}

/* Pflichtfeld-Kennzeichnung (leicht, nicht blockierend) */
.field-missing {
    border-color: #d9534f !important;
    background: #fdf3f2;
}

.block-space-small {
    height: 8px;
}

.block-space-big {
    height: 30px;
}

/* Step8 Checkliste: Textzeile + Eingabezeile */
.chk-item {
    margin: 14px 0;
    width: 100%;
}

.chk-text {
    width: 100%;
    margin-bottom: 6px;
    line-height: 1.35;
    color: var(--hf-dark);
}

.chk-input {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100%;
}

.step8-block {
    max-width: var(--nk-content-width);
}

    .step8-block .chk-input {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
    }


/* =========================
   Step9 - stabil + responsive
========================= */

.step9-block {
    max-width: 1000px !important;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 18px 50px rgba(45,59,61,.10);
}

/* Alle Spaltenbreiten zentral -> Header + Rows immer identisch */
:root {
    --s9-cols: 2.8fr 0.7fr 0.7fr 1fr 1.2fr 1.4fr;
}

/* EIN gemeinsamer Scrollcontainer für Header + Rows */
.s9-scroll {
    width: 100%;
    overflow-x: auto;
}

/* Header */
.s9-head {
    width: 100%;
    display: grid;
    grid-template-columns: var(--s9-cols);
    border: 1px solid var(--hf-dark);
    border-bottom: 0;
    min-width: 980px; /* wichtig: Header bleibt gleich wie Rows */
}

.s9-hcell {
    border-right: 1px solid var(--hf-dark);
    padding: 10px 8px;
    background: var(--hf-dark);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
}

    .s9-hcell:last-child {
        border-right: 0;
    }

    .s9-hcell.s9-sub {
        background: #56696b;
        font-weight: 600;
    }

/* Rows */
.s9-rows {
    width: 100%;
    border: 1px solid var(--hf-dark);
    border-top: 0;
    min-width: 980px; /* exakt wie Header */
}

.s9-row {
    display: grid;
    grid-template-columns: var(--s9-cols);
}

.s9-cell {
    border-top: 1px solid var(--hf-border);
    border-right: 1px solid var(--hf-border);
    padding: 10px 8px;
    font-size: 13px;
    background: #fff;
    vertical-align: middle;
}

.s9-row .s9-cell:last-child {
    border-right: 0;
}

.s9-text {
    line-height: 1.3;
    color: var(--hf-dark);
}

/* =========================
   Inputs immer sichtbar (Desktop + Mobile)
========================= */
.s9-input {
    width: 100%;
    display: block;
    border: 1px solid var(--hf-border);
    background: #fff;
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.s9-blue .s9-input {
    border-color: #b9c9cb;
}

.s9-input:focus {
    outline: none;
    border-color: var(--hf-green);
    box-shadow: 0 0 0 3px rgba(137,186,23,0.25);
}

.s9-input[type="date"] {
    min-height: 38px;
}

/* Radios */
.s9-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.step9-radio {
    width: 16px;
    height: 16px;
}

/* Mobile Labels default aus */
.s9-mbl {
    display: none;
    font-size: 12px;
    opacity: 0.75;
    margin-bottom: 4px;
}

/* =========================
   Mobile: echte Cards, kein "Tabellen-Rest"
========================= */
@media (max-width: 1300px) {

    /* Header weg */
    .s9-head {
        display: none;
    }

    /* keine Scrolltable mehr nötig */
    .s9-scroll {
        overflow-x: visible;
    }

    .s9-rows {
        border: 0;
        min-width: 0;
    }

    .s9-row {
        grid-template-columns: 1fr 1fr; /* 2 Spalten Card */
        border: 1px solid var(--hf-dark);
        border-radius: 10px;
        overflow: hidden;
        margin-bottom: 14px;
    }

    .s9-cell {
        border: 0;
        border-top: 1px solid #ddd;
        border-right: 1px solid #ddd;
        background: #fff;
    }

    /* letzte Spalte kein rechter Rand */
    .s9-row .s9-cell:nth-child(2n) {
        border-right: 0;
    }

    /* Text oben über volle Breite */
    .s9-row .s9-cell:nth-child(1) {
        grid-column: 1 / -1;
        border-top: 0;
        background: var(--hf-cream);
        font-weight: 600;
    }

    /* JA + NEIN bleiben 2 Spalten */
    .s9-row .s9-cell:nth-child(2),
    .s9-row .s9-cell:nth-child(3) {
        grid-column: span 1;
    }

    /* Termin / Verantwortlich / Aufbewahrung jeweils volle Breite */
    .s9-row .s9-cell:nth-child(4),
    .s9-row .s9-cell:nth-child(5),
    .s9-row .s9-cell:nth-child(6) {
        grid-column: 1 / -1;
        border-right: 0;
    }

    .s9-mbl {
        display: block;
    }

    .s9-blue {
        background: #fff; /* Card bleibt clean */
    }

        .s9-blue .s9-input {
            background: rgba(137,186,23,.06);
        }
}


/* ===========================================================
   Übersicht / Druckvorschau (Print.cshtml) — Card-Look wie Formular
=========================================================== */

.print-wrap {
    background: var(--hf-cream);
    min-height: 100vh;
    padding: 80px 6vw 80px calc(120px + 5vw);
}

.print-header,
.print-note,
.print-lastsaved,
.print-empty,
.print-content {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.print-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.print-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.print-logo {
    height: 40px;
    object-fit: contain;
}

.print-h1 {
    font-size: clamp(22px, 2.6vw, 30px);
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--hf-ink);
    margin: 0;
}

.print-sub {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--hf-green);
}

.print-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.print-note {
    font-size: 12px;
    color: var(--hf-dark);
    opacity: 0.85;
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid var(--hf-border);
    border-radius: 8px;
    background: #fff;
}

.print-content {
    display: grid;
    gap: 18px;
}

.p-section {
    background: #fff;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(45,59,61,.08);
}

.p-head {
    background: var(--hf-dark);
    color: #fff;
    padding: 12px 16px;
    font-weight: 600;
    letter-spacing: .02em;
}

.p-body {
    padding: 18px 16px;
}

.p-subhead {
    margin: 10px 0 6px;
    font-weight: 700;
    color: var(--hf-dark);
}

.p-box {
    border: 1px solid var(--hf-border);
    border-radius: 10px;
    padding: 10px;
}

.p-row {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid var(--hf-cream);
}

    .p-row:last-child {
        border-bottom: 0;
    }

.p-lbl {
    font-weight: 600;
    color: var(--hf-dark);
    opacity: 0.9;
}

.p-val {
    white-space: pre-wrap;
}

.p-empty {
    opacity: 0.7;
    font-style: italic;
}

/* Tabellen (Arrays) */
.p-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

    .p-table th,
    .p-table td {
        border: 1px solid var(--hf-border);
        padding: 7px 8px;
        vertical-align: top;
    }

    .p-table th {
        background: var(--hf-cream);
        font-weight: 700;
        text-align: left;
        color: var(--hf-dark);
    }

.p-list {
    margin: 6px 0 0 18px;
}
