:root {
    --sps-navy: #00235a;
    --sps-light-navy: #0c3d82;
    --sps-green: #0dd175;
    --sps-gray-100: #f4f6f8;
    --sps-gray-200: #e4e8ed;
    --sps-gray-400: #c5cbd3;
    --sps-gray-700: #4a5668;
    --page-background: #ffffff;
    --form-width: min(1080px, 92vw);
    --switch-width: 44px;
    --switch-height: 24px;
    scroll-behavior: auto;
    scroll-padding-top: 120px;
    scrollbar-gutter: stable;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 2.5rem 0;
    font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
    background: var(--page-background);
    color: #1a2330;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.page-shell {
    position: relative;
    width: var(--form-width);
    display: flex;
    flex-direction: column;
    align-items: center;
}

main {
    display: flex;
    justify-content: center;
    padding: 0 1.5rem 4rem;
    width: 100%;
}

.brand-corner {
    position: absolute;
    top: 0;
    left: 0;
}

.page-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    align-self: center;
    margin: 3.5rem 0 2rem;
    padding: 0 1.5rem;
    width: min(100%, var(--form-width));
    text-align: center;
}

.brand-logo {
    width: 90px;
    height: auto;
}

.brand-tagline {
    margin: 0;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--sps-gray-700);
}

.page-title {
    margin: 0.2rem 0 0;
    font-size: 2.25rem;
    color: var(--sps-navy);
}

.order-form {
    background: #ffffff;
    border: 1px solid var(--sps-gray-200);
    border-radius: 18px;
    padding: 2.5rem;
    width: var(--form-width);
    box-shadow: 0 12px 32px rgba(0, 35, 90, 0.06);
}

.form-section + .form-section {
    margin-top: 2.5rem;
}

.form-section > h2 {
    margin: 0 0 1rem;
    font-size: 1.4rem;
    color: var(--sps-light-navy);
}

.section-hint {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    color: var(--sps-gray-700);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem 1.5rem;
}

label {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-weight: 600;
    color: var(--sps-navy);
}

.field-label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: inherit;
}

label input,
label select,
label textarea {
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--sps-gray-200);
    background: var(--sps-gray-100);
    font: inherit;
    color: inherit;
    transition: border 0.15s ease, box-shadow 0.15s ease;
}

    label input:focus,
    label select:focus,
    label textarea:focus {
        outline: none;
        border-color: var(--sps-light-navy);
        box-shadow: 0 0 0 3px rgba(12, 61, 130, 0.2);
    }

textarea {
    resize: vertical;
    min-height: 120px;
}

.required {
    color: var(--sps-green);
    margin-left: 0.25rem;
}

.full-width {
    grid-column: 1 / -1;
}

.delivery-address {
    margin-top: 1.25rem;
    border: 1px solid var(--sps-gray-200);
    border-radius: 16px;
    padding: 1.5rem;
    background: #ffffff;
    margin-bottom: 1.25rem;
    margin-top: 1.25rem;
}

.delivery-type-grid {
    margin-bottom: 1.25rem;
}

.delivery-address[hidden] {
    display: none;
}

.delivery-address-label {
    margin: 1.25rem 0 0.5rem;
    font-weight: 700;
    color: var(--sps-light-navy);
}

.delivery-address-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.delivery-zip-city-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem 1.5rem;
}

    .delivery-zip-city-row label:first-child input {
        max-width: 180px;
    }

.delivery-note-block {
    margin-top: 1.25rem;
}

.order-type-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    border: none;
    padding: 0;
    margin: 0;
}

.order-type-option {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    border: 1px solid var(--sps-gray-200);
    background: var(--sps-gray-100);
    cursor: pointer;
    font-weight: 600;
    transition: border 0.2s ease, background 0.2s ease;
}

    .order-type-option input {
        appearance: none;
        width: 16px;
        height: 16px;
        border: 2px solid var(--sps-gray-400);
        border-radius: 50%;
        position: relative;
    }

        .order-type-option input:checked {
            border-color: var(--sps-light-navy);
        }

            .order-type-option input:checked::after {
                content: "";
                position: absolute;
                top: 3px;
                left: 3px;
                width: 6px;
                height: 6px;
                border-radius: 50%;
                background: var(--sps-light-navy);
            }

            .order-type-option input:checked + span {
                color: var(--sps-light-navy);
            }

    .order-type-option:hover {
        border-color: var(--sps-light-navy);
    }

.order-detail-section h2 {
    margin: 0 0 1rem;
    font-size: 1.3rem;
    color: var(--sps-light-navy);
}

