/* ══════════════════════════════════════════════
   PAYMENT PAGE — SPECIFIC STYLES
══════════════════════════════════════════════ */

/* ══════════════════════════════════════════════
   ROOT VARIABLES (LOCAL OVERRIDE)
══════════════════════════════════════════════ */
:root {
  --bg:       #060710;
  --surface:  #13141A;
  --surface2: #1A1C24;
  --border:   rgba(255,255,255,0.08);
  --text:     #F0F0F5;
  --muted:    #8888AA;
  --accent:   #7C6EFF;
  --accent2:  #2FFFA0;
  --warm:     #FF9B50;
  --radius:   14px;
  --font:     'Inter', sans-serif;
}

body {
  display: flex;
  flex-direction: column;
}

/* Dot grid overlay */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(circle, rgba(124,110,255,0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,110,255,0.03) 1px, transparent 1px),
    linear-gradient(0deg,  rgba(124,110,255,0.03) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px, 28px 28px;
  opacity: 0.55;
}

/* ── LIGHT MODE ── */
body.light-mode {
  --bg:       #EDF6F9;
  --surface:  #FFFFFF;
  --surface2: #D8EEF5;
  --border:   rgba(0,130,160,0.15);
  --text:     #0A2A33;
  --muted:    #3D7A8A;
  --accent:   #0096B4;
  --accent2:  #E05A2B;
  --warm:     #F4845F;
}
body.light-mode::before { opacity: 0.06; }

/* ══════════════════════════════════════════════
   NAV — PAYMENT PAGE
══════════════════════════════════════════════ */
nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 32px;
  background: rgba(6,7,16,0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  flex-wrap: wrap;
}
body.light-mode nav { background: rgba(237,246,249,0.92); border-bottom-color: var(--border); }

.nav-logo { font-size: 18px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); }
.nav-logo span { color: var(--accent); }

.nav-back {
  margin-left: auto;
  display: flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 13px; font-weight: 500;
  text-decoration: none; padding: 7px 14px;
  border: 1px solid var(--border); border-radius: 99px;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-back:hover { color: var(--text); border-color: var(--accent); }

.nav-secure {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--accent2); font-weight: 600;
  background: rgba(47,255,160,0.08);
  border: 1px solid rgba(47,255,160,0.2);
  padding: 5px 12px; border-radius: 99px;
  white-space: nowrap;
}
body.light-mode .nav-secure {
  color: var(--accent2);
  background: rgba(224,90,43,0.08);
  border-color: rgba(224,90,43,0.2);
}

/* ══════════════════════════════════════════════
   MAIN LAYOUT
══════════════════════════════════════════════ */
main {
  position: relative; z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
  max-width: 1060px;
  margin: 40px auto;
  padding: 0 24px 60px;
  width: 100%;
}

/* ══════════════════════════════════════════════
   SECTION TITLES
══════════════════════════════════════════════ */
.section-head {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 14px;
}

/* ══════════════════════════════════════════════
   LEFT COLUMN — PAYMENT METHODS
══════════════════════════════════════════════ */
.left-col { display: flex; flex-direction: column; gap: 28px; }

.pay-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}
body.light-mode .pay-card { box-shadow: 0 2px 20px rgba(0,130,160,0.06); }

/* ── STEPS ── */
.step-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
body.light-mode .step-num { background: var(--accent); }
.step-title { font-size: 15px; font-weight: 700; }

/* ── FORM FIELDS ── */
.form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-bottom: 14px;
}
.form-row.full { grid-template-columns: 1fr; }
.field label {
  display: block; font-size: 11px; font-weight: 600;
  letter-spacing: 0.5px; color: var(--muted);
  text-transform: uppercase; margin-bottom: 7px;
}
.field input {
  width: 100%; padding: 11px 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-family: var(--font);
  font-size: 14px; outline: none; transition: border-color 0.2s;
}
.field input:focus { border-color: var(--accent); }
.field input::placeholder { color: var(--muted); opacity: 0.6; }
body.light-mode .field input { background: var(--surface2); border-color: var(--border); }

/* ── PAYMENT METHOD CARDS ── */
.method-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.method-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 18px 14px;
  background: var(--surface2); border: 2px solid transparent;
  border-radius: 12px; cursor: pointer;
  transition: all 0.2s; text-align: center;
}
.method-card:hover { border-color: rgba(124,110,255,0.4); }
.method-card.selected {
  border-color: var(--accent);
  background: rgba(124,110,255,0.08);
}
body.light-mode .method-card.selected {
  border-color: var(--accent);
  background: rgba(0,150,180,0.08);
}
.method-card .m-icon { font-size: 28px; }
.method-card .m-name { font-size: 13px; font-weight: 600; }
.method-card .m-desc { font-size: 11px; color: var(--muted); }

