/* ============================================================
   YESPLIS TICKET PLATFORM — Theme dari referensi screenshot
   Navy topbar · Royal-blue CTA · White rounded cards · Green badges
   ============================================================ */
:root {
  --navy: #1e2a5e;
  --navy-2: #17204a;
  --blue: #1c3eb4;
  --blue-dark: #16329b;
  --blue-soft: #e8edff;
  --ink: #1b2437;
  --muted: #6a7280;
  --bg: #eef0f5;
  --card: #ffffff;
  --line: #e6e8f2;
  --lav-bg: #eef0fc;
  --lav-line: #ccd3f5;
  --lav-ink: #3c49ab;
  --green-1: #17924f;
  --green-2: #47bd75;
  --red: #e02d2d;
  --red-soft: #fdecec;
  --amber: #ffd43b;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(30, 42, 94, .10);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #dfe3ee;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.app {
  width: 100%;
  max-width: 430px;
  background: var(--card);
  min-height: 100vh;
  box-shadow: 0 0 40px rgba(23, 32, 74, .18);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ---------- TOP NAVBAR (navy, ikut referensi) ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(90deg, var(--navy-2), var(--navy) 55%, #24307a);
  color: #fff;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
}
.topnav .brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.topnav .brand img {
  height: 26px; width: auto;
  background: #fff; border-radius: 8px;
  padding: 4px 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.28);
  display: block;
}
.topnav .spacer { flex: 1; }
.topnav .ic {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.10);
  border: none; color: #fff; cursor: pointer;
}
.topnav .ic:hover { background: rgba(255,255,255,.22); }
.topnav .ic svg { width: 17px; height: 17px; }
.topnav .ic.cart { position: relative; }
.topnav .ic.cart i {
  position: absolute; top: -2px; right: -2px;
  background: #ff5d73; font-style: normal;
  font-size: 9px; font-weight: 700;
  width: 15px; height: 15px; border-radius: 50%;
  display: grid; place-items: center;
}

/* ---------- PAGE HEADER (putih, back arrow) ---------- */
.pagehead {
  position: sticky; top: 54px; z-index: 49;
  background: #fff;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.pagehead .back {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  border: none; background: #fff; color: var(--ink); cursor: pointer;
}
.pagehead .back:hover { background: #f2f4fa; }
.pagehead .back svg { width: 19px; height: 19px; }
.pagehead h1 { font-size: 16.5px; font-weight: 700; flex: 1; }
.pagehead .share { color: var(--muted); display: grid; place-items: center; background: none; border: none; cursor: pointer; }
.pagehead .share svg { width: 18px; height: 18px; }

/* ---------- CONTAINER ---------- */
.container { padding: 14px 14px 118px; flex: 1; }
.container.nobar { padding-bottom: 28px; }

/* ---------- HERO POSTER ---------- */
.hero { position: relative; }
.hero img.poster {
  width: 100%; display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero .fav {
  position: absolute; right: 10px; top: 10px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.92);
  border: none; display: grid; place-items: center;
  cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.18);
  color: #9aa1b5;
}
.hero .fav.on { color: #ff4d67; }
.hero .fav svg { width: 19px; height: 19px; }

/* ---------- EVENT INFO ---------- */
.event-title { margin: 14px 2px 10px; font-size: 19px; font-weight: 800; letter-spacing: .2px; }
.info-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 9px 2px;
}
.info-row .ico { color: var(--blue); flex: 0 0 auto; margin-top: 1px; }
.info-row .ico svg { width: 17px; height: 17px; }
.info-row .txt b { display: block; font-weight: 600; }
.info-row .txt small { color: var(--muted); }
a.link-blue { color: var(--blue); font-weight: 600; text-decoration: none; }
a.link-blue:hover { text-decoration: underline; }

.organizer {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 12px; margin: 8px 0 4px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fafbff;
}
.organizer .lbl { color: var(--muted); }
.organizer img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.organizer .org-name { color: var(--blue); font-weight: 700; display: flex; align-items: center; gap: 5px; }
.organizer .org-name svg { width: 15px; height: 15px; }
.organizer .chev { margin-left: auto; color: var(--muted); }

