:root {
    --brand-blue: #0b5ea8;
    --brand-blue-dark: #084b86;
    --brand-blue-soft: #dbeeff;
    --brand-cyan: #48b8e8;

    --page-bg-1: #0b5ea8;
    --page-bg-2: #0a4f8a;
    --page-bg-3: #083e6c;

    --white: #ffffff;
    --text-main: #17324d;
    --text-soft: #5d738a;
    --border: rgba(11, 94, 168, 0.14);

    --success-bg: #eefaf4;
    --success-border: #bde7cf;
    --success-text: #17633f;

    --error-bg: #fff1f1;
    --error-border: #f3c3c3;
    --error-text: #9f2727;

    --shadow-lg: 0 20px 60px rgba(4, 28, 54, 0.18);
    --shadow-md: 0 14px 34px rgba(4, 28, 54, 0.12);
    --shadow-sm: 0 8px 24px rgba(4, 28, 54, 0.08);

    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;

    --container-width: 780px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--text-main);
    min-height: 100vh;
}

.page-payment {
    background:
        radial-gradient(circle at top left, rgba(72, 184, 232, 0.28), transparent 30%),
        radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.08), transparent 25%),
        linear-gradient(135deg, var(--page-bg-1) 0%, var(--page-bg-2) 45%, var(--page-bg-3) 100%);
}

.page-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.payment-card {
    width: 100%;
    max-width: var(--container-width);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.payment-card::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -120px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(72, 184, 232, 0.22), transparent 65%);
    pointer-events: none;
}

.payment-header {
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 96px;
    margin-bottom: 10px;
}

.logo-img {
    display: block;
    max-width: min(100%, 320px);
    width: auto;
    height: auto;
    max-height: 110px;
    object-fit: contain;
}

.brand-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-blue-soft) 0%, #f0f8ff 100%);
    color: var(--brand-blue-dark);
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

.payment-title {
    margin: 0;
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    line-height: 1.08;
    letter-spacing: 0;
    color: var(--brand-blue-dark);
}

.payment-subtitle {
    margin: 10px 0 0;
    font-size: 1rem;
    color: var(--text-soft);
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.progress-step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eaf2fb;
    color: var(--brand-blue-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(11, 94, 168, 0.12);
    transition: all 0.25s ease;
}

.progress-step-active {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
    color: var(--white);
    box-shadow: 0 8px 18px rgba(11, 94, 168, 0.22);
}

.progress-line {
    width: 56px;
    height: 4px;
    border-radius: 999px;
    background: #d8e7f6;
}

.info-banner {
    background: linear-gradient(180deg, #f7fbff 0%, #eef7ff 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 1;
}

.info-banner p {
    margin: 0;
    line-height: 1.6;
}

.legal-primary {
    font-size: 1rem;
    text-align: center;
}

.legal-inline-link {
    color: var(--brand-blue-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-inline-link:hover {
    color: var(--brand-blue);
}

.legal-context-note {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.45;
    text-align: center;
}

.legal-context-note a {
    color: var(--brand-blue-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.alert {
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.alert p {
    margin: 0 0 8px;
}

.alert p:last-child {
    margin-bottom: 0;
}

.error-list {
    margin: 0;
    padding-left: 22px;
}

.error-list li + li {
    margin-top: 6px;
}

.alert-error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-text);
}

.summary-title {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 1.2rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.summary-item {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(23, 99, 63, 0.12);
    border-radius: 14px;
    padding: 14px;
}

.summary-label {
    display: block;
    font-size: 0.86rem;
    font-weight: 700;
    color: rgba(23, 99, 63, 0.78);
    margin-bottom: 6px;
}

.summary-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--success-text);
    word-break: break-word;
}

.step {
    display: none;
    border-top: 1px solid rgba(11, 94, 168, 0.1);
    padding-top: 22px;
    margin-top: 22px;
    position: relative;
    z-index: 1;
}

.step-visible {
    display: block;
}

.fade-in {
    animation: fadeInUp 0.32s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--brand-blue-soft);
    color: var(--brand-blue-dark);
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.step-title {
    margin: 0 0 8px;
    font-size: 1.35rem;
    color: var(--brand-blue-dark);
}

.step-description {
    margin: 0 0 20px;
    color: var(--text-soft);
    line-height: 1.6;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-main);
}

.form-input {
    width: 100%;
    min-height: 56px;
    border: 1px solid rgba(11, 94, 168, 0.16);
    border-radius: 16px;
    background: #ffffff;
    padding: 0 16px;
    font-size: 1rem;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: inset 0 1px 1px rgba(4, 28, 54, 0.02);
}

.form-input:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 4px rgba(11, 94, 168, 0.14);
}

.input-with-suffix {
    position: relative;
}

.input-with-suffix .form-input {
    padding-right: 52px;
}

.input-suffix {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: var(--text-soft);
    font-weight: 700;
}

.field-help {
    margin-top: 10px;
    margin-bottom: 0;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.field-error {
    margin-top: 8px;
    margin-bottom: 0;
    color: var(--error-text);
    font-size: 0.92rem;
    font-weight: 700;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 18px;
    line-height: 1.5;
    color: var(--text-main);
}

.checkbox-row input {
    margin-top: 4px;
    transform: scale(1.12);
    accent-color: var(--brand-blue);
}

.checkbox-row-legal {
    padding: 14px 16px;
    background: #f7fbff;
    border: 1px solid rgba(11, 94, 168, 0.12);
    border-radius: 16px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    appearance: none;
    border: 0;
    border-radius: 16px;
    min-height: 52px;
    padding: 0 20px;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
    color: var(--white);
    box-shadow: 0 12px 24px rgba(11, 94, 168, 0.22);
}

.btn-primary:hover {
    opacity: 0.98;
}

.btn-secondary {
    background: #edf4fb;
    color: var(--brand-blue-dark);
    border: 1px solid rgba(11, 94, 168, 0.12);
}

.final-payment-form {
    margin-top: 20px;
}

@media (max-width: 900px) {
    .payment-card {
        padding: 24px;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding: 18px 12px;
    }

    .payment-card {
        padding: 18px;
        border-radius: 22px;
    }

    .payment-title {
        font-size: 1.7rem;
    }

    .payment-subtitle {
        font-size: 0.96rem;
    }

    .logo-container {
        min-height: 80px;
    }

    .logo-img {
        max-width: min(100%, 260px);
        max-height: 86px;
    }

    .progress-line {
        width: 36px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }
}

.form-actions-center {
    justify-content: center;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -56px;
    z-index: 1000;
    background: #ffffff;
    color: var(--brand-blue-dark);
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--shadow-md);
}

.skip-link:focus {
    top: 16px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.progress-steps {
    list-style: none;
    padding: 0;
}

.progress-step {
    list-style: none;
}

.required-indicator {
    font-size: 0.9rem;
    color: var(--text-soft);
    font-weight: 600;
}

.checkbox-group {
    border: 0;
    padding: 0;
    margin: 0;
}

.checkbox-help {
    margin-left: 34px;
}

.summary-grid dt,
.summary-grid dd {
    margin: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex="-1"]:focus {
    outline: 3px solid #0a4f8a;
    outline-offset: 3px;
}

.form-input[aria-invalid="true"],
.checkbox-row input[aria-invalid="true"] {
    border-color: #9f2727;
    box-shadow: 0 0 0 4px rgba(159, 39, 39, 0.12);
}

.legal-inline-link,
.legal-context-note a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
