:root {
  --navy:      #0D1B4B;
  --navy-mid:  #162060;
  --gold:      #C9A84C;
  --gold-lt:   #E8C97A;
  --cream:     #F5F0E8;
  --white:     #FFFFFF;
  --soft-blue: #D6E0F5;
  --muted:     #6B7A9E;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; font-family: 'DM Sans', sans-serif; }

body {
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
}

/* ── OVERLAY ── */
.payment-overlay {
  position: fixed; inset: 0;
  background: rgba(13,27,75,.55);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 999;
  padding: 16px;
}

/* ── MODAL ── */
.payment-modal {
  display: grid;
  grid-template-columns: 400px 1fr;
  width: 100%; max-width: 880px;
  max-height: 92vh;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(13,27,75,.35);
  position: relative;
}

/* ── CLOSE ── */
.close-btn {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.15);
  color: var(--white); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .2s;
  display: flex; align-items: center; justify-content: center;
}
.close-btn:hover { background: rgba(255,255,255,.28); }

/* ── LEFT PANEL ── */
.left-panel {
  background: var(--navy);
  padding: 0;
  display: flex; flex-direction: column;
  overflow-y: auto;
  position: relative;
}
.left-panel::after {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M0 0h40v40H0zm40 40h40v40H40z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.left-inner {
  padding: 36px 30px;
  display: flex; flex-direction: column;
  justify-content: flex-start;
  position: relative; z-index: 1;
  flex: 1;
}



/* HEADING */
.left-panel h2 {
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 900;
  color: var(--white); line-height: 1.25; margin-bottom: 12px;
}
.left-panel h2 em { color: var(--gold); font-style: normal; }
.left-desc { font-size: 13px; color: rgba(255,255,255,.55); line-height: 1.7; margin-bottom: 22px; }

/* PLAN SELECTOR */
.plan-selector-label {
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: rgba(255,255,255,.45);
  margin-bottom: 8px;
}
.plan-selector { display: flex; gap: 7px; margin-bottom: 18px; }
.ps-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 5px; border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  cursor: pointer; transition: all .2s;
}
.ps-btn:hover { border-color: rgba(201,168,76,.4); background: rgba(255,255,255,.09); }
.ps-btn.active { border-color: var(--gold); background: rgba(201,168,76,.15); }
.ps-name { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.7); font-family: 'DM Sans', sans-serif; }
.ps-price { font-size: 12px; font-weight: 900; color: var(--gold); font-family: 'Playfair Display', serif; }
.ps-btn.active .ps-name { color: var(--white); }

/* PLAN SUMMARY */
.plan-summary {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(201,168,76,.2);
  border-radius: 14px; padding: 16px;
  margin-bottom: 22px;
}
.plan-row {
  display: flex; justify-content: space-between;
  font-size: 12px; color: rgba(255,255,255,.55);
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.06);
}
.plan-row strong { color: var(--white); font-weight: 600; }
.plan-row:last-child { border-bottom: none; }
.plan-divider { height: 1px; background: rgba(201,168,76,.25); margin: 5px 0; }
.total-row { padding-top: 8px; }
.total-row strong { color: var(--gold); font-size: 17px; font-weight: 900; }
.total-row span { color: rgba(255,255,255,.8); font-weight: 600; }

/* TRUST BADGES */
.trust-badges { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 22px; }
.badge { font-size: 11px; color: rgba(255,255,255,.5); display: flex; align-items: center; gap: 7px; }

/* ── RIGHT PANEL ── */
.right-panel {
  background: var(--white);
  padding: 36px 32px;
  overflow-y: auto;
  display: flex; flex-direction: column;
}

.step-header { margin-bottom: 24px; }
.step-indicator { display: flex; align-items: center; }
.dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--soft-blue); color: var(--muted);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .3s;
}
.dot.active { background: var(--navy); color: var(--gold); box-shadow: 0 4px 14px rgba(13,27,75,.25); }
.dot.done { background: var(--gold); color: var(--navy); }
.line { flex: 1; height: 2px; background: var(--soft-blue); margin: 0 6px; }
.line.filled { background: var(--gold); }

.step { display: flex; flex-direction: column; flex: 1; }
.step.hidden { display: none; }

