:root {
    --navy: #10243e;
    --navy-light: #173556;
    --blue: #2470c7;
    --blue-dark: #185a9f;
    --blue-soft: #edf5fd;
    --background: #e9eef5;
    --surface: #ffffff;
    --surface-soft: #f7f9fc;
    --text: #1a2433;
    --muted: #697586;
    --line: #dce3eb;
    --success-bg: #ecfdf3;
    --success-text: #067647;
    --error-bg: #fff1f0;
    --error-text: #b42318;
    --shadow: 0 24px 70px rgba(16, 36, 62, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        linear-gradient(135deg, rgba(36, 112, 199, 0.09), transparent 40%),
        var(--background);
    color: var(--text);
}

button,
input,
select,
textarea {
    font: inherit;
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto;
}

.registration-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    min-height: 760px;
    overflow: hidden;
    border-radius: 26px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.info-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 34px;
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 15%, rgba(255,255,255,0.13), transparent 180px),
        linear-gradient(160deg, var(--navy-light), var(--navy));
    color: white;
}

.info-panel::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -120px;
    bottom: -90px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: white;
    color: var(--navy);
    font-weight: 900;
    font-size: 1.25rem;
}

.brand-name {
    display: inline-block;
    margin: 0 0 0 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.info-copy {
    margin: 40px 0 34px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: #8ec6ff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.info-copy h1 {
    margin: 0 0 14px;
    font-size: 2.25rem;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.info-copy p,
.info-note {
    margin: 0;
    color: rgba(255,255,255,0.72);
    line-height: 1.6;
}

.info-steps {
    display: grid;
    gap: 12px;
    margin-bottom: 34px;
}

.info-steps div {
    display: flex;
    align-items: center;
    gap: 13px;
}

.info-steps span {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255,255,255,0.10);
    font-size: 0.76rem;
    font-weight: 800;
}

.info-steps p {
    margin: 0;
    color: rgba(255,255,255,0.88);
    font-weight: 700;
}

.info-note {
    position: relative;
    z-index: 1;
    font-size: 0.8rem;
}

.form-panel {
    padding: 34px 38px 40px;
    background: var(--surface);
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.form-header .eyebrow {
    color: var(--blue);
}

.form-header h2 {
    margin: 0 0 6px;
    font-size: 2rem;
    letter-spacing: -0.035em;
}

.form-header p {
    margin: 0;
    color: var(--muted);
}

.status-pill {
    padding: 9px 12px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue-dark);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

form {
    display: grid;
    gap: 16px;
}

fieldset {
    margin: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, #fff, #fcfdff);
}

legend {
    padding: 0 8px;
    color: var(--navy);
    font-size: 0.98rem;
    font-weight: 850;
}

.grid {
    display: grid;
    gap: 14px;
}

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

.grid.three {
    grid-template-columns: 0.75fr 1fr 1fr;
}

.grid.address {
    grid-template-columns: minmax(0, 2.4fr) minmax(100px, 0.75fr) minmax(100px, 0.8fr) minmax(0, 1.5fr);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.field > span {
    font-size: 0.86rem;
    font-weight: 750;
    color: var(--blue);
}

input,
select,
textarea {
    width: 100%;
    min-height: 43px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--surface-soft);
    color: var(--text);
    outline: none;
    transition: 0.18s ease;
}

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

input:focus,
select:focus,
textarea:focus {
    background: white;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(36, 112, 199, 0.11);
}

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

small,
.hint {
    color: var(--muted);
    font-size: 0.78rem;
}

.hint {
    margin: 10px 0 0;
}

.toggle {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
    cursor: pointer;
}

.toggle input {
    width: 18px;
    height: 18px;
    min-height: 0;
    margin-top: 2px;
    accent-color: var(--blue);
    flex: 0 0 auto;
}

.locations {
    margin-top: 15px;
}

.hidden {
    display: none;
}

.location-card {
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface-soft);
}

.location-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.location-title h3 {
    margin: 0;
    color: var(--navy);
    font-size: 0.98rem;
}

button {
    border: 0;
    border-radius: 10px;
    padding: 11px 17px;
    background: var(--blue);
    color: white;
    font-weight: 800;
    cursor: pointer;
    transition: 0.16s ease;
}

button:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 9px 20px rgba(36, 112, 199, 0.18);
}

button.secondary {
    background: var(--blue-soft);
    color: var(--blue-dark);
    box-shadow: none;
}

button.secondary:hover {
    background: #deecfa;
}

button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.privacy {
    margin-top: 2px;
    padding: 2px 3px;
    font-size: 0.86rem;
}

.actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

.actions button {
    min-width: 230px;
}