/* ── PAYMENT DETAIL PANELS ── */
.pay-detail {
  display: none; margin-top: 20px;
  padding: 20px; border-radius: 12px;
  background: var(--surface2); border: 1px solid var(--border);
  animation: fadeIn 0.25s ease;
}
.pay-detail.active { display: block; }
@keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

/* QRIS */
.qris-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.qris-frame {
  width: 200px; height: 200px;
  background: white; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  padding: 12px; box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  position: relative; overflow: hidden;
}
.qris-placeholder {
  width: 100%; height: 100%;
  background:
    repeating-linear-gradient(0deg, #000 0px, #000 4px, #fff 4px, #fff 8px),
    repeating-linear-gradient(90deg, #000 0px, #000 4px, #fff 4px, #fff 8px);
  background-blend-mode: multiply;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.qris-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; z-index: 2;
}
.qris-note { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.6; }
.qris-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(47,255,160,0.1); border: 1px solid rgba(47,255,160,0.25);
  color: var(--accent2); padding: 5px 12px; border-radius: 99px;
  font-size: 11px; font-weight: 600;
}
body.light-mode .qris-badge {
  background: rgba(224,90,43,0.08); border-color: rgba(224,90,43,0.25);
  color: var(--accent2);
}

/* BANK TRANSFER */
.bank-list { display: flex; flex-direction: column; gap: 10px; }
.bank-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; transition: border-color 0.2s;
}
.bank-item:hover { border-color: var(--accent); }
.bank-item.selected-bank { border-color: var(--accent); background: rgba(124,110,255,0.06); }
.bank-left { display: flex; align-items: center; gap: 12px; }
.bank-emoji { font-size: 20px; }
.bank-name { font-size: 13px; font-weight: 700; }
.bank-type { font-size: 11px; color: var(--muted); }
.bank-copy {
  font-size: 11px; color: var(--accent); font-weight: 600;
  cursor: pointer; padding: 5px 10px;
  border: 1px solid rgba(124,110,255,0.3); border-radius: 99px;
  background: none; font-family: var(--font);
  transition: all 0.2s;
}
.bank-copy:hover { background: rgba(124,110,255,0.1); }

.bank-account-detail {
  display: none; margin-top: 14px;
  padding: 16px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
}
.bank-account-detail.show { display: block; animation: fadeIn 0.2s ease; }
.account-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.account-label { font-size: 12px; color: var(--muted); }
.account-val { font-size: 14px; font-weight: 700; font-family: monospace; letter-spacing: 1px; }

/* E-WALLET */
.ewallet-list { display: flex; flex-direction: column; gap: 10px; }
.ewallet-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px;
}
.ewallet-logo {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.ewallet-name { font-size: 13px; font-weight: 700; }
.ewallet-num  { font-size: 12px; color: var(--muted); font-family: monospace; }
.copy-btn {
  margin-left: auto; font-size: 11px; color: var(--accent);
  font-weight: 600; cursor: pointer; padding: 5px 10px;
  border: 1px solid rgba(124,110,255,0.3); border-radius: 99px;
  background: none; font-family: var(--font); transition: all 0.2s;
}
body.light-mode .copy-btn { color: var(--accent); border-color: rgba(0,130,160,0.3); }
.copy-btn:hover { background: rgba(124,110,255,0.1); }

/* ── STEP 3 — KONFIRMASI ── */
.confirm-info {
  background: rgba(47,255,160,0.06);
  border: 1px solid rgba(47,255,160,0.18);
  border-radius: 10px; padding: 16px;
  font-size: 13px; color: var(--muted); line-height: 1.8;
  margin-bottom: 16px;
}
body.light-mode .confirm-info {
  background: rgba(0,150,180,0.05);
  border-color: rgba(0,150,180,0.2);
}
.confirm-info strong { color: var(--text); }

.btn-confirm {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; width: 100%; padding: 16px;
  background: #25D366; color: #fff;
  border: none; border-radius: 12px;
  font-family: var(--font); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37,211,102,0.3);
}
.btn-confirm:hover {
  background: #1ebe5c;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37,211,102,0.4);
}

/* ══════════════════════════════════════════════
   RIGHT COLUMN — ORDER SUMMARY
══════════════════════════════════════════════ */
.right-col { position: sticky; top: 90px; height: fit-content; }

