/* =====================================================================
   หน้าลูกค้า (Mobile first)
   โทนสี: น้ำเงินป้ายจราจร + เหลืองสีตีเส้นถนน บนพื้นเทาอ่อนแบบลานจอด
   ===================================================================== */
:root {
  --ink: #15233B;
  --ink-2: #44526B;
  --ink-3: #6B778C;
  --paper: #ECEFF3;
  --card: #FFFFFF;
  --line: #D5DBE4;
  --line-soft: #E7EBF0;
  --sign: #0D5BB5;
  --sign-strong: #0A478E;
  --sign-wash: #E8F0FA;
  --paint: #F3C318;
  --paint-ink: #3A2C00;
  --ok: #157A55;
  --ok-wash: #E5F4EC;
  --warn-wash: #FFF3DB;
  --bad: #B3261E;
  --bad-wash: #FCECEA;
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius: 12px;
  --font: "IBM Plex Sans Thai", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-plate: "Sarabun", "IBM Plex Sans Thai", Tahoma, sans-serif;
  --focus: 0 0 0 3px rgba(13, 91, 181, .35);
  --shadow-ticket: 0 1px 0 rgba(21, 35, 59, .04), 0 18px 36px -26px rgba(21, 35, 59, .55);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--sign); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }

.icon { width: 20px; height: 20px; flex: none; }
.icon--flip { transform: scaleX(-1); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip-link:focus { left: 8px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Header / Footer ---------- */
.site-head {
  color: #fff;
  /* เส้นประสีเหลืองแบบเส้นแบ่งช่องจราจร */
  background:
    linear-gradient(90deg, var(--paint) 0 26px, transparent 26px 44px) left bottom / 44px 3px repeat-x,
    var(--ink);
}
.site-head__inner {
  max-width: 640px; margin: 0 auto; padding: 12px 16px 15px;
  display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: #fff; text-decoration: none; font-weight: 600; }
.brand__mark {
  flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--sign); font-weight: 700; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85);
}
.brand__logo { flex: none; width: 34px; height: 34px; object-fit: contain; border-radius: 8px; background: #fff; }
.brand__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-head__module { margin-left: auto; font-size: 13px; color: rgba(255, 255, 255, .78); white-space: nowrap; }

.page { max-width: 640px; margin: 0 auto; padding: 20px 16px 36px; }
.site-foot { max-width: 640px; margin: 0 auto; padding: 4px 16px 32px; text-align: center; font-size: 13px; color: var(--ink-3); }
.site-foot p { margin: 2px 0; }
.site-foot__org { font-weight: 600; color: var(--ink-2); }
body.has-action-bar .site-foot { padding-bottom: 120px; }

/* ---------- Typography ---------- */
.page-title { font-size: 26px; line-height: 1.3; margin: 2px 0 6px; font-weight: 700; letter-spacing: -.005em; }
.page-lead { color: var(--ink-2); margin: 0 0 18px; }
.page-head { margin-bottom: 4px; }
.back-link { display: inline-flex; align-items: center; gap: 2px; color: var(--ink-2); text-decoration: none; font-size: 14px; margin-bottom: 4px; }
.back-link:hover { color: var(--sign); }
.back-link .icon { width: 18px; height: 18px; }

/* ---------- Notices ---------- */
.notice { border-radius: var(--radius); padding: 12px 14px; margin: 0 0 16px; font-size: 15px; border: 1px solid; }
.notice--danger { background: var(--bad-wash); border-color: #F1C5C1; color: #7A1A14; }
.notice--warning { background: var(--warn-wash); border-color: #EFD39C; color: #5C3A00; }
.notice--success { background: var(--ok-wash); border-color: #B8DFCB; color: #0E5239; }
.notice--info { background: var(--sign-wash); border-color: #C5D7F0; color: #10345F; }

/* ---------- Panels & Forms ---------- */
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px 16px 6px; margin: 0 0 14px; min-width: 0;
}
.panel__title { font-size: 17px; font-weight: 600; margin: 0 0 12px; padding: 0; line-height: 1.4; }
legend.panel__title { float: left; width: 100%; }
legend.panel__title + * { clear: both; }
.panel__lead { color: var(--ink-2); margin: -6px 0 14px; font-size: 15px; }

.field { margin: 0 0 14px; min-width: 0; }
.field__label { display: block; font-size: 14px; font-weight: 500; color: var(--ink-2); margin: 0 0 6px; }
.field__hint { color: var(--ink-3); font-size: 14px; margin: 6px 0 12px; }
.field__error { color: var(--bad); font-size: 14px; margin: 6px 0 0; }
.optional { font-weight: 400; color: var(--ink-3); font-size: .9em; }
.field-grid { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
.field-grid--tight { grid-template-columns: 1.4fr 1fr; gap: 10px; }
@media (min-width: 480px) { .field-grid { grid-template-columns: 1fr 1fr; } .field-grid--tight { grid-template-columns: 1.4fr 1fr; } }

.input {
  display: block; width: 100%; min-height: 48px; padding: 10px 12px;
  background: #fff; border: 1px solid #C3CBD7; border-radius: 10px;
  font-size: 16px; line-height: 1.4;
}
.input:focus { outline: none; border-color: var(--sign); box-shadow: var(--focus); }
.input[aria-invalid="true"] { border-color: var(--bad); }
textarea.input { resize: vertical; min-height: 72px; }
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 38px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2344526B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.input--money { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }

.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px;
  padding: 4px; margin: 0 0 14px; background: var(--paper); border-radius: 12px;
}
.segmented__item { position: relative; display: flex; }
.segmented__item input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segmented__item span {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 50px; padding: 8px 6px; border-radius: 9px; text-align: center; line-height: 1.3;
  font-weight: 500; color: var(--ink-2); cursor: pointer;
}
.segmented__item small { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.segmented__item input:checked + span {
  background: #fff; color: var(--sign-strong);
  box-shadow: 0 1px 2px rgba(21, 35, 59, .12), inset 0 0 0 1.5px var(--sign);
}
.segmented__item input:focus-visible + span { box-shadow: var(--focus); }
.segmented--compact span { min-height: 44px; font-size: 15px; }

.form-actions { margin: 18px 0 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 10px 20px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 16px; line-height: 1.3; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn--primary { background: var(--sign); color: #fff; }
.btn--primary:hover { background: var(--sign-strong); }
.btn--secondary { background: #E2E6EC; color: var(--ink); border-color: #D0D6DF; }
.btn--secondary:hover { background: #D6DBE3; }
.btn--danger { background: var(--bad); color: #fff; }
.btn--danger:hover { background: #95201A; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-busy { opacity: .7; cursor: progress; }

.btn-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; border: 0; background: none;
  color: var(--sign); font-weight: 500; font-size: 15px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.btn-link .icon { width: 18px; height: 18px; }

.btn-copy {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px;
  border: 1px solid #BCD0EC; border-radius: 999px; background: var(--sign-wash);
  color: var(--sign-strong); font-size: 14px; font-weight: 600; line-height: 1.3; white-space: nowrap; cursor: pointer;
}
.btn-copy:hover { background: #DCE8F8; }
.btn-copy:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-copy .icon { width: 16px; height: 16px; }
.btn-copy.is-copied { background: var(--ok-wash); border-color: #B5DCC8; color: var(--ok); }
.btn-copy--ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-copy--ghost:hover { background: var(--paper); }
.btn-copy--mini { padding: 5px 8px; }

/* ---------- Landing ---------- */
.intro__title { font-size: 28px; line-height: 1.25; margin: 6px 0 8px; }
.intro__lead { color: var(--ink-2); margin: 0; }
.services { display: grid; gap: 12px; margin: 22px 0 26px; }
.service {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  color: var(--ink); text-decoration: none; transition: border-color .15s ease;
}
.service:hover { border-color: var(--sign); }
.service:focus-visible { outline: none; box-shadow: var(--focus); }
.service__sign { flex: none; width: 58px; height: 58px; border-radius: 12px; display: grid; place-items: center; }
.service__sign--parking {
  background: var(--sign); color: #fff; font-size: 36px; font-weight: 700; line-height: 1;
  box-shadow: inset 0 0 0 3px var(--sign), inset 0 0 0 5px #fff;
}
.service__sign--rental { background: var(--ink); color: var(--paint); }
.service__sign .icon { width: 30px; height: 30px; }
.service__body { min-width: 0; }
.service__title { display: block; font-size: 18px; font-weight: 600; line-height: 1.35; }
.service__desc { display: block; color: var(--ink-2); font-size: 14px; }
.service__go { margin-left: auto; color: var(--ink-3); }
.lookup__form { display: grid; gap: 0 12px; }
.lookup__form .btn { margin-bottom: 14px; }
@media (min-width: 560px) { .lookup__form { grid-template-columns: 1fr 1fr auto; align-items: end; } }

/* ---------- Licence plate (ป้ายทะเบียนรถจำลอง) ---------- */
.plate {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 156px; padding: 8px 16px 10px;
  background: #fff; color: #161616; border: 2px solid #1C1C1C; border-radius: 8px;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px #1C1C1C;
  font-family: var(--font-plate); line-height: 1; vertical-align: middle;
}
.plate__no { font-size: 30px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.plate__prov { font-size: 13px; font-weight: 600; margin-top: 5px; white-space: nowrap; }
.plate--lg { min-width: 230px; padding: 13px 24px 15px; border-radius: 10px; }
.plate--lg .plate__no { font-size: 44px; }
.plate--lg .plate__prov { font-size: 17px; margin-top: 7px; }
.plate-preview {
  display: flex; justify-content: center; padding: 20px 12px; margin: 0 0 16px;
  background: linear-gradient(180deg, #2A3547, #1B2433); border-radius: 12px;
}
.plate-preview.is-placeholder .plate { opacity: .4; }

.unit-tag {
  display: inline-block; padding: 6px 16px; border-radius: 8px;
  background: var(--ink); color: #fff; border: 2px solid var(--paint);
  font-family: var(--font-plate); font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: .02em;
}

/* ---------- Calculator ---------- */
.calc { background: var(--paper); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 12px; }
.calc__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); padding: 2px 0; }
.calc__row span:last-child { text-align: right; color: var(--ink); }
.calc__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.calc__total strong { font-size: 26px; }

/* ---------- Payment screen ---------- */
.pay-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 20px; }
.pay-head .page-title { margin: 0; }
.ref-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 5px 4px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--ink-2);
}
.ref-chip strong { color: var(--ink); font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; }

.steps { list-style: none; margin: 0; padding: 0; }
.step { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 0 14px; padding-bottom: 28px; }
.step::before { content: ""; position: absolute; left: 17px; top: 42px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.step:last-child::before { display: none; }
.step.is-done::before { background: var(--ok); }
.step__marker {
  position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 16px;
  background: #fff; color: var(--ink-3); border: 2px solid var(--line);
}
.step__check { display: none; width: 20px; height: 20px; stroke-width: 2.6; }
.step.is-active .step__marker { background: var(--sign); border-color: var(--sign); color: #fff; box-shadow: 0 0 0 5px var(--sign-wash); }
.step.is-done .step__marker { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.is-done .step__num { display: none; }
.step.is-done .step__check { display: block; }
.step.is-error .step__marker { background: var(--bad); border-color: var(--bad); color: #fff; }
.step__body { min-width: 0; }
.step__title { font-size: 18px; line-height: 1.5; font-weight: 600; margin: 3px 0 14px; }
.step.is-upcoming .step__title { color: var(--ink-3); }

.timer {
  display: inline-block; min-width: 4.4ch; margin: 0 2px; padding: 0 9px; border-radius: 8px;
  background: var(--paint); color: var(--paint-ink); font-weight: 700; text-align: center;
  font-variant-numeric: tabular-nums;
}
.timer.is-low { background: #FFDCCF; color: #8A2100; }
.timer.is-expired { background: var(--bad); color: #fff; }

.acct-switch { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 12px; padding: 2px; }
.acct-switch__item {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; text-align: left; cursor: pointer;
}
.acct-switch__item[aria-selected="true"] { border-color: var(--sign); background: var(--sign-wash); box-shadow: inset 0 0 0 1px var(--sign); }
.acct-switch__item:focus-visible { outline: none; box-shadow: var(--focus); }
.acct-switch__text { display: flex; flex-direction: column; line-height: 1.3; }
.acct-switch__name { font-weight: 600; font-size: 14px; }
.acct-switch__tail { font-size: 12px; color: var(--ink-3); }

/* Ticket: การ์ดสีขาวกรอบมนแบบตั๋ว มีรอยปรุคั่นส่วนยอดชำระ */
.ticket {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-ticket);
}
.ticket__panel { padding: 18px 18px 4px; }
.ticket__bank { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ticket__bank--empty { padding: 18px; margin: 0; color: var(--ink-2); }
.ticket__bank--empty p { margin: 0; }
.ticket__bank-name { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.35; }
.ticket__bank-sub { margin: 0; font-size: 13px; color: var(--ink-3); }
.ticket__rows { margin: 0; }
.ticket__row { padding: 10px 0; border-top: 1px solid var(--line-soft); }
.ticket__row dt { font-size: 13px; color: var(--ink-3); margin: 0 0 2px; }
.ticket__row dd { margin: 0; font-weight: 600; }
.ticket__acct-name { font-size: 17px; }
.ticket__row--number dd { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.acct-no { font-size: 25px; font-weight: 700; letter-spacing: .04em; }
.ticket__tear {
  position: relative; height: 26px; margin: 6px 0 4px; padding: 0 24px;
  background-image: linear-gradient(90deg, var(--line) 55%, transparent 0);
  background-size: 12px 2px; background-repeat: repeat-x; background-position: center;
  background-origin: content-box; background-clip: content-box;
}
.ticket__tear::before, .ticket__tear::after {
  content: ""; position: absolute; top: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--line);
}
.ticket__tear::before { left: -14px; clip-path: inset(0 0 0 13px); }
.ticket__tear::after { right: -14px; clip-path: inset(0 13px 0 0); }
.ticket__stub { display: grid; gap: 18px; padding: 6px 18px 16px; }
.stub-label { display: block; font-size: 13px; color: var(--ink-3); margin: 0 0 6px; }
.stub-detail { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.amount {
  display: inline-block; padding: 0 4px; font-size: 46px; font-weight: 700; line-height: 1.05;
  letter-spacing: -.01em;
  background: linear-gradient(transparent 58%, rgba(243, 195, 24, .6) 58%, rgba(243, 195, 24, .6) 90%, transparent 90%);
}
.amount__cur { font-size: .52em; font-weight: 600; margin-right: 3px; vertical-align: .34em; }
.amount__dec { font-size: .52em; font-weight: 600; }
.stub-amount .btn-copy { margin-top: 10px; }
.ticket__payer { margin: 0; padding: 10px 18px 12px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--ink-3); }
@media (min-width: 540px) {
  .ticket__stub { grid-template-columns: 1fr auto; align-items: end; }
  .stub-amount { text-align: right; }
}
details.ticket-wrap > summary { cursor: pointer; color: var(--sign); font-weight: 500; margin: 0 0 10px; }
details.ticket-wrap:not([open]) > summary { margin: 0; }

.qr-card { margin-top: 14px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.qr-block { display: grid; gap: 14px; }
.qr-block__code { justify-self: center; padding: 10px; background: #fff; border: 1px solid var(--line-soft); border-radius: 12px; }
.qr-canvas { display: block; width: 200px; height: 200px; image-rendering: pixelated; }
.qr-image { display: block; width: 220px; height: auto; max-height: 300px; object-fit: contain; }
.qr-block__title { font-size: 16px; margin: 0 0 4px; }
.qr-block__text p { margin: 0 0 6px; font-size: 14px; color: var(--ink-2); }
.qr-block__text .qr-block__pp { color: var(--ink); font-weight: 600; }
@media (min-width: 540px) { .qr-block { grid-template-columns: auto 1fr; align-items: center; } }
/* ช่องทาง QR อย่างเดียว: QR อยู่ในการ์ดแทนเลขบัญชี */
.qr-block--inline { padding: 14px 0 8px; border-top: 1px solid var(--line-soft); text-align: center; }
.qr-block--inline .qr-block__code { padding: 4px; border: 0; }
.qr-block--inline .qr-image { width: 264px; max-height: none; }
@media (min-width: 540px) { .qr-block--inline { grid-template-columns: 1fr; } }

.bank-logo { flex: none; display: inline-grid; place-items: center; border-radius: 12px; object-fit: contain; background: #fff; }
img.bank-logo { border: 1px solid var(--line-soft); padding: 3px; }
.bank-logo--lg { width: 52px; height: 52px; }
.bank-logo--md { width: 40px; height: 40px; border-radius: 10px; }
.bank-logo--xs { width: 28px; height: 28px; border-radius: 8px; padding: 2px; }
.bank-logo--badge { background: var(--bank-bg); color: var(--bank-fg); font-weight: 700; font-size: 13px; letter-spacing: .01em; }
.bank-logo--xs.bank-logo--badge { font-size: 9px; padding: 0; }

/* Upload slip */
.dropzone {
  position: relative; border: 2px dashed #B6C1D1; border-radius: var(--radius-lg); background: #F8FAFC;
  transition: border-color .15s ease, background-color .15s ease;
}
.dropzone.is-dragover { border-color: var(--sign); background: var(--sign-wash); }
.dropzone.has-error { border-color: var(--bad); }
.dropzone.has-file { border-style: solid; border-color: var(--line); background: #fff; }
.dropzone__input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.dropzone__label { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; text-align: center; cursor: pointer; }
.dropzone__input:focus-visible + .dropzone__label { box-shadow: var(--focus); border-radius: 14px; }
.dropzone__icon { width: 34px; height: 34px; color: var(--sign); margin-bottom: 4px; }
.dropzone__title { font-size: 17px; font-weight: 600; }
.dropzone__hint { font-size: 14px; color: var(--ink-3); max-width: 32ch; }
.dropzone.has-file .dropzone__label { display: none; }
.dropzone__preview { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 12px; align-items: start; }
.dropzone__img {
  display: block; width: 120px; height: 180px; object-fit: cover; object-position: top;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper); cursor: zoom-in;
}
.dropzone__preview.is-expanded { grid-template-columns: 1fr; }
.dropzone__preview.is-expanded .dropzone__img { width: 100%; height: auto; max-height: 80vh; object-fit: contain; cursor: zoom-out; }
.dropzone__name { margin: 0; font-size: 14px; font-weight: 600; word-break: break-all; }
.dropzone__size { margin: 2px 0 8px; font-size: 13px; color: var(--ink-3); }
.qr-read { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 6px; font-size: 13px; color: var(--ink-3); }
.qr-read .icon { width: 16px; height: 16px; margin-top: 2px; }
.qr-read.is-ok { color: var(--ok); }
.qr-read.is-bad { color: var(--bad); }
.slip-form .field-grid { margin-top: 16px; }
.upload-progress { margin-top: 4px; }
.upload-progress__bar { height: 6px; background: var(--line-soft); border-radius: 99px; overflow: hidden; }
.upload-progress__bar span { display: block; width: 0; height: 100%; background: var(--sign); transition: width .2s ease; }
.upload-progress__text { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); }

.slip-done {
  display: flex; align-items: center; gap: 14px; padding: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.slip-done__thumb img { display: block; width: 64px; height: 96px; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 8px; }
.slip-done__title { margin: 0; font-weight: 600; }
.slip-done__meta { margin: 0; font-size: 13px; color: var(--ink-3); }

/* Status */
.status { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); }
.status__head { display: flex; align-items: center; gap: 12px; }
.status__headline { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.45; }
.status--pending { border-color: #C6D6EE; background: linear-gradient(180deg, var(--sign-wash), #fff 75%); }
.status--ok { border-color: #B5DCC8; background: var(--ok-wash); }
.status--error { border-color: #EFC1BD; background: var(--bad-wash); }
.status__icon { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.status__icon .icon { width: 20px; height: 20px; stroke-width: 2.4; }
.status--ok .status__icon { background: var(--ok); }
.status--error .status__icon { background: var(--bad); }
.status__meta { margin: 12px 0 0; font-size: 13px; color: var(--ink-3); }
.status__reason { margin: 10px 0 0; font-weight: 600; color: #7A1A14; }
.spinner {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid #C6D6EE; border-top-color: var(--sign); animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.checks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }
.check .icon { width: 18px; height: 18px; margin-top: 2px; }
.check--ok .icon { color: var(--ok); stroke-width: 2.4; }
.check--warn .icon { color: #B86400; }
.check--info .icon { color: var(--ink-3); }
.check--wait .icon { color: var(--sign); }
.status-idle { margin: 0; padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--radius-lg); font-size: 14px; color: var(--ink-3); }

/* ช่วงเวลาเดียวที่มีการเคลื่อนไหว: เมื่อแจ้งชำระสำเร็จ ขั้นตอนที่ 3 ปรากฏพร้อมผลตรวจทีละข้อ */
.step.is-arrived .status { animation: arrive .45s ease-out both; }
.step.is-arrived .check { animation: arrive .35s ease-out both; }
.step.is-arrived .check:nth-child(1) { animation-delay: .25s; }
.step.is-arrived .check:nth-child(2) { animation-delay: .4s; }
.step.is-arrived .check:nth-child(3) { animation-delay: .55s; }
.step.is-arrived .check:nth-child(4) { animation-delay: .7s; }
.step.is-arrived .check:nth-child(5) { animation-delay: .85s; }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Bottom action bar */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px -18px rgba(21, 35, 59, .45);
}
.action-bar__inner { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.action-bar .btn { width: 100%; padding: 10px 10px; font-size: 15.5px; }
.action-bar .btn .icon { width: 19px; height: 19px; }

.cancelled__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 14px; }

/* Dialog */
.dialog {
  width: min(440px, calc(100vw - 32px)); padding: 22px 20px 18px; border: 0; border-radius: var(--radius-xl);
  color: var(--ink); box-shadow: 0 24px 60px -20px rgba(21, 35, 59, .55);
}
.dialog::backdrop { background: rgba(21, 35, 59, .5); }
.dialog__title { margin: 0 0 8px; font-size: 19px; }
.dialog p { margin: 0 0 10px; }
.dialog__warn { display: flex; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--warn-wash); color: #5C3A00; font-size: 14px; }
.dialog__warn .icon { width: 18px; height: 18px; margin-top: 2px; }
.dialog__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 40;
  transform: translateX(-50%); max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px;
  box-shadow: 0 10px 30px -12px rgba(21, 35, 59, .6);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation-duration: 2.4s; }
  .step.is-arrived .status, .step.is-arrived .check { animation: none; }
}
