/* ============================================================
   TRANS7 25 Bersinar - Sistem Pendaftaran Tiket
   Design system: tiruan estetika referensi (detikevent-style)
   Font: Montserrat | Palet: navy, biru, gradasi oranye-merah
   ============================================================ */
:root {
  --bg: #f4f5f9;
  --bg-out: #e9ebf2;
  --card: #ffffff;
  --navy: #a52d16;
  --blue: #ed4b1b;
  --blue-dark: #c93614;
  --blue-soft: #fff0e9;
  --grey-1: #3c4256;
  --grey-2: #5a6072;
  --grey-3: #8a90a2;
  --line: #e3e6ee;
  --input-line: #d8dce6;
  --red: #e53935;
  --red-soft: #fdecea;
  --green: #1e9e5a;
  --green-soft: #e6f6ec;
  --amber: #f2994a;
  --amber-soft: #fff4e5;
  --grad-tag: linear-gradient(90deg, #ff9800 0%, #f4511e 45%, #e53935 72%, #d81b60 100%);
  --grad-float: linear-gradient(135deg, #ff9800 0%, #f4511e 100%);
  --radius: 12px;
  --shadow-card: 0 2px 10px rgba(23, 32, 90, 0.06);
  --shadow-float: 0 6px 16px rgba(244, 81, 30, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
  background: var(--bg-out);
  color: var(--grey-1);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ---------- Layout kolom utama (mobile-first, center di desktop) ---------- */
.page {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  box-shadow: 0 0 40px rgba(23, 32, 90, 0.08);
  display: flex;
  flex-direction: column;
}
.page-body { flex: 1 0 auto; padding-bottom: 28px; }
.page-body.has-sticky { padding-bottom: 150px; }

/* ---------- Header ---------- */
.main-header {
  background: var(--card);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(23, 32, 90, 0.06);
}
.main-header__logo img {
  height: 30px;
  width: auto;
  border-radius: 6px;
  display: block;
  object-fit: contain;
}
.main-header__logo img:first-child { max-width: 158px; }
.main-header__logo img + img { height: 30px; max-width: 36px; }
.main-header__logo { display: flex; align-items: center; gap: 10px; }
.main-header__logo .brand-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.4px;
}
.icon-btn {
  background: transparent;
  border: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}
.icon-btn:hover { background: var(--blue-soft); }
.icon-btn svg { width: 20px; height: 20px; stroke: var(--navy); }

/* ---------- Tag slider ---------- */
.tag-slider-wrapper { background: var(--card); padding: 4px 0 12px; }
.tag-slider-nav { position: relative; }
.tag-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 44px;
  scrollbar-width: none;
  background: var(--grad-tag);
  border-radius: 999px;
  margin: 0 12px;
}
.tag-track::-webkit-scrollbar { display: none; }
.tag-item {
  flex: 0 0 auto;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  white-space: nowrap;
  transition: background 0.2s;
}
.tag-item:hover { background: rgba(255, 255, 255, 0.3); }
.slick-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgba(120, 20, 10, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s;
}
.slick-arrow:hover { background: rgba(120, 20, 10, 0.55); }
.slick-arrow svg { width: 12px; height: 12px; stroke: #fff; }
#prevTag { left: 18px; }
#nextTag { right: 18px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding: 14px 16px 2px;
  font-size: 11px;
  color: var(--grey-3);
  line-height: 1.7;
}
.breadcrumb a { color: var(--grey-3); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--blue); text-decoration: underline; }
.breadcrumb .breadcrumb__aktif { color: var(--navy); font-weight: 700; }

/* ---------- Hero banner ---------- */
.hero {
  margin: 12px 16px 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
}
.hero img { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; }

/* ---------- Judul & meta event ---------- */
.event-title { padding: 16px 16px 0; }
.event-title h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.2px;
  margin-bottom: 4px;
}
.event-title .event-date { font-size: 13px; color: var(--grey-2); }
.event-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 0; }
.btn-tag {
  display: inline-block;
  border: 1px solid var(--blue);
  color: var(--blue);
  background: var(--card);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  transition: all 0.2s;
}
.btn-tag:hover { background: var(--blue); color: #fff; }

/* ---------- Info lokasi & organizer ---------- */
.info-container { margin: 16px 16px 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 16px; }
.address { display: flex; gap: 10px; align-items: flex-start; }
.address img, .address svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px; }
.address-details { font-size: 13px; color: var(--grey-1); }
.address-details a:hover { color: var(--blue); text-decoration: underline; }
.info-container hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.contact { display: flex; align-items: center; gap: 10px; }
.contact .iconsa { position: relative; width: 30px; height: 30px; flex: 0 0 auto; }
.contact .iconsa img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.barcode-name { font-size: 13px; font-weight: 700; color: var(--navy); }

