:root {
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --bg: #f5f7fb;
    --card: #ffffff;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --primary-soft: #ccfbf1;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --warn: #b45309;
    --warn-soft: #fef3c7;
    --ok: #047857;
    --ok-soft: #d1fae5;
    --bkash: #e2136e;
    --nagad: #ea580c;
    --rocket: #6d28d9;
    --radius: 16px;
    --shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
}

body.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(900px 420px at 100% -10%, #d1fae5 0%, rgba(209, 250, 229, 0) 60%),
        radial-gradient(700px 380px at -10% 0%, #e0e7ff 0%, rgba(224, 231, 255, 0) 55%),
        var(--bg);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3, p {
    margin-top: 0;
}

h1 {
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

code, .mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
}

code {
    background: #f1f5f9;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.05rem 0.35rem;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 0.88rem;
}

.label-caps {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.2rem;
}

.eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.55rem;
}

.site-header {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.25rem 1.25rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--ink);
    font-weight: 800;
    font-size: 1.12rem;
    letter-spacing: -0.01em;
}

.brand:hover {
    text-decoration: none;
}

.brand small {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
    background: linear-gradient(135deg, #0f766e, #0ea5e9);
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.28);
}

.secure-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #065f46;
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    padding: 0.4rem 0.7rem;
    white-space: nowrap;
}

.secure-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.site-main {
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
    flex: 1;
}

.site-main.narrow {
    max-width: 560px;
    padding-top: 2.5rem;
}

.checkout-hero {
    max-width: 660px;
    margin: 0.2rem 0 1.4rem;
}

.checkout-hero h1 {
    font-size: clamp(1.75rem, 3.6vw, 2.35rem);
}

.lede {
    font-size: 1.02rem;
    color: var(--muted);
    margin-bottom: 0;
}

.site-footer {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.2rem 1.25rem 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
    font-size: 0.82rem;
}

.card {
    background: var(--card);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.1rem;
}

.checkout-card {
    padding: 0;
    overflow: hidden;
    border-radius: 20px;
}

.co-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    padding: 1.4rem 1.6rem;
    color: #fff;
    background:
        radial-gradient(420px 200px at 100% 0%, rgba(255, 255, 255, 0.18), transparent 70%),
        linear-gradient(135deg, #0f766e, #0e7490);
}

.co-summary .label-caps {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.15rem;
}

