.pay-page {
    min-height: 100vh;
    margin: 0;
    font-family: "DM Sans", "Noto Sans Bengali", sans-serif;
    color: #0f172a;
    background:
        radial-gradient(720px 280px at 50% -40px, rgba(14, 165, 233, 0.18), transparent 70%),
        linear-gradient(180deg, #f3f7fb 0%, #eef3f8 100%);
}

.pay-wrap {
    width: min(460px, calc(100% - 1.5rem));
    margin: 0 auto;
    padding: 2.5rem 0 3rem;
}

.pay-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 1.5rem;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 24px 60px rgba(15, 23, 42, 0.08);
    padding: 1.6rem 1.4rem 1.35rem;
}

.pay-brand {
    display: flex;
    justify-content: center;
    margin: 0.1rem 0 1.05rem;
    padding-bottom: 1.05rem;
    border-bottom: 1px solid #eef2f6;
}

.pay-logo {
    display: block;
    width: min(248px, 78%);
    height: auto;
}

.pay-card h1 {
    margin: 0 0 0.35rem;
    font-family: Outfit, "DM Sans", sans-serif;
    font-size: 1.65rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.pay-lead {
    margin: 0 0 1.25rem;
    color: #64748b;
    font-size: 0.94rem;
    line-height: 1.5;
}

.pay-field {
    margin-bottom: 0.9rem;
}

.pay-field label {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    color: #334155;
}

.pay-optional {
    font-weight: 500;
    color: #94a3b8;
}

.pay-input,
.pay-textarea {
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.38rem;
    padding: 0.78rem 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.8rem;
    font: inherit;
    color: #0f172a;
    background: #f8fafc;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.pay-textarea {
    min-height: 4.6rem;
    resize: vertical;
}

.pay-input:hover,
.pay-textarea:hover {
    border-color: #cbd5e1;
}

.pay-input:focus,
.pay-textarea:focus {
    outline: none;
    border-color: #0284c7;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.pay-amount {
    position: relative;
    margin-top: 0.45rem;
}

.pay-amount span {
    position: absolute;
    left: 1.05rem;
    top: 50%;
    transform: translateY(-50%);
    color: #0369a1;
    font-family: Outfit, "DM Sans", sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1;
}

.pay-amount .pay-input {
    margin-top: 0;
    padding: 1.05rem 1rem 1.05rem 3.2rem;
    border-color: #bae6fd;
    border-radius: 1rem;
    font-family: Outfit, "DM Sans", sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    -moz-appearance: textfield;
    appearance: textfield;
}

.pay-amount .pay-input::-webkit-outer-spin-button,
.pay-amount .pay-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pay-amount .pay-input::placeholder {
    color: #7dd3fc;
    font-weight: 600;
}

.pay-amount .pay-input:focus {
    border-color: #0284c7;
    background: #fff;
}

.pay-fold {
    margin: 0;
    border: 0;
    background: transparent;
}

.pay-fold summary {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.28rem 0.1rem;
    cursor: pointer;
    list-style: none;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

.pay-fold-label {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    min-width: 0;
}

.pay-fold .pay-optional {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

.pay-fold summary::-webkit-details-marker { display: none; }

.pay-fold summary::after {
    content: "+";
    color: #64748b;
    font-weight: 500;
    font-size: 1.05rem;
    line-height: 1;
}

.pay-fold[open] summary::after { content: "–"; }

.pay-fold-body { padding: 0 0.85rem 0.85rem; }

.pay-fold .pay-input,
.pay-fold .pay-textarea { margin-top: 0; background: #fff; }

.pay-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
    margin-top: 1.2rem;
}

.pay-btn {
    border: 0;
    border-radius: 0.9rem;
    padding: 0.85rem 0.75rem 0.8rem;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    color: #fff;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.pay-btn small {
    display: block;
    margin-top: 0.18rem;
    font-size: 0.68rem;
    font-weight: 550;
    letter-spacing: 0.01em;
    opacity: 0.88;
}

.pay-btn--ssl {
    background: linear-gradient(180deg, #0f766e 0%, #0d5f59 100%);
}

.pay-btn--bkash {
    background: linear-gradient(180deg, #ee2a7b 0%, #d01262 100%);
    box-shadow: 0 8px 16px rgba(226, 19, 110, 0.18);
}

.pay-btn:hover { filter: brightness(1.05); }
.pay-btn:active { transform: translateY(1px); }
.pay-btn:disabled { opacity: 0.65; cursor: wait; transform: none; }

.pay-alert {
    margin-bottom: 0.9rem;
    padding: 0.8rem 0.9rem;
    border-radius: 0.8rem;
    font-size: 0.88rem;
    line-height: 1.45;
}

.pay-alert--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.pay-alert--success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.pay-alert--info { background: #f0f9ff; color: #075985; border: 1px solid #bae6fd; }

.pay-charge-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin: 0.35rem 0.15rem 0;
}

.pay-total,
.pay-charge {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    color: #64748b;
}

.pay-total span {
    color: #0f172a;
    font-weight: 650;
}

.pay-charge {
    text-align: right;
}

.pay-note {
    margin: 1rem 0 0;
    color: #94a3b8;
    font-size: 0.75rem;
    line-height: 1.45;
    text-align: center;
}

.pay-meta {
    margin: 0.4rem 0 0;
    padding: 0;
    list-style: none;
}

.pay-meta li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-top: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.pay-meta span { color: #64748b; }
.pay-meta strong { text-align: right; word-break: break-all; }

.pay-card--status .pay-lead {
    margin-bottom: 0;
}

.pay-status {
    text-align: center;
    margin-bottom: 0.35rem;
}

.pay-status-icon {
    width: 3.4rem;
    height: 3.4rem;
    margin: 0 auto 0.85rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pay-status-icon svg {
    width: 1.7rem;
    height: 1.7rem;
}

.pay-status--success .pay-status-icon { background: #d1fae5; color: #047857; }
.pay-status--cancelled .pay-status-icon { background: #fef3c7; color: #b45309; }
.pay-status--failed .pay-status-icon { background: #fee2e2; color: #b91c1c; }
.pay-status--missing .pay-status-icon { background: #e2e8f0; color: #475569; }

.pay-status h1 { margin-bottom: 0.4rem; }

.pay-meta-amount strong {
    font-size: 1.15rem;
    color: #047857;
}

.pay-again {
    display: block;
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 0.9rem;
    background: linear-gradient(180deg, #0f766e 0%, #0d5f59 100%);
    color: #fff;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.pay-again:hover { filter: brightness(1.05); }

@media (max-width: 420px) {
    .pay-logo { width: min(220px, 82%); }
    .pay-actions { grid-template-columns: 1fr; }
    .pay-card { padding: 1.35rem 1.1rem 1.15rem; }
}