/* ---------- Kartu umum ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin: 12px 16px 0;
  padding: 16px;
}
.card h2 { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }

/* Accordion venue */
.accordion-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: var(--navy);
  font-size: 15px;
  cursor: pointer;
  user-select: none;
}
.accordion-title svg { width: 12px; height: 8px; stroke: var(--grey-2); transition: transform 0.25s; }
.accordion-item.open .accordion-title svg { transform: rotate(180deg); }
.accordion-content { display: none; padding-top: 14px; }
.accordion-item.open .accordion-content { display: block; }
.venue-figure { text-align: center; }
.venue-figure img { width: 200px; max-width: 100%; margin: 0 auto 10px; border-radius: 10px; }
.venue-figure p { font-size: 12px; color: var(--grey-2); }

/* ---------- Kartu tiket ---------- */
.ticket-card .ticket-name { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.ticket-card .ticket-desc { font-size: 12px; color: var(--grey-3); }
.ticket-card .ticket-time { font-size: 12px; color: var(--grey-1); margin-top: 2px; }
.ticket-card .ticket-deadline { font-size: 12px; color: var(--red); margin-top: 10px; font-weight: 600; }
.ticket-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 12px; }
.price-label { font-size: 11px; color: var(--grey-3); }
.price-value { font-size: 17px; font-weight: 800; color: var(--blue); margin-top: 2px; }
.badge-tersedia {
  display: inline-block;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-top: 6px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  font-weight: 700;
  border-radius: 10px;
  transition: all 0.2s;
  text-align: center;
}
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); }
.btn--primary:active { transform: scale(0.98); }
.btn--md { padding: 11px 22px; font-size: 13px; }
.btn--block { width: 100%; padding: 15px 20px; font-size: 15px; border-radius: 12px; }
.btn--ghost { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn--ghost:hover { background: var(--blue-soft); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Deskripsi & Info Penting ---------- */
.desc-block h2 { font-size: 15px; font-weight: 700; color: var(--navy); margin: 20px 16px 8px; }
.desc-block p { padding: 0 16px; font-size: 13px; color: var(--grey-1); text-align: justify; }
.info-penting { padding: 0 16px; }
.info-penting h3 { font-size: 15px; font-weight: 700; color: var(--navy); margin: 16px 0 8px; }
.info-penting ol { padding-left: 18px; }
.info-penting li { font-size: 13px; color: var(--grey-1); margin-bottom: 10px; text-align: justify; }

/* ---------- Pilih tiket (detailtiket.html) ---------- */
.pilih-card { border: 1.5px solid var(--blue); position: relative; }
.pilih-card::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: var(--radius);
  pointer-events: none;
  box-shadow: 0 0 0 3px rgba(29, 89, 200, 0.12);
}
.qty-row { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.qty-label { font-size: 13px; font-weight: 600; color: var(--navy); }
.stepper { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--input-line); border-radius: 10px; overflow: hidden; }
.stepper button {
  width: 36px;
  height: 36px;
  border: 0;
  background: var(--card);
  font-size: 18px;
  font-weight: 700;
  color: var(--blue);
  transition: background 0.15s;
}
.stepper button:hover { background: var(--blue-soft); }
.stepper button:disabled { color: #b9bdc9; cursor: not-allowed; background: var(--card); }
.stepper .qty-val { width: 44px; text-align: center; font-weight: 700; color: var(--navy); font-size: 14px; }

/* ---------- Sticky bottom bar ---------- */
.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 24px rgba(22, 48, 122, 0.14);
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  z-index: 40;
}
.sticky-bar .total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.sticky-bar .total-label { font-size: 12px; color: var(--grey-2); }
.sticky-bar .total-value { font-size: 18px; font-weight: 800; color: var(--navy); }
.sticky-bar .pax { font-size: 11px; color: var(--grey-3); }

/* ---------- Form pemesan ---------- */
.form-section-title { font-size: 16px; font-weight: 700; color: var(--navy); padding: 16px 16px 0; }
.form-intro { padding: 4px 16px 0; font-size: 13px; color: var(--grey-1); }
.form-intro a { color: var(--blue); font-weight: 700; }
.form-intro a:hover { text-decoration: underline; }
.form-card { margin: 14px 16px 0; }
.f-field { margin-bottom: 16px; }
.f-field label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.f-field .req { color: var(--red); }
.f-input, .f-select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--input-line);
  border-radius: 10px;
  background: var(--card);
  padding: 0 14px;
  font-size: 14px;
  color: var(--grey-1);
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}
.f-input:focus, .f-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 89, 200, 0.12); }
.f-input::placeholder { color: #b0b5c4; }
.f-input.invalid, .f-select.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12); }
.f-caption { font-size: 11px; color: var(--grey-3); margin-top: 6px; }
.f-error { display: none; font-size: 11px; color: var(--red); margin-top: 5px; font-weight: 600; }
.f-error.show { display: block; }
.f-row { display: flex; gap: 10px; }
.f-row .f-select { width: 76px; flex: 0 0 auto; }
.f-row .f-input { flex: 1; }
.radio-group { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.radio-opt { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--grey-1); cursor: pointer; }
.radio-opt input { width: 18px; height: 18px; accent-color: var(--blue); cursor: pointer; }
.agree-row { display: flex; gap: 10px; align-items: flex-start; margin: 4px 16px 0; font-size: 12px; color: var(--grey-2); }
.agree-row input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--blue); flex: 0 0 auto; cursor: pointer; }
.agree-row a { color: var(--blue); font-weight: 700; }
.agree-row a:hover { text-decoration: underline; }

