/* ============================================================
   KodKlean Capture — Components
   ============================================================ */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 0 20px; height: 52px; border-radius: var(--r-md);
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
  transition: transform 0.13s, box-shadow 0.18s, background 0.18s, opacity 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 20px; height: 20px; }
.btn:active { transform: scale(0.975); }
.btn:disabled { opacity: 0.4; pointer-events: none; }

.btn--primary {
  background: linear-gradient(150deg, var(--brand-bright), var(--brand-deep));
  color: white; border-color: transparent; box-shadow: var(--shadow-brand);
}
.btn--ghost { background: var(--surface-2); border-color: transparent; color: var(--ink-soft); }
.btn--danger { background: var(--fail-tint); color: var(--fail); border-color: transparent; }
.btn--block { width: 100%; }
.btn--lg { height: 60px; font-size: 17px; border-radius: var(--r-lg); }
.btn--sm { height: 40px; padding: 0 14px; font-size: 14px; border-radius: var(--r-sm); }

/* The big home capture button */
.capture-cta {
  width: 100%;
  border-radius: var(--r-xl);
  padding: 26px 24px;
  background: linear-gradient(155deg, var(--brand-bright), var(--brand-deep));
  color: white; box-shadow: var(--shadow-brand);
  display: flex; align-items: center; gap: 18px; text-align: left;
  transition: transform 0.14s;
}
.capture-cta:active { transform: scale(0.985); }
.capture-cta__icon {
  width: 60px; height: 60px; border-radius: 20px; flex: none;
  display: grid; place-items: center;
  background: oklch(1 0 0 / 0.16);
}
.capture-cta__icon svg { width: 32px; height: 32px; }
.capture-cta__t1 { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.capture-cta__t2 { font-size: 13.5px; opacity: 0.9; font-weight: 500; margin-top: 2px; }
.capture-cta__chev { margin-left: auto; opacity: 0.85; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card--pad { padding: 18px; }
.card-list { display: flex; flex-direction: column; gap: 12px; }

/* Order card */
.ordercard {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center;
  padding: 14px; cursor: pointer;
  transition: transform 0.13s, box-shadow 0.18s;
}
.ordercard:active { transform: scale(0.99); box-shadow: var(--shadow-md); }
.ordercard__thumb {
  width: 56px; height: 56px; border-radius: 14px; flex: none;
  background: var(--surface-sunk); overflow: hidden;
  display: grid; place-items: center; color: var(--ink-ghost);
}
.ordercard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ordercard__title { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.ordercard__meta { font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.ordercard__amt { font-size: 16px; font-weight: 800; text-align: right; }
.ordercard__amt small { display: block; font-size: 11px; color: var(--ink-ghost); font-weight: 600; }

/* ---------- Status badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--done    { background: var(--brand-tint);   color: var(--brand-ink); }
.badge--review  { background: var(--review-tint);  color: oklch(0.50 0.12 70); }
.badge--failed  { background: var(--fail-tint);    color: var(--fail); }
.badge--dup     { background: var(--dup-tint);     color: var(--dup); }
.badge--pending { background: var(--pending-tint); color: oklch(0.46 0.02 240); }
.badge--processing { background: var(--pending-tint); color: oklch(0.46 0.02 240); }

/* ---------- Stat tiles ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-sm);
}
.stat__label { font-size: 12.5px; color: var(--ink-faint); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.stat__label svg { width: 16px; height: 16px; }
.stat__value { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin-top: 7px; line-height: 1; }
.stat__value small { font-size: 14px; color: var(--ink-faint); font-weight: 600; }
.stat__delta { font-size: 12px; font-weight: 600; margin-top: 6px; }
.stat--accent { background: linear-gradient(150deg, var(--brand-bright), var(--brand-deep)); border-color: transparent; color: white; box-shadow: var(--shadow-brand); }
.stat--accent .stat__label { color: oklch(1 0 0 / 0.85); }

/* attention tiles for review counts */
.alert-tile {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-sm); width: 100%; text-align: left;
}
.alert-tile__ic { width: 42px; height: 42px; border-radius: 13px; flex: none; display: grid; place-items: center; }
.alert-tile__ic svg { width: 21px; height: 21px; }
.alert-tile--review .alert-tile__ic { background: var(--review-tint); color: oklch(0.5 0.12 70); }
.alert-tile--failed .alert-tile__ic { background: var(--fail-tint); color: var(--fail); }
.alert-tile__n { font-size: 22px; font-weight: 800; line-height: 1; }
.alert-tile__l { font-size: 12.5px; color: var(--ink-faint); font-weight: 600; margin-top: 3px; }

/* ---------- Segmented / chips filter ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px; margin: 0 -2px 14px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 9px 15px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-soft);
  border: 1px solid transparent; transition: all 0.16s;
}
.chip.is-active { background: var(--ink); color: var(--surface); }
.chip__count { opacity: 0.6; margin-left: 4px; font-weight: 700; }
.chip.is-active .chip__count { opacity: 0.7; }

/* ---------- Search ---------- */
.searchbar {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 0 14px; height: 48px; margin-bottom: 14px;
}
.searchbar svg { width: 18px; height: 18px; color: var(--ink-ghost); flex: none; }
.searchbar input { flex: 1; border: none; background: none; font-size: 15px; }
.searchbar input::placeholder { color: var(--ink-ghost); }
.searchbar input:focus { outline: none; }

/* ---------- Capture flow ---------- */
.flow-head { margin-bottom: 18px; }
.flow-steps { display: flex; gap: 7px; margin-bottom: 14px; }
.flow-step { flex: 1; height: 5px; border-radius: var(--r-pill); background: var(--surface-sunk); transition: background 0.3s; }
.flow-step.done { background: var(--brand); }
.flow-step.active { background: var(--brand-bright); }
.flow-title { font-size: 23px; font-weight: 800; letter-spacing: -0.025em; }
.flow-desc { font-size: 14.5px; color: var(--ink-faint); margin-top: 4px; }

.shot-tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 700; margin-bottom: 14px;
}
.shot-tag svg { width: 15px; height: 15px; }
.shot-tag--proof { background: oklch(0.95 0.03 240); color: oklch(0.46 0.08 240); }
.shot-tag--bill  { background: var(--brand-tint); color: var(--brand-ink); }

/* Camera capture frame / dropzone */
.shot-frame {
  position: relative; width: 100%; aspect-ratio: 3 / 4;
  border-radius: var(--r-xl); overflow: hidden;
  background: var(--surface-sunk);
  border: 2px dashed var(--line);
  display: grid; place-items: center; text-align: center;
  transition: border-color 0.2s;
}
.shot-frame.has-img { border-style: solid; border-color: var(--brand); background: #000; }
.shot-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.shot-frame__empty { padding: 30px; color: var(--ink-faint); }
.shot-frame__empty svg { width: 52px; height: 52px; color: var(--ink-ghost); margin-bottom: 12px; }
.shot-frame__empty b { display: block; font-size: 16px; color: var(--ink-soft); font-weight: 700; }
.shot-frame__empty span { font-size: 13px; }
/* corner guides */
.shot-frame__guide { position: absolute; width: 26px; height: 26px; border: 3px solid oklch(1 0 0 / 0.7); pointer-events: none; }
.shot-frame.has-img .shot-frame__guide { display: none; }
.shot-frame__guide.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.shot-frame__guide.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.shot-frame__guide.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.shot-frame__guide.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.shot-frame.has-img .shot-frame__guide { display: none; }
.shot-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: white; display: none; place-items: center;
  box-shadow: var(--shadow-md);
}
.shot-frame.has-img .shot-badge { display: grid; }
.shot-badge svg { width: 19px; height: 19px; }

.shot-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }

/* Summary thumbs */
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 6px 0 20px; }
.summary-shot { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.summary-shot__img { aspect-ratio: 3/4; background: #000; }
.summary-shot__img img { width: 100%; height: 100%; object-fit: cover; }
.summary-shot__cap { display: flex; align-items: center; gap: 7px; padding: 10px 12px; font-size: 13px; font-weight: 700; }
.summary-shot__cap svg { width: 16px; height: 16px; color: var(--brand); flex: none; }

/* ---------- Detail rows ---------- */
.kv { display: flex; flex-direction: column; gap: 0; }
.kv__row { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.kv__row:last-child { border-bottom: 0; }
.kv__k { font-size: 13.5px; color: var(--ink-faint); font-weight: 600; flex: none; }
.kv__v { font-size: 14.5px; font-weight: 600; text-align: right; }

/* line item (menu/add-on/drink) — bilingual */
.lineitem { padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.lineitem:last-child { border-bottom: 0; }
.lineitem__top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.lineitem__name { font-size: 15px; font-weight: 700; }
.lineitem__qty { font-size: 12.5px; font-weight: 700; color: var(--brand-deep); background: var(--brand-tint); padding: 2px 8px; border-radius: var(--r-pill); margin-left: 8px; }
.lineitem__price { font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.lineitem__my { font-size: 14px; color: var(--ink-soft); margin-top: 3px; }
.lineitem__orig { font-size: 12px; color: var(--ink-ghost); margin-top: 3px; font-family: var(--font-mono); }

/* group heading inside detail */
.group-head { display: flex; align-items: center; gap: 9px; margin: 20px 0 6px; }
.group-head svg { width: 18px; height: 18px; color: var(--brand-deep); }
.group-head h3 { font-size: 14px; font-weight: 800; letter-spacing: 0.01em; }
.group-head .count { font-size: 12px; color: var(--ink-ghost); font-weight: 600; }

/* ---------- Form fields (review edit) ---------- */
.field { margin-bottom: 14px; }
.field__label { font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; display: block; }
.field__input, .field__area {
  width: 100%; padding: 13px 14px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface); font-size: 15px;
  transition: border-color 0.16s;
}
.field__input:focus, .field__area:focus { outline: none; border-color: var(--brand); }
.field__area { resize: vertical; min-height: 80px; line-height: 1.5; }
.field__hint { font-size: 12px; color: var(--ink-ghost); margin-top: 5px; }

/* ---------- Raw JSON viewer ---------- */
.raw-json {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.6;
  background: oklch(0.22 0.012 150); color: oklch(0.9 0.02 150);
  border-radius: var(--r-md); padding: 14px; overflow-x: auto;
  white-space: pre; -webkit-overflow-scrolling: touch;
}
.raw-json .k { color: oklch(0.78 0.10 200); }
.raw-json .s { color: oklch(0.82 0.12 130); }
.raw-json .n { color: oklch(0.82 0.12 70); }

/* validation error chips */
.verr { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border-radius: var(--r-md); background: var(--review-tint); margin-bottom: 8px; }
.verr svg { width: 17px; height: 17px; color: oklch(0.5 0.12 70); flex: none; margin-top: 1px; }
.verr span { font-size: 13.5px; color: oklch(0.42 0.10 70); font-weight: 600; }

/* ---------- Toast ---------- */
#toast-host {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + var(--safe-bot) + 16px); z-index: 200;
  width: calc(100% - 32px); max-width: calc(var(--maxw) - 32px);
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--r-md);
  background: var(--ink); color: var(--surface);
  box-shadow: var(--shadow-lg); font-size: 14.5px; font-weight: 600;
  animation: toast-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
}
.toast.out { animation: toast-out 0.25s forwards; }
.toast svg { width: 20px; height: 20px; flex: none; }
.toast--ok    { background: var(--brand-deep); color: white; }
.toast--error { background: var(--fail); color: white; }
.toast__bar { width: 4px; align-self: stretch; border-radius: 4px; }
@keyframes toast-in  { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(0.97); } }

/* ---------- Modal / sheet ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 100;
  background: oklch(0.2 0.01 150 / 0.42);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: none; align-items: flex-end; justify-content: center;
  animation: fade 0.2s;
}
.scrim.show { display: flex; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: var(--maxw);
  background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 8px 18px calc(var(--safe-bot) + 22px);
  max-height: 90dvh; overflow-y: auto;
  animation: sheet-up 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow-lg);
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet__grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 8px auto 14px; }
.sheet__title { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }

/* fullscreen detail uses page mechanism, but image lightbox: */
.lightbox { position: fixed; inset: 0; z-index: 150; background: oklch(0.12 0 0 / 0.94); display: none; place-items: center; padding: 20px; }
.lightbox.show { display: grid; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--r-md); }
.lightbox__close { position: absolute; top: calc(var(--safe-top) + 14px); right: 16px; width: 42px; height: 42px; border-radius: 50%; background: oklch(1 0 0 / 0.15); color: white; display: grid; place-items: center; }

