:root {
    --bg: #f6f3ed;
    --card: #ffffff;
    --ink: #17201a;
    --muted: #68746d;
    --green: #0b5a3b;
    --green-dark: #073d29;
    --gold: #caa65a;
    --line: #e7e0d2;
    --danger: #b42318;
    --success: #0b7a43;
    --shadow: 0 24px 80px rgba(23, 32, 26, .14);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(202,166,90,.26), transparent 32rem),
        linear-gradient(135deg, #fbfaf7 0%, var(--bg) 48%, #ece3d4 100%);
    min-height: 100vh;
}

.page-shell {
    width: min(1120px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 28px;
    align-items: center;
    padding: 40px 0;
}

.hero-card, .payment-card, .status-card {
    border: 1px solid rgba(255,255,255,.72);
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    border-radius: 30px;
}

.hero-card {
    padding: 34px;
    min-height: 560px;
    color: #fff;
    background:
        linear-gradient(155deg, rgba(7,61,41,.94), rgba(11,90,59,.86)),
        url('https://images.unsplash.com/photo-1566073771259-6a8506099945?auto=format&fit=crop&w=1200&q=80') center/cover;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}

.hero-card::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;
    right: -70px;
    top: -70px;
}

.brand-block { position: relative; z-index: 1; display: flex; gap: 18px; align-items: flex-start; }
.logo-mark {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: var(--gold);
    color: var(--green-dark);
    display: grid;
    place-items: center;
    font-weight: 900;
    letter-spacing: .04em;
    flex: 0 0 auto;
}
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 800; color: var(--gold); }
h1, h2 { margin: 0; line-height: 1.04; }
h1 { font-size: clamp(40px, 7vw, 72px); letter-spacing: -.05em; }
h2 { font-size: clamp(26px, 4vw, 40px); letter-spacing: -.035em; }
.subtitle { color: rgba(255,255,255,.8); font-size: 18px; line-height: 1.65; max-width: 520px; }

.trust-row { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; }
.trust-row span {
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.24);
    background: rgba(255,255,255,.1);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}
.info-box {
    position: relative;
    z-index: 1;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
}
.info-box p { margin: 6px 0 0; color: rgba(255,255,255,.78); }

.payment-card { padding: 34px; }
.card-header { margin-bottom: 26px; }

.order-form-panel[hidden] {
    display: none !important;
}

.payment-form { display: grid; gap: 18px; }
.form-grid { display: grid; gap: 16px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-grid.three { grid-template-columns: 1.2fr .8fr 1fr; }
label { display: grid; gap: 8px; }
label span { color: var(--muted); font-size: 14px; font-weight: 800; }
input, select {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    border-radius: 16px;
    padding: 15px 16px;
    font: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
input:focus, select:focus {
    border-color: rgba(11,90,59,.55);
    box-shadow: 0 0 0 4px rgba(11,90,59,.1);
}
.amount-field { position: relative; }
.amount-field strong {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--green);
    font-size: 13px;
}
.amount-field input { padding-left: 62px; }
.pay-button {
    border: none;
    margin-top: 6px;
    border-radius: 18px;
    padding: 17px 20px;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #fff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 18px 34px rgba(11,90,59,.26);
}
.pay-button:hover { transform: translateY(-1px); }
.pay-button:disabled { opacity: .7; cursor: not-allowed; }
.note { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0; }

.status-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.status-card {
    width: min(620px, 100%);
    padding: 38px;
    text-align: center;
}
.status-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 36px;
    font-weight: 900;
}
.status-card.success .status-icon { background: var(--success); }
.status-card.failed .status-icon { background: var(--danger); }
.receipt-box {
    margin: 24px 0;
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    text-align: left;
}
.receipt-box div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}
.receipt-box div:last-child { border-bottom: 0; }
.receipt-box span { color: var(--muted); }
.secondary-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--green);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
}

@media (max-width: 860px) {
    .page-shell { grid-template-columns: 1fr; padding: 20px 0; }
    .hero-card { min-height: 430px; }
}
@media (max-width: 560px) {
    .page-shell { width: min(100% - 20px, 1120px); }
    .hero-card, .payment-card, .status-card { border-radius: 22px; padding: 24px; }
    .brand-block { flex-direction: column; }
    .form-grid.two, .form-grid.three { grid-template-columns: 1fr; }
    .receipt-box div { flex-direction: column; gap: 4px; }
}

.inline-checkout {
    margin-top: 26px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 24px;
    padding: 18px;
    box-shadow: 0 18px 45px rgba(23, 32, 26, .09);
}

.inline-checkout[hidden] { display: none; }
.inline-checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.inline-checkout-header h3 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -.03em;
}
.small-button {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--green-dark);
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}
.checkout-alert {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 14px;
}
.checkout-alert.success {
    background: rgba(11, 122, 67, .09);
    color: var(--success);
    border: 1px solid rgba(11, 122, 67, .18);
}
.checkout-alert.error {
    background: rgba(180, 35, 24, .08);
    color: var(--danger);
    border: 1px solid rgba(180, 35, 24, .18);
}
.checkout-frame {
    width: 100%;
    min-height: 760px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
}
.checkout-page {
    width: min(1060px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    place-items: center;
    padding: 34px 0;
}
.checkout-card {
    width: 100%;
    border: 1px solid rgba(255,255,255,.72);
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    border-radius: 30px;
    padding: 28px;
}
.checkout-header {
    margin-bottom: 18px;
}
.checkout-header p { color: var(--muted); }

@media (max-width: 560px) {
    .inline-checkout-header { align-items: flex-start; flex-direction: column; }
    .checkout-frame { min-height: 680px; border-radius: 16px; }
    .checkout-card { border-radius: 22px; padding: 18px; }
}
