:root {
    color-scheme: light;
    --ink: #17211c;
    --muted: #68736d;
    --line: #dce3df;
    --surface: #fff;
    --canvas: #f4f7f5;
    --green: #087a55;
    --green-dark: #056044;
    --green-soft: #e7f5ef;
    --red: #c9362b;
    --yellow: #ffd629;
    --error: #b42318;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }

.site-header {
    height: 72px;
    padding: 0 max(24px, calc((100vw - 1120px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 20px; font-weight: 760; text-decoration: none; }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 7px; background: var(--green); overflow: hidden; }
.brand-mark::before, .brand-mark span { content: ""; display: block; width: 17px; height: 4px; background: white; transform: skewX(-28deg); }
.brand-mark span { width: 11px; margin: 3px 0 0 6px; }
.secure-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 650; }
.lock { width: 13px; height: 11px; border: 2px solid var(--green); border-radius: 3px; position: relative; }
.lock::before { content: ""; position: absolute; width: 7px; height: 6px; left: 1px; top: -8px; border: 2px solid var(--green); border-bottom: 0; border-radius: 6px 6px 0 0; }

.checkout-shell { width: min(1120px, calc(100% - 48px)); margin: 52px auto 42px; display: grid; grid-template-columns: minmax(260px, .76fr) minmax(520px, 1.24fr); gap: 72px; align-items: start; }
.checkout-heading { padding-top: 34px; }
.eyebrow, .step-label, .status-kicker { margin: 0 0 10px; color: var(--green); font-size: 12px; line-height: 1.3; font-weight: 800; text-transform: uppercase; }
.checkout-heading h1 { margin: 0; font-size: 44px; line-height: 1.08; letter-spacing: 0; }
.checkout-heading > p:not(.eyebrow) { max-width: 390px; margin: 18px 0 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.trust-list { margin-top: 42px; display: grid; gap: 18px; }
.trust-list div { display: flex; align-items: center; gap: 13px; font-size: 14px; font-weight: 650; }
.trust-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 800; }

.payment-panel { min-height: 620px; padding: 34px 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 18px 48px rgba(23, 33, 28, .1); }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.panel-header h2, .result-view h2, .empty-state h2 { margin: 0; font-size: 23px; line-height: 1.25; }
.merchant-logo { width: 46px; height: 46px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--green-soft); color: var(--green); font-weight: 800; }
.merchant-logo img { width: 100%; height: 100%; object-fit: contain; display: none; }

#checkout-form { display: grid; grid-template-columns: 1fr 1fr; gap: 19px 16px; }
.field { min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label, .field legend { display: block; margin-bottom: 8px; color: #29332e; font-size: 13px; font-weight: 720; }
.field label > span, .field legend > span { color: var(--error); }
.label-row { display: flex; align-items: center; justify-content: space-between; }
.label-row span { color: var(--muted); font-size: 11px; }
input, select, textarea { width: 100%; border: 1px solid #cdd6d1; border-radius: 6px; background: white; color: var(--ink); outline: none; transition: border-color 150ms ease, box-shadow 150ms ease; }
input, select { height: 46px; padding: 0 13px; }
textarea { min-height: 78px; padding: 12px 13px; resize: vertical; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: #98a29d; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(8, 122, 85, .12); }
.select-wrap { position: relative; }
.select-wrap::after { content: "\2304"; position: absolute; right: 14px; top: 10px; pointer-events: none; color: var(--muted); }
select { appearance: none; padding-right: 38px; }
.phone-input, .amount-input { display: flex; border: 1px solid #cdd6d1; border-radius: 6px; overflow: hidden; }
.phone-input:focus-within, .amount-input:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(8, 122, 85, .12); }
.phone-input > span, .amount-input > span { min-width: 52px; display: grid; place-items: center; border-right: 1px solid var(--line); background: #f7f9f8; color: #4f5b55; font-size: 11px; font-weight: 800; }
.phone-input input, .amount-input input { border: 0; border-radius: 0; box-shadow: none; }
.amount-input > span { min-width: 56px; }
.field-hint, .field-error { min-height: 15px; margin: 5px 0 0; font-size: 11px; line-height: 1.35; }
.field-hint { color: var(--muted); }
.field-error { color: var(--error); }
.has-error input, .has-error select, .has-error textarea, .has-error .phone-input, .has-error .amount-input { border-color: var(--error); }

.provider-field { padding: 0; border: 0; margin: 0; }
.provider-options { display: grid; grid-template-columns: 1fr; gap: 12px; }
.provider-option { min-height: 62px; margin: 0 !important; padding: 10px 12px; display: grid !important; grid-template-columns: 38px 1fr 16px; gap: 10px; align-items: center; border: 1px solid #cdd6d1; border-radius: 6px; cursor: pointer; }
.provider-option:has(input:checked) { border-color: var(--green); box-shadow: 0 0 0 2px rgba(8, 122, 85, .1); }
.provider-option.is-selected { border-color: var(--green); box-shadow: 0 0 0 2px rgba(8, 122, 85, .1); cursor: default; }
.provider-option input { position: absolute; opacity: 0; pointer-events: none; }
.provider-symbol { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; font-size: 12px; font-weight: 900; }
.airtel .provider-symbol { background: var(--red); color: white; }
.mtn .provider-symbol { background: var(--yellow); color: #151515; font-size: 9px; }
.provider-option strong, .provider-option small { display: block; }
.provider-option strong { font-size: 13px; }
.provider-option small { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; }
.provider-option i { width: 15px; height: 15px; border: 1.5px solid #a9b3ae; border-radius: 50%; position: relative; }
.provider-option:has(input:checked) i { border-color: var(--green); }
.provider-option:has(input:checked) i::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--green); }
.provider-option.is-selected i { border-color: var(--green); }
.provider-option.is-selected i::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--green); }

.form-alert { grid-column: 1 / -1; padding: 11px 13px; border: 1px solid #f2b8b5; border-radius: 6px; background: #fff4f3; color: var(--error); font-size: 12px; line-height: 1.45; }
.pay-button, .secondary-button { grid-column: 1 / -1; height: 49px; border: 0; border-radius: 6px; cursor: pointer; font-weight: 760; }
.pay-button { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--green); color: white; }
.pay-button:hover { background: var(--green-dark); }
.pay-button:disabled { cursor: wait; opacity: .72; }
.button-arrow { position: absolute; right: 18px; font-size: 18px; }
.button-spinner { width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.45); border-top-color: white; border-radius: 50%; display: none; animation: spin .7s linear infinite; }
.pay-button.is-loading .button-spinner { display: block; }
.pay-button.is-loading .button-arrow { display: none; }
.consent { grid-column: 1 / -1; margin: -8px 0 0; text-align: center; color: var(--muted); font-size: 11px; }
@keyframes spin { to { transform: rotate(360deg); } }

.result-view, .empty-state { min-height: 550px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.status-symbol, .empty-symbol { width: 64px; height: 64px; margin-bottom: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); }
.status-symbol::after { content: "\2026"; margin-top: -13px; font-size: 32px; font-weight: 800; }
.status-symbol.success::after { content: "\2713"; margin-top: 0; }
.status-symbol.failed { background: #fff0ef; color: var(--error); }
.status-symbol.failed::after { content: "\00d7"; margin-top: -3px; font-size: 38px; }
.status-message { max-width: 390px; margin: 12px auto 28px; color: var(--muted); line-height: 1.55; }
.receipt { width: 100%; margin: 0 0 24px; border-top: 1px solid var(--line); }
.receipt div { min-height: 45px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.receipt dt { color: var(--muted); font-size: 12px; }
.receipt dd { margin: 0; max-width: 65%; overflow-wrap: anywhere; text-align: right; font-size: 13px; font-weight: 700; }
.status-pill { padding: 4px 8px; border-radius: 999px; background: #fff7d6; color: #735c00; font-size: 10px; text-transform: uppercase; }
.status-pill.success { background: var(--green-soft); color: var(--green-dark); }
.status-pill.failed { background: #fff0ef; color: var(--error); }
.secondary-button { width: 100%; background: #edf2ef; color: var(--ink); }
.empty-state p { color: var(--muted); }
.empty-symbol { font-weight: 850; }

footer { width: min(1120px, calc(100% - 48px)); min-height: 62px; margin: 0 auto; padding: 20px 0; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
[hidden] { display: none !important; }

@media (max-width: 860px) {
    .checkout-shell { grid-template-columns: 1fr; gap: 28px; margin-top: 34px; }
    .checkout-heading { padding: 0; }
    .checkout-heading h1 { font-size: 36px; }
    .checkout-heading > p:not(.eyebrow) { margin-top: 10px; }
    .trust-list { display: none; }
}
@media (max-width: 600px) {
    .site-header { height: 62px; padding: 0 18px; }
    .secure-label { font-size: 0; }
    .checkout-shell { width: 100%; margin: 0; gap: 0; }
    .checkout-heading { padding: 28px 20px 22px; }
    .checkout-heading h1 { font-size: 30px; }
    .checkout-heading > p:not(.eyebrow) { font-size: 14px; }
    .payment-panel { min-height: 0; padding: 26px 20px 32px; border-width: 1px 0 0; border-radius: 0; box-shadow: none; }
    #checkout-form { grid-template-columns: 1fr; }
    .field-full, .form-alert, .pay-button, .consent { grid-column: auto; }
    .provider-options { grid-template-columns: 1fr; }
    footer { width: calc(100% - 40px); flex-direction: column; gap: 7px; }
}
