/*
 * PORTAL Checkliste — Stylesheet
 * Orientiert an www.portal-stb.de (Farbschema + Open Sans)
 *
 * Primärfarbe:   #b01c41 (Weinrot)
 * Headlines:     #B21C25
 * Text:          #505050
 * Sekundär:      #444
 * Slider-BG:     #F6F6F6
 * Borders:       #ebebeb / #ddd / #efefef
 */

/* --- Reset + Basis --- */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 100.01%;
}

body {
    margin: 0;
    font-family: 'Open Sans', Arial, Helvetica, Verdana, sans-serif;
    font-weight: 400;
    color: #505050;
    background: #fff;
    line-height: 1.5;
    font-size: 15px;
}

a {
    color: #b01c41;
    text-decoration: none;
}

a:hover, a:active, a:focus {
    color: #000;
    text-decoration: underline;
}

h1, h2, h3 {
    margin: 0 0 0.8em;
    color: #505050;
    line-height: 1.3;
}

h1 {
    font-size: 30px;
    font-weight: 300;
    padding-bottom: 0.4em;
    border-bottom: 1px solid #ebebeb;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    color: #B21C25;
    text-shadow: 0 1px 0 #fff;
}

h3 {
    font-size: 16px;
    font-weight: bold;
    color: #444;
}

p, li {
    font-size: 14px;
}

strong { font-weight: 600; }

hr {
    border: 0;
    border-top: 1px solid #ebebeb;
    margin: 2em 0;
}

/* --- Layout: 12-Spalten-Grid (nach Portal-STB-Konvention) --- */

.zeile {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.zeile::after {
    content: "";
    display: table;
    clear: both;
}

/* --- Header --- */

#header {
    padding: 18px 0;
    background: #fff;
    border-bottom: 1px solid #ebebeb;
}

#header .logo-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
}

#header .logo {
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
    font-size: 22px;
    letter-spacing: 4px;
    color: #505050;
}

#header .logo-sub {
    font-size: 10px;
    color: #888;
    letter-spacing: 0.5px;
    display: block;
    margin-top: 2px;
}

/* --- Sub-Banner (wie Slider bei Portal-STB) --- */

#banner {
    background: #F6F6F6;
    padding: 40px 0;
    border-bottom: 1px solid #ebebeb;
}

#banner h1 {
    border: 0;
    margin: 0;
    font-size: 28px;
    font-weight: 300;
    color: #505050;
}

#banner .subtitle {
    margin-top: 8px;
    font-size: 14px;
    color: #777;
}

/* --- Haupt-Inhaltsbereich --- */

main {
    padding: 40px 0 60px;
}

main h1 {
    border-bottom: 1px solid #ebebeb;
    padding-bottom: 0.3em;
    margin-bottom: 1.2em;
}

.intro {
    max-width: 780px;
    color: #444;
    font-size: 14px;
    margin-bottom: 2em;
}

/* --- Formular --- */

form.checkliste {
    max-width: 960px;
}

fieldset {
    border: 1px solid #ebebeb;
    background: #fff;
    margin: 0 0 24px;
    padding: 20px 24px;
}

legend {
    padding: 0 10px;
    font-size: 15px;
    font-weight: 600;
    color: #B21C25;
}

label {
    display: block;
    font-size: 13px;
    color: #444;
    margin-bottom: 4px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14px;
    color: #505050;
    background: #fff;
    border: 1px solid #ebebeb;
    margin-bottom: 16px;
    transition: border-color 0.15s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #b01c41;
}

/* Stammdaten-Grid: 3 Spalten */
.stammdaten {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 20px;
}

@media (max-width: 700px) {
    .stammdaten { grid-template-columns: 1fr; }
}

/* --- Einkunftsarten-Tabelle (S / P) --- */

.einkunftstabelle {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.einkunftstabelle thead th {
    font-size: 12px;
    font-weight: 600;
    color: #505050;
    text-align: center;
    padding: 6px 8px;
    border-bottom: 2px solid #ebebeb;
    width: 42px;
}

.einkunftstabelle thead th:first-child {
    text-align: left;
    width: auto;
}

.einkunftstabelle tbody td {
    padding: 7px 8px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    vertical-align: top;
}

.einkunftstabelle tbody td:first-child {
    padding-left: 0;
}

.einkunftstabelle tbody tr:hover {
    background: #fafafa;
}

.einkunftstabelle td.check {
    text-align: center;
    width: 42px;
}

.einkunftstabelle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #b01c41;
    cursor: pointer;
}

.einkunftstabelle .hint {
    font-size: 11px;
    color: #888;
    font-weight: 400;
    display: block;
    margin-top: 2px;
}

/* --- Qualitätsanalyse --- */

.qualitaetsanalyse {
    width: 100%;
    max-width: 520px;
    border-collapse: collapse;
    margin-top: 10px;
}

.qualitaetsanalyse th,
.qualitaetsanalyse td {
    padding: 6px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
    font-size: 12px;
}

.qualitaetsanalyse th {
    font-weight: 600;
    color: #505050;
}

