:root {
  --cobalt: #2340FF;
  --cobalt-dark: #1A30CC;
  --navy: #0A1440;
  --yellow: #FFD23F;
  --ink: #0A1440;
  --muted: #4A5378;
  --line: #DDE1F0;
  --bg: #F4F6FC;
  --card: #FFFFFF;
  --danger: #C62828;
  --ok: #1B7F3B;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--cobalt); }
.wrap { width: 100%; max-width: 520px; margin: 0 auto; padding: 0 16px; }
body.wide .wrap { max-width: 1200px; }

.topbar { background: var(--navy); color: #fff; padding: 12px 0; }
.brand { display: inline-block; line-height: 0; }
.brand img { height: 34px; width: auto; }

h1 { font-size: 26px; line-height: 1.2; margin: 24px 0 6px; letter-spacing: -0.02em; }
.lead { color: var(--muted); margin: 0 0 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

/* Ringkasan paket */
.paket { background: var(--navy); color: #fff; border: 0; }
.paket-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.paket-name { font-weight: 700; font-size: 18px; }
.paket-price { font-weight: 800; font-size: 26px; color: var(--yellow); }
.paket ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.paket li { font-size: 14px; padding-left: 22px; position: relative; }
.paket li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230A1440' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* Form */
.field { margin-bottom: 16px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=tel], input[type=password] {
  width: 100%; font: inherit; font-size: 16px; padding: 13px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(35, 64, 255, .18); }
.field.has-error input { border-color: var(--danger); }
.err { color: var(--danger); font-size: 14px; margin-top: 4px; }

.methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.method { position: relative; }
.method input { position: absolute; opacity: 0; inset: 0; }
.method span {
  display: flex; flex-direction: column; justify-content: center; min-height: 64px;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer;
  font-weight: 700;
}
.method small { font-weight: 500; color: var(--muted); font-size: 13px; }
.method input:checked + span { border-color: var(--cobalt); background: #EEF1FF; box-shadow: inset 0 0 0 1px var(--cobalt); }
.method input:focus-visible + span { box-shadow: 0 0 0 3px rgba(35, 64, 255, .3); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 12px 20px; font: inherit; font-weight: 700; font-size: 17px;
  border: 0; border-radius: 12px; cursor: pointer; text-decoration: none;
  background: var(--cobalt); color: #fff;
}
.btn:hover { background: var(--cobalt-dark); }
.btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.btn[disabled] { opacity: .7; cursor: wait; }
.btn-yellow { background: var(--yellow); color: var(--navy); }
.btn-yellow:hover { background: #F2C21F; }
.btn-sm { width: auto; min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 8px; }
.btn-ghost { background: transparent; color: var(--cobalt); border: 1.5px solid var(--cobalt); }
.btn-ghost:hover { background: #EEF1FF; }
.btn-danger { background: transparent; color: var(--danger); border: 1.5px solid var(--danger); }
.btn-danger:hover { background: #FDECEC; }

.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 15px; }
.alert-error { background: #FDECEC; color: #8E1B1B; }
.alert-ok { background: #E7F6EC; color: #145C2B; }

/* Halaman bayar */
.order-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--muted); }
.order-meta strong { color: var(--ink); font-size: 15px; }
.amount { text-align: center; padding: 6px 0 14px; }
.amount .label { font-size: 14px; color: var(--muted); }
.amount .value { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.qris img { display: block; width: 100%; height: auto; max-width: 360px; margin: 0 auto; border-radius: 12px; }
.steps { padding-left: 20px; margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.rek { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #EEF1FF; border-radius: 12px; padding: 12px 14px; margin: 14px 0 4px; }
.rek-num { font-size: 22px; font-weight: 800; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.status-box { text-align: center; }
.status-box h2 { margin: 8px 0 6px; font-size: 20px; }
.status-box p { color: var(--muted); margin: 0; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.badge-menunggu_pembayaran { background: #FFF4CC; color: #6B5200; }
.badge-menunggu_verifikasi { background: #E3E8FF; color: #1A2C9E; }
.badge-lunas { background: #E7F6EC; color: #145C2B; }
.badge-batal { background: #EEE; color: #555; }

/* Admin */
.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 20px 0 12px; }
.admin-bar h1 { margin: 0; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.filters a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); font-size: 14px; }
.filters a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #F8F9FD; font-size: 13px; color: var(--muted); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.mono { font-variant-numeric: tabular-nums; white-space: nowrap; }
.notif { display: block; font-size: 12px; white-space: nowrap; }
.notif.ok { color: var(--ok); }
.notif.fail { color: var(--danger); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions form { margin: 0; }
.empty { padding: 24px; text-align: center; color: var(--muted); }

/* Kartu order di HP */
@media (max-width: 760px) {
  table, thead, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  td { border: 0; padding: 4px 14px; }
  td::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
}

.foot { color: var(--muted); font-size: 13px; text-align: center; padding-top: 12px; padding-bottom: 32px; }
.foot p { margin: 4px 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