/* ---------- States: loading / empty / error ---------- */
.state { padding: 54px 24px; text-align: center; color: var(--ink-faint); }
.state svg { width: 52px; height: 52px; color: var(--ink-ghost); margin-bottom: 14px; }
.state__t { font-size: 16.5px; font-weight: 700; color: var(--ink-soft); }
.state__d { font-size: 14px; margin-top: 5px; }

.skeleton { background: linear-gradient(100deg, var(--surface-sunk) 30%, var(--surface-2) 50%, var(--surface-sunk) 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--r-md); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skel-card { height: 84px; margin-bottom: 12px; }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid oklch(1 0 0 / 0.3); border-top-color: white; animation: spin 0.7s linear infinite; }
.spinner--ink { border-color: var(--line); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Offline banner ---------- */
.offline-banner {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--maxw); z-index: 300;
  background: var(--fail); color: white; text-align: center;
  padding: calc(var(--safe-top) + 9px) 16px 9px;
  font-size: 13.5px; font-weight: 700;
  transform: translate(-50%, -100%); transition: transform 0.3s;
}
.offline-banner.show { transform: translate(-50%, 0); }

/* claim-evidence block (order detail) */
.evidence { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.evidence__tile { display: flex; flex-direction: column; }
.evidence__tile--primary { grid-column: 1 / -1; }
.evidence__img {
  position: relative; border-radius: var(--r-lg); overflow: hidden; background: #000;
  border: 1px solid var(--line); cursor: zoom-in; aspect-ratio: 4 / 3;
}
.evidence__tile--primary .evidence__img { aspect-ratio: 4 / 3; }
.evidence__img img { width: 100%; height: 100%; object-fit: cover; }
.evidence__zoom {
  position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px;
  border-radius: 50%; background: oklch(0.12 0 0 / 0.55); color: #fff;
  display: grid; place-items: center; backdrop-filter: blur(4px);
}
.evidence__zoom svg { width: 17px; height: 17px; }
.evidence__empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--ink-ghost); background: var(--surface-sunk); }
.evidence__empty svg { width: 30px; height: 30px; }
.evidence__empty span { font-size: 12px; }
.evidence__cap { display: flex; align-items: center; gap: 7px; padding: 8px 2px 0; font-size: 13px; font-weight: 700; }
.evidence__cap svg { width: 16px; height: 16px; color: var(--brand); flex: none; }

