* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
}

html,
body {
    width: 100%;
    min-height: 100%;
    background: #f4f4f4;
    color: #0f172a;
}

body {
    display: flex;
    flex-direction: column;
}

.app-header {
    background: #0e2433;
    padding: 24px 16px;
}

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.header-logo {
    max-width: 100%;
    height: auto;
}

.page-wrap {
    width: 100%;
    padding: 28px 16px 40px;
    display: flex;
    justify-content: center;
}

.checkout-card {
    width: 100%;
    max-width: 1120px;
}

.intro-text {
    margin-bottom: 28px;
    font-size: 18px;
    color: #111827;
}

#payment-form,
#installment-plan-form,
#result {
    width: 100%;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 24px;
    margin-bottom: 28px;
}

.field-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field-block.full {
    width: 100%;
}

.field-block label {
    font-size: 14px;
    font-weight: 700;
    color: #18331f;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.text-input {
    width: 100%;
    height: 58px;
    border: 1px solid #d7dbe2;
    border-radius: 4px;
    background: #e9edf3;
    color: #111827;
    padding: 0 16px;
    font-size: 16px;
    outline: none;
}

.text-input::placeholder {
    color: #98a2b3;
}

.payment-card {
    margin-top: 18px;
}

.card-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 22px 24px;
    align-items: end;
    margin-top: 20px;
}

.card-number-block {
    min-width: 0;
}

.stripe-box {
    width: 100%;
    min-height: 58px;
    border: 1px solid #d7dbe2;
    border-radius: 4px;
    background: #e9edf3;
    padding: 18px 16px;
    display: flex;
    align-items: center;
}

.StripeElement {
    width: 100%;
}

.StripeElement--focus {
    border-color: #91c92f;
}

.StripeElement--invalid {
    color: #dc2626;
}

.plan-summary {
    border: 1px solid #d7dbe2;
    border-radius: 4px;
    background: #fff;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 26px;
}

.plan-summary-product {
    font-size: 20px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.plan-summary-label {
    font-size: 14px;
    color: #6b7280;
}

.plan-summary-price {
    font-size: 18px;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
}

.primary-btn,
.loading-btn {
    width: 100%;
    height: 56px;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: opacity .2s ease;
}

.primary-btn {
    background: #8cc92f;
    color: #fff;
}

.primary-btn:hover {
    opacity: .94;
}

.primary-btn.secondary {
    margin-top: 18px;
}

.loading-btn {
    background: #8cc92f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loading-btn.dark {
    background: #111827;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.card-errors {
    margin-top: 12px;
    color: #dc2626;
    font-size: 14px;
    min-height: 20px;
}

.plans-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #0f172a;
}

.plans-list {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}

.plan-option {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #d7dbe2;
    background: #fff;
    border-radius: 4px;
    padding: 16px 18px;
    cursor: pointer;
    font-size: 16px;
    color: #111827;
}

.plan-option input[type="radio"] {
    transform: scale(1.15);
}

.help-container {
    margin-top: 24px;
    text-align: center;
}

.help-text {
    margin-bottom: 8px;
    color: #4b5563;
    font-size: 14px;
}

.help-link {
    color: #4eb648;
    text-decoration: underline;
    font-size: 14px;
}

.help-link-block {
    display: block;
    margin-bottom: 16px;
}

.app-footer {
    margin-top: auto;
    padding: 24px 16px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    text-align: center;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.6;
}

.footer-link {
    color: #6b7280;
    text-decoration: underline;
}

#status-message {
    font-size: 16px;
    line-height: 1.7;
    color: #111827;
}

.loading-btn[hidden] {
    display: none !important;
}

@media (max-width: 768px) {
    .intro-text {
        font-size: 16px;
    }

    .info-grid,
    .card-grid {
        grid-template-columns: 1fr;
    }

    .plan-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .plan-summary-price {
        white-space: normal;
    }

    .primary-btn,
    .loading-btn {
        font-size: 16px;
    }

    .plan-summary-product {
        font-size: 18px;
    }
}