.alert {
    margin-bottom: 16px;
    padding: 13px 15px;
    border-radius: 11px;
    font-size: 0.9rem;
}

.alert.success {
    background: var(--success-bg);
    color: var(--success-text);
}

.alert.error {
    background: var(--error-bg);
    color: var(--error-text);
}

@media (max-width: 920px) {
    .registration-shell {
        grid-template-columns: 1fr;
    }

    .info-panel {
        min-height: auto;
        padding: 26px;
    }

    .info-copy {
        margin: 26px 0 20px;
    }

    .info-steps {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        margin-bottom: 22px;
    }

    .info-steps div {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 700px) {
    .page {
        width: min(100% - 16px, 1180px);
        margin: 8px auto;
    }

    .registration-shell {
        border-radius: 18px;
    }

    .form-panel {
        padding: 22px 18px 26px;
    }

    .form-header {
        flex-direction: column;
        gap: 12px;
    }

    .grid.two,
    .grid.three,
    .grid.address {
        grid-template-columns: 1fr;
    }

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

    .info-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    fieldset {
        padding: 16px;
    }

    .location-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .actions button {
        width: 100%;
    }
}

/* Kompakte Darstellung */
.page {
    width: min(1120px, calc(100% - 24px));
    margin: 18px auto;
}

.registration-shell {
    grid-template-columns: 255px minmax(0, 1fr);
    min-height: 0;
    border-radius: 20px;
}

.info-panel {
    padding: 24px;
}

.info-copy {
    margin: 26px 0 24px;
}

.info-copy h1 {
    font-size: 1.75rem;
}

.info-steps {
    gap: 8px;
    margin-bottom: 22px;
}

.info-steps span {
    width: 29px;
    height: 29px;
}

.form-panel {
    padding: 24px 28px 28px;
}

.form-header {
    margin-bottom: 16px;
}

.form-header h2 {
    font-size: 1.55rem;
}

form {
    gap: 10px;
}

fieldset {
    padding: 13px 15px 15px;
    border-radius: 13px;
}

.grid {
    gap: 10px 12px;
}

.field {
    gap: 4px;
}

.field > span {
    font-size: 0.8rem;
}

input,
select,
textarea {
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 8px;
}

textarea {
    min-height: 66px;
}

.hint {
    margin-top: 7px;
}

.privacy {
    font-size: 0.8rem;
}

.actions button {
    min-width: 210px;
}

.location-overview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.location-overview-row strong {
    display: block;
    color: var(--navy);
    font-size: 0.9rem;
}

.location-overview-row p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.8rem;
}

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

body.modal-open {
    overflow: hidden;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 18px;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 24, 42, 0.62);
    backdrop-filter: blur(3px);
}

.modal-dialog {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: calc(100vh - 36px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 28px 80px rgba(10, 24, 42, 0.32);
}

.modal-header,
.modal-footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    background: white;
}

.modal-header {
    border-bottom: 1px solid var(--line);
}

.modal-header h2 {
    margin: 0 0 3px;
    color: var(--navy);
    font-size: 1.35rem;
}

.modal-header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.modal-header .eyebrow {
    margin-bottom: 4px;
    color: var(--blue);
}

.modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 18px 22px;
    background: var(--surface-soft);
}

.modal-footer {
    border-top: 1px solid var(--line);
}

.icon-button {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--navy);
    font-size: 1.6rem;
    line-height: 1;
}

.icon-button:hover {
    transform: none;
    box-shadow: none;
}

.location-card {
    margin-bottom: 12px;
    padding: 15px;
    background: white;
}

.location-card:last-child {
    margin-bottom: 0;
}

.add-location-button {
    width: 100%;
    margin-top: 12px;
}

.danger-button {
    color: #a62920 !important;
    background: #fff1f0 !important;
}

@media (max-width: 920px) {
    .registration-shell {
        grid-template-columns: 1fr;
    }

    .info-panel {
        display: none;
    }
}

@media (max-width: 700px) {
    .page {
        width: 100%;
        margin: 0;
    }

    .registration-shell {
        border-radius: 0;
    }

    .form-panel {
        padding: 18px 14px 22px;
    }

    .grid.two,
    .grid.three,
    .grid.address {
        grid-template-columns: 1fr;
    }

    .location-overview-row,
    .modal-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .location-overview-row button,
    .modal-footer button {
        width: 100%;
    }

    .modal {
        padding: 0;
    }

    .modal-dialog {
        width: 100%;
        max-height: 100vh;
        min-height: 100vh;
        border-radius: 0;
    }

    .modal-header,
    .modal-footer,
    .modal-body {
        padding-left: 15px;
        padding-right: 15px;
    }
}


