/* SHI SLIP — ดีไซน์สว่าง สะอาด แบบแอปธนาคาร (มีโหมดมืด) */

/* ---------- ฟอนต์ (โฮสต์เอง) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-thai-thai-400-normal.woff2") format("woff2"); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-thai-thai-500-normal.woff2") format("woff2"); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-thai-thai-600-normal.woff2") format("woff2"); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-thai-thai-700-normal.woff2") format("woff2"); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }

/* ---------- โทเคน: โหมดสว่าง (ค่าเริ่มต้น) ---------- */
:root {
  color-scheme: light;
  --font: "Inter", "IBM Plex Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;

  --bg: #f3f5f9;
  --bg-soft: #f8fafc;
  --card: #ffffff;
  --card-2: #f6f8fb;
  --line: #e6eaf1;
  --line-strong: #d6dce7;
  --text: #0f1a33;
  --text-2: #3b4863;
  --muted: #5a6680;
  --faint: #8a94a8;

  --brand: #1766ff;
  --brand-hover: #0f55e0;
  --brand-ink: #0e4fd1;
  --brand-soft: #ebf1ff;
  --brand-soft-2: #d9e5ff;
  --cyan: #19a8f5;
  --grad: linear-gradient(135deg, #1766ff 0%, #1d8ff5 100%);
  --grad-hero: linear-gradient(135deg, #0d47d6 0%, #1766ff 48%, #1fa9f5 100%);
  --navy: #0b1633;

  --ok: #10a05a;   --ok-ink: #0a7a44;  --ok-soft: #e7f7ee;  --ok-line: #bfe6d0;
  --bad: #e5484d;  --bad-ink: #c22b31; --bad-soft: #fdeeee; --bad-line: #f5c8ca;
  --warn: #f29d0c; --warn-ink: #9a5800; --warn-soft: #fff5e1; --warn-line: #f8d99c;
  --info: #1766ff; --info-ink: #0e4fd1; --info-soft: #ebf1ff; --info-line: #c8d9ff;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px -8px rgba(16, 24, 40, .10);
  --shadow-lg: 0 18px 48px -16px rgba(16, 24, 40, .22);
  --shadow-brand: 0 1px 2px rgba(16, 24, 40, .08), 0 6px 16px -6px rgba(23, 102, 255, .55);
  --ring: 0 0 0 4px rgba(23, 102, 255, .16);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar-w: 264px;
  --bottom-h: 68px;
}

/* ---------- โหมดมืด ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1020;
  --bg-soft: #0d1427;
  --card: #111a2e;
  --card-2: #16203a;
  --line: #213050;
  --line-strong: #2c3d63;
  --text: #e9eefb;
  --text-2: #c3cde2;
  --muted: #8d9ab6;
  --faint: #5f6d8c;
  --brand: #2a6bff;
  --brand-hover: #4a82ff;
  --brand-ink: #9cb9ff;
  --brand-soft: rgba(61, 123, 255, .15);
  --brand-soft-2: rgba(61, 123, 255, .25);
  --ok: #2fbf71;   --ok-ink: #62d898;  --ok-soft: rgba(47, 191, 113, .13);  --ok-line: rgba(47, 191, 113, .32);
  --bad: #f06368;  --bad-ink: #ff8f93; --bad-soft: rgba(240, 99, 104, .13); --bad-line: rgba(240, 99, 104, .32);
  --warn: #f5b13d; --warn-ink: #ffc766; --warn-soft: rgba(245, 177, 61, .13); --warn-line: rgba(245, 177, 61, .32);
  --info: #3d7bff; --info-ink: #9cb9ff; --info-soft: rgba(61, 123, 255, .15); --info-line: rgba(61, 123, 255, .35);
  --shadow-xs: none;
  --shadow: 0 1px 0 rgba(255, 255, 255, .02) inset, 0 8px 24px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .8);
  --shadow-brand: 0 6px 18px -6px rgba(61, 123, 255, .6);
  --ring: 0 0 0 4px rgba(61, 123, 255, .25);
}

/* ---------- พื้นฐาน ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "cv11";
}
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
h1 { font-size: 26px; } h2 { font-size: 19px; } h3 { font-size: 16.5px; } h4 { font-size: 15px; }
p { margin: 0 0 1em; }
code, kbd, pre, .mono { font-family: var(--mono); font-size: 13px; }
code { background: var(--brand-soft); color: var(--brand-ink); padding: 2px 6px; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
img { max-width: 100%; }
::selection { background: rgba(23, 102, 255, .22); }
.i { flex: none; vertical-align: -3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(23, 102, 255, .45); outline-offset: 2px; border-radius: 8px; }
.num, .tnum { font-variant-numeric: tabular-nums; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text);
  font: 600 14.5px/1 var(--font); cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-xs);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .1s, color .15s; text-decoration: none !important;
}
.btn:hover { background: var(--card-2); border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn.is-loading { opacity: .6; pointer-events: none; }
.btn[disabled] { opacity: 1; background: var(--card-2); color: var(--faint); border-color: var(--line); box-shadow: none; pointer-events: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); box-shadow: none; }
.btn-ghost:hover { background: var(--card-2); border-color: transparent; color: var(--text); }
.btn-soft { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); box-shadow: none; }
.btn-soft:hover { background: var(--brand-soft-2); border-color: transparent; }
.btn-danger { background: var(--bad-soft); border-color: transparent; color: var(--bad-ink); box-shadow: none; }
.btn-danger:hover { background: var(--bad-soft); border-color: var(--bad-line); }
.btn-light { background: #fff; border-color: #fff; color: #0e4fd1; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .35); }
.btn-light:hover { background: #f1f5ff; border-color: #f1f5ff; }
.btn-sm { height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13.5px; gap: 6px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 36px; }
.btn .spin { display: none; }
.btn.is-loading .spin { display: inline-block; }
.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- ฟอร์ม ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field > label, .label { font-weight: 600; font-size: 14px; color: var(--text); }
.label-opt { font-weight: 400; color: var(--muted); font-size: 13px; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.5; }
.input, .select, .textarea {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--card); color: var(--text); font: 400 15px var(--font); transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 96px; padding: 12px 14px; line-height: 1.6; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input[disabled] { background: var(--card-2); color: var(--muted); }
.input.mono { font-family: var(--font); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.input.code-input { font-family: var(--mono); font-size: 13.5px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2366728c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; }
.affix { position: relative; display: flex; align-items: center; }
.affix .input { padding-right: 44px; }
.affix-end { position: absolute; right: 14px; color: var(--muted); font-weight: 600; pointer-events: none; }
.affix-start { position: absolute; left: 14px; color: var(--muted); pointer-events: none; display: flex; }
.affix-start + .input { padding-left: 42px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14.5px; color: var(--text-2); }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }

/* สวิตช์ */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; width: 46px; height: 28px; border-radius: 99px; background: var(--line-strong); flex: none; transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: var(--ring); }
.switch-text b { display: block; font-size: 14.5px; color: var(--text); }
.switch-text span { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }

/* การ์ดตัวเลือก (radio) */
.options { display: grid; gap: 12px; }
.options-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.options-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.option { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.option:hover { border-color: var(--line-strong); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option .o-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--card-2); color: var(--muted); flex: none; }
.option .o-body { min-width: 0; flex: 1; }
.option .o-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: 15px; color: var(--text); }
.option .o-desc { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.option .o-tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; display: grid; place-items: center; color: #fff; transition: all .15s; }
.option .o-tick .i { opacity: 0; }
.option:has(input:checked), .option.is-checked { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 55%, var(--card)); box-shadow: var(--ring); }
.option:has(input:checked) .o-icon, .option.is-checked .o-icon { background: var(--brand); color: #fff; }
.option:has(input:checked) .o-tick, .option.is-checked .o-tick { background: var(--brand); border-color: var(--brand); }
.option:has(input:checked) .o-tick .i, .option.is-checked .o-tick .i { opacity: 1; }
.option:has(input:focus-visible) { box-shadow: var(--ring); }
.o-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; font-size: 13.5px; color: var(--text-2); }
.o-list li { display: flex; gap: 8px; align-items: flex-start; }
.o-list .i { margin-top: 3px; color: var(--ok); }
.o-list li.off { color: var(--muted); }
.o-list li.off .i { color: var(--faint); }