.material-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px var(--sps-gray-200);
}

    .material-table th,
    .material-table td {
        padding: 0.95rem 1.25rem;
        text-align: left;
    }

    .material-table thead {
        background: var(--sps-gray-100);
        color: var(--sps-navy);
        font-weight: 700;
    }

    .material-table tbody tr + tr {
        border-top: 1px solid var(--sps-gray-200);
    }

    .material-table input {
        width: 120px;
        padding: 0.65rem 0.75rem;
        border-radius: 10px;
        border: 1px solid var(--sps-gray-200);
        background: var(--sps-gray-100);
        font: inherit;
        color: var(--sps-navy);
        transition: border 0.15s ease, box-shadow 0.15s ease;
    }

        .material-table input:focus {
            outline: none;
            border-color: var(--sps-light-navy);
            box-shadow: 0 0 0 3px rgba(12, 61, 130, 0.2);
        }

.switch-field {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--sps-navy);
    cursor: pointer;
    user-select: none;
}

.switch-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: relative;
    display: inline-block;
    width: var(--switch-width);
    height: var(--switch-height);
    background: var(--sps-gray-200);
    border-radius: var(--switch-height);
    transition: background 0.2s ease;
}

    .switch-slider::after {
        content: "";
        position: absolute;
        width: calc(var(--switch-height) - 6px);
        height: calc(var(--switch-height) - 6px);
        top: 3px;
        left: 3px;
        background: #ffffff;
        border-radius: 50%;
        transition: transform 0.2s ease;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

.switch-input:checked + .switch-slider {
    background: var(--sps-green);
}

    .switch-input:checked + .switch-slider::after {
        transform: translateX(calc(var(--switch-width) - var(--switch-height)));
    }

.switch-label::after {
    content: attr(data-off);
    display: inline-block;
    font-weight: 600;
    color: var(--sps-gray-700);
}

.switch-input:checked + .switch-slider + .switch-label::after {
    content: attr(data-on);
    color: var(--sps-green);
}

.finishing-label {
    font-weight: 600;
    color: var(--sps-light-navy);
    margin-top: 2rem;
}

.finishing-options {
    margin-top: 0.75rem;
    padding: 1.5rem;
}

.switch-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem 1.5rem;
}

.upload-area {
    margin-top: 2rem;
}

.file-upload {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    padding: 1.75rem 1.5rem;
    border: 2px dashed var(--sps-gray-200);
    border-radius: 16px;
    background: var(--sps-gray-100);
    color: var(--sps-navy);
    cursor: pointer;
}

    .file-upload:hover {
        border-color: var(--sps-light-navy);
    }

    .file-upload input {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

.file-upload-icon {
    font-size: 2rem;
    color: var(--sps-light-navy);
}

.upload-hint {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    color: var(--sps-gray-700);
}

.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.primary-action,
.secondary-action {
    padding: 0.9rem 1.75rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.primary-action {
    background: linear-gradient(135deg, var(--sps-light-navy), var(--sps-navy));
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 35, 90, 0.18);
}

    .primary-action:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 26px rgba(0, 35, 90, 0.22);
    }

.secondary-action {
    background: #ffffff;
    color: var(--sps-light-navy);
    border: 1px solid var(--sps-light-navy);
}

    .secondary-action:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(12, 61, 130, 0.1);
    }

.modal-btn-sm {
    padding: 0.45rem 1.1rem;
    font-size: 0.875rem;
}

.loading-placeholder {
    margin: 1rem 0;
    padding: 1.5rem;
    border-radius: 12px;
    background: var(--sps-gray-100);
    color: var(--sps-gray-700);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 720px) {
    body {
        padding: 1.5rem 0;
    }

    .order-form {
        padding: 1.75rem;
    }

    .page-title {
        font-size: 1.8rem;
    }

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

.block {
    margin-top: 2rem;
    line-height: 1.5rem;
}

.impressum-content {
    font-size: .875rem;
}

.impressum-content p {
    margin: 0 0 16px 0;
}

.impressum-content h1, h2, h3, h4 {
    margin: 24px 0 8px 0;
    font-weight: 600;
    letter-spacing: -.04em;
}

.impressum-content h1 {
    font-size: 1.5rem;
}

.impressum-content h2 {
    font-size: 1.35rem;
}

.impressum-content h3 {
    font-size: 1.2rem;
}

.impressum-content h4 {
    font-size: 1.1rem;
}

.impressum-content .spliter {
    padding: 16px 0 16px 0;
}