.co-amount {
    display: block;
    font-size: clamp(2rem, 6vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.3;
}

.co-lock {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.55rem;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.co-summary-order {
    display: grid;
    justify-items: end;
    gap: 0.15rem;
    text-align: right;
    font-size: 0.85rem;
}

.co-summary-order .label-caps {
    color: rgba(255, 255, 255, 0.72);
}

.co-summary-order .mono {
    font-weight: 700;
}

.co-back {
    margin-top: 0.3rem;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.co-back:hover {
    color: #fff;
}

.co-body {
    padding: 1.5rem 1.6rem 1.6rem;
}

.co-body .order-context {
    margin-bottom: 1.2rem;
}

.form-row.form-row-single {
    grid-template-columns: 1fr;
}

.order-context {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
    padding: 0.7rem 0.9rem;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 10px;
    font-size: 0.86rem;
}

.order-context a {
    margin-left: auto;
    color: var(--primary-strong, #0f766e);
    font-weight: 700;
    text-decoration: none;
}

.order-context a:hover {
    text-decoration: underline;
}

.auth-card {
    padding: 2rem;
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.form-grid {
    display: grid;
    gap: 1.1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.field {
    display: grid;
    gap: 0.35rem;
}

.field > span {
    font-size: 0.86rem;
    font-weight: 700;
    color: #334155;
}

.field small {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
    width: 100%;
    min-height: 46px;
    padding: 0.62rem 0.8rem;
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

input::placeholder {
    color: #94a3b8;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.method-fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}

.method-fieldset legend {
    font-size: 0.86rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.55rem;
    padding: 0;
}

.method-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.method-option {
    position: relative;
    cursor: pointer;
}

.method-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.method-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: #fbfdff;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.method-option:hover .method-body {
    border-color: var(--line-strong);
    transform: translateY(-1px);
}

.method-option input:focus-visible + .method-body {
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15);
}

.method-badge {
    font-weight: 800;
    font-size: 1rem;
}

.method-meta {
    font-size: 0.76rem;
    color: var(--muted);
}

.method-tick {
    position: absolute;
    top: 0.55rem;
    right: 0.65rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #fff;
    background: var(--primary);
}

.method-option input:checked + .method-body {
    border-color: var(--primary);
    background: #f0fdfa;
    box-shadow: 0 6px 16px rgba(15, 118, 110, 0.1);
}

.method-option input:checked + .method-body .method-tick {
    display: inline-flex;
}

.method-bkash .method-badge { color: var(--bkash); }
.method-nagad .method-badge { color: var(--nagad); }
.method-rocket .method-badge { color: var(--rocket); }

.method-bkash input:checked + .method-body {
    border-color: var(--bkash);
    background: #fdf2f8;
    box-shadow: 0 6px 16px rgba(226, 19, 110, 0.12);
}

.method-bkash input:checked + .method-body .method-tick { background: var(--bkash); }

.method-nagad input:checked + .method-body {
    border-color: var(--nagad);
    background: #fff7ed;
    box-shadow: 0 6px 16px rgba(234, 88, 12, 0.12);
}

.method-nagad input:checked + .method-body .method-tick { background: var(--nagad); }

.method-rocket input:checked + .method-body {
    border-color: var(--rocket);
    background: #f5f3ff;
    box-shadow: 0 6px 16px rgba(109, 40, 217, 0.12);
}

.method-rocket input:checked + .method-body .method-tick { background: var(--rocket); }

.checkout-card .btn-primary {
    background: linear-gradient(135deg, #0f766e, #0e7490);
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.28);
}

.checkout-card .btn-primary:hover {
    background: linear-gradient(135deg, #115e59, #0c6478);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.62rem 1.05rem;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
    text-decoration: none;
}

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

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-ghost {
    background: #fff;
    color: var(--ink);
    border-color: var(--line-strong);
}

.btn-ghost:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    min-height: 50px;
    font-size: 1rem;
}

.btn-sm {
    min-height: 36px;
    padding: 0.35rem 0.7rem;
    font-size: 0.82rem;
}

.btn-xs {
    min-height: 28px;
    padding: 0.2rem 0.5rem;
    font-size: 0.74rem;
    border-radius: 8px;
}

.security-note {
    margin: 0;
    padding: 0.85rem 1rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #475569;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.return-panel {
    display: grid;
    gap: 0.75rem;
    justify-items: center;
    margin-top: 1.1rem;
    padding: 1rem 1rem 1.15rem;
    background: var(--ok-soft);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 14px;
}

.return-copy {
    margin: 0;
    font-size: 0.9rem;
    color: #065f46;
}

.return-copy strong {
    font-variant-numeric: tabular-nums;
    font-size: 1.05rem;
}

.return-panel .btn {
    min-width: 220px;
}

.return-panel.is-warning {
    background: var(--warn-soft);
    border-color: rgba(180, 83, 9, 0.28);
}

.return-panel.is-warning .return-copy {
    color: var(--warn);
}

.alert {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 1.1rem;
    border: 1px solid transparent;
}

.alert-error {
    color: #991b1b;
    background: var(--danger-soft);
    border-color: #fecaca;
}

.alert-ok {
    color: #065f46;
    background: var(--ok-soft);
    border-color: #a7f3d0;
}

.alert-warn {
    color: #92400e;
    background: var(--warn-soft);
    border-color: #fde68a;
}

.alert div + div {
    margin-top: 0.3rem;
}

.trust-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.7rem;
    margin-top: 1.1rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
}

.trust-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 0.7rem;
    font-weight: 800;
}

/* Payment status */
.pay-status {
    text-align: center;
    padding: 2rem 1.8rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.75rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
}

.status-pill.pending {
    background: #e0f2fe;
    color: #0369a1;
}

.status-pill.completed {
    background: var(--ok-soft);
    color: var(--ok);
}

.status-pill.expired {
    background: var(--warn-soft);
    color: var(--warn);
}

.status-pill.rejected {
    background: var(--danger-soft);
    color: var(--danger);
}

.status-pill.neutral {
    background: #f1f5f9;
    color: var(--muted);
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0ea5e9;
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.45); }
    50% { box-shadow: 0 0 0 6px rgba(14, 165, 233, 0); }
}

.pay-number-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    margin: 1rem auto 0.5rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 1.5px dashed var(--line-strong);
    border-radius: 12px;
    max-width: 440px;
}

.pay-number {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: clamp(1.35rem, 4vw, 1.8rem);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.payment-instructions {
    text-align: left;
    max-width: 470px;
    margin: 1.5rem auto;
}

.steps {
    margin: 0;
    padding-left: 1.2rem;
    color: #475569;
    font-size: 0.9rem;
}

.steps li {
    margin-bottom: 0.45rem;
}

.steps li::marker {
    color: var(--primary);
    font-weight: 700;
}

.timer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    max-width: 470px;
    margin: 0 auto 1rem;
    padding: 0.85rem 1rem;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 12px;
    text-align: left;
}

.timer {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: 0.03em;
}

.timer-low {
    color: var(--danger);
}

.ref-block {
    text-align: right;
}

.ref-block .mono {
    font-weight: 700;
    margin-right: 0.3rem;
}

.waiting-line {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.7rem;
    font-size: 0.84rem;
    color: var(--muted);
}

.spin {
    width: 15px;
    height: 15px;
    border: 2px solid #cbd5e1;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.state-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0.4rem auto 0.9rem;
}

.state-icon.success {
    background: var(--ok-soft);
    color: var(--ok);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.12);
}

