/* =========================================================================
   Berolina GmbH – Corporate Design Stylesheet (Selbstauskunft Portal)
   Farbwelt: Feingold (#C5A059), Tief-Anthrazit (#1C1E22), Warm-Elfenbein (#F6F4EE)
   ========================================================================= */

:root {
    --gold-primary: #C5A059;
    --gold-dark: #9F7B35;
    --gold-light: #DFC388;
    --gold-tint: #FBF8F1;
    --anthracite: #1C1E22;
    --anthracite-soft: #282B31;
    --ivory-bg: #F5F2EA;
    --card-bg: #FFFFFF;
    --text-main: #1F2227;
    --text-muted: #5F646E;
    --border-warm: #E3DDD0;
    --success: #247A4D;
    --danger: #B9382C;
    --radius-md: 8px;
    --radius-sm: 5px;
    --shadow-card: 0 8px 26px rgba(28, 30, 34, 0.055);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--ivory-bg);
    color: var(--text-main);
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

.hp-wrap {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* Topbar (Edelmetall-Ticker-Anmutung) */
.topbar {
    background: #141619;
    color: #C9CDD4;
    font-size: 12.5px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.25);
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 7px;
    padding-bottom: 7px;
    gap: 12px;
    flex-wrap: wrap;
}

.metal-pills {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.metal-pill {
    background: rgba(197, 160, 89, 0.12);
    border: 1px solid rgba(197, 160, 89, 0.32);
    color: #EAD8B1;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11.5px;
    letter-spacing: 0.3px;
}

.metal-pill strong {
    color: var(--gold-light);
}

.topbar-divider {
    color: #50555E;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-link {
    color: #D7DAE0;
    text-decoration: none;
    transition: color 0.15s;
}

.topbar-link:hover {
    color: var(--gold-light);
}

.lang-switch {
    display: inline-flex;
    border: 1px solid rgba(197, 160, 89, 0.4);
    border-radius: 4px;
    overflow: hidden;
    margin-left: 6px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: #AEB3BC;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    cursor: pointer;
}

.lang-btn.active {
    background: var(--gold-primary);
    color: #141619;
}

/* Header */
.site-header {
    background: var(--anthracite);
    border-bottom: 3px solid var(--gold-primary);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    padding-bottom: 16px;
    gap: 20px;
    flex-wrap: wrap;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.brand-emblem {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.brand-logo-img {
    max-height: 50px;
    width: auto;
}

.brand-wordmark {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: 3.5px;
    color: #FFFFFF;
    line-height: 1.1;
}

.brand-sub {
    font-size: 10.5px;
    letter-spacing: 1.8px;
    color: var(--gold-light);
    margin-top: 3px;
}

.main-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.main-nav a {
    color: #E5E7EB;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.main-nav a:hover {
    color: var(--gold-light);
    border-bottom-color: var(--gold-primary);
}

/* Hero Banner */
.hero-banner {
    position: relative;
    background: linear-gradient(135deg, #22252B 0%, #191B20 60%, #2C261B 100%);
    color: #FFFFFF;
    padding: 44px 0 40px;
    overflow: hidden;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.11;
    background-image: radial-gradient(circle at 85% 30%, #D8BA73 0%, transparent 45%),
                      repeating-linear-gradient(45deg, rgba(216,186,115,0.22) 0px, rgba(216,186,115,0.22) 1px, transparent 1px, transparent 18px);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--gold-light);
    border: 1px solid rgba(216, 186, 115, 0.45);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.hero-banner h1 {
    margin: 0 0 12px;
    font-size: clamp(26px, 3.4vw, 36px);
    font-weight: 700;
    letter-spacing: 0.3px;
}

.hero-lead {
    max-width: 820px;
    margin: 0 0 22px;
    color: #D4D7DD;
    font-size: 15.5px;
    line-height: 1.65;
}

.hero-trust-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #E6DEC8;
}

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

.trust-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.25);
}

/* Sticky Stepper */
.stepper-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-warm);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}

.stepper-inner {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    scrollbar-width: thin;
}

.step-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: all 0.18s;
}

.step-chip:hover {
    background: var(--gold-tint);
    color: var(--anthracite);
}

.step-chip.active {
    background: var(--anthracite);
    color: #FFFFFF;
    border-color: var(--gold-primary);
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: rgba(197, 160, 89, 0.25);
    color: var(--gold-dark);
    font-size: 11px;
    font-weight: 700;
}

.step-chip.active .step-num {
    background: var(--gold-primary);
    color: #141619;
}

/* Main & Cards */
.main-content {
    padding-top: 30px;
    padding-bottom: 56px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-warm);
    border-top: 3px solid var(--gold-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 28px 30px;
    margin-bottom: 26px;
}