/* ---------- Detail pemesanan (tabel ringkasan) ---------- */
.order-summary { margin: 16px 16px 0; }
.order-summary .os-title { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.os-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.os-table th { text-align: right; color: var(--grey-2); font-weight: 600; padding: 4px 0 8px; }
.os-table th:first-child { text-align: left; }
.os-table td { padding: 6px 0; vertical-align: top; color: var(--grey-1); }
.os-table td:first-child { text-align: left; }
.os-table td:not(:first-child) { text-align: right; white-space: nowrap; }
.os-table .os-item-name { font-weight: 700; color: var(--navy); font-size: 12.5px; }
.os-table .os-event { color: var(--grey-2); }
.os-table .os-date { color: var(--grey-3); font-size: 11px; }
.os-total-row { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; font-size: 14px; font-weight: 800; color: var(--navy); }

/* ---------- QRIS ---------- */
.pay-amount { text-align: center; padding: 18px 16px 0; }
.pay-amount .pa-label { font-size: 12px; color: var(--grey-2); }
.pay-amount .pa-value { font-size: 26px; font-weight: 800; color: var(--navy); margin-top: 2px; }
.pay-amount .pa-order { font-size: 11px; color: var(--grey-3); margin-top: 4px; letter-spacing: 0.4px; }
.qris-card { width: 300px; max-width: calc(100% - 32px); margin: 16px auto 0; background: var(--card); border-radius: 16px; box-shadow: var(--shadow-card); padding: 16px; text-align: center; }
.qris-card img { width: 100%; border-radius: 8px; }
.qris-card .qris-brand { font-size: 12px; font-weight: 800; letter-spacing: 2px; color: var(--navy); margin-bottom: 10px; }
.qris-card .qris-brand-image { display: block; width: 130px; max-width: 55%; height: auto; margin: 0 auto 12px; object-fit: contain; }
.pay-steps { margin: 16px 16px 0; }
.pay-steps .ps-title { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.ps-item { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.ps-num {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ps-item p { font-size: 13px; color: var(--grey-1); }
.pay-timer { text-align: center; margin-top: 4px; }
.pay-timer .timer-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--amber-soft);
  color: #b26a1b;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
}
.pay-timer .timer-chip.expired { background: var(--red-soft); color: var(--red); }
.pay-actions { padding: 16px 16px 0; display: flex; flex-direction: column; gap: 10px; }

/* ---------- Loading ---------- */
.loading-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 24px; text-align: center; }
.spinner {
  width: 58px;
  height: 58px;
  border: 5px solid #e5e9f2;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-wrap h2 { font-size: 16px; font-weight: 700; color: var(--navy); margin-top: 22px; }
.loading-wrap .sub { font-size: 12px; color: var(--grey-3); margin-top: 6px; }
.load-steps { margin-top: 28px; width: 100%; max-width: 300px; text-align: left; }
.ls-item { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--grey-3); margin-bottom: 14px; opacity: 0.45; transition: opacity 0.4s, color 0.4s; }
.ls-item .ls-dot { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 50%; border: 2px solid #c9cedd; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: transparent; }
.ls-item.active { opacity: 1; color: var(--navy); }
.ls-item.active .ls-dot { border-color: var(--blue); color: var(--blue); }
.ls-item.done { opacity: 1; color: var(--green); }
.ls-item.done .ls-dot { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.loading-fallback { margin-top: 26px; font-size: 12px; color: var(--grey-3); }
.loading-fallback a { color: var(--blue); font-weight: 700; }

/* ---------- Pending ---------- */
.status-wrap { padding: 28px 16px 0; text-align: center; }
.status-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--amber-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.status-icon svg { width: 36px; height: 36px; stroke: var(--amber); }
.status-chip {
  display: inline-block;
  margin-top: 14px;
  background: var(--amber-soft);
  color: #b26a1b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 999px;
}
.status-wrap h2 { font-size: 18px; font-weight: 800; color: var(--navy); margin-top: 10px; }
.status-wrap .status-text { font-size: 13px; color: var(--grey-2); margin-top: 8px; }
.receipt { margin: 20px 16px 0; }
.receipt .rc-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.receipt .rc-row:last-child { border-bottom: 0; }
.receipt .rc-label { color: var(--grey-3); flex: 0 0 auto; }
.receipt .rc-val { color: var(--navy); font-weight: 700; text-align: right; word-break: break-word; }
.receipt .rc-val.big { font-size: 15px; font-weight: 800; }
.pending-actions { padding: 20px 16px 0; display: flex; flex-direction: column; gap: 10px; }
.spin-mini { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
.btn.loading .spin-mini { display: inline-block; }

/* ---------- Floating buttons ---------- */
.float-group { position: fixed; right: max(14px, calc(50% - 260px + 14px)); bottom: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 60; }
.float-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--grad-float);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  box-shadow: var(--shadow-float);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.float-btn:hover { transform: translateY(-2px); }
.float-btn svg { width: 18px; height: 18px; stroke: #fff; }

/* ---------- Modal search ---------- */
.modal-search {
  position: fixed;
  inset: 0;
  background: rgba(11, 22, 48, 0.92);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 90px 20px 20px;
}
.modal-search.show { display: flex; }
.modal-search .close-modal {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-search .close-modal svg { width: 22px; height: 22px; stroke: #fff; }
.modal-search .search-box { width: 100%; max-width: 460px; }
.modal-search .search-label { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.modal-search .search-row { display: flex; gap: 10px; }
.modal-search .search-input {
  flex: 1;
  height: 48px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0 16px;
  font-size: 14px;
  outline: none;
}
.modal-search .search-input::placeholder { color: rgba(255, 255, 255, 0.5); }
.modal-search .search-submit {
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.modal-search .search-submit:hover { background: var(--blue-dark); }

/* ---------- Footer ---------- */
.main-footer { background: #eef0f6; margin-top: 28px; padding: 20px 16px 26px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
.footer-links a { font-size: 12px; font-weight: 600; color: var(--grey-2); }
.footer-links a:hover { color: var(--blue); }
.footer-copy { font-size: 11px; color: var(--grey-3); line-height: 1.8; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%) translateY(10px);
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 120;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Desktop ---------- */
@media (min-width: 768px) {
  .event-title h1 { font-size: 26px; }
}