.state-icon.warning {
    background: var(--warn-soft);
    color: var(--warn);
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.12);
}

.amount-hero {
    font-size: clamp(2rem, 6vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin: 0.5rem 0 1rem;
}

.detail-list {
    display: grid;
    gap: 0;
    max-width: 450px;
    margin: 1.2rem auto;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.detail-list > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.9rem;
    background: #fff;
}

.detail-list > div + div {
    border-top: 1px solid var(--line);
}

.detail-list dt {
    color: var(--muted);
    font-size: 0.82rem;
}

.detail-list dd {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 700;
    text-align: right;
    word-break: break-word;
}

.stack {
    display: grid;
    gap: 0.9rem;
    justify-items: start;
}

.stack .btn-block {
    justify-self: stretch;
}

.copy-helper {
    position: absolute;
    left: -9999px;
    top: 0;
}

@media (max-width: 680px) {
    .site-header,
    .site-footer,
    .site-main {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .form-row,
    .method-grid,
    .trust-row {
        grid-template-columns: 1fr;
    }

    .method-grid {
        gap: 0.55rem;
    }

    .method-body {
        flex-direction: row;
        align-items: center;
        gap: 0.6rem;
    }

    .method-meta {
        margin-left: auto;
    }

    .method-tick {
        position: static;
        margin-left: 0.1rem;
    }

    .card,
    .auth-card,
    .pay-status {
        padding: 1.25rem;
    }

    .checkout-card {
        padding: 0;
    }

    .co-summary {
        padding: 1.15rem 1.25rem;
    }

    .co-summary-order {
        justify-items: start;
        text-align: left;
    }

    .co-body {
        padding: 1.25rem;
    }

    .timer-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .ref-block {
        text-align: left;
    }

    .trust-row {
        display: none;
    }
}

.alert-flush {
    margin: 0;
}
