/* ============================================================
   Perodua Orbital Passport — Exact PPT Theme
   ============================================================ */
:root {
  /* Shell / page background — silver gradient matching PPT */
  --shell-bg:   linear-gradient(160deg, #dce2ec 0%, #edf0f5 45%, #d8dfe9 100%);

  /* Header band (title area) — darker silver gradient */
  --header-bg:  linear-gradient(180deg, #cdd4e0 0%, #dde3ed 100%);

  /* Content area */
  --content-bg: #f0f2f7;

  /* White card surfaces */
  --white:      #ffffff;

  /* Station buttons — blue-grey from PPT */
  --station:    #7b8fa8;
  --station-dk: #5f7590;
  --station-on: #4ab5e0;   /* completed / stamped */

  /* Primary action blue — Q&A options, badges, DONE btn */
  --blue:       #4ab5e0;
  --blue-dk:    #2e96c2;
  --blue-lt:    #d6eef9;

  /* Typography */
  --text:       #1c2b3a;
  --muted:      #8a9aaa;

  /* Borders / inputs */
  --border:     #c8d2de;
  --input-line: #b8c4d0;

  /* Semantic */
  --green:      #27ae60;
  --red:        #e74c3c;
  --orange:     #f39c12;

  /* Shape */
  --r:          12px;   /* button radius */
  --rlg:        18px;   /* card radius */
  --shadow:     0 3px 14px rgba(28,43,58,.13);
  --shadow-sm:  0 1px 6px rgba(28,43,58,.09);

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: #b8c4d4;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
a { text-decoration: none; color: var(--blue); }

/* ── Phone shell ── */
.shell {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: var(--shell-bg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,.25);
}

/* ── Top bar ── */
.topbar {
  background: var(--white);
  padding: 13px 18px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #dde4ee;
  position: sticky; top: 0; z-index: 20;
}
.topbar-brand {
  display: flex; align-items: center; gap: 9px;
}
/* Perodua P logo circle — matches PPT */
.p-logo {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--station);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 900; color: var(--station);
  flex-shrink: 0;
}
.topbar-title {
  font-size: 14px; font-weight: 800; color: var(--text); line-height: 1.2;
}
.topbar-back {
  font-size: 12px; color: var(--muted); font-weight: 600;
}

/* ── Page title band — silver gradient like PPT ── */
.title-band {
  background: var(--header-bg);
  padding: 18px 20px 20px;
  text-align: center;
  border-bottom: 1px solid #c8d2de;
}
.title-band h2 {
  font-size: 20px; font-weight: 800; color: var(--text); line-height: 1.2;
}
.title-band p {
  font-size: 13px; color: var(--muted); margin-top: 4px;
}

/* ── Content wrapper ── */
.content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

/* ── Registration form — line inputs matching PPT ── */
.form-card {
  background: var(--white);
  border-radius: var(--rlg);
  padding: 22px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 13px; color: var(--muted);
  font-weight: 400; /* exactly like PPT label */
}
/* Line-only input — matches PPT exactly */
.line-input {
  width: 100%; background: transparent;
  border: none; border-bottom: 1.5px solid var(--input-line);
  padding: 9px 2px; font-size: 15px; color: var(--text);
  outline: none; font-family: var(--font);
  transition: border-color .2s;
}
.line-input:focus { border-bottom-color: var(--blue); }
.line-input::placeholder { color: #b0bec8; }
select.line-input { appearance: none; cursor: pointer; }

/* PDPA row */
.pdpa-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: #f4f6f9;
  border-radius: 8px;
}
.pdpa-row input[type=checkbox] {
  width: 16px; height: 16px; flex-shrink: 0;
  margin-top: 2px; accent-color: var(--station);
}
.pdpa-row label { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ── BUTTONS ── */

/* White/grey pill button — NEXT, SHOW MAP, START YOUR JOURNEY */
.btn-grey {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px 20px;
  background: #e4e9f0; border: 1px solid #c8d0da;
  border-radius: 99px;
  font-size: 13px; font-weight: 700; color: var(--text);
  letter-spacing: .06em;
  cursor: pointer; transition: all .2s;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(28,43,58,.1);
}
.btn-grey:hover { background: #d8e0ea; }
.btn-grey:disabled { opacity: .5; cursor: not-allowed; }

/* Blue filled button — DONE, COLLECT GIFT, NEXT (gift page) */
.btn-blue {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px 20px;
  background: var(--blue); border: none;
  border-radius: 99px;
  font-size: 13px; font-weight: 700; color: var(--white);
  letter-spacing: .06em;
  cursor: pointer; transition: background .2s;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(74,181,224,.4);
}
.btn-blue:hover { background: var(--blue-dk); }
.btn-blue:disabled { background: #b0c4d4; cursor: not-allowed; }

/* Small variants */
.btn-sm { padding: 9px 18px; width: auto; font-size: 12px; }

/* ── Station grid ── */
.station-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  padding: 14px 18px;
}
.stn-btn {
  aspect-ratio: 1;
  border-radius: var(--r);
  background: var(--station);
  color: var(--white);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 8px 5px;
  font-size: 11px; font-weight: 700;
  line-height: 1.25;
  cursor: default;
  box-shadow: 0 2px 6px rgba(28,43,58,.18);
  transition: background .3s;
}
/* Completed station — bright blue */
.stn-btn.done { background: var(--station-on); box-shadow: 0 3px 10px rgba(74,181,224,.45); }
/* Not yet unlocked — slightly faded */
.stn-btn.locked { opacity: .6; }
.stn-btn .tick { font-size: 9px; opacity: .9; margin-top: 2px; }

/* Show Map / bottom action button */
.map-btn-wrap { padding: 0 18px 18px; }
.show-map-btn {
  width: 100%; padding: 13px;
  background: #e4e9f0; border: 1px solid #c8d0da;
  border-radius: 99px;
  font-size: 13px; font-weight: 700; color: var(--text);
  letter-spacing: .06em;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 1px 4px rgba(28,43,58,.1);
  transition: all .2s;
}
.show-map-btn:hover { background: #d8e0ea; }

/* Progress bar */
.progress-section { padding: 12px 18px 6px; }
.progress-labels {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted); margin-bottom: 6px;
}
.progress-track { height: 6px; background: #c8d2de; border-radius: 99px; overflow: hidden; }
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--blue), #6ec8ea);
  border-radius: 99px; transition: width .5s ease;
}

/* ── Q&A ── */
.station-title-band {
  background: var(--header-bg);
  padding: 18px 20px 22px;
  text-align: center;
  border-bottom: 1px solid #c8d2de;
}
.station-title-band h2 { font-size: 20px; font-weight: 800; color: var(--text); }
.station-title-band p  { font-size: 12px; color: var(--muted); margin-top: 4px; }

.question-box {
  background: var(--white);
  border-radius: var(--rlg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.q-label { font-size: 13px; color: var(--muted); font-style: italic; margin-bottom: 8px; }
.q-text  { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.55; }

/* Option buttons — sky blue matching PPT exactly */
.opts { display: flex; flex-direction: column; gap: 8px; }
.option-btn {
  width: 100%; padding: 11px 14px;
  /* DEFAULT — white with blue border (clearly unselected) */
  background: var(--white);
  border: 2px solid var(--blue);
  border-radius: 9px;
  color: var(--blue); font-size: 13px; font-weight: 600;
  text-align: left; cursor: pointer;
  display: flex; align-items: flex-start; gap: 9px;
  line-height: 1.4;
  transition: all .15s;
}
.option-btn .opt-key { font-weight: 800; flex-shrink: 0; min-width: 16px; }
.option-btn:hover:not(:disabled) { background: var(--blue-lt); }
.option-btn:disabled { cursor: default; }
/* SELECTED — solid blue fill (only 1 button at a time) */
.option-btn.selected {
  background: var(--blue) !important;
  border-color: var(--blue) !important;
  color: var(--white) !important;
  box-shadow: 0 3px 10px rgba(74,175,214,.4);
}
/* After submit — correct answer = green */
.option-btn.correct {
  background: #27ae60 !important;
  border-color: #27ae60 !important;
  color: var(--white) !important;
  box-shadow: 0 2px 8px rgba(39,174,96,.35) !important;
}
/* After submit — wrong choice = red */
.option-btn.wrong {
  background: #e74c3c !important;
  border-color: #e74c3c !important;
  color: var(--white) !important;
  box-shadow: 0 2px 8px rgba(231,76,60,.35) !important;
}

/* SUBMIT button (small white pill, matches PPT) */
#submitBtn {
  align-self: center;
  width: auto;
  padding: 9px 32px;
}

/* Result panels */
.result-panel {
  background: var(--white);
  border-radius: var(--rlg);
  padding: 22px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  box-shadow: var(--shadow-sm);
  animation: popIn .4s ease;
}
@keyframes popIn { from{opacity:0;transform:scale(.9)} to{opacity:1;transform:scale(1)} }
.result-panel .big-icon { font-size: 52px; }

/* "Congratulations" — matches PPT teal heading */
.congrats-heading {
  font-size: 22px; font-weight: 900; color: var(--blue); text-align: center;
}

.answer-box {
  background: var(--white);
  border-radius: var(--r);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.ans-label { font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--green); margin-bottom: 5px; }
.ans-text  { font-size: 14px; font-weight: 700; color: var(--text); }
.ans-expl  { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.5; }

/* "Ops" wrong answer panel */
.ops-heading { font-size: 22px; font-weight: 900; color: var(--blue); }

/* ── Choose journey ── */
.journey-option {
  background: var(--white);
  border-radius: var(--rlg);
  border: 2px solid var(--border);
  padding: 16px;
  cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s;
}
.journey-option.selected { border-color: var(--blue); background: #eaf5fc; }
.journey-option input[type=radio] { display: none; }
.gift-circle-sm {
  width: 64px; height: 64px; border-radius: 50%;
  border: 3px solid var(--station-on); background: var(--blue-lt);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; flex-shrink: 0;
}
.jo-info { flex: 1; }
.jo-complete { font-size: 10px; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; }
.jo-stations { font-size: 13px; font-weight: 900; color: var(--blue); margin: 2px 0 5px; }
.jo-badge {
  display: inline-block; padding: 3px 12px;
  border-radius: 99px; font-size: 11px; font-weight: 800;
  letter-spacing: .05em;
}
.jo-badge.half { background: var(--blue); color: var(--white); }
.jo-badge.full { background: var(--station); color: var(--white); }
.journey-option.selected .jo-badge.full { background: var(--blue); }

.chevron-div { text-align: center; font-size: 20px; color: var(--blue); opacity: .7; margin: -4px 0; }

/* ── Gift screens ── */
.gift-title-band { background: var(--header-bg); padding: 18px 20px; text-align: center;
  border-bottom: 1px solid #c8d2de; }
.gift-title-band h2 { font-size: 20px; font-weight: 800; color: var(--text); }

.gift-img-circle {
  width: 150px; height: 150px;
  border-radius: 50%;
  border: 4px solid var(--blue);
  background: var(--blue-lt);
  display: flex; align-items: center; justify-content: center;
  font-size: 70px;
  margin: 0 auto;
  box-shadow: 0 0 0 8px rgba(74,181,224,.12);
}
.gift-name-label { font-size: 13px; color: var(--muted); text-align: center; font-style: italic; }

/* QR display */
.qr-display {
  background: var(--white);
  border-radius: var(--rlg);
  padding: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  box-shadow: var(--shadow);
  text-align: center;
}
.qr-display h3 { font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.4; }
.qr-img-wrap { background: #fff; padding: 12px; border-radius: 10px;
  border: 1px solid var(--border); }
.qr-notice {
  background: var(--blue-lt); border: 1px solid rgba(74,181,224,.4);
  border-radius: 9px; padding: 10px 14px;
  font-size: 12px; color: #1e6e9a; line-height: 1.6; width: 100%;
}

/* ── Alerts ── */
.alert { padding: 11px 15px; border-radius: 9px; font-size: 13px;
  font-weight: 600; line-height: 1.5; }
.alert-ok   { background: #e4f6ee; border: 1px solid #a8d8b8; color: #1a6038; }
.alert-err  { background: #fde8e6; border: 1px solid #f0a8a0; color: #9e2416; }
.alert-info { background: var(--blue-lt); border: 1px solid rgba(74,181,224,.4); color: #1e6e9a; }
.alert-warn { background: #fef4e0; border: 1px solid #f5d78c; color: #7a5000; }

/* ── Map overlay ── */
.map-overlay { display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 100;
  align-items: flex-end; justify-content: center; }
.map-overlay.open { display: flex; }
.map-sheet {
  background: var(--white); border-radius: 20px 20px 0 0;
  padding: 20px 18px 36px; width: 100%; max-width: 430px; position: relative;
}
.map-sheet h3 { font-size: 17px; font-weight: 800; color: var(--text); margin-bottom: 14px; }
.map-close {
  position: absolute; top: 14px; right: 14px;
  background: #e8edf3; border: none; border-radius: 50%;
  width: 28px; height: 28px; cursor: pointer; color: var(--text);
  font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.map-placeholder {
  background: #f0f3f7; border-radius: 10px; min-height: 180px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--muted); text-align: center;
  padding: 20px; margin-bottom: 14px;
}

/* ── Gift modal bottom sheet ── */
.modal-back { display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 200;
  align-items: flex-end; justify-content: center; }
.modal-back.open { display: flex; }
.modal-sheet {
  background: var(--white); border-radius: 22px 22px 0 0;
  padding: 22px 18px 36px; width: 100%; max-width: 430px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  animation: slideUp .3s ease;
}
@keyframes slideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }
.modal-sheet h3 { font-size: 17px; font-weight: 800; color: var(--text); text-align: center; }

/* ── Scanner ── */
#reader { width: 100%; border-radius: var(--rlg); overflow: hidden;
  background: #000; min-height: 280px; }
#reader video { border-radius: var(--rlg); }
#reader__dashboard_section_csr     { display:none!important; }
#reader__dashboard_section_swaplink{ display:none!important; }
#reader__status_span               { display:none!important; }
#reader__camera_selection          { display:none!important; }
#reader__dashboard { padding:10px!important; background:var(--white)!important; }
#reader__dashboard button {
  background: var(--blue)!important; color:#fff!important;
  border:none!important; padding:9px 20px!important;
  border-radius:99px!important; font-weight:700!important; cursor:pointer!important;
}
.status-strip {
  display:flex; align-items:center; gap:8px;
  padding:9px 14px; background:var(--white);
  border:1px solid var(--border); border-radius:9px; font-size:13px; color:var(--text);
}
.sdot { width:8px;height:8px;border-radius:50%;flex-shrink:0; }
.sdot.grey  {background:var(--muted);}
.sdot.yellow{background:var(--orange);}
.sdot.green {background:var(--green);box-shadow:0 0 5px rgba(39,174,96,.5);}
.sdot.red   {background:var(--red);}

/* ── Completed ── */
.trophy-card {
  background: linear-gradient(135deg, var(--blue-lt), #c8e8f6);
  border: 2px solid var(--blue); border-radius: var(--rlg);
  padding: 26px 22px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  box-shadow: var(--shadow-sm);
}
.trophy-card .trophy { font-size: 62px; }
.trophy-card h2 { font-size: 22px; font-weight: 900; color: var(--text); }
.trophy-card p  { font-size: 13px; color: var(--muted); line-height: 1.6; }
