/*
|--------------------------------------------------------------------------
| Design System
|--------------------------------------------------------------------------
*/

* {
    box-sizing: border-box;
}

:root {
    --green-dark: #005538;
    --green: #008939;

    --cream: #F5F1E9;

    --black: #000000;
    --white: #FFFFFF;

    --text: #000000;
    --text-muted: #62625D;

    --border: #DDD9D0;
    --border-light: #E9E5DC;

    --surface: #FFFFFF;
    --surface-soft: #F5F1E9;

    --radius: 8px;
    --radius-small: 5px;

    --content-width: 1000px;

    --shadow-soft:
        0 2px 8px
        rgba(0, 0, 0, 0.05);

    --shadow-card:
        0 4px 14px
        rgba(0, 0, 0, 0.06);

    --shadow-dialog:
        0 20px 50px
        rgba(0, 0, 0, 0.15);
}


/*
|--------------------------------------------------------------------------
| Basis
|--------------------------------------------------------------------------
*/

html {
    background: var(--cream);
}

body {
    margin: 0;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    background: var(--cream);
    color: var(--text);

    font-size: 14px;
    line-height: 1.5;
}

a {
    color: var(--green-dark);
}

a:hover {
    color: var(--green);
}

h1,
h2,
h3,
h4 {
    line-height: 1.25;
}

p:first-child {
    margin-top: 0;
}

p:last-child {
    margin-bottom: 0;
}


/*
|--------------------------------------------------------------------------
| Header
|--------------------------------------------------------------------------
*/

header {
    background: var(--green-dark);
    color: var(--white);

    padding:
        18px
        28px;
}

.header-inner {
    max-width: var(--content-width);

    margin: auto;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 24px;
}

header h1 {
    margin: 0;

    font-size: 21px;
    font-weight: 600;

    letter-spacing: -0.3px;
}

.header-subtitle {
    margin-top: 3px;

    color:
        rgba(255, 255, 255, 0.68);

    font-size: 12px;
}

header nav {
    display: flex;

    align-items: center;
    flex-wrap: wrap;

    gap: 22px;
}

header nav a {
    color:
        rgba(255, 255, 255, 0.78);

    text-decoration: none;

    font-size: 13px;
    font-weight: 500;
}

header nav a:hover {
    color: var(--white);
}


/*
|--------------------------------------------------------------------------
| Main Layout
|--------------------------------------------------------------------------
*/

main {
    width: 100%;

    max-width: var(--content-width);

    margin:
        30px
        auto;

    padding:
        0
        24px
        60px;
}

.page-header {
    margin-bottom: 22px;
}

.page-header h1 {
    margin:
        0
        0
        6px;

    color: var(--green-dark);

    font-size: 26px;
    font-weight: 650;

    letter-spacing: -0.4px;
}

.page-header p {
    max-width: 720px;

    margin: 0;

    color: var(--text-muted);

    font-size: 14px;
}


/*
|--------------------------------------------------------------------------
| Panels / Bereiche
|--------------------------------------------------------------------------
*/

.panel,
.section,
.form-panel,
.step-panel,
.summary-panel {
    background: var(--white);

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius);

    padding: 20px;
}

.panel + .panel,
.section + .section,
.step-panel + .step-panel {
    margin-top: 16px;
}

.section-title,
.panel-title {
    margin:
        0
        0
        14px;

    color: var(--green-dark);

    font-size: 17px;
    font-weight: 650;
}

.section-description {
    margin:
        -7px
        0
        18px;

    color: var(--text-muted);

    font-size: 12px;
}


/*
|--------------------------------------------------------------------------
| Onboarding Fortschritt
|--------------------------------------------------------------------------
*/

.progress-wrapper {
    margin-bottom: 24px;
}