.section-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 1px solid #EFECE4;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D5B46E, #A9833A);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.section-head h2 {
    margin: 0 0 3px;
    font-size: 20px;
    color: var(--anthracite);
}

.section-sub {
    margin: 0;
    font-size: 13.5px;
    color: var(--text-muted);
}

/* Grids & Form Elements */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-3-street { display: grid; grid-template-columns: 2.2fr 0.8fr 1.2fr; gap: 16px; }
.grid-5-rep { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 12px; }
.field-row-split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: end; }

.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-6  { margin-bottom: 6px; }

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #2B2E36;
    margin-bottom: 6px;
}

.req {
    color: var(--danger);
    font-weight: 700;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    font-size: 14.5px;
    font-family: inherit;
    color: var(--text-main);
    background: #FFFFFF;
    border: 1px solid #CFC9BA;
    border-radius: var(--radius-sm);
    transition: border-color 0.18s, box-shadow 0.18s;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.2);
}

.form-control.invalid {
    border-color: var(--danger);
    background: #FFF9F8;
}

.form-control.valid-iban {
    border-color: var(--success);
    background: #F6FCF8;
}

/* KYC Highlight & Radio Pills */
.kyc-highlight-box {
    background: var(--gold-tint);
    border: 1px solid #E6D8B8;
    border-radius: var(--radius-sm);
    padding: 18px 20px;
}

.radio-pills {
    display: inline-flex;
    gap: 10px;
}

.pill-option {
    cursor: pointer;
}

.pill-option input {
    position: absolute;
    opacity: 0;
}

.pill-option span {
    display: inline-block;
    padding: 8px 22px;
    border-radius: var(--radius-sm);
    border: 1px solid #CFC8B8;
    background: #FFFFFF;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.15s;
}

.pill-option input:checked + span {
    background: var(--anthracite);
    color: var(--gold-light);
    border-color: var(--gold-primary);
}

.checkbox-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #FFFFFF;
    border: 1px solid #D8D1C1;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
}

.chip-check input {
    accent-color: var(--gold-dark);
}

.simplified-toggle-box {
    background: #F8F7F4;
    border: 1px dashed #CBC3B1;
    border-radius: var(--radius-sm);
    padding: 13px 16px;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    cursor: pointer;
}

.check-row input {
    margin-top: 3px;
    accent-color: var(--gold-dark);
}

.muted-inline {
    color: var(--text-muted);
}

/* Upload Cards */
.upload-card {
    background: #FAF8F3;
    border: 1px dashed #C7B99B;
    border-radius: var(--radius-sm);
    padding: 16px;
}

.file-input {
    width: 100%;
    font-size: 13px;
    padding: 6px 0;
}

.file-hint {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Repeater Cards */
.repeater-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.repeater-item {
    background: #FAF9F6;
    border: 1px solid #E5E0D4;
    border-radius: var(--radius-sm);
    padding: 16px 18px;
}

.repeater-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13.5px;
    color: var(--gold-dark);
}

.btn-remove {
    background: transparent;
    border: 1px solid #D9B6B2;
    color: var(--danger);
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-remove:hover {
    background: #FDF0EE;
}

/* Info Callout & IBAN Status */
.info-callout {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #FBF7EC;
    border-left: 4px solid var(--gold-primary);
    padding: 12px 16px;
    font-size: 13.5px;
    color: #363229;
    border-radius: 0 5px 5px 0;
}

.iban-status {
    font-size: 11.5px;
    font-weight: 700;
    margin-left: 6px;
}

.iban-status.ok { color: var(--success); }
.iban-status.err { color: var(--danger); }

/* Compliance Blocks */
.compliance-block {
    border: 1px solid #E6E1D5;
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    background: #FCFBF9;
}

.compliance-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid #ECE7DC;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.compliance-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--anthracite);
}

.policy-link {
    font-size: 12.5px;
    color: var(--gold-dark);
    font-weight: 600;
    text-decoration: none;
}

.policy-link:hover {
    text-decoration: underline;
}

.comp-question-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #F2EFE7;
    font-size: 14px;
}

.comp-question-row:last-child {
    border-bottom: none;
}

.radio-pills-sm {
    display: inline-flex;
    gap: 6px;
    flex-shrink: 0;
}

.radio-pills-sm label {
    cursor: pointer;
}

.radio-pills-sm input {
    position: absolute;
    opacity: 0;
}

.radio-pills-sm span {
    display: inline-block;
    padding: 5px 14px;
    border: 1px solid #CFC8B8;
    border-radius: 4px;
    background: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
}