/* Interessen-Popup nach erfolgreicher Registrierung */
.interest-dialog {
    max-width: 560px;
}

.interest-form {
    display: grid;
    gap: 10px;
}

.interest-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface-soft);
    color: var(--blue);
    font-weight: 750;
    cursor: pointer;
    transition: 0.16s ease;
}

.interest-option:hover {
    border-color: var(--blue);
    background: var(--blue-soft);
}

.interest-option input {
    width: 19px;
    height: 19px;
    min-height: 0;
    margin: 0;
    accent-color: var(--blue);
    flex: 0 0 auto;
}

.interest-option:has(input:checked) {
    border-color: var(--blue);
    background: var(--blue-soft);
}


.interest-consent {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #dbe5f0;
}

.consent-option {
    background: #f5f9ff;
    border-color: #b9d2ee;
    align-items: flex-start;
}

.consent-option span {
    font-size: 0.88rem;
    line-height: 1.45;
}

/* Dezente, ruhige Gestaltung */
:root {
    --navy: #3f4b59;
    --navy-light: #566372;
    --blue: #557a9e;
    --blue-dark: #426583;
    --blue-soft: #f2f6f9;
    --background: #f3f4f6;
    --surface: #ffffff;
    --surface-soft: #fafbfc;
    --text: #303843;
    --muted: #737d89;
    --line: #e1e5e9;
    --shadow: 0 8px 28px rgba(35, 45, 55, 0.08);
}

body {
    background: var(--background);
}

.page {
    width: min(1200px, calc(100% - 24px));
    margin: 20px auto;
}

