/* ============================================================
   Padma — original checkout theme for Profess0rPay
   River-inspired, mobile-first. All classes are pd- prefixed.
   Colours: deep river teal, sand amber, soft paper background.
   ============================================================ */

:root {
    --pd-teal: #0b5e54;
    --pd-teal-2: #0f7a6c;
    --pd-teal-deep: #083f38;
    --pd-teal-soft: #e2f1ec;
    --pd-teal-line: #c4ddd4;
    --pd-sand: #e9a13b;
    --pd-sand-soft: #fdf3df;
    --pd-ink: #14261f;
    --pd-muted: #5f736b;
    --pd-faint: #8ba099;
    --pd-line: #dce8e2;
    --pd-bg: #edf3f0;
    --pd-card: #ffffff;
    --pd-danger: #d92d20;
    --pd-danger-soft: #fef1f0;
    --pd-success: #12805c;
    --pd-success-soft: #e3f5ec;
    --pd-warn: #b54708;
    --pd-warn-soft: #fef4e2;
    --pd-radius: 18px;
    --pd-shadow: 0 10px 30px rgba(11, 94, 84, .10);
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body.pd-body {
    margin: 0;
    font-family: 'Hind Siliguri', 'Inter', system-ui, sans-serif;
    background: var(--pd-bg);
    color: var(--pd-ink);
    min-height: 100vh;
}

/* ---------- page shell ---------- */
.pd-shell {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--pd-card);
    display: flex;
    flex-direction: column;
    position: relative;
}
@media (min-width: 640px) {
    body.pd-body { padding: 28px 16px; }
    .pd-shell {
        min-height: auto;
        border-radius: 24px;
        box-shadow: var(--pd-shadow);
        overflow: hidden;
        border: 1px solid var(--pd-line);
    }
}

/* ---------- river header band ---------- */
.pd-river {
    background: linear-gradient(135deg, var(--pd-teal-2) 0%, var(--pd-teal) 55%, var(--pd-teal-deep) 100%);
    color: #fff;
    padding: 18px 20px 0;
    position: relative;
}
.pd-river-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pd-icon-btn {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    color: #fff;
    border: none; cursor: pointer;
    transition: background .2s;
}
.pd-icon-btn:hover { background: rgba(255,255,255,.28); }
.pd-icon-btn svg { width: 20px; height: 20px; }
.pd-river-label {
    font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
    color: #bfe3d8; font-weight: 600;
}
.pd-river-wave { display: block; width: 100%; height: 26px; margin-top: 14px; }
.pd-river-wave path { fill: var(--pd-card); }

