:root {
    --font-body: "Manrope", "Segoe UI", sans-serif;
    --font-display: "Epilogue", "Manrope", "Segoe UI", sans-serif;
    --bg-start: #f8f5f7;
    --bg-end: #efe8ec;
    --surface: #ffffff;
    --surface-muted: #faf8f9;
    --primary: #991b40;
    --primary-strong: #7c1434;
    --primary-soft: #fdf1f5;
    --text-main: #1f1920;
    --text-muted: #6e6168;
    --border: #e6dde2;
    --ring: rgba(153, 27, 64, 0.22);
    --panel-width: min(1080px, 92vw);
    --panel-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.52));
    --panel-border: 1px solid rgba(255, 255, 255, 0.74);
    --panel-shadow: 0 20px 42px rgba(45, 20, 31, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background:
        radial-gradient(circle at 12% 15%, rgba(153, 27, 64, 0.08), transparent 35%),
        radial-gradient(circle at 86% 2%, rgba(177, 128, 148, 0.10), transparent 28%),
        linear-gradient(135deg, var(--bg-start), var(--bg-end));
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.payment-header {
    width: var(--panel-width);
    margin-top: 1.15rem;
    margin-bottom: 1.8rem;
    padding: 1.55rem 1.4rem 1.25rem;
    border-radius: 18px;
    border: var(--panel-border);
    background: var(--panel-bg);
    box-shadow: var(--panel-shadow);
    position: relative;
}

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

.payment-title {
    font-family: var(--font-display);
    color: var(--primary);
    letter-spacing: -0.03em;
    font-weight: 800;
    font-size: clamp(2.1rem, 2.6vw, 3rem);
    line-height: 1.05;
    margin-top: 0.2rem;
    margin-bottom: 0.3rem;
}

.subtitle,
.payment-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    font-size: 1.04rem;
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    margin-top: 0.35rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 6px 14px rgba(32, 22, 27, 0.06);
}

.header-lang {
    position: absolute;
    right: 1.15rem;
    top: 1rem;
    margin-top: 0;
}

.lang-btn {
    border: 0;
    border-radius: 999px;
    min-width: 3.1rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #5a4d54;
    background: transparent;
    transition: all 0.18s ease;
}

.lang-btn.active {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 8px 18px rgba(153, 27, 64, 0.28);
}

.lang-btn:not(.active):hover {
    background: #f4edf1;
    color: #41353b;
}

.step-indicator {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 7px;
    margin-top: 1.4rem;
    margin-bottom: 0.25rem;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 72px;
}

.step {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 8px 16px rgba(153, 27, 64, 0.20);
}

.step.inactive {
    background-color: #ebe6e9;
    color: #8e848a;
    box-shadow: none;
}

.step-line {
    width: 44px;
    height: 2px;
    margin-top: 16px;
    background: linear-gradient(90deg, #d9c8d0, #ddd4d9);
}

.step-label {
    margin-top: 0.45rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8a7c84;
    text-align: center;
    line-height: 1.1;
}

.step:not(.inactive) + .step-label {
    color: var(--primary);
}

.container {
    width: var(--panel-width);
    background: var(--panel-bg);
    border: var(--panel-border);
    border-radius: 18px;
    box-shadow: var(--panel-shadow);
    padding: 2rem 2rem 1.9rem;
    margin-bottom: 2rem;
}

@media (min-width: 1100px) {
    .payment-header {
        padding-left: 1.65rem;
        padding-right: 1.65rem;
    }
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

@media (min-width: 760px) {
    .form-row {
        flex-direction: row;
    }
}

.form-group {
    flex: 1;
    margin-right: 0;
}

label {
    font-weight: 700;
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.45rem;
    color: #251d22;
}

input[type="text"],
input[type="number"],
input[type="tel"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0.85rem 0.95rem;
    margin-top: 0;
    border-radius: 10px;
    background-color: var(--surface-muted);
    border: 1px solid var(--border);
    font-weight: 500;
    font-size: 0.92rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--ring);
    background-color: #ffffff;
    outline: none;
}

.validationMessage {
    color: #842029;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    padding: 0.8rem 0.95rem;
    border-radius: 10px;
    font-size: 0.92rem;
    margin-top: 0.6rem;
}

.validation-summary {
    background: rgba(153, 27, 64, 0.08);
    border: 1px solid rgba(153, 27, 64, 0.22);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 0.85rem 1rem 0.8rem;
    margin: 0.7rem 0 1.1rem;
    color: #5f1630;
    box-shadow: 0 8px 20px rgba(153, 27, 64, 0.08);
}

.validation-summary ul {
    margin: 0;
    padding-left: 1.2rem;
}

.validation-summary li {
    margin: 0.15rem 0;
    font-weight: 600;
}

.validation-summary.validation-summary-valid {
    display: none;
}

#toast-container > .toast {
    width: 340px;
    border-radius: 12px;
    box-shadow: 0 12px 26px rgba(45, 20, 31, 0.18);
    font-size: 0.93rem;
    font-weight: 600;
    line-height: 1.35;
    padding: 0.8rem 0.95rem;
    opacity: 1;
}

#toast-container > .toast-error {
    background: rgba(153, 27, 64, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    backdrop-filter: blur(4px);
    background-image: none !important;
    padding-left: 0.95rem !important;
}

#toast-container .toast-title {
    display: none;
}

#toast-container .toast-message {
    font-size: 0.93rem;
}

#toast-container > .toast .toast-close-button {
    right: 0.45rem;
    top: 0.2rem;
    color: #fff;
    opacity: 0.85;
    font-size: 1.2rem;
    text-shadow: none;
}

input[type="submit"] {
    margin-top: 1.5rem;
    width: 100%;
    padding: 0.9rem;
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 700;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.04rem;
    letter-spacing: -0.01em;
    transition: background-color 0.18s ease, transform 0.12s ease, box-shadow 0.2s ease;
}

input[type="submit"]:hover {
    background-color: var(--primary-strong);
    box-shadow: 0 8px 16px rgba(153, 27, 64, 0.20);
}

input[type="submit"]:active {
    transform: translateY(1px);
}

.button {
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 800;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.12s ease, box-shadow 0.2s ease;
}

.button:hover {
    background-color: var(--primary-strong);
    box-shadow: 0 8px 16px rgba(153, 27, 64, 0.20);
}

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

@media (max-width: 640px) {
    .payment-header {
        width: 94vw;
        margin-top: 0.75rem;
        padding: 1rem 0.75rem 0.95rem;
    }

    .header-lang {
        position: static;
        margin: 0 auto 0.75rem;
        display: table;
    }

    .payment-title {
        margin-top: 0.25rem;
        font-size: 1.95rem;
    }

    .subtitle,
    .payment-subtitle {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }

    .step-indicator {
        margin-top: 1rem;
        margin-bottom: 0;
        gap: 4px;
    }

    .step-item {
        min-width: 56px;
    }

    .step {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .step-label {
        font-size: 0.62rem;
        margin-top: 0.35rem;
    }

    .step-line {
        width: 20px;
        margin-top: 14px;
    }

    .container {
        width: 94vw;
        padding: 1.25rem;
    }

    .section-title {
        font-size: 1.15rem;
    }
}
