:root {
    --primary: #1e3a5f;
    --accent: #f97316;
    --bg: #f8fafc;
    --text: #0f172a;
    --muted: #475569;
    --card: #ffffff;
    --border: rgba(2, 6, 23, 0.10);
    --shadow: 0 18px 50px rgba(2, 6, 23, 0.08);
    --shadow2: 0 10px 30px rgba(2, 6, 23, 0.06);
    --radius: 18px;
}

.billing-page {
    min-height: 100vh;
    background:
            radial-gradient(circle at 10% 8%, rgba(30, 58, 95, 0.07), transparent 27%),
            radial-gradient(circle at 90% 10%, rgba(249, 115, 22, 0.09), transparent 25%),
            var(--bg);
    color: var(--text);
}

.billing-shell {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 64px;
}

.billing-heading {
    max-width: 760px;
    margin: 0 auto 24px;
    text-align: center;
}

.billing-heading h1 {
    margin: 12px 0 8px;
    color: var(--text);
    font-size: clamp(1.85rem, 3.4vw, 2.6rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.billing-heading p {
    margin: 0;
    color: var(--muted);
    font-size: .95rem;
}

.info-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border: 1px solid rgba(30, 58, 95, 0.12);
    border-radius: 999px;
    background: rgba(30, 58, 95, 0.08);
    color: var(--primary);
    font-size: .75rem;
    font-weight: 800;
}

.review-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .75fr);
    gap: 16px;
    align-items: start;
}

.billing-card {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow2);
}

.billing-card-inner {
    padding: 22px;
}

.billing-card h2,
.billing-card h3,
.billing-card h4,
.billing-card strong {
    color: var(--text);
}

.billing-step {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text);
    font-size: .9rem;
    font-weight: 800;
}

.billing-step-number {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(30, 58, 95, 0.12);
    border-radius: 999px;
    background: rgba(30, 58, 95, 0.08);
    color: var(--primary);
    font-size: .74rem;
    font-weight: 900;
}

.seat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.seat-option,
.period-option {
    position: relative;
}

.seat-option input,
.period-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.seat-option label {
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 9px 6px;
    border: 1px solid rgba(2, 6, 23, 0.11);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    transition: .16s ease;
}

.seat-option label:hover,
.period-option label:hover {
    border-color: rgba(30, 58, 95, 0.32);
    box-shadow: 0 6px 16px rgba(2, 6, 23, 0.04);
}

.seat-option label strong {
    font-size: 1.05rem;
    line-height: 1;
}

.seat-option label span {
    margin-top: 4px;
    color: var(--muted);
    font-size: .69rem;
}

.seat-option input:checked + label,
.period-option input:checked + label {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.035);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.period-list {
    display: grid;
    gap: 8px;
}

.period-option label {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(2, 6, 23, 0.11);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    transition: .16s ease;
}

.period-title {
    color: var(--text);
    font-size: .86rem;
    font-weight: 800;
}

.period-sub {
    margin-top: 2px;
    color: var(--muted);
    font-size: .72rem;
}

.period-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 4px 7px;
    border: 1px solid rgba(22, 163, 74, 0.18);
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.09);
    color: #15803d;
    font-size: .68rem;
    font-weight: 900;
    white-space: nowrap;
}

.period-badge[hidden] {
    display: none !important;
}

.price-total-box {
    margin-top: 14px;
    padding: 15px;
    border: 1px solid rgba(2, 6, 23, 0.08);
    border-radius: 14px;
    background: #f8fafc;
}

.price-total-label {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
}

.price-total {
    margin-top: 2px;
    color: var(--text);
    font-size: 1.9rem;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.billing-primary-btn {
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent);
    border-radius: 11px;
    padding: 10px 14px;
    background: var(--accent);
    color: #fff;
    font-size: .88rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.14);
    transition: .16s ease;
}

.billing-primary-btn:hover {
    background: #ea580c;
    border-color: #ea580c;
    color: #fff;
    transform: translateY(-1px);
}

.billing-primary-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

.billing-outline-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid rgba(2, 6, 23, 0.14);
    border-radius: 11px;
    background: #fff;
    color: var(--primary);
    font-size: .88rem;
    font-weight: 800;
    text-decoration: none;
    transition: .16s ease;
}

.billing-outline-btn:hover {
    border-color: rgba(30, 58, 95, 0.32);
    background: rgba(30, 58, 95, 0.035);
    color: var(--primary);
}

.review-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(2, 6, 23, 0.07);
    font-size: .86rem;
}

.review-row:last-child {
    border-bottom: 0;
}

.review-row > span {
    color: var(--muted);
}

.review-row strong {
    max-width: 62%;
    text-align: right;
    overflow-wrap: anywhere;
}

.order-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid rgba(249, 115, 22, 0.22);
}

.order-total > span {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
}

.order-total strong {
    color: var(--text);
    font-size: 1.55rem;
    font-weight: 900;
}

.secure-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 10px;
    color: #64748b;
    font-size: .72rem;
    line-height: 1.4;
}

.auth-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.state-card {
    max-width: 650px;
    margin: 0 auto;
    padding: 28px;
    text-align: center;
}

.state-card .text-muted,
.billing-card .text-muted {
    color: var(--muted) !important;
}

.state-card .price-total-box {
    max-width: 500px;
    margin: 20px auto 0;
}

.state-card .review-row {
    text-align: left;
}

.alert-inline {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #fed7aa;
    border-radius: 11px;
    background: #fff7ed;
    color: #9a3412;
    font-size: .8rem;
}

.form-check {
    color: var(--muted);
}

.form-check-input {
    border-color: rgba(2, 6, 23, 0.22);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    border-color: rgba(30, 58, 95, 0.50);
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.09);
}

.form-check-label a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.form-check-label a:hover {
    text-decoration: underline;
}

.billing-trust {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.billing-trust-item {
    min-height: 78px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 22px rgba(2, 6, 23, 0.035);
}

.billing-trust-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: .82rem;
}

.billing-trust-item span {
    display: block;
    color: var(--muted);
    font-size: .69rem;
    line-height: 1.4;
}

.review-grid > aside.billing-card {
    align-self: start;
}

.review-grid > aside.billing-card .mt-auto {
    margin-top: 14px !important;
}

.billing-page footer {
    margin-top: auto;
}

@media (max-width: 900px) {
    .review-grid {
        grid-template-columns: 1fr;
    }

    .billing-trust {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .billing-shell {
        width: calc(100% - 20px);
        padding: 28px 0 42px;
    }

    .billing-heading {
        margin-bottom: 16px;
    }

    .billing-heading h1 {
        font-size: 1.55rem;
    }

    .billing-heading p {
        font-size: .82rem;
    }

    .billing-card {
        border-radius: 16px;
    }

    .billing-card-inner,
    .state-card {
        padding: 16px;
    }

    .seat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .seat-option label {
        min-height: 48px;
        padding: 7px 4px;
    }

    .seat-option label strong {
        font-size: .95rem;
    }

    .seat-option label span {
        font-size: .62rem;
    }

    .period-option label {
        min-height: 48px;
        padding: 8px 10px;
    }

    .period-title {
        font-size: .8rem;
    }

    .period-sub {
        font-size: .66rem;
    }

    .billing-trust {
        grid-template-columns: 1fr;
    }

    .auth-actions {
        grid-template-columns: 1fr;
    }

    .review-row {
        gap: 10px;
        font-size: .8rem;
    }

    .review-row strong {
        max-width: 58%;
    }
}