/* ---------- การ์ด / กริด ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card + .card { margin-top: 20px; }
:where(.grid, .stats, .accounts, .use-cards, .options, .results) > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .btn { flex: none; }
.card-sub { color: var(--muted); font-size: 14px; margin-top: 3px; line-height: 1.5; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush > .card-head { padding: 20px 22px 0; margin-bottom: 14px; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--line); background: var(--card-2); }
.card-glow { background: color-mix(in srgb, var(--brand-soft) 60%, var(--card)); border-color: var(--brand-soft-2); }
.card-title { display: flex; align-items: flex-start; gap: 12px; }
.card-title .t-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.stack > * + * { margin-top: 20px; }
.stack-sm > * + * { margin-top: 12px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 30px 0 14px; flex-wrap: wrap; }
.section-title h2 { margin: 0; font-size: 18px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.back-link:hover { color: var(--text); text-decoration: none; }

/* ---------- ตัวเลขสรุป ---------- */
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 500; }
.stat-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.stat-icon.ok { background: var(--ok-soft); color: var(--ok); }
.stat-icon.bad { background: var(--bad-soft); color: var(--bad); }
.stat-icon.warn { background: var(--warn-soft); color: var(--warn-ink); }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-value small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.stat-foot { font-size: 13px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stats .card { padding: 18px 20px; }

/* ---------- ป้าย ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.badge .i { vertical-align: 0; }
.badge-ok { background: var(--ok-soft); color: var(--ok-ink); }
.badge-warn { background: var(--warn-soft); color: var(--warn-ink); }
.badge-bad { background: var(--bad-soft); color: var(--bad-ink); }
.badge-info { background: var(--info-soft); color: var(--info-ink); }
.badge-muted { background: var(--card-2); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.badge-grad { background: var(--grad); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--faint); flex: none; }
.dot-ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot-bad { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.dot-warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }

/* ชิปตัวกรอง */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap; text-decoration: none !important; }
.chip:hover { border-color: var(--faint); color: var(--text); }
.chip.is-active { background: var(--text); border-color: var(--text); color: var(--card); }
.chip .count { font-size: 12px; opacity: .7; }

/* ---------- แจ้งเตือน ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid transparent; font-size: 14.5px; margin-bottom: 20px; line-height: 1.55; }
.alert > .i { margin-top: 2px; }
.alert > div { min-width: 0; flex: 1; }
.alert-ok { background: var(--ok-soft); color: var(--ok-ink); border-color: var(--ok-line); }
.alert-bad { background: var(--bad-soft); color: var(--bad-ink); border-color: var(--bad-line); }
.alert-warn { background: var(--warn-soft); color: var(--warn-ink); border-color: var(--warn-line); }
.alert-info { background: var(--info-soft); color: var(--info-ink); border-color: var(--info-line); }
.alert b, .alert strong { color: inherit; }
.alert a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.alert-body { color: var(--text-2); }
.alert-body strong { color: var(--text); }
.alert .alert-action { margin-left: auto; flex: none; align-self: center; }

/* ---------- ตาราง ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-weight: 600; font-size: 13px; color: var(--muted); padding: 11px 16px; background: var(--card-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--card-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .row-link { color: var(--text); font-weight: 600; }
.cell-sub { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }

/* ---------- key-value ---------- */
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px 16px; font-size: 14.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