.registration-shell {
    grid-template-columns: 225px minmax(0, 1fr);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.info-panel {
    padding: 24px 22px;
    background: #536170;
}

.info-panel::after {
    display: none;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 7px;
    font-size: 1rem;
    font-weight: 700;
}

.brand-name {
    font-weight: 700;
    letter-spacing: 0.05em;
}

.info-copy {
    margin: 28px 0 24px;
}

.info-copy h1 {
    margin-bottom: 10px;
    font-size: 1.48rem;
    line-height: 1.18;
    letter-spacing: -0.02em;
}

.info-copy p,
.info-note {
    color: rgba(255,255,255,0.74);
    line-height: 1.5;
}

.eyebrow {
    color: rgba(255,255,255,0.72);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
}

.info-steps {
    gap: 6px;
}

.info-steps span {
    width: 27px;
    height: 27px;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    font-weight: 700;
}

.info-steps p {
    font-size: 0.84rem;
    font-weight: 600;
}

.form-panel {
    padding: 24px 28px 28px;
}

.form-header {
    margin-bottom: 14px;
}

.form-header .eyebrow {
    color: #71849a;
}

.form-header h2 {
    font-size: 1.42rem;
    font-weight: 650;
    letter-spacing: -0.015em;
}

.status-pill {
    padding: 7px 10px;
    border: 1px solid #dfe7ed;
    border-radius: 7px;
    background: #f7f9fa;
    color: #66788a;
    font-weight: 650;
}

form {
    gap: 9px;
}

fieldset {
    padding: 12px 14px 14px;
    border-radius: 8px;
    background: #fff;
}

legend {
    color: #4b5866;
    font-size: 0.9rem;
    font-weight: 700;
}

.field > span {
    color: #5d7186;
    font-size: 0.79rem;
    font-weight: 650;
}

input,
select,
textarea {
    min-height: 37px;
    border-radius: 6px;
    background: #fbfcfd;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

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

input:focus,
select:focus,
textarea:focus {
    border-color: #8aa0b4;
    box-shadow: 0 0 0 2px rgba(85, 122, 158, 0.08);
}

button {
    border-radius: 6px;
    padding: 10px 15px;
    background: #5c7893;
    font-weight: 650;
}

button:hover {
    background: #4d687f;
    transform: none;
    box-shadow: none;
}

button.secondary {
    border: 1px solid #d7dfe6;
    background: #f7f9fa;
    color: #566b7d;
}

button.secondary:hover {
    background: #eef2f5;
}

.alert {
    border: 1px solid transparent;
    border-radius: 7px;
}

.alert.success {
    border-color: #cfe5d8;
    background: #f4faf6;
}

.alert.error {
    border-color: #efd0cd;
    background: #fff7f6;
}

.modal-backdrop {
    background: rgba(37, 45, 54, 0.44);
    backdrop-filter: none;
}

.modal-dialog {
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 14px 42px rgba(28, 36, 45, 0.18);
}

.modal-header,
.modal-footer {
    padding: 15px 18px;
}

.modal-header h2 {
    color: #465461;
    font-size: 1.18rem;
    font-weight: 650;
}

.modal-header .eyebrow {
    color: #71849a;
}

.modal-body {
    padding: 16px 18px;
    background: #fafbfc;
}

.icon-button {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: #f1f4f6;
    color: #596979;
}

.location-card,
.interest-option {
    border-radius: 7px;
    background: #fff;
}

.interest-option {
    padding: 11px 12px;
    color: #53697d;
    font-weight: 600;
}

.interest-option:hover,
.interest-option:has(input:checked) {
    border-color: #aebdca;
    background: #f5f8fa;
}

.consent-option {
    border-color: #d8e0e6;
    background: #fafbfc;
}

.danger-button {
    color: #8a4b46 !important;
    background: #fbf5f4 !important;
}

@media (max-width: 920px) {
    .registration-shell {
        grid-template-columns: 1fr;
    }
}

/* Feldbeschriftungen: blau und normalgewichtig */
.field > span {
    color: #2f6f9f;
    font-weight: 400;
}

/* Schaltflächen einheitlich blau */
button,
button.secondary,
.icon-button,
.danger-button {
    border: 1px solid #2f6f9f !important;
    background: #2f6f9f !important;
    color: #ffffff !important;
    font-weight: 600;
}

button:hover,
button.secondary:hover,
.icon-button:hover,
.danger-button:hover {
    border-color: #285f88 !important;
    background: #285f88 !important;
    color: #ffffff !important;
    transform: none;
    box-shadow: none;
}

button:disabled {
    border-color: #9db5c8 !important;
    background: #9db5c8 !important;
    color: #ffffff !important;
}


/* Neukundenaufnahme oben statt GROTEC-Schriftzug */
.info-copy-top {
    margin: 0 0 26px;
}

.info-copy-top .eyebrow {
    margin-bottom: 10px;
}

/* Seite ohne sichtbare Scrollbar */
html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    min-height: 100%;
}

.page {
    height: 100vh;
    width: min(1200px, calc(100% - 20px));
    margin: 0 auto;
    padding: 10px 0;
}

.registration-shell {
    height: 100%;
    min-height: 0;
}

.info-panel,
.form-panel {
    min-height: 0;
}

.form-panel {
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.form-panel::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
body::-webkit-scrollbar,
html::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.modal-body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

@media (max-width: 920px) {
    html,
    body {
        height: auto;
        min-height: 100%;
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .page {
        width: 100%;
        height: auto;
        min-height: 100vh;
        padding: 0;
    }

    .registration-shell {
        height: auto;
        min-height: 100vh;
    }

    .form-panel {
        overflow: visible;
    }
}


/* Unternehmen und Rechnungsanschrift nebeneinander */
.company-billing-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.company-billing-row > fieldset {
    min-width: 0;
    height: 100%;
}

.company-billing-row .grid.address {
    grid-template-columns: minmax(0, 1fr) minmax(92px, 0.42fr);
}

.company-billing-row .grid.address .zip,
.company-billing-row .grid.address .city {
    grid-column: auto;
}

@media (max-width: 1050px) {
    .company-billing-row {
        grid-template-columns: 1fr;
    }

    .company-billing-row .grid.address {
        grid-template-columns: minmax(0, 2.4fr) minmax(100px, 0.75fr) minmax(100px, 0.8fr) minmax(0, 1.5fr);
    }
}

@media (max-width: 700px) {
    .company-billing-row .grid.address {
        grid-template-columns: 1fr;
    }
}

/* Rechnungsanschrift: PLZ schmaler, Ort breiter */
.company-billing-row .grid.address {
    grid-template-columns: 90px minmax(0, 1fr) 92px;
}

.company-billing-row .grid.address .street {
    grid-column: 1 / 3;
}

.company-billing-row .grid.address .number {
    grid-column: 3;
}

.company-billing-row .grid.address .zip {
    grid-column: 1;
}

.company-billing-row .grid.address .city {
    grid-column: 2 / 4;
}

@media (max-width: 1050px) {
    .company-billing-row .grid.address {
        grid-template-columns: minmax(0, 2.5fr) minmax(90px, 0.65fr) 90px minmax(0, 1.8fr);
    }

    .company-billing-row .grid.address .street,
    .company-billing-row .grid.address .number,
    .company-billing-row .grid.address .zip,
    .company-billing-row .grid.address .city {
        grid-column: auto;
    }
}

@media (max-width: 700px) {
    .company-billing-row .grid.address {
        grid-template-columns: 1fr;
    }

    .company-billing-row .grid.address .street,
    .company-billing-row .grid.address .number,
    .company-billing-row .grid.address .zip,
    .company-billing-row .grid.address .city {
        grid-column: auto;
    }
}