.radio-pills-sm input:checked + span {
    background: var(--anthracite);
    color: var(--gold-light);
    border-color: var(--gold-primary);
}

.cert-upload-drawer {
    background: #F5F1E6;
    border: 1px solid #DFD4BC;
    border-radius: var(--radius-sm);
    padding: 14px;
    margin: 8px 0;
}

.pep-box {
    background: #FAF8F3;
    border: 1px solid #E5DEC9;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
}

/* Sektion 9: 5/5 Declarations Counter */
.decl-counter-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FDF4E3;
    border: 1px solid #E8C787;
    color: #6B4908;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
}

.decl-counter-banner.ready {
    background: #ECF8F1;
    border-color: #93D3AE;
    color: #1B5E3A;
}

.decl-badge {
    margin-left: auto;
    font-size: 14px;
}

.declarations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.decl-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #E5E0D3;
    border-radius: var(--radius-sm);
    background: #FCFBF9;
    font-size: 13.5px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.decl-item:hover {
    border-color: var(--gold-primary);
}

.decl-item input {
    margin-top: 3px;
    width: 17px;
    height: 17px;
    accent-color: var(--gold-dark);
    flex-shrink: 0;
}

.decl-item a {
    color: var(--gold-dark);
    font-weight: 600;
}

/* Signature Pad */
.sig-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.signature-box {
    border: 1px solid #CFC9BA;
    border-radius: var(--radius-sm);
    background: #FFFFFF;
    overflow: hidden;
}

#signatureCanvas {
    width: 100%;
    height: 130px;
    display: block;
    touch-action: none;
    cursor: crosshair;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: 14.5px;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s;
}

.btn-gold {
    background: linear-gradient(135deg, #CFA95E 0%, #A88136 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(168, 129, 54, 0.28);
}

.btn-gold:hover:not(:disabled) {
    background: linear-gradient(135deg, #D8B56C 0%, #B78E40 100%);
    transform: translateY(-1px);
}

.btn-gold:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-lg {
    padding: 14px 30px;
    font-size: 15.5px;
}

.btn-outline {
    background: #FFFFFF;
    border-color: var(--gold-primary);
    color: var(--anthracite);
}

.btn-outline-sm {
    background: #FFFFFF;
    border: 1px solid #CFC6B2;
    color: var(--anthracite);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.btn-outline-sm:hover {
    border-color: var(--gold-primary);
    background: var(--gold-tint);
}

.btn-text-gold {
    background: none;
    border: none;
    padding: 4px 0;
    color: var(--gold-dark);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.btn-text-gold:hover {
    text-decoration: underline;
}

.submit-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 18px;
    border-top: 1px solid #ECE7DC;
}

.submit-meta {
    font-size: 13px;
    color: var(--text-muted);
}

/* Alerts & Success Card */
.alert-banner {
    background: #FDF1F0;
    border: 1px solid #E5A9A3;
    border-left: 5px solid var(--danger);
    color: #7A1F17;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 22px;
    font-size: 14px;
}

.success-card {
    text-align: center;
    padding: 48px 30px;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #EAF7F0;
    color: var(--success);
    font-size: 32px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--success);
}

.dossier-meta {
    display: inline-flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    background: var(--gold-tint);
    border: 1px solid #E4D5B3;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    margin: 16px 0 24px;
    font-size: 14px;
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Footer */
.site-footer {
    background: var(--anthracite);
    color: #C9CDD4;
    border-top: 3px solid var(--gold-primary);
    padding: 42px 0 36px;
    font-size: 13.5px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 32px;
}

.footer-brand {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: #FFFFFF;
    margin-bottom: 10px;
}

.footer-heading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--gold-light);
    margin-bottom: 10px;
}

.footer-text {
    margin: 0 0 10px;
    line-height: 1.65;
}

.footer-text a, .footer-links a {
    color: #E5E7EB;
    text-decoration: none;
}

.footer-text a:hover, .footer-links a:hover {
    color: var(--gold-light);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
}

.footer-links li {
    margin-bottom: 6px;
}

.footer-small {
    font-size: 12px;
    color: #8E94A0;
    margin: 0;
}

/* Responsive */
@media (max-width: 920px) {
    .grid-4, .grid-5-rep { grid-template-columns: repeat(2, 1fr); }
    .grid-3, .grid-3-street, .footer-grid { grid-template-columns: 1fr; }
    .field-row-split, .grid-2 { grid-template-columns: 1fr; }
    .comp-question-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media print {
    .topbar, .stepper-bar, .main-nav, .submit-footer, .btn-outline-sm, .btn-text-gold {
        display: none !important;
    }
    body { background: #FFFFFF; }
    .card { box-shadow: none; break-inside: avoid; }
}