.progress-meta {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 16px;

    margin-bottom: 7px;

    color: var(--text-muted);

    font-size: 11px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.progress {
    height: 7px;

    overflow: hidden;

    border-radius: 20px;

    background: var(--border-light);
}

.progress-bar {
    height: 100%;

    width: 0;

    border-radius: inherit;

    background: var(--green);

    transition:
        width 0.25s ease;
}


/*
|--------------------------------------------------------------------------
| Schrittanzeige
|--------------------------------------------------------------------------
*/

.steps {
    display: flex;

    align-items: flex-start;

    margin-bottom: 25px;

    overflow-x: auto;
}

.step {
    position: relative;

    flex:
        1
        0
        120px;

    padding-top: 34px;

    text-align: center;

    color: var(--text-muted);

    font-size: 11px;
}

.step::before {
    content: "";

    position: absolute;

    top: 12px;
    left: 0;

    width: 100%;
    height: 2px;

    background: var(--border);
}

.step:first-child::before {
    left: 50%;
    width: 50%;
}

.step:last-child::before {
    width: 50%;
}

.step-marker {
    position: absolute;

    top: 4px;
    left: 50%;

    z-index: 2;

    display: flex;

    width: 18px;
    height: 18px;

    align-items: center;
    justify-content: center;

    transform:
        translateX(-50%);

    border:
        2px
        solid
        var(--border);

    border-radius: 50%;

    background: var(--white);

    font-size: 9px;
    font-weight: 700;
}

.step.active {
    color: var(--green-dark);

    font-weight: 650;
}

.step.active .step-marker {
    border-color: var(--green-dark);

    background: var(--green-dark);
    color: var(--white);
}

.step.completed {
    color: var(--green-dark);
}

.step.completed::before {
    background: var(--green);
}

.step.completed .step-marker {
    border-color: var(--green);

    background: var(--green);
    color: var(--white);
}


/*
|--------------------------------------------------------------------------
| Formulare
|--------------------------------------------------------------------------
*/

form {
    margin: 0;
}

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap:
        16px
        14px;
}

.field {
    min-width: 0;
}

.field.full,
.form-grid-full {
    grid-column: 1 / -1;
}

.field label,
label.field-label {
    display: block;

    margin-bottom: 5px;

    color: var(--text-muted);

    font-size: 11px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.required::after {
    content: " *";

    color: var(--green-dark);
}

input,
select,
textarea {
    width: 100%;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-small);

    background: var(--white);
    color: var(--black);

    font: inherit;
    font-size: 13px;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

input,
select {
    min-height: 40px;

    padding:
        8px
        10px;
}

textarea {
    min-height: 100px;

    padding: 10px;

    resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #BBB8B0;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--green);

    box-shadow:
        0 0 0 2px
        rgba(0, 137, 57, 0.10);
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    min-height: auto;

    accent-color: var(--green-dark);
}

input[type="date"],
input[type="number"] {
    min-width: 0;
}

.help,
.hint,
.muted {
    color: var(--text-muted);

    font-size: 12px;
}

.field .help {
    display: block;

    margin-top: 5px;
}


/*
|--------------------------------------------------------------------------
| Auswahlkarten
|--------------------------------------------------------------------------
*/

.choice-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 12px;
}

.choice {
    position: relative;

    display: block;

    cursor: pointer;
}

.choice input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;
}

.choice-content {
    height: 100%;

    padding: 16px;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius);

    background: var(--white);

    transition:
        border-color 0.15s ease,
        background-color 0.15s ease,
        box-shadow 0.15s ease;
}

.choice:hover .choice-content {
    border-color:
        rgba(0, 85, 56, 0.45);

    box-shadow: var(--shadow-soft);
}

.choice input:checked + .choice-content {
    border-color: var(--green-dark);

    background:
        rgba(0, 137, 57, 0.06);

    box-shadow:
        0 0 0 1px
        var(--green-dark);
}

.choice input:focus-visible + .choice-content {
    outline:
        2px
        solid
        var(--green);

    outline-offset: 2px;
}

.choice-title {
    display: block;

    margin-bottom: 5px;

    color: var(--green-dark);

    font-size: 14px;
    font-weight: 650;
}

.choice-description {
    display: block;

    color: var(--text-muted);

    font-size: 12px;
}


/*
|--------------------------------------------------------------------------
| Ja / Nein Auswahl
|--------------------------------------------------------------------------
*/

.binary-choice {
    display: flex;

    gap: 10px;
}

.binary-choice .choice {
    flex:
        0
        1
        150px;
}

.binary-choice .choice-content {
    padding:
        11px
        15px;

    text-align: center;
}

.binary-choice .choice-title {
    margin: 0;
}


/*
|--------------------------------------------------------------------------
| Aufgaben / Checkliste
|--------------------------------------------------------------------------
*/

.task-list {
    display: flex;

    flex-direction: column;

    gap: 10px;
}

.task {
    display: flex;

    align-items: flex-start;

    gap: 12px;

    padding: 14px;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-small);

    background: var(--white);
}

.task:hover {
    border-color:
        rgba(0, 85, 56, 0.35);
}

.task-checkbox {
    flex: 0 0 auto;

    margin-top: 3px;
}

.task-content {
    flex: 1;

    min-width: 0;
}

.task-title {
    color: var(--text);

    font-size: 13px;
    font-weight: 650;
}

.task-description {
    margin-top: 3px;

    color: var(--text-muted);

    font-size: 12px;
}

.task-meta {
    display: flex;

    flex-wrap: wrap;

    gap: 5px;

    margin-top: 9px;
}

.task.completed {
    background:
        rgba(0, 137, 57, 0.04);
}

