/* FTS บัญชี — same look as หลังบ้าน HR (white surfaces on light grey, one sans font, brand red only as the accent) */
:root {
  --bg: #F4F4F6; --surface: #FFFFFF; --ink: #111418; --soft: #6B7280; --mute: #9CA3AF; --line: #E6E6EA;
  --red: #E1251B; --red-dark: #B5170F; --red-50: #FDEEEC; --green: #16A34A; --green-50: #EAF7EE; --amber: #D97706; --amber-50: #FEF5E6;
  --blue: #1B6FE8; --blue-50: #EAF2FD;
  --r: 18px; --shadow: 0 1px 2px rgba(17,20,24,.04), 0 8px 24px rgba(17,20,24,.05);
  --font: "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; transition: transform .08s ease, background-color .15s ease; }
button:active:not(:disabled) { transform: scale(.98); }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
[hidden] { display: none !important; }
.i { width: 1.15em; height: 1.15em; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

header { position: sticky; top: 0; z-index: 2; background: rgba(244,244,246,.88); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); }
.bar { max-width: 720px; margin: 0 auto; padding: 14px 16px 10px; }
.brand { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font: 600 12px var(--font); letter-spacing: .06em; color: var(--soft); }
.brand::before { content: "FT"; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--red); color: #fff; font: 700 10px var(--font); letter-spacing: 0; }
h1 { margin: 0; font: 700 28px/1.2 var(--font); letter-spacing: -.01em; }
h2 { margin: 22px 2px 10px; font: 600 17px var(--font); }
.sub { margin: 2px 0 0; font-size: 13.5px; color: var(--soft); }
main { max-width: 720px; margin: 0 auto; padding: 6px 16px calc(40px + env(safe-area-inset-bottom, 0px)); }
.center { text-align: center; padding: 48px 16px; color: var(--soft); }

.card { margin-top: 12px; padding: 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card .who { font-size: 13px; color: var(--soft); }
.card .title { font: 600 16px/1.4 var(--font); }
.amt { margin-top: 6px; font: 700 26px/1.15 var(--font); font-variant-numeric: tabular-nums; }
.amt small { font: 500 13px var(--font); color: var(--soft); margin-left: 4px; }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font: 600 12.5px var(--font); white-space: nowrap; }
.pill.red { background: var(--red-50); color: var(--red-dark); }
.pill.amber { background: var(--amber-50); color: #B45309; }
.pill.blue { background: var(--blue-50); color: var(--blue); }
.pill.green { background: var(--green-50); color: #15803D; }
.pill.grey { background: var(--bg); color: var(--soft); }

/* 3-step track */
.track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0 4px; }
.step { position: relative; padding-top: 12px; font-size: 12.5px; line-height: 1.35; color: var(--soft); }
.step::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; border-radius: 3px; background: var(--line); }
.step.done { color: var(--ink); }
.step.done::before { background: var(--green); }
.step.now { color: var(--ink); font-weight: 600; }
.step.now::before { background: var(--amber); }
.step span { display: block; color: var(--soft); font-weight: 400; font-size: 11.5px; }

.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn { flex: 1 1 140px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 14px; border-radius: 14px; font: 600 15px var(--font); text-decoration: none; }
.btn.primary { background: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-dark); }
.btn.ghost { background: var(--bg); color: var(--ink); }
.btn.green { background: #15803D; color: #fff; }
.btn.small { flex: 0 1 auto; min-height: 44px; padding: 8px 12px; font-size: 14px; border-radius: 12px; }

.info { display: flex; gap: 12px; align-items: flex-start; }
.info .ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--red-50); color: var(--red); flex: none; }
.info .ic .i { width: 22px; height: 22px; vertical-align: 0; }
.info b { display: block; font-weight: 600; }
.info p { margin: 2px 0 0; color: var(--soft); font-size: 14px; }

/* bottom sheet */
.scrim { position: fixed; inset: 0; z-index: 9; background: rgba(17,20,24,.42); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; padding: 10px 18px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 22px 22px 0 0; background: var(--surface); animation: up .22s ease; }
.sheet .grab { width: 40px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: var(--line); }
.sheet h3 { margin: 0 0 4px; font: 700 20px var(--font); }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.pick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 150px; margin-top: 14px; border: 2px dashed var(--line); border-radius: 16px; background: var(--bg); color: var(--soft); font-weight: 500; text-align: center; overflow: hidden; }
.pick .i { width: 34px; height: 34px; color: var(--red); }
.pick img { display: block; width: 100%; max-height: 260px; object-fit: contain; background: #000; }
label.f { display: block; margin-top: 14px; font-size: 13.5px; color: var(--soft); }
label.f input, label.f select { display: block; width: 100%; margin-top: 4px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 10; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 500; box-shadow: var(--shadow); }
.done-big { text-align: center; padding: 18px 0 6px; }
.done-big .ok { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 24px; background: var(--green-50); color: var(--green); }
.done-big .ok .i { width: 36px; height: 36px; vertical-align: 0; }
.step.red::before { background: var(--red); }
.nowrap { white-space: nowrap; }
.sub, .title { text-wrap: pretty; }
body.partner .brand::before { display: none; }
.row a { color: var(--ink); font-weight: 600; text-decoration: none; }