.form-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 900;
  color: var(--navy); margin-bottom: 20px;
}

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fg { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.fg label { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.fg input, .fg select {
  padding: 10px 13px;
  border: 1.5px solid var(--soft-blue);
  border-radius: 9px; font-family: 'DM Sans', sans-serif;
  font-size: 14px; color: var(--navy);
  background: #FAFBFF; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.fg input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,.12); }

.card-wrap { position: relative; }
.card-wrap input { padding-right: 38px; }
.lock-icon { position: absolute; right: 12px; bottom: 11px; font-size: 14px; pointer-events: none; }

.card-types { display: flex; gap: 7px; margin-bottom: 16px; flex-wrap: wrap; }
.ct { background: var(--soft-blue); color: var(--navy); font-size: 11px; font-weight: 600; padding: 5px 11px; border-radius: 6px; }

.secure-bar {
  display: flex; gap: 9px; align-items: center;
  background: rgba(201,168,76,.07); border: 1px solid rgba(201,168,76,.2);
  border-radius: 9px; padding: 9px 13px; margin-bottom: 18px;
}
.secure-bar span { font-size: 16px; }
.secure-bar p { font-size: 12px; color: var(--muted); }

.summary-table { background: #FAFBFF; border: 1.5px solid var(--soft-blue); border-radius: 12px; padding: 18px; margin-bottom: 18px; }
.sr { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); padding: 7px 0; border-bottom: 1px solid var(--soft-blue); }
.sr span:last-child { color: var(--navy); font-weight: 600; }
.sr-divider { height: 1px; background: var(--soft-blue); margin: 3px 0; }
.sr.total { border-bottom: none; font-size: 15px; padding-top: 11px; }
.sr.total span:first-child { color: var(--navy); font-weight: 700; }
.sr.total span:last-child { color: var(--gold); font-size: 19px; font-weight: 900; }

.terms-row { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; color: var(--muted); margin-bottom: 18px; line-height: 1.6; }
.terms-row input { accent-color: var(--gold); margin-top: 2px; flex-shrink: 0; }
.terms-row a { color: var(--gold); text-decoration: none; }
.terms-row a:hover { text-decoration: underline; }

/* BUTTONS */
.primary-btn {
  background: var(--navy); color: var(--white);
  border: none; border-radius: 50px;
  padding: 13px 28px; font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600; letter-spacing: .4px;
  cursor: pointer; transition: all .25s;
  box-shadow: 0 6px 20px rgba(13,27,75,.2); margin-top: 4px;
}
.primary-btn:hover { background: var(--gold); color: var(--navy); transform: translateY(-2px); }

.ghost-btn {
  background: transparent; color: var(--muted);
  border: 1.5px solid var(--soft-blue); border-radius: 50px;
  padding: 12px 22px; font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 500; cursor: pointer; transition: all .2s;
}
.ghost-btn:hover { border-color: var(--navy); color: var(--navy); }

.gold-btn {
  background: var(--gold); color: var(--navy);
  border: none; border-radius: 50px;
  padding: 13px 28px; font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: all .25s;
  box-shadow: 0 6px 20px rgba(201,168,76,.35);
}
.gold-btn:hover { background: var(--gold-lt); transform: translateY(-2px); }

.btn-pair { display: flex; gap: 10px; align-items: center; margin-top: 4px; }

/* SUCCESS */
.success-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; padding: 16px 0; }
.success-circle {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--gold); color: var(--navy);
  font-size: 28px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 28px rgba(201,168,76,.4);
}
.success-msg { font-size: 13px; color: var(--muted); text-align: center; line-height: 1.7; max-width: 320px; margin: 10px auto 24px; }

/* ════════════════════════════════
   LARGE DESKTOP (≥1280px)
════════════════════════════════ */
@media (min-width: 1280px) {
  .payment-modal {
    grid-template-columns: 420px 1fr;
    max-width: 960px;
  }
  .left-inner { padding: 42px 34px; }
  .left-panel h2 { font-size: 28px; }
  .right-panel { padding: 42px 38px; }
  .form-title { font-size: 24px; }
}

/* ════════════════════════════════
   DESKTOP (1024px – 1279px)
════════════════════════════════ */
@media (min-width: 1024px) and (max-width: 1279px) {
  .payment-modal {
    grid-template-columns: 390px 1fr;
    max-width: 900px;
  }
}

/* ════════════════════════════════
   TABLET LANDSCAPE (901px – 1023px)
════════════════════════════════ */
@media (min-width: 901px) and (max-width: 1023px) {
  .payment-modal {
    grid-template-columns: 340px 1fr;
    max-width: 820px;
    max-height: 94vh;
  }
  .left-inner { padding: 28px 22px; }
  .left-panel h2 { font-size: 22px; }
  .right-panel { padding: 28px 26px; }
  .ps-name { font-size: 10px; }
  .ps-price { font-size: 11px; }
  .ps-btn { padding: 8px 4px; }
}

/* ════════════════════════════════
   TABLET PORTRAIT (681px – 900px)
════════════════════════════════ */
@media (min-width: 681px) and (max-width: 900px) {
  .payment-overlay { padding: 12px; }
  .payment-modal {
    grid-template-columns: 300px 1fr;
    max-height: 95vh;
  }
  .left-inner { padding: 24px 18px; }
  .left-panel h2 { font-size: 20px; margin-bottom: 10px; }
  .brand-logo-wrap { width: 50px; height: 50px; }
  .brand-name { font-size: 17px; }
  .left-desc { font-size: 12px; margin-bottom: 16px; }
  .ps-name { font-size: 10px; }
  .ps-price { font-size: 10px; }
  .ps-btn { padding: 8px 3px; }
  .plan-selector { gap: 5px; }
  .plan-summary { padding: 12px; }
  .plan-row { font-size: 11px; }
  .right-panel { padding: 24px 20px; }
  .form-title { font-size: 20px; }
  .fg input, .fg select { font-size: 13px; padding: 9px 11px; }
}

/* ════════════════════════════════
   MOBILE (≤680px) — bottom sheet
════════════════════════════════ */
@media (max-width: 680px) {
  .payment-overlay { padding: 0; align-items: flex-end; }

  .payment-modal {
    grid-template-columns: 1fr;
    width: 100%; max-width: 100%;
    max-height: 100dvh;
    border-radius: 22px 22px 0 0;
    overflow: hidden;
  }

  /* ── Left panel — collapsed header strip ── */
  .left-panel {
    max-height: 190px;
    overflow: hidden;
  }
  .left-inner { padding: 18px 16px; }

  .brand { margin-bottom: 10px; gap: 10px; }
  .brand-logo-wrap { width: 40px; height: 40px; border-radius: 9px; }
  .brand-logo-initials { font-size: 14px; }
  .brand-name { font-size: 15px; letter-spacing: 1.5px; }
  .brand-tag { font-size: 10px; }

  .left-panel h2 { font-size: 17px; margin-bottom: 6px; }
  .left-desc { display: none; }

  .plan-selector-label { font-size: 9px; margin-bottom: 6px; }
  .plan-selector { gap: 5px; margin-bottom: 10px; }
  .ps-btn { padding: 7px 3px; border-radius: 8px; }
  .ps-name { font-size: 9px; }
  .ps-price { font-size: 10px; }

  .plan-summary { display: none; }
  .trust-badges { display: none; }

  /* ── Right panel ── */
  .right-panel {
    padding: 20px 16px 28px;
    overflow-y: auto;
    max-height: calc(100dvh - 190px);
    -webkit-overflow-scrolling: touch;
  }

  .step-header { margin-bottom: 18px; }
  .dot { width: 28px; height: 28px; font-size: 11px; }
  .form-title { font-size: 19px; margin-bottom: 14px; }

  .form-row-2 { grid-template-columns: 1fr; gap: 0; }
  .fg { margin-bottom: 12px; }
  .fg input, .fg select { font-size: 15px; padding: 11px 13px; }

  .card-types { flex-wrap: wrap; gap: 5px; }
  .ct { font-size: 10px; padding: 4px 9px; }

  .secure-bar { padding: 8px 11px; margin-bottom: 14px; }
  .secure-bar p { font-size: 11px; }

  .summary-table { padding: 14px; margin-bottom: 14px; }
  .sr { font-size: 12px; padding: 6px 0; }
  .sr.total { font-size: 14px; }
  .sr.total span:last-child { font-size: 17px; }

  .btn-pair { flex-direction: column; gap: 8px; }
  .ghost-btn, .primary-btn, .gold-btn {
    width: 100%; text-align: center;
    padding: 13px 20px;
  }
  .primary-btn { font-size: 15px; }

  .success-circle { width: 58px; height: 58px; font-size: 24px; }
  .success-msg { font-size: 12px; margin-bottom: 18px; }
}

/* ════════════════════════════════
   SMALL MOBILE (≤430px)
════════════════════════════════ */
@media (max-width: 430px) {
  .left-panel { max-height: 175px; }
  .right-panel { max-height: calc(100dvh - 175px); padding: 16px 14px 24px; }

  .left-inner { padding: 14px 14px; }
  .brand-logo-wrap { width: 36px; height: 36px; }
  .brand-name { font-size: 14px; }
  .left-panel h2 { font-size: 15px; }

  .ps-btn { padding: 6px 2px; }
  .ps-name { font-size: 8.5px; }
  .ps-price { font-size: 9px; }

  .form-title { font-size: 17px; }
  .fg label { font-size: 9px; }
  .fg input, .fg select { font-size: 14px; padding: 10px 11px; }
}

/* ════════════════════════════════
   TINY MOBILE (≤360px)
════════════════════════════════ */
@media (max-width: 360px) {
  .left-panel { max-height: 160px; }
  .right-panel { max-height: calc(100dvh - 160px); padding: 14px 12px 20px; }
  .left-inner { padding: 12px; }

  .brand { gap: 8px; }
  .brand-logo-wrap { width: 32px; height: 32px; border-radius: 7px; }
  .brand-logo-initials { font-size: 12px; }
  .brand-name { font-size: 13px; }
  .brand-tag { display: none; }
  .left-panel h2 { font-size: 14px; }

  .plan-selector { gap: 4px; }
  .ps-btn { padding: 5px 2px; border-radius: 7px; }
  .ps-name { font-size: 8px; }
  .ps-price { font-size: 8.5px; }

  .dot { width: 26px; height: 26px; font-size: 10px; }
  .form-title { font-size: 16px; }
  .primary-btn, .gold-btn { font-size: 13px; padding: 12px 16px; }
  .ghost-btn { font-size: 12px; padding: 11px 14px; }
}