.qualitaetsanalyse th:first-child,
.qualitaetsanalyse td:first-child {
    text-align: left;
    font-size: 13px;
    width: 160px;
}

.qualitaetsanalyse input[type="radio"] {
    accent-color: #b01c41;
    cursor: pointer;
}

.qualitaetsanalyse .legende {
    font-size: 11px;
    color: #888;
    margin-top: 10px;
}

/* --- Navigation / Buttons --- */

.button-leiste {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin: 30px 0 0;
}

.btn {
    display: inline-block;
    padding: 10px 22px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    background: #b01c41;
    color: #fff;
    border: 0;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
}

.btn:hover {
    background: #8d1634;
    color: #fff;
    text-decoration: none;
}

.btn.secondary {
    background: #fff;
    color: #505050;
    border: 1px solid #ddd;
}

.btn.secondary:hover {
    background: #f6f6f6;
    color: #b01c41;
    border-color: #b01c41;
}

.btn.danger {
    background: #fff;
    color: #b01c41;
    border: 1px solid #b01c41;
}

.btn.danger:hover {
    background: #b01c41;
    color: #fff;
}

/* --- Hinweisboxen --- */

.hinweis {
    padding: 14px 18px;
    background: #fff7d7;
    border-left: 4px solid #a28c3c;
    font-size: 13px;
    color: #444;
    margin: 20px 0;
}

.hinweis.datenschutz {
    background: #f6f0f2;
    border-left-color: #b01c41;
}

.autosave-status {
    display: inline-block;
    font-size: 12px;
    color: #888;
    margin-left: auto;
}

.autosave-status.ok {
    color: #4a8c4a;
}

/* --- Partner-Toggle: Partner-spezifische Elemente verstecken --- */

body.no-partner [data-partner-only] {
    display: none !important;
}

/* --- Modal-Overlay (Option-C-Dialog + Bestätigung) --- */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
    background: #fff;
    max-width: 540px;
    width: 100%;
    padding: 30px;
    border-top: 4px solid #b01c41;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.modal h2 {
    margin-top: 0;
    color: #B21C25;
}

.modal .modal-body {
    font-size: 14px;
    color: #444;
    margin-bottom: 20px;
}

.modal ul {
    margin: 10px 0;
    padding-left: 20px;
}

.modal li {
    font-size: 13px;
    margin-bottom: 4px;
}

.modal .modal-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.email-hervorheb {
    display: inline-block;
    background: #fff7d7;
    border: 1px solid #a28c3c;
    padding: 4px 10px;
    font-weight: 600;
    color: #505050;
    margin: 6px 0;
}

/* --- Druck-Stylesheet --- */

@media print {
    #header, #fuss, .button-leiste,
    .hinweis.datenschutz, .autosave-status,
    .modal-backdrop {
        display: none !important;
    }
    #banner {
        border: 0;
        padding: 10px 0;
        background: #fff;
    }
    body {
        font-size: 11pt;
        color: #000;
    }
    fieldset {
        border: 1px solid #888;
        page-break-inside: avoid;
        margin-bottom: 12px;
        padding: 12px 16px;
    }
    legend {
        color: #000;
        font-weight: 700;
    }
    .einkunftstabelle, .qualitaetsanalyse {
        page-break-inside: auto;
    }
    .einkunftstabelle tr, .qualitaetsanalyse tr {
        page-break-inside: avoid;
    }
    input[type="text"], input[type="email"], input[type="tel"],
    input[type="number"], input[type="date"], select, textarea {
        border: 0;
        border-bottom: 1px solid #888;
        background: transparent;
        padding: 2px 0;
    }
    input[type="checkbox"], input[type="radio"] {
        accent-color: #000;
    }
    h1, h2, h3, legend {
        color: #000 !important;
    }
    a { color: #000; text-decoration: none; }
}

/* --- Startseite: Versions-Auswahl --- */

.versions-wahl {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 40px 0;
}

@media (max-width: 700px) {
    .versions-wahl { grid-template-columns: 1fr; }
}

.version-karte {
    border: 1px solid #ebebeb;
    padding: 30px;
    transition: border-color 0.15s ease, transform 0.15s ease;
    text-align: center;
}

.version-karte:hover {
    border-color: #b01c41;
    transform: translateY(-2px);
}

.version-karte h2 {
    color: #B21C25;
    margin-top: 0;
}

.version-karte .jahr {
    font-size: 40px;
    font-weight: 300;
    color: #505050;
    margin: 10px 0;
}

.version-karte p {
    color: #666;
    min-height: 60px;
}

/* --- Footer --- */

#fuss {
    background: #b01c41;
    color: #fff;
    padding: 40px 0 30px;
    margin-top: 50px;
}

#fuss .footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

@media (max-width: 800px) {
    #fuss .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    #fuss .footer-grid { grid-template-columns: 1fr; }
}

#fuss h2 {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-shadow: none;
    margin-bottom: 10px;
}

#fuss p, #fuss a {
    color: #fff;
    font-size: 12px;
}

#fuss a:hover {
    color: #E4E1DD;
    text-decoration: underline;
}

#fuss .footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 11px;
    color: rgba(255,255,255,0.7);
}