/* ---------- brand row ---------- */
.pd-brand {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 20px 4px;
}
.pd-brand-logo {
    width: 58px; height: 58px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    background: var(--pd-teal-soft);
}
.pd-brand-name {
    font-size: 19px; font-weight: 700; line-height: 1.25;
    word-break: break-word;
}
.pd-brand-sub { font-size: 13px; color: var(--pd-muted); margin-top: 2px; }
.pd-linklike {
    display: inline-block; margin-top: 6px;
    font-size: 12.5px; font-weight: 600; color: var(--pd-teal-2);
    background: var(--pd-teal-soft);
    border: 1px solid var(--pd-teal-line);
    padding: 4px 12px; border-radius: 999px;
    cursor: pointer;
}
.pd-linklike:hover { background: #d2e8e0; }

/* ---------- amount hero ---------- */
.pd-amount {
    margin: 16px 20px 0;
    background: linear-gradient(135deg, var(--pd-teal-soft), #f4faf7);
    border: 1px solid var(--pd-teal-line);
    border-radius: var(--pd-radius);
    padding: 18px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.pd-amount::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
    background: linear-gradient(90deg, var(--pd-teal-2), var(--pd-sand), var(--pd-teal-2));
    opacity: .55;
}
.pd-amount-label {
    font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
    color: var(--pd-muted); font-weight: 600;
}
.pd-amount-value {
    font-size: 38px; font-weight: 700; line-height: 1.15; margin-top: 4px;
    letter-spacing: -.5px;
}
.pd-amount-value .pd-taka { font-size: 30px; font-weight: 600; margin-right: 2px; }
.pd-amount-meta {
    font-size: 13px; color: var(--pd-muted); margin-top: 6px;
    display: flex; justify-content: center; gap: 6px; align-items: center; flex-wrap: wrap;
}
.pd-chip {
    display: inline-block; font-size: 11.5px; font-weight: 600;
    padding: 2px 9px; border-radius: 999px;
    background: var(--pd-sand-soft); color: var(--pd-warn);
    border: 1px solid #f3dfae;
}

/* ---------- steps ---------- */
.pd-steps {
    display: flex; gap: 0;
    margin: 18px 20px 0;
    border: 1px solid var(--pd-line);
    border-radius: 12px; overflow: hidden;
    background: #f8fbf9;
}
.pd-step {
    flex: 1; text-align: center;
    font-size: 11.5px; font-weight: 600; color: var(--pd-muted);
    padding: 9px 4px; line-height: 1.3;
    border-right: 1px solid var(--pd-line);
}
.pd-step:last-child { border-right: none; }
.pd-step b {
    display: block; width: 20px; height: 20px; margin: 0 auto 3px;
    border-radius: 50%; background: var(--pd-teal-soft); color: var(--pd-teal);
    font-size: 11px; line-height: 20px;
}
.pd-step.on { background: var(--pd-teal); color: #fff; }
.pd-step.on b { background: rgba(255,255,255,.22); color: #fff; }
.pd-step.done { color: var(--pd-teal); }
.pd-step.done b { background: var(--pd-teal); color: #fff; }

/* ---------- section titles ---------- */
.pd-section { padding: 20px 20px 0; }
.pd-section-title {
    font-size: 13px; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: var(--pd-muted);
    margin: 0 0 10px;
}

/* ---------- method tabs ---------- */
.pd-tabs {
    display: flex; gap: 8px; padding: 0 20px;
    margin-top: 18px;
}
.pd-tab {
    flex: 1; border: 1px solid var(--pd-line); background: #fff;
    color: var(--pd-muted); font-weight: 600; font-size: 13.5px;
    padding: 11px 6px; border-radius: 12px; cursor: pointer;
    text-align: center; transition: all .2s; font-family: inherit;
}
.pd-tab:hover { border-color: var(--pd-teal-line); color: var(--pd-teal); }
.pd-tab.on {
    background: var(--pd-teal); border-color: var(--pd-teal); color: #fff;
    box-shadow: 0 6px 16px rgba(11,94,84,.25);
}

/* ---------- gateway grid ---------- */
.pd-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
    padding: 14px 20px 0;
}
.pd-gw {
    background: #fff; border: 1.5px solid var(--pd-line);
    border-radius: 14px; padding: 14px 10px 12px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    cursor: pointer; transition: all .18s; text-align: center;
    min-height: 104px; justify-content: center;
}
.pd-gw:hover {
    border-color: var(--pd-teal-2);
    box-shadow: 0 8px 18px rgba(11,94,84,.12);
    transform: translateY(-2px);
}
.pd-gw img { max-width: 118px; max-height: 44px; object-fit: contain; }
.pd-gw-name { font-size: 13px; font-weight: 600; color: var(--pd-ink); line-height: 1.3; }
.pd-gw-tag {
    font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--pd-teal); background: var(--pd-teal-soft);
    padding: 2px 8px; border-radius: 999px;
}
.pd-empty {
    grid-column: 1 / -1; text-align: center; color: var(--pd-muted);
    font-size: 14px; padding: 26px 10px;
    border: 1.5px dashed var(--pd-line); border-radius: 14px;
}

/* ---------- sticky pay bar ---------- */
.pd-paybar {
    margin-top: auto;
    padding: 14px 20px 18px;
    background: linear-gradient(to top, #fff 78%, rgba(255,255,255,0));
    position: sticky; bottom: 0;
}
.pd-paybar-btn {
    width: 100%; border: none; cursor: pointer;
    background: var(--pd-teal); color: #fff;
    font-size: 17px; font-weight: 700; font-family: inherit;
    padding: 15px 0; border-radius: 14px;
    box-shadow: 0 8px 20px rgba(11,94,84,.28);
    transition: background .2s, transform .15s;
}
.pd-paybar-btn:hover { background: var(--pd-teal-2); }
.pd-paybar-btn:active { transform: scale(.985); }
.pd-paybar-note {
    text-align: center; font-size: 12px; color: var(--pd-faint); margin-top: 8px;
}

/* ---------- support row ---------- */
.pd-support {
    display: flex; justify-content: center; gap: 10px;
    padding: 16px 20px 0;
}
.pd-support-btn {
    width: 46px; height: 46px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 1.5px solid var(--pd-line);
    color: var(--pd-teal); cursor: pointer; transition: all .2s;
}
.pd-support-btn:hover { border-color: var(--pd-teal-2); transform: translateY(-2px); }
.pd-support-btn svg { width: 22px; height: 22px; }
.pd-support-btn.wa { color: #1faa55; border-color: #bfe8cd; }

/* ---------- footer ---------- */
.pd-foot {
    text-align: center; font-size: 12px; color: var(--pd-faint);
    padding: 10px 20px 20px;
}
.pd-foot .pd-wave-mini { display: block; margin: 0 auto 8px; }

/* ---------- sheets (custom overlays, no framework dependency) ---------- */
.pd-sheet {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(10, 35, 30, .5);
    display: none; align-items: flex-end; justify-content: center;
    backdrop-filter: blur(2px);
}
.pd-sheet.open { display: flex; }
.pd-sheet-card {
    background: #fff; width: 100%; max-width: 520px;
    border-radius: 22px 22px 0 0;
    padding: 22px 20px 26px;
    max-height: 86vh; overflow-y: auto;
    animation: pd-slide-up .22s ease-out;
}
@keyframes pd-slide-up { from { transform: translateY(24px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.pd-sheet-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
}
.pd-sheet-title { font-size: 17px; font-weight: 700; }
.pd-sheet-x {
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: #f0f4f2; color: var(--pd-ink); font-size: 16px;
    cursor: pointer; line-height: 1;
}
.pd-kv {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 11px 14px; background: #f8fbf9;
    border: 1px solid var(--pd-line); border-radius: 12px; margin-bottom: 8px;
    font-size: 13.5px;
}
.pd-kv .k { color: var(--pd-muted); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.pd-kv .v { font-weight: 700; text-align: right; word-break: break-all; }
.pd-kv .v.big { font-size: 17px; color: var(--pd-teal); }
.pd-copy-btn {
    border: none; background: var(--pd-teal-soft); color: var(--pd-teal);
    border-radius: 8px; padding: 5px 9px; font-size: 12px; font-weight: 700;
    cursor: pointer; margin-left: 6px; flex-shrink: 0;
}
.pd-support-card {
    display: flex; align-items: center; gap: 14px;
    border-radius: 12px; padding: 14px; margin-bottom: 10px;
    text-decoration: none; transition: transform .15s;
}
.pd-support-card:hover { transform: translateY(-2px); }
.pd-support-card .ic {
    width: 40px; height: 40px; border-radius: 50%; background: #fff;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pd-support-card .ic svg { width: 20px; height: 20px; }
.pd-support-card .t { font-weight: 700; font-size: 14.5px; margin: 0; }
.pd-support-card .s { font-size: 12.5px; opacity: .85; }
.pd-support-card.wa { background: #e7f6ec; color: #1b7a3d; }
.pd-support-card.tg { background: #e4f1fb; color: #1565c0; }
.pd-support-card.em { background: #fdf1e3; color: #b54708; }
.pd-field-label { font-size: 13px; font-weight: 600; color: var(--pd-ink); margin: 0 0 6px; }
.pd-field-label .req { color: var(--pd-danger); }

/* ---------- gateway detail card ---------- */
.pd-gw-card {
    margin: 16px 20px 0;
    background: #fff;
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    padding: 20px;
    box-shadow: var(--pd-shadow);
}
.pd-gw-card-head { text-align: center; margin-bottom: 6px; }
.pd-gw-card-head img { max-width: 180px; max-height: 64px; object-fit: contain; }
.pd-gw-back {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: none; cursor: pointer;
    color: var(--pd-muted); font-size: 13.5px; font-weight: 600;
    padding: 6px 0; font-family: inherit;
}
.pd-gw-back:hover { color: var(--pd-teal); }
.pd-gw-back svg { width: 18px; height: 18px; }

/* ---------- status screens ---------- */
.pd-status { padding: 26px 20px 8px; text-align: center; }
.pd-status-ring {
    width: 84px; height: 84px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
}
.pd-status-ring svg { width: 42px; height: 42px; }
.pd-status-ring.ok { background: var(--pd-success-soft); }
.pd-status-ring.ok svg { stroke: var(--pd-success); }
.pd-status-ring.wait { background: var(--pd-warn-soft); }
.pd-status-ring.wait svg { stroke: var(--pd-warn); }
.pd-status-ring.bad { background: var(--pd-danger-soft); }
.pd-status-ring.bad svg { stroke: var(--pd-danger); }
.pd-status-title { font-size: 23px; font-weight: 700; margin: 0 0 8px; }
.pd-status-title.ok { color: var(--pd-success); }
.pd-status-title.bad { color: var(--pd-danger); }
.pd-status-text { font-size: 14.5px; color: var(--pd-muted); line-height: 1.6; margin: 0 0 20px; }
.pd-receipt-box {
    text-align: left; background: #f8fbf9;
    border: 1px solid var(--pd-line); border-radius: 14px;
    padding: 6px 14px; margin-bottom: 18px;
}
.pd-btn {
    display: block; width: 100%; text-align: center;
    padding: 14px; border-radius: 12px; font-weight: 700; font-size: 15px;
    text-decoration: none; border: none; cursor: pointer; font-family: inherit;
}
.pd-btn.primary { background: var(--pd-teal); color: #fff; }
.pd-btn.primary:hover { background: var(--pd-teal-2); }
.pd-btn.ghost {
    background: #f0f4f2; color: var(--pd-ink);
    border: 1px solid var(--pd-line); margin-top: 10px;
}
.pd-badge {
    font-size: 12.5px; font-weight: 700; padding: 3px 11px; border-radius: 999px;
}
.pd-badge.ok { background: var(--pd-success-soft); color: var(--pd-success); }
.pd-badge.wait { background: var(--pd-warn-soft); color: var(--pd-warn); }
.pd-badge.bad { background: var(--pd-danger-soft); color: var(--pd-danger); }
.pd-redirect-box {
    background: linear-gradient(135deg, #f4faf7, #eef5f1);
    border: 1px solid var(--pd-teal-line); border-radius: 12px;
    padding: 14px; margin-top: 16px; text-align: center;
}
.pd-progress {
    height: 8px; background: #dce8e2; border-radius: 6px; overflow: hidden; margin-top: 10px;
}
.pd-progress > div {
    height: 100%; background: var(--pd-teal-2); border-radius: 6px;
    transition: width 1s linear;
}

/* ---------- invoice / product pages ---------- */
.pd-page { padding: 20px; }
.pd-page-head { text-align: center; margin-bottom: 18px; }
.pd-page-head h1 { font-size: 22px; margin: 10px 0 6px; }
.pd-page-head p { color: var(--pd-muted); font-size: 14px; line-height: 1.6; margin: 0; }
.pd-product-img {
    width: 110px; height: 110px; object-fit: cover;
    border-radius: 20px; border: 2px solid #fff;
    box-shadow: 0 10px 22px rgba(0,0,0,.12);
}
.pd-product-fallback {
    width: 84px; height: 84px; margin: 0 auto;
    border-radius: 20px; background: var(--pd-teal-soft);
    display: flex; align-items: center; justify-content: center;
    color: var(--pd-teal);
}
.pd-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pd-table th {
    text-align: left; font-size: 11px; text-transform: uppercase;
    letter-spacing: .06em; color: var(--pd-muted);
    padding: 8px 6px; border-bottom: 2px solid var(--pd-line);
}
.pd-table td { padding: 10px 6px; border-bottom: 1px solid var(--pd-line); vertical-align: top; }
.pd-table td.num, .pd-table th.num { text-align: right; white-space: nowrap; }
.pd-totals { margin-top: 14px; }
.pd-totals .pd-kv { background: transparent; border: none; padding: 7px 6px; margin: 0; }
.pd-totals .pd-kv.grand {
    background: var(--pd-teal-soft); border-radius: 12px; padding: 12px 14px;
}
.pd-note-box {
    background: var(--pd-sand-soft); border: 1px solid #f3dfae;
    border-radius: 12px; padding: 12px 14px; font-size: 13.5px;
    color: #7a4a06; margin-top: 16px; line-height: 1.55;
}
.pd-secure {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--pd-success-soft); color: var(--pd-success);
    font-size: 12.5px; font-weight: 600; padding: 7px 14px; border-radius: 999px;
}
.pd-secure svg { width: 15px; height: 15px; }

/* form fields rendered by the app keep Tabler styling; give them breathing room */
.pd-form .form-group { margin-bottom: 14px; }