/* ---------- TABS ---------- */
.tabs {
  display: flex; gap: 4px;
  border-bottom: 1.5px solid var(--line);
  margin: 14px 0 16px;
}
.tabs button {
  flex: 1; padding: 10px 4px;
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--muted);
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
}
.tabs button.active { color: var(--blue); border-bottom-color: var(--blue); }
.tabpanel { display: none; }
.tabpanel.show { display: block; animation: fadeUp .25s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.desc h2 { font-size: 17px; font-weight: 800; margin-bottom: 2px; }
.desc .tag { color: var(--blue); font-weight: 700; font-size: 12.5px; }
.desc p { margin: 9px 0; color: #333c52; }
.desc .quote { font-weight: 700; }

/* ---------- FASILITAS ---------- */
.fac-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fac-card {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; background: #fff;
}
.fac-card .fi {
  width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: 10px; background: var(--blue-soft);
  display: grid; place-items: center; font-size: 18px;
  filter: saturate(1.1);
}
.fac-card b { font-size: 12.5px; font-weight: 700; line-height: 1.3; }

/* ---------- MEDIA SOSIAL ---------- */
.sos-card {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; margin-bottom: 10px; text-decoration: none; color: var(--ink);
}
.sos-card:hover { border-color: var(--lav-line); background: #fafbff; }
.sos-card .si { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 17px; }
.sos-card b { display: block; font-size: 13px; }
.sos-card small { color: var(--muted); }
.sos-card .arr { margin-left: auto; color: var(--blue); font-weight: 800; }

/* ---------- SECTION TITLE ---------- */
.sec-title { margin: 20px 0 10px; font-size: 16px; font-weight: 800; }
.sec-title small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }

/* ---------- BANNER INFO (ungu muda) ---------- */
.banner-info {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--lav-bg); border: 1px solid var(--lav-line);
  color: var(--lav-ink);
  border-radius: 12px; padding: 11px 12px;
  font-weight: 500; font-size: 13px;
  margin-bottom: 14px;
}
.banner-info .bi { font-size: 16px; line-height: 1.2; }

/* ---------- TIKET CARD ---------- */
.ticket-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 16px;
  background: #fff; box-shadow: 0 4px 14px rgba(30,42,94,.06);
}
.t-badge {
  background: linear-gradient(90deg, var(--green-1), var(--green-2));
  color: #fff; font-weight: 700; font-size: 13.5px;
  padding: 8px 14px;
  display: flex; align-items: center; gap: 8px;
}
.t-badge .pct {
  background: var(--amber); color: #7a5200;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
}
.t-body { padding: 13px 14px 15px; }
.t-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.t-head .t-name { font-weight: 800; font-size: 14.5px; letter-spacing: .3px; }
.t-status {
  font-size: 11px; font-weight: 700; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px;
  background: #e5f7ec; color: #14804a;
  display: flex; align-items: center; gap: 5px;
}
.t-status i { width: 6px; height: 6px; border-radius: 50%; background: #1fa860; display: inline-block; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.t-price { display: flex; align-items: baseline; gap: 10px; margin: 7px 0 3px; }
.t-price .now { font-size: 21px; font-weight: 800; color: var(--ink); }
.t-price .now small { font-size: 13px; font-weight: 700; }
.t-price .old { color: #9aa1b5; text-decoration: line-through; font-size: 13px; }
.t-price .per { color: var(--muted); font-size: 11.5px; }
.t-benefits {
  background: #f6f7fb; border-radius: 10px;
  padding: 10px 12px 10px 12px; margin: 10px 0 4px;
}
.t-benefits ol { margin-left: 16px; }
.t-benefits li { margin: 4px 0; color: #333c52; font-size: 12.8px; }
.t-benefits li b { font-weight: 700; }
.t-more {
  background: none; border: none; color: var(--blue);
  font-family: inherit; font-weight: 700; font-size: 12.8px;
  cursor: pointer; padding: 4px 0 0; display: inline-block;
}
.btn-buy {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--blue), #2a52d8);
  color: #fff; text-decoration: none;
  font-weight: 800; letter-spacing: .8px; font-size: 13.5px;
  padding: 13px; border-radius: 12px;
  box-shadow: 0 6px 16px rgba(28, 62, 180, .35);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-buy:active { transform: scale(.97); }
.btn-buy:hover { box-shadow: 0 8px 20px rgba(28,62,180,.45); }

/* ---------- BOTTOM NAVBAR (CTA biru, ikut referensi) ---------- */
.bottombar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; z-index: 60;
  background: #fff;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 20px rgba(23,32,74,.10);
}
.btn-cta {
  display: block; width: 100%; text-align: center;
  background: linear-gradient(90deg, var(--blue), #2a52d8);
  color: #fff; font-weight: 800; font-size: 15px;
  text-decoration: none; border: none; font-family: inherit;
  padding: 13px; border-radius: 12px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(28,62,180,.35);
}
.btn-cta:active { transform: scale(.98); }
.bottombar .note {
  text-align: center; font-size: 11px; color: var(--muted);
  margin-top: 8px;
}
.bottombar .note a { color: var(--blue); font-weight: 700; text-decoration: none; }

/* ---------- STEPS ---------- */
.steps { display: flex; align-items: center; gap: 6px; padding: 14px 14px 4px; }
.steps .st { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 0 0 auto; width: 74px; }
.steps .dot {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
  background: #e7eaf3; color: #9aa1b5;
}
.steps .st span { font-size: 10px; color: #9aa1b5; font-weight: 600; text-align: center; }
.steps .st.active .dot { background: var(--blue); color: #fff; box-shadow: 0 0 0 4px var(--blue-soft); }
.steps .st.active span { color: var(--blue); }
.steps .st.done .dot { background: var(--green-2); color: #fff; }
.steps .bar { flex: 1; height: 3px; border-radius: 3px; background: #e7eaf3; margin-bottom: 16px; }
.steps .bar.done { background: var(--green-2); }

/* ---------- FORM ---------- */
.order-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; background: #fff;
  box-shadow: 0 4px 14px rgba(30,42,94,.06);
  margin-bottom: 14px;
}
.order-card .oc-head { display: flex; justify-content: space-between; align-items: center; }
.order-card .oc-head b { font-size: 14px; letter-spacing: .3px; }
.order-card .oc-change { font-size: 11.5px; color: var(--blue); font-weight: 700; text-decoration: none; }
.order-card .oc-price { display: flex; align-items: baseline; gap: 8px; margin: 5px 0 12px; }
.order-card .oc-price b { font-size: 19px; }
.order-card .oc-price s { color: #9aa1b5; font-size: 12.5px; }

.qty-row { display: flex; align-items: center; justify-content: space-between; background: #f6f7fb; border-radius: 12px; padding: 10px 12px; }
.qty-row .q-lbl { font-weight: 600; font-size: 13px; }
.qty-row .q-lbl small { display: block; color: var(--muted); font-weight: 500; }
.qty { display: flex; align-items: center; gap: 12px; }
.qty button {
  width: 30px; height: 30px; border-radius: 9px; border: none; cursor: pointer;
  background: #fff; color: var(--blue); font-size: 17px; font-weight: 800;
  box-shadow: 0 2px 6px rgba(30,42,94,.12);
  display: grid; place-items: center;
}
.qty button:disabled { color: #c3c8d6; box-shadow: none; cursor: not-allowed; }
.qty b { min-width: 18px; text-align: center; font-size: 15px; }

.sum-rows { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.sum-row { display: flex; justify-content: space-between; padding: 4px 0; color: #333c52; font-size: 13px; }
.sum-row.total { border-top: 1px dashed var(--line); margin-top: 7px; padding-top: 10px; font-weight: 800; color: var(--ink); font-size: 14.5px; }
.sum-row.total .v { color: var(--blue); font-size: 17px; }
.sum-row .disc { color: var(--green-1); font-weight: 700; }

.field { margin-bottom: 12px; }
.field label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 6px; }
.field label i { color: var(--red); font-style: normal; }
.field input {
  width: 100%; padding: 12px 13px;
  border: 1.5px solid var(--line); border-radius: 11px;
  font-family: inherit; font-size: 13.5px; color: var(--ink);
  background: #fbfcff; outline: none;
  transition: border .15s ease, box-shadow .15s ease;
}
.field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); background: #fff; }
.field input.err { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.field .msg { display: none; color: var(--red); font-size: 11.5px; margin-top: 5px; font-weight: 600; }
.field .msg.show { display: block; }

.coupon-row { display: flex; gap: 8px; margin-bottom: 6px; }
.coupon-row input { flex: 1; padding: 11px 12px; border: 1.5px dashed var(--lav-line); border-radius: 11px; font-family: inherit; font-size: 13px; text-transform: uppercase; background: var(--lav-bg); outline: none; color: var(--lav-ink); font-weight: 600; }
.coupon-row button {
  padding: 0 18px; border: none; border-radius: 11px; cursor: pointer;
  background: var(--navy); color: #fff; font-weight: 700; font-family: inherit; font-size: 12.5px;
}
.coupon-msg { display: none; font-size: 12px; font-weight: 600; margin: 2px 0 10px; }
.coupon-msg.ok { display: block; color: var(--green-1); }
.coupon-msg.bad { display: block; color: var(--red); }

.agree { display: flex; gap: 9px; align-items: flex-start; margin: 14px 2px; font-size: 12.3px; color: #333c52; }
.agree input { margin-top: 2px; width: 15px; height: 15px; accent-color: var(--blue); }
.agree a { color: var(--blue); font-weight: 700; text-decoration: none; }

.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  background: linear-gradient(90deg, var(--blue), #2a52d8);
  color: #fff; font-weight: 800; font-size: 14.5px; font-family: inherit;
  border: none; padding: 14px; border-radius: 12px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(28,62,180,.35);
}
.btn-primary:disabled { background: #c3c8d6; box-shadow: none; cursor: not-allowed; }
.secure-note { text-align: center; font-size: 11px; color: var(--muted); margin-top: 10px; }

/* ---------- LOADING ---------- */
.load-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 30px; text-align: center; }
.load-logo {
  width: 84px; height: 84px; object-fit: cover; border-radius: 16px;
  box-shadow: var(--shadow); margin-bottom: 26px;
  animation: float 1.6s ease-in-out infinite;
  border: 3px solid #fff;
}
@keyframes float { 50% { transform: translateY(-6px); } }
.spinner {
  width: 52px; height: 52px; border-radius: 50%;
  border: 5px solid var(--blue-soft); border-top-color: var(--blue);
  animation: spin .8s linear infinite; margin-bottom: 22px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.load-wrap h2 { font-size: 16.5px; margin-bottom: 6px; }
.load-wrap p { color: var(--muted); font-size: 12.5px; margin-bottom: 26px; }
.load-steps { width: 100%; max-width: 260px; text-align: left; }
.load-step { display: flex; align-items: center; gap: 9px; padding: 6px 0; color: #aab0c2; font-size: 12.5px; font-weight: 600; transition: color .3s; }
.load-step .ld { width: 8px; height: 8px; border-radius: 50%; background: #d5d9e6; transition: background .3s; }
.load-step.on { color: var(--blue); }
.load-step.on .ld { background: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.load-step.ok { color: var(--green-1); }
.load-step.ok .ld { background: var(--green-2); }
.load-amt { margin-top: 26px; font-size: 12px; color: var(--muted); }
.load-amt b { display: block; font-size: 20px; color: var(--ink); }

/* ---------- QRIS ---------- */
.qris-amount {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(90deg, var(--navy-2), var(--navy));
  color: #fff; border-radius: 14px; padding: 13px 16px;
  margin-bottom: 14px; box-shadow: var(--shadow);
}
.qris-amount small { font-size: 11px; opacity: .75; display: block; }
.qris-amount b { font-size: 19px; }
.qris-amount .timer { text-align: right; }
.qris-amount .timer b { color: #ffd0d8; font-size: 15px; font-variant-numeric: tabular-nums; }

.qris-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; text-align: center; box-shadow: 0 4px 14px rgba(30,42,94,.06); }
.qris-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 4px; }
.qris-brand .q {
  background: var(--navy); color: #fff; font-weight: 900; font-style: italic;
  padding: 3px 12px; border-radius: 7px; font-size: 16px; letter-spacing: 1px;
}
.qris-brand span { font-size: 10px; color: var(--muted); font-weight: 600; text-align: left; line-height: 1.25; }
.qris-card img { width: 62%; max-width: 240px; margin: 12px auto; display: block; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; }
.qris-merchant b { display: block; font-size: 13.5px; }
.qris-merchant small { color: var(--muted); font-size: 11.5px; }
.qris-nmid { margin-top: 8px; font-size: 11px; color: var(--muted); background: #f6f7fb; border-radius: 8px; padding: 6px; font-variant-numeric: tabular-nums; }

.howto { margin: 16px 2px 4px; }
.howto b { font-size: 13px; }
.howto ol { margin: 8px 0 0 18px; color: #333c52; }
.howto li { margin: 5px 0; font-size: 12.6px; }

.btn-check { margin-top: 16px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-check .mini-spin { width: 16px; height: 16px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: none; }
.btn-check.busy .mini-spin { display: inline-block; }
.btn-ghost {
  display: block; width: 100%; text-align: center; margin-top: 10px;
  background: #fff; color: var(--red); font-weight: 700;
  border: 1.5px solid #f3c4c4; border-radius: 12px;
  padding: 12px; font-family: inherit; font-size: 13px; cursor: pointer;
  text-decoration: none;
}
.btn-ghost.blue { color: var(--muted); border-color: var(--line); }

/* ---------- ERROR ---------- */
.err-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px 24px 40px; }
.err-ico {
  width: 92px; height: 92px; border-radius: 50%;
  background: var(--red-soft); display: grid; place-items: center;
  margin-bottom: 20px; position: relative;
}
.err-ico svg { width: 44px; height: 44px; color: var(--red); }
.err-ico::after {
  content: ''; position: absolute; inset: -9px;
  border-radius: 50%; border: 2px dashed #f3b8b8;
  animation: spin 9s linear infinite;
}
.err-wrap h1 { font-size: 19px; margin-bottom: 6px; }
.err-wrap .code {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  background: #f6f7fb; color: var(--red); font-weight: 700; font-size: 11.5px;
  border-radius: 8px; padding: 4px 10px; margin-bottom: 10px;
  border: 1px solid var(--line);
}
.err-wrap > p { color: var(--muted); font-size: 12.8px; max-width: 300px; margin-bottom: 20px; }
.err-detail {
  width: 100%; border: 1px solid var(--line); border-radius: 14px;
  text-align: left; padding: 4px 14px; margin-bottom: 16px; background: #fbfcff;
}
.err-detail .row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 12.6px; }
.err-detail .row:last-child { border-bottom: none; }
.err-detail .row span { color: var(--muted); }
.err-detail .row b { font-weight: 700; }
.err-detail .row b.wait { color: #c77700; }
.err-actions { width: 100%; }
.err-tip {
  margin-top: 18px; font-size: 11.5px; color: var(--muted);
  background: #f6f7fb; border-radius: 10px; padding: 10px 12px; width: 100%;
  text-align: left; line-height: 1.5;
}

/* ---------- FOOTER MINI ---------- */
.foot {
  text-align: center; color: #aab0c2; font-size: 10.5px;
  padding: 6px 0 18px;
}
.foot b { color: var(--navy); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 430px) {
  body { background: #fff; }
  .app { box-shadow: none; }
}
