/* หลังบ้านแพลตฟอร์ม + หน้าอัปเกรด + หน้าแรกแพลตฟอร์ม */
/* สีตามคู่มือแบรนด์ BILLY POS: Billy Blue #1537D5 · Bill Yellow #FFD34E · Receipt Ivory #FFF8EA · Ink Navy #111525 */
:root { --ink: #111525; --muted: #5E6475; --line: #E8E2D4; --bg: #FFF8EA; --card: #fff; --brand: #1537D5; --brand-soft: #E5EAFB; --gold: #FFD34E; --ivory: #FFF8EA; --ok: #15803d; --warn: #b45309; --bad: #b91c1c; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'Helvetica Neue', Thonburi, 'Noto Sans Thai', system-ui, sans-serif; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px 64px; }
header.bar { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 10; }
header.bar .wrap { display: flex; align-items: center; gap: 24px; padding-bottom: 0; min-height: 56px; }
header.bar b { font-size: 17px; letter-spacing: .02em; }
nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
nav button { background: none; border: 0; color: #d6d3d1; padding: 17px 14px; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
nav button[aria-current="true"] { color: #fff; border-color: var(--gold); font-weight: 600; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 500; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: #a8a29e; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
h1.page { font-size: 22px; margin: 28px 0 16px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.stat small { color: var(--muted); display: block; }
.stat b { font-size: 30px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tablewrap { overflow-x: auto; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
th { font-size: 13px; color: var(--muted); font-weight: 500; background: #f5f5f4; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #fafaf9; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #f5f5f4; }
.pill.ok { background: #dcfce7; color: var(--ok); } .pill.warn { background: #fef3c7; color: var(--warn); } .pill.bad { background: #fee2e2; color: var(--bad); } .pill.brand { background: var(--brand-soft); color: var(--brand); }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: #fff; min-height: 38px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
label.f { display: block; margin-top: 12px; }
label.f > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
label.f input, label.f select, label.f textarea { width: 100%; }
.row { display: flex; gap: 12px; flex-wrap: wrap; } .row > * { flex: 1; min-width: 140px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
dialog { border: 0; border-radius: 16px; padding: 0; width: min(760px, 94vw); max-height: 90vh; box-shadow: 0 24px 80px rgb(0 0 0 / .3); }
dialog::backdrop { background: rgb(0 0 0 / .45); }
.dlg-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.dlg-head h2 { flex: 1; font-size: 18px; }
.dlg-body { padding: 18px 22px 24px; }
.dlg-body h3 { font-size: 15px; margin: 22px 0 8px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.meter { height: 8px; background: #f5f5f4; border-radius: 4px; overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.slip { max-width: 260px; border-radius: 8px; border: 1px solid var(--line); display: block; margin-top: 8px; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 99; }
#toast.show { opacity: 1; }
.login { max-width: 380px; margin: 12vh auto 0; }
.login h1 { font-size: 24px; margin-bottom: 4px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; margin-top: 12px; }
.bars i { flex: 1; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.plans { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.plan { position: relative; }
.plan.current { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.plan h3 { font-size: 18px; } .plan .price { font-size: 28px; font-weight: 700; margin: 6px 0; } .plan .price small { font-size: 14px; font-weight: 400; color: var(--muted); }
.plan ul { padding: 0; margin: 12px 0; list-style: none; } .plan li { padding: 3px 0; } .plan li::before { content: "✓ "; color: var(--ok); font-weight: 700; } .plan li.no { color: #a8a29e; } .plan li.no::before { content: "– "; color: #a8a29e; }
.qrbox { background: #fff; padding: 12px; border: 1px solid var(--line); border-radius: 12px; width: 240px; margin: 12px auto; } .qrbox canvas { width: 100%; display: block; image-rendering: pixelated; }
.center { text-align: center; }
/* หน้าแรกแพลตฟอร์ม */
.land { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; background: radial-gradient(90% 70% at 85% 0%, #ffe3ad 0%, transparent 60%), radial-gradient(70% 80% at 0% 100%, #dbe3f7 0%, transparent 60%), var(--ivory); }
.land-in { max-width: 760px; }
.land h1 { font-size: clamp(34px, 7vw, 60px); line-height: 1.12; letter-spacing: -.02em; }
.land h1 em { font-style: normal; color: var(--brand); }
.land p.lead { font-size: 18px; color: #57534e; margin: 18px 0 28px; max-width: 560px; }
.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 36px; }
.feats div { background: rgb(255 255 255 / .7); border: 1px solid var(--line); border-radius: 14px; padding: 16px; backdrop-filter: blur(6px); }
.feats b { display: block; margin-bottom: 2px; }

.land-logo { display: block; height: 100px; width: auto; margin-bottom: 26px; }
header.bar .brand-mark { height: 30px; width: auto; display: block; } /* โลโก้แนวนอนบนพื้นน้ำเงิน (ตัวขาว ป้าย POS เหลือง) */