.task.completed .task-title {
    color: var(--text-muted);

    text-decoration: line-through;
}


/*
|--------------------------------------------------------------------------
| Badges
|--------------------------------------------------------------------------
*/

.badge {
    display: inline-flex;

    align-items: center;

    min-height: 21px;

    padding:
        2px
        7px;

    border-radius: 20px;

    background: var(--cream);
    color: var(--text-muted);

    font-size: 10px;
    font-weight: 650;
}

.badge-green {
    background:
        rgba(0, 137, 57, 0.12);

    color: var(--green-dark);
}

.badge-dark {
    background: var(--green-dark);
    color: var(--white);
}


/*
|--------------------------------------------------------------------------
| Zusammenfassung
|--------------------------------------------------------------------------
*/

.summary-list {
    margin: 0;
}

.summary-row {
    display: grid;

    grid-template-columns:
        minmax(140px, 0.35fr)
        minmax(0, 1fr);

    gap: 20px;

    padding:
        10px
        0;

    border-bottom:
        1px
        solid
        var(--border-light);
}

.summary-row:first-child {
    padding-top: 0;
}

.summary-row:last-child {
    padding-bottom: 0;

    border-bottom: 0;
}

.summary-label {
    color: var(--text-muted);

    font-size: 11px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.summary-value {
    color: var(--text);

    font-size: 13px;
}


/*
|--------------------------------------------------------------------------
| Hinweise / Nachrichten
|--------------------------------------------------------------------------
*/

.message,
.notice,
.alert {
    margin-bottom: 16px;

    padding:
        12px
        14px;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-small);

    background: var(--white);
}

.message-success {
    border-color: var(--green);

    background:
        rgba(0, 137, 57, 0.05);

    color: var(--green-dark);
}

.message-error {
    border-color: var(--black);

    color: var(--black);
}

.notice {
    border-left:
        4px
        solid
        var(--green-dark);
}

.notice-title {
    margin-bottom: 3px;

    color: var(--green-dark);

    font-weight: 650;
}


/*
|--------------------------------------------------------------------------
| Buttons
|--------------------------------------------------------------------------
*/

button,
.button,
input[type="submit"] {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 38px;

    padding:
        8px
        15px;

    border: 0;
    border-radius: var(--radius-small);

    cursor: pointer;

    text-decoration: none;

    font-size: 13px;
    font-weight: 600;

    white-space: nowrap;

    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        opacity 0.15s ease;
}

.button-primary,
button.button-primary,
input.button-primary {
    background: var(--green-dark);
    color: var(--white);
}

.button-primary:hover,
button.button-primary:hover,
input.button-primary:hover {
    background: var(--green);
    color: var(--white);
}

.button-secondary {
    background: transparent;

    color: var(--green-dark);

    border:
        1px
        solid
        var(--green-dark);
}

.button-secondary:hover {
    background: var(--green-dark);
    color: var(--white);
}

.button-muted {
    background: var(--cream);
    color: var(--text);
}

.button-muted:hover {
    background: var(--border-light);
}

.button-danger {
    background: var(--black);
    color: var(--white);
}

.button-danger:hover {
    opacity: 0.78;
}

.button-small {
    min-height: 32px;

    padding:
        6px
        10px;

    font-size: 12px;
}

button:disabled,
.button.disabled {
    cursor: default;

    opacity: 0.45;

    pointer-events: none;
}


/*
|--------------------------------------------------------------------------
| Navigation zwischen Schritten
|--------------------------------------------------------------------------
*/

.step-actions {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-top: 22px;

    padding-top: 18px;

    border-top:
        1px
        solid
        var(--border-light);
}

.step-actions-right {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-left: auto;
}


/*
|--------------------------------------------------------------------------
| Abschluss
|--------------------------------------------------------------------------
*/

.completion {
    padding:
        40px
        24px;

    text-align: center;
}

.completion-icon {
    display: flex;

    width: 54px;
    height: 54px;

    margin:
        0
        auto
        18px;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--green-dark);
    color: var(--white);

    font-size: 25px;
    font-weight: 700;
}

.completion h2 {
    margin:
        0
        0
        8px;

    color: var(--green-dark);

    font-size: 22px;
}

.completion p {
    max-width: 600px;

    margin:
        0
        auto
        20px;

    color: var(--text-muted);
}


/*
|--------------------------------------------------------------------------
| Tabellen
|--------------------------------------------------------------------------
*/

.table-wrapper {
    width: 100%;

    overflow-x: auto;
}

table {
    width: 100%;

    border-collapse: collapse;

    background: var(--white);
}

th,
td {
    padding:
        10px
        12px;

    border-bottom:
        1px
        solid
        var(--border-light);

    text-align: left;
}

th {
    color: var(--green-dark);

    font-size: 11px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.4px;
}