.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
body.light-mode .order-card { box-shadow: 0 4px 24px rgba(0,130,160,0.08); }

.order-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(124,110,255,0.12), rgba(47,255,160,0.06));
}
body.light-mode .order-header {
  background: linear-gradient(135deg, rgba(0,150,180,0.1), rgba(224,90,43,0.06));
}
.order-pkg-name { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.order-pkg-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; padding: 4px 10px;
  border-radius: 99px; background: rgba(124,110,255,0.15);
  border: 1px solid rgba(124,110,255,0.3); color: var(--accent);
}
body.light-mode .order-pkg-badge {
  background: rgba(224,90,43,0.1); border-color: rgba(224,90,43,0.3); color: var(--accent2);
}

.order-body { padding: 20px 24px; }

.order-items { margin-bottom: 20px; }
.order-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.order-item:last-child { border-bottom: none; }
.oi-check { color: var(--accent2); font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.oi-text { color: var(--muted); line-height: 1.5; }

.order-total {
  padding: 16px; border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.total-row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.total-label { font-size: 13px; color: var(--muted); }
.total-val { font-size: 13px; font-weight: 600; }
.total-row.main .total-label { font-size: 15px; font-weight: 700; color: var(--text); }
.total-row.main .total-val {
  font-size: 22px; font-weight: 800; color: var(--accent);
}
body.light-mode .total-row.main .total-val { color: var(--accent2); }

.order-note {
  font-size: 12px; color: var(--muted); line-height: 1.7;
  padding: 12px; border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}
body.light-mode .order-note { background: rgba(0,0,0,0.02); }

/* ── TRUST BADGES ── */
.trust-row {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.trust-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
}
.trust-item span { font-size: 15px; }

/* ══════════════════════════════════════════════
   THEME TOGGLE
══════════════════════════════════════════════ */
.theme-toggle {
    position: static;
    display: flex;
    align-items: center;
    background: transparent;
    border: 1px solid rgba(124,110,255,0.2);
    border-radius: 99px;
    padding: 2px;
    box-shadow: none;
    backdrop-filter: none;
    transition: all 0.3s;
  }
  .theme-toggle:hover {
    border-color: rgba(124,110,255,0.4);
    background: rgba(124,110,255,0.08);
    backdrop-filter: blur(8px);
  }
  body.light-mode .theme-toggle {
    background: transparent;
    border-color: rgba(0,150,180,0.2);
    box-shadow: none;
  }
  body.light-mode .theme-toggle:hover {
    border-color: rgba(0,150,180,0.4);
    background: rgba(0,150,180,0.08);
    box-shadow: none;
  }
  .theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 99px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-head);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
    letter-spacing: 0.2px;
  }
  .theme-toggle-btn .t-icon { font-size: 12px; transition: transform 0.3s; }
  .theme-toggle-btn:hover { color: var(--text); }
  .theme-toggle-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: none;
  }
  body.light-mode .theme-toggle-btn.active {
    background: var(--accent2);
    box-shadow: none;
  }
  .theme-toggle-btn.active .t-icon { transform: rotate(20deg); }
  .theme-divider {
    width: 1px;
    height: 12px;
    background: rgba(124,110,255,0.15);
    flex-shrink: 0;
  }

/* ══════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 90px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface); border: 1px solid var(--accent2);
  color: var(--text); padding: 12px 24px;
  border-radius: 99px; font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
  opacity: 0; pointer-events: none;
  transition: all 0.3s; z-index: 1000;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* NAV */
  nav {
    padding: 10px 12px;
    gap: 8px;
    justify-content: space-between;
  }
  .nav-logo {
    font-size: 16px;
    flex-shrink: 0;
  }
  .nav-secure {
    display: none;
  }
  .theme-toggle {
    display: none;
  }
  .nav-back {
    margin-left: 0;
    padding: 6px 10px;
    font-size: 12px;
    flex-shrink: 0;
  }
  
  /* MAIN */
  main { grid-template-columns: 1fr; margin: 20px auto; gap: 20px; padding: 0 16px 100px; }
  .right-col { position: static; order: -1; }
  .method-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .pay-card { padding: 16px; }
}

@media (max-width: 480px) {
  nav {
    padding: 8px 10px;
    gap: 6px;
  }
  .nav-logo {
    font-size: 14px;
  }
  .nav-back {
    padding: 5px 8px;
    font-size: 11px;
  }
  .method-grid { grid-template-columns: 1fr; }
  main { padding: 0 12px 100px; }
}