/* ---------- Instant translate (kitchen view) ---------- */
.lang-toggle { display: inline-flex; background: var(--surface-2); border-radius: var(--r-pill); padding: 3px; gap: 2px; }
.lang-toggle__btn { padding: 6px 14px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 700; color: var(--ink-faint); }
.lang-toggle__btn.is-active { background: var(--surface); color: var(--brand-deep); box-shadow: var(--shadow-sm); }

.translate-loading { padding-top: 14px; }
.translate-loading__img { width: 100%; aspect-ratio: 3/4; max-height: 52vh; border-radius: var(--r-xl); overflow: hidden; background: #000; border: 1px solid var(--line); }
.translate-loading__img img { width: 100%; height: 100%; object-fit: contain; }

.krow { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.krow:last-child { border-bottom: 0; }
.krow__main { flex: 1; min-width: 0; }
/* default emphasis (Myanmar first) */
.krow__my { font-size: 19px; font-weight: 700; line-height: 1.5; }
.krow__th { font-size: 14px; color: var(--ink-faint); margin-top: 2px; font-weight: 600; }
.krow__orig { font-size: 11.5px; color: var(--ink-ghost); margin-top: 2px; }
.krow__qty { flex: none; font-size: 17px; font-weight: 800; color: var(--brand-deep); background: var(--brand-tint); padding: 6px 12px; border-radius: var(--r-md); min-width: 52px; text-align: center; }
/* Thai-first emphasis swaps the sizes */
.lang-th-first .krow__my { font-size: 14px; color: var(--ink-faint); font-weight: 600; order: 2; }
.lang-th-first .krow__th { font-size: 19px; color: var(--ink); font-weight: 700; margin-top: 0; }
.lang-th-first .krow__main { display: flex; flex-direction: column; }

/* secondary home CTA */
.home-secondary {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform 0.14s;
}
.home-secondary:active { transform: scale(0.99); }
.home-secondary__ic {
  width: 46px; height: 46px; border-radius: 14px; flex: none; display: grid; place-items: center;
  background: oklch(0.95 0.03 200); color: oklch(0.46 0.10 230);
}
.home-secondary__ic svg { width: 23px; height: 23px; }
.home-secondary > svg:last-child { color: var(--ink-ghost); }

/* dictionary entry */
.dict-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.dict-row:last-child { border-bottom: 0; }
.dict-row__main { flex: 1; min-width: 0; }
.dict-row__th { font-size: 15px; font-weight: 700; }
.dict-row__my { font-size: 13.5px; color: var(--ink-soft); margin-top: 2px; }
.dict-row__cat { font-size: 11px; color: var(--ink-ghost); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.tag-mini { font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: 0.03em; }
.tag-mini--auto { background: var(--review-tint); color: oklch(0.5 0.12 70); }
.tag-mini--ok { background: var(--brand-tint); color: var(--brand-ink); }

/* ============================================================
   📷 Photo-capture feature + Settings — components
   ============================================================ */

/* small inline link */
.linklike { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-deep); font-weight: 700; font-size: 13.5px; padding: 6px 0; }
.linklike svg { width: 16px; height: 16px; }

/* home: two half-width tiles (ถ่ายภาพ | แปลออเดอร์) */
.home-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.home-tile { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); text-align: left; min-height: 122px; transition: transform 0.13s; }
.home-tile:active { transform: scale(0.98); }
.home-tile__ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.home-tile__ic svg { width: 23px; height: 23px; }
.home-tile__t { font-weight: 800; font-size: 15.5px; letter-spacing: -0.01em; }
.home-tile__d { font-size: 11.5px; color: var(--ink-faint); margin-top: auto; line-height: 1.4; }
.home-tile--photo .home-tile__ic { background: var(--brand-tint); color: var(--brand-deep); }
.home-tile--translate .home-tile__ic { background: oklch(0.95 0.03 200); color: oklch(0.46 0.10 230); }

/* option pickers (store / platform) */
.optgrid { display: flex; flex-wrap: wrap; gap: 10px; }
.optbtn { flex: 1 1 auto; min-width: 120px; display: flex; align-items: center; gap: 9px; padding: 13px 14px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 14.5px; text-align: left; transition: border-color 0.15s, background 0.15s; }
.optbtn__ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-soft); flex: none; }
.optbtn__ic svg { width: 17px; height: 17px; }
.optbtn__lbl { flex: 1; }
.optbtn.is-active { border-color: var(--brand); background: var(--brand-tint); }
.optbtn.is-active .optbtn__ic { background: var(--brand); color: #fff; }
.optbtn.is-soon { opacity: 0.55; }
.optbtn__soon { font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: var(--r-pill); background: var(--surface-sunk); color: var(--ink-faint); white-space: nowrap; }

/* order-number field with platform prefix */
.ordernum { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.ordernum:focus-within { border-color: var(--brand); }
.ordernum__prefix { padding: 0 14px; display: grid; place-items: center; background: var(--surface-2); font-weight: 800; color: var(--brand-deep); font-family: var(--font-mono); border-right: 1px solid var(--line); flex: none; }
.ordernum input { flex: 1; border: none; height: 52px; padding: 0 14px; font-size: 16px; font-family: var(--font-mono); background: none; min-width: 0; }
.ordernum input:focus { outline: none; }

/* platform badge */
.pbadge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: var(--r-pill); background: var(--surface-sunk); color: var(--ink-soft); }
.pbadge--grab { background: oklch(0.93 0.07 150); color: var(--brand-deep); }
.pbadge--lineman { background: oklch(0.93 0.05 150); color: oklch(0.42 0.09 150); }
.pbadge--shopeefood { background: oklch(0.94 0.06 35); color: oklch(0.52 0.15 35); }

/* photo grid (capture + editor) */
.photogrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photogrid__cell { position: relative; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; background: #000; border: 1px solid var(--line); cursor: pointer; }
.photogrid__cell img { width: 100%; height: 100%; object-fit: cover; }
.photogrid__rm { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%; background: oklch(0.12 0 0 / 0.6); color: #fff; display: grid; place-items: center; }
.photogrid__rm svg { width: 15px; height: 15px; }
.photogrid__add { aspect-ratio: 1; border: 2px dashed var(--line); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-faint); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font-size: 12px; font-weight: 700; }
.photogrid__add svg { width: 24px; height: 24px; }
.photogrid__err { width: 100%; height: 100%; display: grid; place-items: center; background: var(--surface-sunk); color: var(--ink-ghost); }
.photogrid__err svg { width: 26px; height: 26px; }

/* optional-details toggle */
.details-toggle { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-soft); font-weight: 700; font-size: 14.5px; }
.details-toggle svg { width: 18px; height: 18px; flex: none; }
.details-block { margin-top: 14px; }

/* editable line items */
.itemedit .itemrow { display: grid; grid-template-columns: 1fr 54px 72px 36px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.itemedit .itemrow:last-of-type { border-bottom: 0; }
.itemrow input { height: 42px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 10px; font-size: 14px; background: var(--surface); width: 100%; }
.itemrow input:focus { outline: none; border-color: var(--brand); }
.itemrow .ie__qty, .itemrow .ie__price { text-align: center; font-variant-numeric: tabular-nums; padding: 0 6px; }
.ie__rm { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--fail); background: var(--fail-tint); }
.ie__rm svg { width: 16px; height: 16px; }

/* claim view (read-only detail) */
.claimhead { background: linear-gradient(155deg, var(--brand-bright), var(--brand-deep)); color: #fff; border-radius: var(--r-xl); padding: 22px; box-shadow: var(--shadow-brand); }
.claimhead__row { display: flex; align-items: center; gap: 10px; }
.claimhead .pbadge { background: oklch(1 0 0 / 0.2); color: #fff; }
.claimhead__store { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; opacity: 0.92; }
.claimhead__store svg { width: 15px; height: 15px; }
.claimhead__label { font-size: 11px; opacity: 0.85; margin-top: 16px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; }
.claimhead__num { font-size: 34px; font-weight: 800; letter-spacing: 0.02em; line-height: 1.1; margin-top: 3px; }
.claimhead__meta { font-size: 13.5px; opacity: 0.92; margin-top: 10px; }
.photoview { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photoview__tile { position: relative; aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; background: #000; border: 1px solid var(--line); cursor: zoom-in; }
.photoview__tile--hero { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.photoview__tile img { width: 100%; height: 100%; object-fit: cover; }
.photoview__zoom { position: absolute; right: 10px; bottom: 10px; width: 32px; height: 32px; border-radius: 50%; background: oklch(0.12 0 0 / 0.55); color: #fff; display: grid; place-items: center; }
.photoview__zoom svg { width: 16px; height: 16px; }
.claimgroup { font-size: 12px; font-weight: 800; color: var(--ink-ghost); text-transform: uppercase; letter-spacing: 0.05em; margin: 16px 0 4px; }
.claimgroup:first-child { margin-top: 0; }
.claimitem { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.claimitem:last-child { border-bottom: 0; }
.claimitem__name { font-size: 14.5px; font-weight: 600; }
.claimitem__qty { font-size: 12px; color: var(--brand-deep); background: var(--brand-tint); padding: 1px 7px; border-radius: var(--r-pill); margin-left: 8px; font-weight: 700; }
.claimitem__price { font-size: 14px; font-weight: 700; flex: none; }
.claimtotal { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1.5px solid var(--line); font-size: 17px; font-weight: 800; }
.claimnote { display: flex; gap: 9px; margin-top: 12px; padding: 11px 13px; background: var(--surface-2); border-radius: var(--r-md); font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.claimnote svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--ink-faint); }

/* switch */
.switch { position: relative; display: inline-block; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch__track { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--surface-sunk); transition: background 0.2s; pointer-events: none; }
.switch__thumb { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform 0.2s; pointer-events: none; }
.switch input:checked ~ .switch__track { background: var(--brand); }
.switch input:checked ~ .switch__thumb { transform: translateX(20px); }

/* settings rows */
.setrow { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.setrow:last-child { border-bottom: 0; }
.setrow__ic { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-soft); }
.setrow__ic svg { width: 19px; height: 19px; }
.setrow__main { flex: 1; min-width: 0; }
.setrow__t { font-weight: 700; font-size: 14.5px; }
.setrow__d { font-size: 12px; color: var(--ink-faint); margin-top: 3px; line-height: 1.45; }
.iconbtn { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--ink-soft); background: var(--surface-2); flex: none; }
.iconbtn svg { width: 18px; height: 18px; }
.miniorder { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.miniorder__thumb { width: 44px; height: 44px; border-radius: 11px; flex: none; overflow: hidden; background: var(--surface-sunk); display: grid; place-items: center; color: var(--ink-ghost); }
.miniorder__thumb img { width: 100%; height: 100%; object-fit: cover; }
.miniorder > svg:last-child { color: var(--ink-ghost); flex: none; }

/* customer analytics cards */
.custcard { padding: 14px 16px; }
.custcard__head { display: flex; align-items: center; gap: 10px; }
.custcard__name { font-weight: 800; font-size: 15.5px; flex: 1; min-width: 0; }
.custcard__badge { font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: var(--r-pill); background: var(--brand-tint); color: var(--brand-ink); flex: none; }
.custcard__stats { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.custstat { font-size: 12.5px; color: var(--ink-faint); }
.custstat b { color: var(--ink); font-weight: 800; font-size: 14px; }
.custfav { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.custfav__chip { font-size: 11.5px; background: var(--surface-2); padding: 4px 10px; border-radius: var(--r-pill); color: var(--ink-soft); font-weight: 600; }
.loading-pad { padding-top: 8px; }