/* ---------- โค้ด / แท็บ ---------- */
.code { position: relative; background: #0b1633; border: 1px solid #1c2a4d; border-radius: 14px; padding: 16px 18px; overflow-x: auto; color: #dbe6ff; font-family: var(--mono); font-size: 13px; line-height: 1.7; white-space: pre; margin: 0; }
.code .c { color: #7589b3; } .code .s { color: #7dd3fc; } .code .k { color: #b4bdfd; }
.code-copy { position: absolute; top: 10px; right: 10px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px 14px; border: 0; background: none; color: var(--muted); font: 600 14px var(--font); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.is-active { color: var(--brand-ink); border-bottom-color: var(--brand); }
.tab-panel[hidden] { display: none; }
a.tab { text-decoration: none; }

/* ---------- โปรเกรส ---------- */
.progress { height: 8px; border-radius: 99px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.progress.is-warn > span { background: linear-gradient(90deg, #f29d0c, #f7bd4f); }
.progress.is-bad > span { background: linear-gradient(90deg, #e5484d, #f07b7f); }
.progress.is-ok > span { background: linear-gradient(90deg, #10a05a, #34c27c); }

/* ---------- ว่าง ---------- */
.empty { text-align: center; padding: 44px 24px; color: var(--muted); }
.empty .empty-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 14px; background: var(--brand-soft); color: var(--brand); }
.empty > .i { color: var(--faint); margin-bottom: 10px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.empty p { margin: 0 auto 14px; max-width: 380px; }
.empty .btn { margin-top: 4px; }

/* ---------- รายการแบบแถว (ประวัติ / ล่าสุด) ---------- */
.list { display: flex; flex-direction: column; }
.list-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 22px; border-top: 1px solid var(--line); color: inherit; text-decoration: none !important; transition: background .12s; }
.list > .list-row:first-child { border-top: 0; }
a.list-row:hover { background: var(--card-2); }
.row-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--card-2); color: var(--muted); flex: none; }
.row-icon.ok { background: var(--ok-soft); color: var(--ok); }
.row-icon.bad { background: var(--bad-soft); color: var(--bad); }
.row-icon.warn { background: var(--warn-soft); color: var(--warn-ink); }
.row-icon.info { background: var(--info-soft); color: var(--info); }
.row-main { min-width: 0; }
.row-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--text); min-width: 0; }
.row-title .amt { font-variant-numeric: tabular-nums; font-weight: 700; }
.row-sub { display: block; font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub.is-bad { color: var(--bad-ink); }
.row-sub.is-warn { color: var(--warn-ink); }
.row-end { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row-time { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-src { font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.list-group { padding: 10px 22px 8px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--card-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.list > .list-group:first-child { border-top: 0; }
.list-group + .list-row { border-top: 0; }

/* ---------- เปลือกแอป ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(to right, var(--card) calc(var(--sidebar-w) - 1px), var(--line) calc(var(--sidebar-w) - 1px), var(--line) var(--sidebar-w), transparent var(--sidebar-w)); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px 14px; background: var(--card); border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 6px 16px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none !important; min-width: 0; }
.brand img { width: 38px; height: 38px; border-radius: 50%; flex: none; box-shadow: 0 2px 8px -2px rgba(23, 102, 255, .45); }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: .01em; line-height: 1.15; color: var(--text); }
.brand-name small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 1px; }
.sidebar-cta { margin: 0 4px 12px; }
.drawer-close { display: none; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 14px 12px 6px; }
.nav-title:empty { padding: 6px 0; border-top: 1px solid var(--line); margin: 8px 8px 4px; }
.nav-link { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 12px; color: var(--text-2); font-weight: 500; font-size: 15px; text-decoration: none !important; transition: background .12s, color .12s; }
.nav-link .i { color: var(--muted); transition: color .12s; }
.nav-link:hover { background: var(--card-2); color: var(--text); }
.nav-link.is-active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.nav-link.is-active .i { color: var(--brand); }
.nav-link .badge { margin-left: auto; }
.sidebar-foot { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.plan-mini { display: block; padding: 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); color: var(--text); text-decoration: none !important; transition: border-color .15s; }
.plan-mini:hover { border-color: var(--line-strong); }
.plan-mini .pm-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.plan-mini b { font-size: 14.5px; }
.plan-mini .pm-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.plan-mini .progress { height: 6px; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px 2px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: 15px; flex: none; }
.user-row .who { min-width: 0; flex: 1; line-height: 1.35; }
.user-row .who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-row .who span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-links { display: flex; align-items: center; gap: 4px; padding: 0 2px; }
.sidebar-links .btn { flex: 1; }

.main { min-width: 0; display: flex; flex-direction: column; }
.appbar { display: none; }
.content { padding: 30px 40px 64px; max-width: 1140px; width: 100%; margin: 0 auto; }
.plan-pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--text-2); font-size: 13.5px; font-weight: 500; text-decoration: none !important; }
.plan-pill:hover { border-color: var(--line-strong); color: var(--text); }
.plan-pill.is-ok { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok-ink); }
.plan-pill.is-info { background: var(--info-soft); border-color: var(--info-line); color: var(--info-ink); }

/* เมนูล่าง (มือถือ) */
.bottom-nav { display: none; }
.scrim { display: none; }

/* ---------- ตรวจสลิป ---------- */
.check-wrap { max-width: 780px; margin: 0 auto; }
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 250px; padding: 32px 24px;
  border: 2px dashed var(--brand-soft-2); border-radius: 22px; background: color-mix(in srgb, var(--brand-soft) 45%, var(--card)); text-align: center; cursor: pointer; transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 80%, var(--card)); }
.dropzone.is-disabled { opacity: .6; pointer-events: none; }
.dz-icon { width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: var(--shadow-brand); margin-bottom: 8px; }
.dropzone h2, .dropzone h3 { margin: 0; font-size: 19px; }
.dropzone p { margin: 0; color: var(--muted); font-size: 14.5px; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dz-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 12px; position: relative; z-index: 1; }
.dz-actions .btn { position: relative; overflow: hidden; }
.dz-actions input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-kbd { font-size: 13px; color: var(--muted); margin-top: 6px; }
kbd { font-family: var(--font); font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong); color: var(--text-2); }
.check-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-top: 16px; }
.check-options .field { margin: 0; }
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; flex-wrap: wrap; }
.results-bar h2 { margin: 0; font-size: 17px; }
.tally { display: flex; gap: 8px; flex-wrap: wrap; }
.results { display: flex; flex-direction: column; gap: 14px; }

.result { border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; animation: pop .25s ease; }
.result-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--card-2); border-bottom: 1px solid var(--line); }
.result-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--muted); flex: none; }
.result-title { min-width: 0; flex: 1; line-height: 1.35; }
.result-title b { display: block; font-size: 16.5px; }
.result-title span { display: block; font-size: 14px; color: var(--text-2); }
.result-time { font-size: 13px; color: var(--muted); white-space: nowrap; }
.result.is-pass .result-head { background: var(--ok-soft); border-color: var(--ok-line); }
.result.is-pass .result-icon { background: var(--ok); color: #fff; }
.result.is-pass .result-title b { color: var(--ok-ink); }
.result.is-qr_only .result-head { background: var(--info-soft); border-color: var(--info-line); }
.result.is-qr_only .result-icon { background: var(--info); color: #fff; }
.result.is-qr_only .result-title b { color: var(--info-ink); }
.result.is-fail .result-head { background: var(--bad-soft); border-color: var(--bad-line); }
.result.is-fail .result-icon { background: var(--bad); color: #fff; }
.result.is-fail .result-title b { color: var(--bad-ink); }
.result.is-error .result-head { background: var(--warn-soft); border-color: var(--warn-line); }
.result.is-error .result-icon { background: var(--warn); color: #fff; }
.result.is-error .result-title b { color: var(--warn-ink); }
.result-body { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 18px; padding: 18px; }
.result-thumb { width: 84px; height: 112px; border-radius: 12px; object-fit: cover; background: var(--card-2); border: 1px solid var(--line); }
.result-thumb:not([src]), .result-thumb[src=""] { visibility: hidden; }
.result-amount { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; margin-bottom: 8px; }
.result-amount:empty { display: none; }
.result-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 14.5px; }
.result-lines li { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; }
.result-lines li > span:first-child { color: var(--muted); }
.result-lines li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.result-lines .ok { font-weight: 600; }
.result-notes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.result-notes:empty { display: none; }
.result-notes li { display: flex; gap: 8px; align-items: flex-start; }
.result-notes li .i { margin-top: 3px; }
.checklist { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; }
.checklist:empty { display: none; }
.checklist li { display: inline-flex; align-items: center; gap: 5px; color: var(--ok-ink); }
.checklist li.no { color: var(--bad-ink); }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.result-actions:empty { display: none; }
.result.is-loading .result-thumb { animation: pulse 1.2s ease-in-out infinite; }
.result.is-loading .result-body { padding-bottom: 18px; }
.skel { display: block; height: 12px; border-radius: 6px; background: var(--card-2); margin-bottom: 10px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 50% { opacity: .5; } }

/* ใช้ร่วม: เหตุผล + ชิปผลเช็ก (หน้าผลตรวจเดี่ยว / หลังบ้าน) */
.reasons { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.reasons li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.reasons li .i { margin-top: 3px; }
.r-fail { color: var(--bad-ink); } .r-error { color: var(--warn-ink); } .r-warn { color: var(--warn-ink); } .r-info { color: var(--info-ink); }
.checks-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.check-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 500; background: var(--card-2); color: var(--text-2); }
.check-chip.yes { background: var(--ok-soft); color: var(--ok-ink); }
.check-chip.no { background: var(--bad-soft); color: var(--bad-ink); }

/* ผลตรวจเดี่ยว */
.verdict { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card-2); margin-bottom: 20px; }
.verdict .v-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--muted); flex: none; }
.verdict h2 { margin: 0; font-size: 21px; }
.verdict p { margin: 2px 0 0; color: var(--text-2); }
.verdict .v-amount { margin-left: auto; text-align: right; }
.verdict .v-amount b { display: block; font-size: 28px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.verdict .v-amount span { font-size: 13px; color: var(--muted); }
.verdict.is-pass { background: var(--ok-soft); border-color: var(--ok-line); } .verdict.is-pass .v-icon { background: var(--ok); color: #fff; } .verdict.is-pass h2 { color: var(--ok-ink); }
.verdict.is-qr_only { background: var(--info-soft); border-color: var(--info-line); } .verdict.is-qr_only .v-icon { background: var(--info); color: #fff; } .verdict.is-qr_only h2 { color: var(--info-ink); }
.verdict.is-fail { background: var(--bad-soft); border-color: var(--bad-line); } .verdict.is-fail .v-icon { background: var(--bad); color: #fff; } .verdict.is-fail h2 { color: var(--bad-ink); }
.verdict.is-error { background: var(--warn-soft); border-color: var(--warn-line); } .verdict.is-error .v-icon { background: var(--warn); color: #fff; } .verdict.is-error h2 { color: var(--warn-ink); }
.slip-img { width: 100%; max-height: 640px; object-fit: contain; border-radius: 14px; border: 1px solid var(--line); background: var(--card-2); }

/* ---------- ภาพรวม ---------- */
.hero-card { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 30px; border-radius: 24px; background: var(--grad-hero); color: #fff; box-shadow: 0 18px 40px -20px rgba(23, 102, 255, .7); }
.hero-card::after { content: ""; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 65%); pointer-events: none; }
.hero-card h2 { color: #fff; font-size: 22px; margin: 0 0 4px; }
.hero-card p { color: #fff; margin: 0; font-size: 15px; opacity: .95; }
.hero-card .hc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-card .hc-mode { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; background: rgba(255, 255, 255, .16); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none !important; margin-bottom: 12px; }
.hero-card .hc-mode:hover { background: rgba(255, 255, 255, .24); }
.hc-art { position: relative; z-index: 1; flex: none; width: 150px; height: 120px; }
.hc-slip { position: absolute; right: 18px; top: 0; width: 88px; height: 116px; border-radius: 12px; background: #fff; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .45); padding: 12px 10px; transform: rotate(6deg); }
.hc-slip i { display: block; height: 7px; border-radius: 4px; background: #e3e9f6; margin-bottom: 7px; }
.hc-slip i:nth-child(2) { width: 70%; } .hc-slip i:nth-child(3) { width: 85%; } .hc-slip i:nth-child(4) { width: 55%; background: #cfdcff; }
.hc-slip b { position: absolute; left: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 6px; background: repeating-linear-gradient(90deg, #0f1a33 0 3px, transparent 3px 6px), repeating-linear-gradient(0deg, #0f1a33 0 3px, transparent 3px 6px); opacity: .75; }
.hc-badge { position: absolute; left: 4px; bottom: 6px; width: 50px; height: 50px; border-radius: 50%; background: #10a05a; color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 5px rgba(255, 255, 255, .35), 0 10px 20px -8px rgba(0, 0, 0, .4); }
.setup-card .steps-mini { display: grid; gap: 4px; margin-top: 4px; }
.step-mini { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: inherit; text-decoration: none !important; }
a.step-mini:hover { background: var(--card-2); }
.step-mini .sm-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-strong); color: var(--muted); font-size: 12.5px; font-weight: 700; flex: none; }
.step-mini.is-done .sm-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.step-mini .sm-text { flex: 1; min-width: 0; }
.step-mini .sm-text b { display: block; font-size: 14.5px; }
.step-mini .sm-text span { display: block; font-size: 13px; color: var(--muted); }
.step-mini.is-done .sm-text b { color: var(--muted); font-weight: 500; }
.step-mini .i.chev { color: var(--faint); }

/* ---------- วิซาร์ดตั้งค่าร้าน ---------- */
.wizard { max-width: 760px; margin: 0 auto; }
.stepper { display: flex; align-items: flex-start; gap: 0; margin: 4px 0 26px; list-style: none; padding: 0; }
.stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; text-align: center; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.stepper li::before { content: ""; position: absolute; top: 17px; right: 50%; width: 100%; height: 2px; background: var(--line-strong); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.is-done::before, .stepper li.is-active::before { background: var(--brand); }
.stepper .s-num { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line-strong); font-weight: 700; color: var(--muted); }
.stepper li.is-active { color: var(--text); font-weight: 600; }
.stepper li.is-active .s-num { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--ring); }
.stepper li.is-done .s-num { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.wizard-card { padding: 28px; }
.wizard-card > h2 { font-size: 21px; }
.wizard-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.wizard-intro { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.wizard-intro .t-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.wizard-intro h2 { margin: 0 0 2px; font-size: 21px; }
.wizard-intro p { margin: 0; color: var(--muted); }
.done-hero { text-align: center; padding: 8px 0 4px; }
.done-hero .d-icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: var(--ok); color: #fff; box-shadow: 0 0 0 10px var(--ok-soft); }
.use-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.use-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: inherit; text-decoration: none !important; transition: border-color .15s, box-shadow .15s, transform .15s; text-align: left; }
.use-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-1px); }
.use-card .u-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.use-card b { font-size: 15px; }
.use-card span { font-size: 13.5px; color: var(--muted); }

/* ---------- บัญชีรับเงิน ---------- */
.accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.account { position: relative; padding: 18px 18px 16px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #0d47d6, #1766ff 55%, #1fa9f5); box-shadow: 0 12px 28px -16px rgba(23, 102, 255, .8); overflow: hidden; min-height: 132px; }
.account::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.account .a-label { font-size: 13px; opacity: .85; display: flex; align-items: center; gap: 6px; }
.account .a-no { font-size: 19px; font-weight: 700; letter-spacing: .06em; margin: 10px 0 6px; font-variant-numeric: tabular-nums; }
.account .a-name { font-size: 14.5px; font-weight: 600; }
.account .a-name span { display: block; font-size: 12.5px; font-weight: 400; opacity: .8; }
.account form { position: absolute; top: 10px; right: 10px; z-index: 1; }
.account .btn-ghost { color: rgba(255, 255, 255, .85); }
.account .btn-ghost:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.add-account { margin-top: 16px; border-top: 1px dashed var(--line-strong); padding-top: 18px; }
.add-account > summary { list-style: none; cursor: pointer; display: inline-flex; }
.add-account > summary::-webkit-details-marker { display: none; }
.add-account[open] > summary { margin-bottom: 16px; }

/* ---------- แพ็กเกจ / ชำระเงิน ---------- */
.pay-box { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.qr-frame { background: #fff; border-radius: 20px; padding: 16px; text-align: center; border: 1px solid #e6eaf1; box-shadow: var(--shadow); }
.qr-frame svg, .qr-frame img { width: 100%; height: auto; display: block; }
.qr-frame .qr-cap { color: #0f1a33; font-size: 13px; margin-top: 8px; font-weight: 600; }
.qr-pp { display: flex; align-items: center; justify-content: center; gap: 6px; background: #0b3a8c; color: #fff; border-radius: 10px; font-weight: 700; font-size: 13px; padding: 6px; margin-bottom: 10px; letter-spacing: .02em; }
.amount-big { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.plan-card { display: flex; flex-direction: column; gap: 12px; position: relative; }
.plan-card.is-hot { border: 2px solid var(--brand); box-shadow: 0 18px 40px -20px rgba(23, 102, 255, .55); }
.plan-price { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.plan-price small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan-feats { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; font-size: 14.5px; color: var(--text-2); }
.plan-feats li { display: flex; gap: 8px; align-items: flex-start; }
.plan-feats .i { color: var(--ok); margin-top: 3px; }
.plan-feats li.off { color: var(--faint); }
.plan-feats li.off .i { color: var(--faint); }
.plan-tag { position: absolute; top: -13px; right: 18px; }
.plan-current { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.plan-current .pc-main { flex: 1; min-width: 220px; }

/* ---------- toast ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--navy); color: #fff; box-shadow: var(--shadow-lg); font-size: 14.5px; max-width: 360px; animation: pop .2s ease; }
.toast.ok::before { content: "✓ "; color: #5fe0a0; font-weight: 700; }
.toast.bad::before { content: "! "; color: #ff9da1; font-weight: 700; }

/* ---------- dialog / ช่องความลับ ---------- */
dialog.modal { border: 1px solid var(--line); border-radius: 20px; background: var(--card); color: var(--text); padding: 26px; width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(15, 26, 51, .45); backdrop-filter: blur(3px); }
.secret-box { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--card-2); border: 1px dashed var(--brand); font-family: var(--mono); font-size: 13.5px; word-break: break-all; color: var(--text); }

/* ---------- เข้าสู่ระบบ / สมัคร ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--bg); }
.auth-side { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 44px 52px; background: var(--grad-hero); color: #fff; }
.auth-side::before { content: ""; position: absolute; left: -120px; bottom: -160px; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 65%); }
.auth-side .brand, .auth-side .brand-name, .auth-side .brand-name small { color: #fff; }
.auth-side .brand img { box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.auth-side h2 { color: #fff; font-size: 32px; line-height: 1.3; margin: 0 0 12px; max-width: 440px; }
.auth-side p { color: rgba(255, 255, 255, .85); font-size: 16px; max-width: 420px; }
.auth-points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.auth-points li { display: flex; gap: 12px; align-items: center; font-size: 15.5px; }
.auth-points .i { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.auth-mini { position: relative; margin-top: 28px; max-width: 360px; background: #fff; color: #0f1a33; border-radius: 18px; padding: 16px 18px; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .45); }
.auth-mini .am-head { display: flex; align-items: center; gap: 10px; }
.auth-mini .am-head span { width: 34px; height: 34px; border-radius: 50%; background: #10a05a; color: #fff; display: grid; place-items: center; }
.auth-mini .am-head b { color: #0a7a44; }
.auth-mini .am-amt { font-size: 24px; font-weight: 700; margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.auth-mini .am-sub { font-size: 13px; color: #66728c; }
.auth-main { display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: min(420px, 100%); }
.auth-card > .card { padding: 30px; }
.auth-brand { display: none; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 22px; text-align: center; color: inherit; text-decoration: none !important; }
.auth-brand img { width: 64px; height: 64px; border-radius: 50%; }
.auth-brand h1 { font-size: 20px; margin: 4px 0 0; }
.auth-brand p { color: var(--muted); margin: 0; font-size: 14px; }
.auth-title { font-size: 24px; margin: 0 0 4px; }
.auth-foot { text-align: center; margin-top: 18px; color: var(--muted); font-size: 14.5px; }
.auth-solo { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; background: var(--bg); }
.auth-solo .auth-brand { display: flex; }

/* ---------- เว็บหน้าแรก ---------- */
.site { background: var(--card); }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: 24px; }
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-nav { display: flex; align-items: center; gap: 16px; height: 70px; }
.site-links { display: flex; gap: 4px; margin-left: 20px; }
.site-links a { color: var(--text-2); padding: 8px 12px; border-radius: 10px; font-weight: 500; font-size: 15px; text-decoration: none; }
.site-links a:hover { background: var(--card-2); color: var(--text); }
.site-nav .spacer { flex: 1; }
.hero-bg { background: radial-gradient(900px 480px at 85% -10%, rgba(31, 169, 245, .16), transparent 60%), radial-gradient(900px 520px at 0% 0%, rgba(23, 102, 255, .12), transparent 60%), var(--card); }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; padding-block: 56px 80px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-xs); color: var(--text-2); font-size: 14px; font-weight: 500; }
.eyebrow b { background: var(--brand); color: #fff; padding: 1px 10px; border-radius: 99px; font-size: 12.5px; }
.hero h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.2; margin: 20px 0 18px; letter-spacing: -0.025em; }
.hero h1 .hl { color: var(--brand); }
.hero .lead { font-size: 18px; color: var(--text-2); max-width: 540px; margin-bottom: 30px; line-height: 1.7; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 22px; font-size: 14.5px; color: var(--muted); display: flex; gap: 8px 20px; flex-wrap: wrap; }
.hero-note span { display: inline-flex; gap: 6px; align-items: center; }
.hero-note .i { color: var(--ok); }
.hero-visual { position: relative; display: flex; justify-content: center; }
.phone { position: relative; width: 300px; height: 600px; border-radius: 46px; background: #0f1a33; padding: 12px; box-shadow: 0 50px 90px -30px rgba(15, 26, 51, .55), 0 0 0 1px rgba(15, 26, 51, .08); }
.phone-screen { position: relative; height: 100%; border-radius: 36px; background: #f3f5f9; overflow: hidden; color: #0f1a33; }
.phone-notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 92px; height: 24px; border-radius: 14px; background: #0f1a33; z-index: 2; }
.ph-bar { display: flex; align-items: center; gap: 8px; padding: 44px 16px 12px; background: #fff; border-bottom: 1px solid #e6eaf1; font-weight: 700; font-size: 14px; }
.ph-bar img { width: 24px; height: 24px; border-radius: 50%; }
.ph-body { padding: 14px 12px; display: grid; gap: 10px; }
.ph-card { background: #fff; border-radius: 16px; border: 1px solid #e6eaf1; overflow: hidden; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }
.ph-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 700; font-size: 13.5px; }
.ph-head .ph-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.ph-ok .ph-head { background: #e7f7ee; color: #0a7a44; } .ph-ok .ph-ic { background: #10a05a; }
.ph-bad .ph-head { background: #fdeeee; color: #c22b31; } .ph-bad .ph-ic { background: #e5484d; }
.ph-main { padding: 10px 12px 12px; font-size: 12px; color: #66728c; }
.ph-main b { display: block; font-size: 22px; color: #0f1a33; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.ph-row { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.ph-row span:last-child { color: #0f1a33; font-weight: 600; }
.ph-drop { border: 2px dashed #c8d9ff; border-radius: 16px; background: #eef3ff; padding: 16px; text-align: center; font-size: 12.5px; color: #0e4fd1; font-weight: 600; }
.ph-drop span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; margin: 0 auto 6px; background: #1766ff; color: #fff; }
.float-card { position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow-lg); font-size: 13.5px; display: flex; align-items: center; gap: 10px; }
.float-card .fc-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.float-card b { display: block; font-size: 14px; }
.float-card span { color: var(--muted); font-size: 12.5px; }
.fc-1 { left: -8px; top: 120px; } .fc-1 .fc-ic { background: var(--bad-soft); color: var(--bad); }
.fc-2 { right: -30px; bottom: 44px; } .fc-2 .fc-ic { background: var(--brand-soft); color: var(--brand); }
.logos { display: flex; gap: 10px 26px; flex-wrap: wrap; align-items: center; justify-content: center; color: var(--muted); font-weight: 600; font-size: 14.5px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.logos span { display: inline-flex; align-items: center; gap: 8px; }
.bank-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.section { padding: 84px 0; }
.section-alt { background: var(--bg); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-head .kicker { display: inline-block; color: var(--brand-ink); font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.3; margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }
.feature { display: flex; flex-direction: column; gap: 10px; }
.feature .f-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.feature .f-icon.bad { background: var(--bad-soft); color: var(--bad); }
.feature .f-icon.warn { background: var(--warn-soft); color: var(--warn-ink); }
.feature .f-icon.ok { background: var(--ok-soft); color: var(--ok); }
.feature h3 { margin: 6px 0 0; font-size: 18px; }
.feature p { color: var(--muted); margin: 0; font-size: 15px; }
.feature .f-fix { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ok-ink); font-weight: 600; display: flex; gap: 8px; align-items: flex-start; }
.feature .f-fix .i { margin-top: 3px; }
.channel { display: flex; flex-direction: column; gap: 12px; }
.channel .ch-visual { height: 150px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; position: relative; }
.ch-web { width: 78%; background: var(--card); border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 10px; }
.ch-web .dots { display: flex; gap: 4px; margin-bottom: 8px; } .ch-web .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.ch-web .zone { border: 2px dashed var(--brand-soft-2); border-radius: 8px; padding: 12px; text-align: center; color: var(--brand); font-size: 12px; font-weight: 600; background: var(--brand-soft); }
.ch-code { width: 84%; background: #0b1633; color: #dbe6ff; border-radius: 10px; padding: 12px 14px; font-family: var(--mono); font-size: 11.5px; line-height: 1.7; text-align: left; }
.ch-code .s { color: #7dd3fc; } .ch-code .ok { color: #5fe0a0; }
.ch-chat { width: 84%; display: grid; gap: 8px; text-align: left; font-size: 12px; }
.ch-msg { display: flex; gap: 8px; align-items: flex-start; }
.ch-msg .av { width: 26px; height: 26px; border-radius: 50%; flex: none; background: #c7d2fe; }
.ch-msg .av.bot { background: #5865f2; display: grid; place-items: center; color: #fff; }
.ch-msg .bub { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; color: var(--text-2); }
.ch-msg .bub b { color: var(--ok-ink); }
.steps-h { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: s; }
.step-h { position: relative; padding: 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.step-h::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 700; margin-bottom: 14px; }
.step-h h3 { font-size: 17px; margin: 0 0 6px; }
.step-h p { color: var(--muted); margin: 0; font-size: 15px; }
.steps { counter-reset: s; }
.step { position: relative; padding-left: 54px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.compare { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.compare th, .compare td { padding: 16px 20px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th { background: var(--card-2); font-size: 15px; }
.compare thead th.is-rec { background: var(--brand-soft); color: var(--brand-ink); }
.compare td.is-rec { background: color-mix(in srgb, var(--brand-soft) 40%, var(--card)); }
.compare .yes { color: var(--ok); } .compare .no { color: var(--faint); }
.compare th small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; }
.mode { display: flex; flex-direction: column; gap: 10px; }
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; background: var(--card); }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 22px; line-height: 1; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 10px 0 0; }
.cta-band { position: relative; overflow: hidden; border-radius: 28px; padding: 52px 40px; text-align: center; background: var(--grad-hero); color: #fff; box-shadow: 0 30px 60px -30px rgba(23, 102, 255, .8); }
.cta-band::after { content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .2), transparent 65%); }
.cta-band h2 { color: #fff; font-size: clamp(24px, 3vw, 32px); }
.cta-band p { color: rgba(255, 255, 255, .88); font-size: 16.5px; }
.cta-band .btn { position: relative; z-index: 1; }
.site-foot { border-top: 1px solid var(--line); padding: 32px 0 44px; color: var(--muted); font-size: 14px; background: var(--card); }
.site-foot .wrap { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.site-foot a { color: var(--text-2); }
.page-hero { padding: 48px 0 8px; }
.page-hero h1 { font-size: clamp(28px, 4vw, 38px); }
.prose { max-width: 780px; }
.prose h2 { margin-top: 32px; }
.prose .code { margin: 8px 0 18px; }
.prose p, .prose li { color: var(--text-2); }
.doc-nav { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; }
.doc-nav a { color: var(--muted); padding: 7px 12px; border-radius: 10px; text-decoration: none; }
.doc-nav a:hover { color: var(--text); background: var(--card-2); }
.docs-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.endpoint { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 14px; margin: 8px 0 14px; flex-wrap: wrap; }
.method { padding: 3px 9px; border-radius: 7px; font-weight: 700; font-size: 12px; }
.m-post { background: var(--ok-soft); color: var(--ok-ink); }
.m-get { background: var(--info-soft); color: var(--info-ink); }
.params { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 10px 0 18px; }
.params th, .params td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.params th { color: var(--muted); font-size: 13px; }
.params td:first-child { font-family: var(--mono); font-size: 13px; white-space: nowrap; color: var(--brand-ink); }
.mock { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: var(--shadow-lg); }
.mock-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.mock-row:last-child { border-bottom: 0; }
.mock-row span { color: var(--muted); }

/* ---------- utils ---------- */
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.m-0 { margin: 0; }
.w-100 { width: 100%; }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn-ink); } .info { color: var(--info); }
.break { word-break: break-all; }
.hidden, [hidden] { display: none !important; }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 18px 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.flip { transform: scaleX(-1); }
.stat-grid-sm { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mini { padding: 14px 16px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); }
.mini .stat-value { font-size: 22px; }
.inline-form { display: inline; }
.show-sm { display: none !important; }
.when-dark { display: none; }
:root[data-theme="dark"] .when-dark { display: inline; }
:root[data-theme="dark"] .when-light { display: none; }

/* ---------- จอกลาง ---------- */
@media (max-width: 1180px) {
  .grid-4, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .content { padding: 28px 28px 56px; }
}
@media (max-width: 1060px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-block: 40px 64px; gap: 48px; }
  .hero-copy { text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-note { justify-content: center; }
}

/* ---------- มือถือ / แท็บเล็ต: เมนูล่าง + ลิ้นชัก ---------- */
@media (max-width: 960px) {
  :root { --bottom-safe: calc(var(--bottom-h) + env(safe-area-inset-bottom, 0px)); }
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(320px, 86vw); height: 100%; z-index: 60; transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--shadow-lg); padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  body.nav-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(15, 26, 51, .45); opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  .drawer-close { display: inline-flex; }
  .appbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40; height: 60px; padding: 0 12px 0 16px; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
  .appbar .brand img { width: 32px; height: 32px; }
  .appbar-title { font-weight: 700; font-size: 16.5px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .appbar .spacer { flex: 1; }
  .appbar .avatar { width: 34px; height: 34px; font-size: 14px; text-decoration: none; }
  .content { padding: 18px 16px calc(var(--bottom-safe) + 28px); }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: var(--bottom-safe); padding: 0 6px env(safe-area-inset-bottom, 0px); background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line); }
  .bn-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: var(--bottom-h); border: 0; background: none; color: var(--muted); font: 500 11.5px var(--font); text-decoration: none !important; cursor: pointer; position: relative; }
  .bn-item .i { width: 23px; height: 23px; }
  .bn-item.is-active { color: var(--brand); font-weight: 600; }
  .bn-item .bn-badge { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
  .bn-fab { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; color: var(--brand-ink); font: 600 11.5px var(--font); text-decoration: none !important; }
  .bn-fab .fab { width: 58px; height: 58px; margin-top: -18px; border-radius: 20px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 10px 22px -8px rgba(23, 102, 255, .75), 0 0 0 5px var(--card); }
  .bn-fab.is-active .fab { box-shadow: 0 10px 22px -8px rgba(23, 102, 255, .75), 0 0 0 5px var(--card), 0 0 0 8px var(--brand-soft-2); }
  .toasts { left: 16px; right: 16px; bottom: calc(var(--bottom-safe) + 12px); align-items: center; }
  .page-head { margin-bottom: 18px; }
  .page-head .desk-only { display: none; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .pay-box { grid-template-columns: minmax(0, 1fr); }
  .qr-frame { max-width: 280px; margin: 0 auto; }
  .site-links { display: none; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
  .docs-grid { grid-template-columns: minmax(0, 1fr); }
  .doc-nav { display: none; }
  .options-3 { grid-template-columns: minmax(0, 1fr); }
  .use-cards { grid-template-columns: minmax(0, 1fr); }
  .steps-h { grid-template-columns: minmax(0, 1fr); }
  .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
  .auth-brand { display: flex; }
  .auth-main { padding: 28px 16px 40px; align-items: start; }
  .hide-md { display: none !important; }
  .card { padding: 20px; }
  .card-flush { padding: 0; }
}
@media (max-width: 600px) {
  h1 { font-size: 23px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stats .card { padding: 14px 16px; }
  .stat-value { font-size: 23px; }
  .stat-label { font-size: 13px; }
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .options-2, .accounts, .check-options { grid-template-columns: minmax(0, 1fr); }
  .card-flush > .card-head { padding: 16px 16px 0; }
  .list-row { padding: 12px 16px; gap: 12px; grid-template-columns: 38px minmax(0, 1fr) auto; }
  .row-icon { width: 38px; height: 38px; border-radius: 12px; }
  .list-group { padding: 8px 16px 6px; }
  .result-body { grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .result-thumb { width: 64px; height: 86px; }
  .result-head { padding: 12px 14px; }
  .result-lines li { grid-template-columns: 70px minmax(0, 1fr); }
  .dropzone { min-height: 0; padding: 26px 16px; }
  .dz-desktop { display: none; }
  .hero-card { padding: 22px 20px; }
  .hc-art { display: none; }
  .verdict { flex-wrap: wrap; padding: 18px; }
  .verdict .v-amount { margin-left: 0; text-align: left; width: 100%; }
  .wizard-card { padding: 20px; }
  .stepper li { font-size: 12px; }
  .wrap { padding-inline: 18px; }
  .section { padding: 60px 0; }
  .cta-band { padding: 36px 22px; }
  .phone { width: 270px; height: 540px; }
  .fc-1 { left: -6px; top: 90px; } .fc-2 { right: -6px; bottom: 80px; }
  .hide-sm { display: none !important; }
  .show-sm { display: revert !important; }
  .compare th, .compare td { padding: 12px 12px; font-size: 14px; }
  .table td, .table th { padding-left: 12px; padding-right: 12px; }
  .auth-card > .card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- ชิปธนาคาร ---------- */
.bank-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; color: var(--text-2); white-space: nowrap; }
.bank-chip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; box-shadow: 0 0 0 2px var(--card); }

/* ---------- ตัวกรอง / หน้าเพจ ---------- */
.filter-card { padding: 18px; }
.search-row { display: flex; gap: 10px; }
.search-box { flex: 1; }
.more-filters { margin-top: 12px; }
.more-filters > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 14px; list-style: none; padding: 4px 0; }
.more-filters > summary::-webkit-details-marker { display: none; }
.more-filters > summary:hover { color: var(--text); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; padding: 0 4px; }
.jump { display: flex; gap: 8px; margin: -6px 0 22px; overflow-x: auto; scrollbar-width: none; }
.jump::-webkit-scrollbar { display: none; }
.jump a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap; text-decoration: none; }
.jump a:hover { border-color: var(--line-strong); color: var(--text); }
.set-section { scroll-margin-top: 90px; }
.set-section + .set-section { margin-top: 20px; }
.provider-fields { margin-top: 18px; padding: 18px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); }
.provider-fields .field:last-child { margin-bottom: 0; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.card-head > :first-child { min-width: 0; flex: 1 1 auto; }
.card-head { flex-wrap: wrap; }
.filter-card .chips { margin: 0 -18px; padding: 0 18px 2px; }
@media (max-width: 600px) {
  .page-head > .btn, .page-head .actions .btn { height: 38px; font-size: 13.5px; padding: 0 12px; }
  .result-time { display: none; }
}
.card > .bleed { margin: 0 -24px -24px; border-top: 1px solid var(--line); }
@media (max-width: 960px) { .card > .bleed { margin: 0 -20px -20px; } }
.pc-usage { flex: 1; min-width: 240px; max-width: 420px; }
.pay-steps { list-style: none; counter-reset: ps; padding: 0; margin: 0; display: grid; gap: 22px; }
.pay-steps > li { position: relative; padding-left: 46px; min-width: 0; }
.pay-steps > li::before { counter-increment: ps; content: counter(ps); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.pay-steps > li > b { display: block; font-size: 16px; margin: 4px 0 8px; }
@media (max-width: 600px) { .pay-steps > li { padding-left: 0; } .pay-steps > li::before { position: static; display: inline-grid; margin-bottom: 6px; } }
.affix .input.has-btn { padding-right: 48px; }
.affix-btn { position: absolute; right: 6px; width: 36px; height: 36px; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.affix-btn:hover { background: var(--card-2); color: var(--text); }
h1, h2, h3, .section-head p, .lead { text-wrap: balance; }
p { text-wrap: pretty; }
@media (max-width: 600px) {
  .float-card { display: none; }
  .logos { gap: 8px 18px; padding: 18px 16px; }
  .logos .lbl { flex-basis: 100%; text-align: center; }
  .eyebrow { padding: 5px; }
  .eyebrow .eb-text { display: none; }
  .site-nav { gap: 8px; height: 64px; }
  .site-nav .brand-name small { display: none; }
  .site-nav .brand img { width: 34px; height: 34px; }
  .site-login, .site-cta { height: 38px; padding: 0 12px; font-size: 14px; }
  .hero h1 { margin-top: 16px; }
}

/* ---------- ปรับหลังรีวิวดีไซน์ ---------- */
.card-head:not(:has(.card-sub)) { align-items: center; }
.card-title .t-icon { margin-top: 1px; }
.filter-card .chips { margin: 12px -18px 0; padding: 0 18px 2px; }
.search-row .btn { height: 46px; }
.chips, .jump { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.row-sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-ref { font-size: 12px; font-weight: 600; color: var(--brand-ink); background: var(--brand-soft); padding: 1px 8px; border-radius: 99px; white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.row-title .soft { color: var(--text-2); }
.card-flush > .card-head { padding: 20px 24px 0; }
.list-row, .list-group, .card-foot { padding-inline: 24px; }
.check-card .check-options { margin: 0 0 16px; }
.result { scroll-margin-top: 84px; }
.result-meta-line { font-size: 13px; color: var(--muted); margin-top: 10px; }
.result-next { margin-top: 12px; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: flex-start; }
.result-next:empty { display: none; }
.result-next .i { margin-top: 2px; }
.result.is-pass .result-next { background: var(--ok-soft); color: var(--ok-ink); }
.result.is-qr_only .result-next { background: var(--info-soft); color: var(--info-ink); }
.result.is-fail .result-next { background: var(--bad-soft); color: var(--bad-ink); }
.result.is-error .result-next { background: var(--warn-soft); color: var(--warn-ink); }
.check-card.has-results .dropzone { min-height: 0; padding: 16px 18px; flex-direction: row; gap: 14px; justify-content: flex-start; text-align: left; }
.check-card.has-results .dz-icon { width: 48px; height: 48px; border-radius: 15px; margin: 0; flex: none; }
.check-card.has-results .dropzone p { display: none; }
.check-card.has-results .dropzone h2 { font-size: 16.5px; }
:root[data-theme="dark"] .bank-chip i, :root[data-theme="dark"] .bank-dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .3); }
:root[data-theme="dark"] .phone { background: #2a3656; box-shadow: 0 50px 90px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .1); }
:root[data-theme="dark"] .phone-notch { background: #2a3656; }
.logos .lbl { justify-content: center; }
.compare thead th { white-space: nowrap; }
.phone-wrap { position: relative; }
.float-card { width: max-content; max-width: 260px; }
.fc-1 { left: auto; right: calc(100% - 14px); top: 120px; }
.fc-2 { right: -44px; bottom: 44px; }
@media (max-width: 1279px) and (min-width: 1061px) { .fc-1 { display: none; } }
.hint, .card-sub, .o-desc, .o-list li, .use-card span, .step-h p, .f-fix span, .alert > div, .check span, .stat-foot, .feature p, .result-title span, .row-sub { text-wrap: pretty; }
.pay-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; justify-content: center; }
.copy-inline { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.copy-inline .btn { height: 28px; padding: 0 9px; font-size: 12.5px; }
.pay-foot { display: flex; justify-content: flex-end; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.plan-feats li.note { color: var(--muted); font-size: 13.5px; }
.plan-feats li.note .i { color: var(--muted); }
@media (max-width: 960px) {
  .page-head h1.dup { display: none; }
  .page-head p { margin-top: 0; }
  .appbar [data-theme-toggle] { display: none; }
  .btn-sm { height: 40px; }
  .chip, .jump a { height: 40px; }
  .back-link { min-height: 40px; }
  .more-filters > summary { min-height: 40px; }
  .hc-mode { height: 36px; }
  .jump { flex-wrap: wrap; -webkit-mask-image: none; mask-image: none; }
  .bn-item, .bn-fab { height: var(--bottom-h); justify-content: flex-end; padding-bottom: 11px; }
  .bn-fab { gap: 0; }
  .bn-fab .fab { margin: 0 0 3px; width: 56px; height: 56px; }
  .card-flush > .card-head { padding: 16px 20px 0; }
  .list-row, .list-group, .card-foot { padding-inline: 20px; }
}
@media (max-width: 600px) {
  .pay-steps > li { padding-left: 42px; }
  .pay-steps > li::before { position: absolute; display: grid; margin: 0; width: 30px; height: 30px; }
  .result-body { grid-template-columns: 52px minmax(0, 1fr); row-gap: 0; }
  .result-thumb { width: 52px; height: 70px; }
  .result-lines li { grid-template-columns: 62px minmax(0, 1fr); }
  .list-row, .list-group, .card-foot { padding-inline: 16px; }
  /* จอเล็ก: รูปสลิปอยู่ข้างยอดเงิน ส่วนผลเช็ก/สิ่งที่ต้องทำใช้เต็มความกว้างการ์ด */
  .result-info { display: contents; }
  .result-thumb { grid-column: 1; grid-row: 1 / span 2; }
  .result-amount, .result-lines { grid-column: 2; }
  .result-notes, .checklist, .result-next, .result-meta-line, .result-actions { grid-column: 1 / -1; }
}
.options .option { align-items: center; }
.options .o-list { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; }
.options .o-tick { align-self: center; }
.provider-fields .more-filters { margin-top: 4px; }
@media (max-width: 600px) { .options .option { align-items: flex-start; } .options .o-icon { width: 38px; height: 38px; } }
.account.is-light { color: #2b2100; }
.account.is-light .btn-ghost { color: rgba(43, 33, 0, .75); }
@media (max-width: 600px) {
  /* ตัวเลือก: วงกลมติ๊กไปอยู่มุมขวาบน ให้ข้อความได้ความกว้างเต็ม */
  .options .o-tick { position: absolute; top: 16px; right: 16px; }
  .options .o-title { padding-right: 30px; }
  /* ลิงก์ไปหัวข้อ: แถวเดียว ไม่มีไอคอน */
  .jump { gap: 6px; }
  .jump a { padding: 0 12px; }
  .jump a .i { display: none; }
}
@media (max-width: 600px) {
  /* ตารางเทียบบนมือถือ: คอลัมน์แรกต้องกว้างพอให้อ่านเป็นคำ ไม่หักทีละตัวอักษร */
  .compare { table-layout: fixed; font-size: 14px; }
  .compare thead th { white-space: normal; }
  .compare th, .compare td { padding: 12px 10px; }
  .compare th:first-child, .compare td:first-child { width: 40%; padding-left: 14px; }
  .compare thead th:not(:first-child), .compare td.yes, .compare td.no { text-align: center; }
  .compare th small { font-size: 12px; line-height: 1.4; margin-top: 2px; }
}
@media (max-width: 600px) {
  /* ชิปกรองผล: ขึ้นบรรทัดใหม่แทนการเลื่อนซ่อน ให้เห็นครบทุกตัวเลือก */
  .filter-card .chips { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; -webkit-mask-image: none; mask-image: none; }
  /* ปุ่มท้ายขั้นตอน: ปุ่มหลักเต็มความกว้างอยู่บน ปุ่มรองอยู่ล่าง */
  .wizard-foot { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
  .wizard-foot > .btn-primary { width: 100%; justify-content: center; }
  .wizard-foot > :not(.btn-primary) { align-self: center; }
}
.result-meta-line:empty { display: none; }
@media (max-width: 600px) { .compare td.small { text-align: center; font-size: 12.5px; line-height: 1.45; } }