td {
    font-size: 13px;
}


/*
|--------------------------------------------------------------------------
| Dialog
|--------------------------------------------------------------------------
*/

dialog {
    width:
        min(
            440px,
            calc(100% - 30px)
        );

    padding: 0;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius);

    background: var(--white);

    box-shadow: var(--shadow-dialog);
}

dialog::backdrop {
    background:
        rgba(0, 0, 0, 0.30);
}

.dialog-content {
    padding: 20px;
}

.dialog-content h2 {
    margin:
        0
        0
        7px;

    color: var(--green-dark);

    font-size: 18px;
    font-weight: 650;
}

.dialog-content p {
    margin:
        0
        0
        18px;

    color: var(--text-muted);

    font-size: 12px;
}

.dialog-actions {
    display: flex;

    justify-content: flex-end;

    gap: 8px;

    margin-top: 18px;
}


/*
|--------------------------------------------------------------------------
| Utility Klassen
|--------------------------------------------------------------------------
*/

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: 8px !important;
}

.mt-2 {
    margin-top: 16px !important;
}

.mt-3 {
    margin-top: 24px !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 8px !important;
}

.mb-2 {
    margin-bottom: 16px !important;
}

.mb-3 {
    margin-bottom: 24px !important;
}


/*
|--------------------------------------------------------------------------
| Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 700px) {

    .form-grid,
    .choice-grid {
        grid-template-columns: 1fr;
    }

    .field.full,
    .form-grid-full {
        grid-column: auto;
    }

    .summary-row {
        grid-template-columns: 1fr;

        gap: 3px;
    }

}


@media (max-width: 650px) {

    header {
        padding:
            16px
            18px;
    }

    .header-inner {
        display: block;
    }

    header nav {
        margin-top: 12px;
    }

    main {
        margin-top: 18px;

        padding:
            0
            12px
            40px;
    }

    .page-header h1 {
        font-size: 22px;
    }

    .panel,
    .section,
    .form-panel,
    .step-panel,
    .summary-panel {
        padding: 16px;
    }

    .binary-choice {
        display: grid;

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .binary-choice .choice {
        flex: auto;
    }

    .step-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .step-actions-right {
        display: grid;

        grid-template-columns: 1fr;

        width: 100%;

        margin-left: 0;
    }

    .step-actions .button,
    .step-actions button {
        width: 100%;
    }

}

/*
|--------------------------------------------------------------------------
| Onboarding Auswahl
|--------------------------------------------------------------------------
*/

.onboarding-grid {
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
}

.onboarding-option {
    display: flex;

    min-height: 125px;

    padding: 18px;

    flex-direction: column;
    justify-content: center;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius);

    background: var(--white);

    color: var(--text);

    text-decoration: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease;
}

a.onboarding-option:hover {
    border-color: var(--green-dark);

    background:
        rgba(0, 137, 57, 0.04);

    box-shadow: var(--shadow-soft);

    color: var(--text);
}

.onboarding-option-title {
    display: block;

    margin-bottom: 5px;

    color: var(--green-dark);

    font-size: 16px;
    font-weight: 650;
}

.onboarding-option-description {
    display: block;

    color: var(--text-muted);

    font-size: 12px;
}

.onboarding-option.disabled {
    cursor: default;

    opacity: 0.45;
}

@media (max-width: 800px) {

    .onboarding-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

}

@media (max-width: 500px) {

    .onboarding-grid {
        grid-template-columns: 1fr;
    }

}

/*
|--------------------------------------------------------------------------
| Onboarding Auswahl
|--------------------------------------------------------------------------
*/

.onboarding-selection {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    gap: 14px;
}

.onboarding-button {
    display: flex;

    width: 100%;
    min-height: 90px;

    padding:
        18px
        20px;

    align-items: center;
    justify-content: center;

    border:
        1px
        solid
        var(--green-dark);

    border-radius: var(--radius);

    background: var(--green-dark);
    color: var(--white);

    cursor: pointer;

    text-decoration: none;

    font: inherit;
    font-size: 15px;
    font-weight: 650;

    text-align: center;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.onboarding-button:hover {
    background: var(--green);
    border-color: var(--green);

    color: var(--white);

    box-shadow: var(--shadow-soft);
}

.onboarding-button:active {
    transform: translateY(1px);
}

.onboarding-button:disabled {
    background: var(--cream);
    border-color: var(--border);

    color: var(--text-muted);

    cursor: not-allowed;

    opacity: 0.65;

    box-shadow: none;
}


/*
|--------------------------------------------------------------------------
| Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 700px) {

    .onboarding-selection {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

}


@media (max-width: 450px) {

    .onboarding-selection {
        grid-template-columns: 1fr;
    }

}
