:root {
  --bg: #f4f6fb; --card: #fff; --ink: #1c2333; --muted: #6b7489; --line: #e3e7f0;
  --brand: #1f3b73; --brand-2: #2f5bb7; --accent: #f5b041;
  --ok: #1e8e5a; --ok-bg: #e5f6ee; --warn: #b26a00; --warn-bg: #fff4e0; --bad: #c0392b; --bad-bg: #fdecea;
  --r: 12px; --shadow: 0 1px 2px rgba(20,30,60,.06), 0 2px 8px rgba(20,30,60,.05);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Sarabun, "Leelawadee UI", Tahoma, system-ui, sans-serif; font-size: 16px; line-height: 1.45;
  background: var(--bg); color: var(--ink); -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
.boot { padding: 40px; text-align: center; color: var(--muted); }

/* layout */
.top { position: sticky; top: 0; z-index: 5; background: var(--brand); color: #fff;
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
.top .brand { font-weight: 700; font-size: 18px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .who { font-size: 14px; opacity: .9; text-align: right; }
.top button { background: rgba(255,255,255,.15); border: 0; color: #fff; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.shell { display: flex; min-height: calc(100vh - 52px); }
nav.tabs { display: flex; flex-direction: column; gap: 4px; width: 200px; padding: 12px; border-right: 1px solid var(--line); background: #fff; }
nav.tabs a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
nav.tabs a.on { background: #e8eefb; color: var(--brand); }
nav.tabs .badge { margin-left: auto; }
main { flex: 1; min-width: 0; padding: 16px; max-width: 1100px; }
@media (max-width: 760px) {
  .shell { display: block; }
  nav.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; width: auto; flex-direction: row; justify-content: space-around;
    border-right: 0; border-top: 1px solid var(--line); padding: 4px 4px max(4px, env(safe-area-inset-bottom)); }
  nav.tabs a { flex-direction: column; gap: 0; font-size: 12px; padding: 6px 4px; flex: 1; justify-content: center; position: relative; }
  nav.tabs a .ic { font-size: 20px; }
  nav.tabs .badge { position: absolute; top: 2px; right: 18%; margin: 0; }
  main { padding: 12px 12px 90px; }
}

/* parts */
h1 { font-size: 22px; margin: 4px 0 12px; }
h2 { font-size: 18px; margin: 20px 0 10px; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.money { font-weight: 700; font-variant-numeric: tabular-nums; }
.bad { color: var(--bad); } .ok { color: var(--ok); } .warn { color: var(--warn); }
.badge { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: #e8eefb; color: var(--brand); white-space: nowrap; }
.badge.bad { background: var(--bad-bg); color: var(--bad); } .badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.grey { background: #eef0f4; color: var(--muted); }
.badge.red { background: var(--bad); color: #fff; }

.btn { border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 700; cursor: pointer; background: var(--brand-2); color: #fff; min-height: 44px; }
.btn.alt { background: #e8eefb; color: var(--brand); }
.btn.ghost { background: transparent; color: var(--brand-2); padding: 6px 10px; min-height: 0; }
.btn.danger { background: var(--bad); }
.btn.okc { background: var(--ok); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sm { padding: 6px 10px; min-height: 34px; font-size: 14px; }

input[type=text], input[type=search], input[type=tel], input[type=number], input[type=date], input[type=password], select, textarea {
  width: 100%; border: 1px solid #cfd6e4; border-radius: 10px; padding: 10px 12px; background: #fff; min-height: 44px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: 0; border-color: transparent; }
label.f { display: block; margin: 0 0 12px; }
label.f > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; color: #3a4357; }
.check { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; font-weight: 600; }
.check input { width: 20px; height: 20px; }

.search { position: sticky; top: 52px; z-index: 3; background: var(--bg); padding: 4px 0 8px; }
.search input { font-size: 18px; min-height: 52px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip { border: 1px solid #cfd6e4; background: #fff; border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 14px; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 6px; margin-bottom: 12px; }
.seg button { border: 1px solid #cfd6e4; background: #fff; border-radius: 10px; padding: 10px; cursor: pointer; font-weight: 600; }
.seg button.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.list { display: grid; gap: 8px; }
.item { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 14px; cursor: pointer; text-decoration: none; color: inherit; }
.item:hover { outline: 1px solid #cfd6e4; }
.code { font-weight: 700; color: var(--brand); min-width: 52px; font-variant-numeric: tabular-nums; }
.name { font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 14px; }
.stat .k { font-size: 13px; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.aging { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #eef0f4; margin: 8px 0 4px; }
.aging span { display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.a1 { background: #6fa8f5; } .a2 { background: #f5b041; } .a3 { background: #e67e22; } .a4 { background: #c0392b; }

.tabs2 { display: flex; gap: 6px; margin: 16px 0 10px; border-bottom: 1px solid var(--line); }
.tabs2 button { border: 0; background: none; padding: 8px 12px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; }
.tabs2 button.on { color: var(--brand); border-color: var(--brand); }
.doc { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 14px; }
.doc.void { opacity: .55; }
.doc .line2 { font-size: 14px; color: var(--muted); }
.slip { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.preview { max-width: 100%; max-height: 260px; border-radius: 10px; margin-top: 8px; display: block; }
table.t { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); font-size: 14px; }
table.t th, table.t td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.t th { background: #f7f8fc; font-weight: 700; }
.scroll { overflow-x: auto; }
.empty { padding: 30px; text-align: center; color: var(--muted); }
.notice { border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; background: var(--warn-bg); color: #6b4300; }
.notice.info { background: #e8eefb; color: var(--brand); }

/* ---------- POS ---------- */
main.wide { max-width: none; }
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 14px; align-items: start; }
.pos-left { min-width: 0; }
.pos-left .row input { flex: 1; width: auto; min-width: 0; }
#pq { font-size: 18px; min-height: 52px; }
.shiftbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #fff; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; box-shadow: var(--shadow); }
.scrollx { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.scrollx .chip { white-space: nowrap; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 8px; }
.ptile { display: flex; flex-direction: column; text-align: left; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px; cursor: pointer; min-height: 96px; box-shadow: var(--shadow); transition: transform .1s, background .2s; }
.ptile:hover { border-color: var(--brand-2); }
.ptile:active, .ptile.hit { transform: scale(.96); background: var(--ok-bg); }
.ptile .pn { font-weight: 600; font-size: 14px; line-height: 1.3; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ptile .pp { font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.ptile .ps { font-size: 12px; color: var(--muted); }
.ptile.out .ps { color: var(--bad); }
.pos-cart { position: sticky; top: 64px; max-height: calc(100vh - 76px); display: flex; flex-direction: column; }
.custbtn { text-align: left; }
.cartlist { overflow-y: auto; flex: 1; min-height: 80px; margin: 0 -14px; padding: 0 14px; }
.cline { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cline .cn { font-weight: 600; font-size: 14px; line-height: 1.3; }
.qty { display: flex; align-items: center; border: 1px solid #cfd6e4; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.qty button { border: 0; background: #f4f6fb; width: 34px; height: 38px; font-size: 18px; cursor: pointer; }
.qty .qv { background: #fff; width: auto; min-width: 40px; font-size: 15px; font-weight: 700; padding: 0 6px; }
.cline .lt { min-width: 76px; text-align: right; font-size: 14px; }
.cline .x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; }
.sum { border-top: 2px solid var(--line); padding-top: 8px; margin-top: 4px; display: grid; gap: 2px; }
.sum .total { font-size: 22px; font-weight: 700; }
.cartbtns { margin-top: 8px; flex-wrap: nowrap; }
.cartbtns .btn { flex: 1; }
.paybtn { width: 100%; margin-top: 8px; font-size: 20px; min-height: 58px; }
.paytotal { font-size: 40px; font-weight: 700; text-align: center; margin: 4px 0 12px; font-variant-numeric: tabular-nums; color: var(--brand); }
.paytotal small { font-size: 16px; color: var(--muted); }
.change { font-size: 22px; text-align: right; margin: 10px 0 4px; }
.change b { color: var(--ok); } .change b.bad { color: var(--bad); }
.quick { margin: -4px 0 4px; }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 8px; }
.paybar { display: none; }
#print { display: none; }
@media (max-width: 1000px) {
  .pos { grid-template-columns: minmax(0, 1fr); }
  .pos-cart { position: static; max-height: none; }
  .cartlist { overflow: visible; }
}
@media (max-width: 760px) {
  nav.tabs { overflow-x: auto; justify-content: flex-start; }
  nav.tabs a { flex: 0 0 64px; }
  .paybar { display: flex; position: fixed; left: 0; right: 0; bottom: 64px; z-index: 6; gap: 10px; align-items: center;
    background: var(--brand); color: #fff; padding: 8px 12px; }
  .paybar[hidden] { display: none; }
  .paybar .btn { background: var(--ok); }
  .pgrid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .paytotal { font-size: 32px; }
}
@media print {
  body > *:not(#print) { display: none !important; }
  #print { display: block; }
  @page { margin: 3mm; }
}
.rc { width: 72mm; font-family: Sarabun, Tahoma, sans-serif; font-size: 12px; color: #000; line-height: 1.35; }
.rc h3 { text-align: center; margin: 0 0 2px; font-size: 16px; }
.rc .c { text-align: center; } .rc .r { text-align: right; white-space: nowrap; } .rc .b, .rc tr.b td { font-weight: 700; }
.rc table { width: 100%; border-collapse: collapse; } .rc td { padding: 1px 0; vertical-align: top; }
.rc hr { border: 0; border-top: 1px dashed #000; margin: 4px 0; }

/* login */
.login { max-width: 380px; margin: 8vh auto; padding: 0 16px; }
.login .logo { width: 72px; height: 72px; display: block; margin: 0 auto 10px; }
.login h1 { text-align: center; }
.pin { letter-spacing: 8px; font-size: 24px; text-align: center; }

/* modal */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(15,22,40,.45); }
dialog form { padding: 18px; }
dialog h2 { margin-top: 0; }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
#toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #1c2333; color: #fff; padding: 10px 16px; border-radius: 10px;
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; }
#toast.err { background: var(--bad); }

/* =====================================================================
   ธีม Phoenix Neon — พื้นมืด การ์ดกระจก ม่วง · ชมพู · ฟ้า (บล็อกนี้ทับธีมเดิมด้านบน)
   ===================================================================== */
:root {
  --bg: #0a0918; --card: rgba(28, 22, 60, .58); --card-2: rgba(40, 30, 84, .55); --ink: #EEEBFF; --muted: #A9A3CF;
  --line: rgba(167, 139, 250, .18); --edge: rgba(192, 132, 252, .32);
  --brand: #D8B4FE; --brand-2: #8B5CF6; --pink: #EC4899; --pink-l: #F9A8D4; --cyan: #22D3EE; --accent: #F472B6;
  --ok: #34D399; --ok-bg: rgba(52, 211, 153, .14); --warn: #FBBF24; --warn-bg: rgba(251, 191, 36, .14);
  --bad: #FB7185; --bad-bg: rgba(251, 113, 133, .15);
  --grad: linear-gradient(135deg, #8B5CF6 0%, #D946EF 55%, #EC4899 100%);
  --glow: 0 0 0 1px var(--edge), 0 8px 30px rgba(10, 6, 30, .55), 0 0 24px rgba(168, 85, 247, .12);
  --shadow: var(--glow);
  color-scheme: dark;
}
body {
  background: var(--bg);
  background-image:
    radial-gradient(900px 520px at 85% -10%, rgba(236, 72, 153, .22), transparent 60%),
    radial-gradient(800px 600px at -10% 20%, rgba(139, 92, 246, .28), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(34, 211, 238, .14), transparent 60%);
  background-attachment: fixed;
}
a { color: var(--pink-l); }
.card, .stat, .item, .doc, .shiftbar, table.t, .ptile {
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--glow);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.card.soft { background: var(--card-2); }
.item:hover, .ptile:hover { outline: 0; border-color: var(--pink); box-shadow: var(--glow), 0 0 18px rgba(236, 72, 153, .35); }

/* แถบบน + เมนู */
.top { background: rgba(14, 10, 34, .72); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.top .brand { background: linear-gradient(90deg, #E9D5FF, #F9A8D4 60%, #A5F3FC); -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: .3px; filter: drop-shadow(0 0 10px rgba(236, 72, 153, .35)); }
.top button { background: rgba(255, 255, 255, .08); border: 1px solid var(--line); }
nav.tabs { background: rgba(14, 10, 34, .55); border-color: var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
nav.tabs a { color: var(--muted); }
nav.tabs a.on { background: linear-gradient(135deg, rgba(139, 92, 246, .35), rgba(236, 72, 153, .28)); color: #fff;
  box-shadow: inset 0 0 0 1px var(--edge), 0 0 18px rgba(236, 72, 153, .25); }
@media (max-width: 760px) { nav.tabs { background: rgba(14, 10, 34, .9); } }
.search { background: transparent; }

/* ปุ่ม + ช่องกรอก */
.btn { background: var(--grad); box-shadow: 0 4px 18px rgba(217, 70, 239, .35); }
.btn.alt { background: rgba(167, 139, 250, .14); color: var(--ink); box-shadow: inset 0 0 0 1px var(--edge); }
.btn.ghost { background: transparent; color: var(--pink-l); box-shadow: none; }
.btn.okc { background: linear-gradient(135deg, #06B6D4, #8B5CF6 60%, #EC4899); box-shadow: 0 4px 22px rgba(34, 211, 238, .3); }
.btn.danger { background: linear-gradient(135deg, #F43F5E, #EC4899); }
input[type=text], input[type=search], input[type=tel], input[type=number], input[type=date], input[type=password], select, textarea {
  background: rgba(10, 8, 28, .55); border-color: var(--edge); color: var(--ink); }
input::placeholder, textarea::placeholder { color: #7D77A6; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--pink); box-shadow: 0 0 14px rgba(236, 72, 153, .35); }
label.f > span { color: var(--muted); }
.chip, .seg button { background: rgba(167, 139, 250, .1); border-color: var(--edge); color: var(--ink); }
.chip.on, .seg button.on { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 0 14px rgba(236, 72, 153, .35); }
.qty { border-color: var(--edge); }
.qty button { background: rgba(167, 139, 250, .14); color: var(--ink); }
.qty .qv { background: rgba(10, 8, 28, .5); }
.tabs2 { border-color: var(--line); }
.tabs2 button.on { color: var(--pink-l); border-color: var(--pink); }

/* ป้าย + ตัวเลข */
.badge { background: rgba(167, 139, 250, .2); color: #E9D5FF; }
.badge.grey { background: rgba(255, 255, 255, .08); color: var(--muted); }
.badge.red { background: var(--pink); color: #fff; box-shadow: 0 0 10px rgba(236, 72, 153, .6); }
.code { color: var(--pink-l); }
.stat .v, .paytotal, .sum .total .money { text-shadow: 0 0 18px rgba(217, 70, 239, .35); }
.paytotal { color: #fff; }
.ptile .pp { color: var(--pink-l); }
.notice { background: var(--warn-bg); color: #FDE68A; border: 1px solid rgba(251, 191, 36, .3); }
.notice.info { background: rgba(139, 92, 246, .16); color: #E9D5FF; border-color: var(--edge); }
table.t th { background: rgba(139, 92, 246, .14); color: var(--muted); font-weight: 600; }
table.t th, table.t td { border-color: var(--line); }
.cline, .sum { border-color: var(--line); }
.aging { background: rgba(255, 255, 255, .08); }
.a1 { background: #8B5CF6; } .a2 { background: #D946EF; } .a3 { background: #EC4899; } .a4 { background: #FB7185; }

/* หน้าต่าง */
dialog { background: rgba(22, 17, 48, .92); color: var(--ink); box-shadow: 0 0 0 1px var(--edge), 0 24px 70px rgba(0, 0, 0, .6), 0 0 40px rgba(236, 72, 153, .18);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
dialog::backdrop { background: rgba(5, 3, 18, .7); backdrop-filter: blur(3px); }
#toast { background: rgba(28, 22, 60, .95); border: 1px solid var(--edge); box-shadow: var(--glow); }
.paybar { background: rgba(20, 14, 46, .92); border-top: 1px solid var(--edge); backdrop-filter: blur(14px); }

/* ---------- กราฟ ---------- */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-top: 12px; }
.chart { position: relative; padding: 14px 14px 10px; }
.chart h3 { margin: 0 0 2px; font-size: 15px; }
.chart .sub { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: rgba(167, 139, 250, .14); stroke-width: 1; }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .tip { position: absolute; pointer-events: none; background: rgba(14, 10, 34, .95); border: 1px solid var(--edge); border-radius: 10px;
  padding: 6px 10px; font-size: 13px; white-space: nowrap; transform: translate(-50%, -110%); box-shadow: var(--glow); opacity: 0; transition: opacity .12s; z-index: 2; }
.chart .tip.on { opacity: 1; }
.legend2 { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.legend2 i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.mix { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; background: rgba(255, 255, 255, .06); margin: 10px 0 2px; }
.mix span { display: block; min-width: 2px; }
.hbar { display: grid; grid-template-columns: 96px 1fr auto; gap: 8px; align-items: center; font-size: 13px; margin: 6px 0; }
.hbar .track { height: 10px; border-radius: 0 4px 4px 0; background: rgba(255, 255, 255, .05); }
.hbar .fill { height: 100%; border-radius: 0 4px 4px 0; background: linear-gradient(90deg, #8B5CF6, #EC4899); box-shadow: 0 0 10px rgba(236, 72, 153, .4); }
@media (max-width: 760px) { .chart .axis text { font-size: 19px; } .charts { grid-template-columns: minmax(0, 1fr); } }
.chart .bar { transition: opacity .12s; } .chart .bar.dim { opacity: .35; }
.c-cash { background: #0891B2; } .c-transfer { background: #EC4899; } .c-credit { background: #8B5CF6; }

/* =====================================================================
   ธีมล้ำสมัย (ทดลอง) — 1 holo โฮโลแกรม · 2 cyber เทอร์มินัล · 3 aurora ออโรร่าชมพู
   เลือกด้วยปุ่ม "ธีม 1 2 3" ที่แถบบน (เก็บใน localStorage aio.theme)
   ===================================================================== */
html[data-theme="holo"] {   /* สีเข้มข้นขึ้น (18 พ.ย.): ฟ้านีออน · ม่วงไฟฟ้า · ชมพูช็อก */
  --bg: #03040c; --card: rgba(12, 14, 44, .66); --card-2: rgba(22, 20, 66, .66); --dialog: rgba(8, 10, 32, .95);
  --ink: #F2F6FF; --muted: #9FB0D8; --line: rgba(0, 229, 255, .2); --edge: rgba(0, 229, 255, .5);
  --brand: #67E8F9; --pink: #FF2E97; --pink-l: #FF7AC0; --a1: #8B2CFF; --a2: #00E5FF;
  --edge-grad: linear-gradient(135deg, #00E5FF, rgba(139, 44, 255, .55) 45%, #FF2E97);
  --btn-grad: linear-gradient(120deg, #00D4FF, #8B2CFF 50%, #FF2E97);
  --text-grad: linear-gradient(90deg, #5CF2FF, #B98CFF 50%, #FF6EB8);
  --accent-glow: rgba(0, 229, 255, .5); --active-bg: linear-gradient(90deg, rgba(0, 229, 255, .26), rgba(255, 46, 151, .14));
  --glow: 0 12px 40px -14px rgba(0, 0, 0, .9), 0 0 34px -6px rgba(0, 229, 255, .42), 0 0 50px -18px rgba(255, 46, 151, .4);
  --fx-aurora: radial-gradient(38% 32% at 10% 15%, rgba(139, 44, 255, .7), transparent 70%),
    radial-gradient(36% 30% at 90% 10%, rgba(255, 46, 151, .6), transparent 70%),
    radial-gradient(44% 34% at 60% 98%, rgba(0, 229, 255, .5), transparent 70%);
  --fx-grid: rgba(0, 229, 255, .1); --num: "Orbitron"; --r: 16px; --btn-r: 12px; --in-r: 12px;
}
html[data-theme="cyber"] {
  --bg: #05010b; --card: rgba(22, 6, 38, .74); --card-2: rgba(34, 10, 56, .7); --dialog: rgba(14, 3, 26, .96);
  --ink: #F5E8FF; --muted: #A98BC0; --line: rgba(217, 70, 239, .2); --edge: rgba(232, 121, 249, .45);
  --brand: #F0ABFC; --pink: #FF2E97; --pink-l: #FF8AC9; --a1: #9333EA; --a2: #E879F9;
  --edge-grad: linear-gradient(135deg, rgba(232, 121, 249, .85), rgba(147, 51, 234, .25) 50%, rgba(255, 46, 151, .85));
  --btn-grad: linear-gradient(120deg, #7E22CE, #D946EF 50%, #FF2E97);
  --text-grad: linear-gradient(90deg, #F5D0FE, #FF7AC6);
  --accent-glow: rgba(217, 70, 239, .4); --active-bg: linear-gradient(90deg, rgba(217, 70, 239, .25), rgba(255, 46, 151, .08));
  --glow: 0 12px 40px -14px rgba(0, 0, 0, .95), 0 0 26px -8px rgba(217, 70, 239, .45);
  --fx-aurora: radial-gradient(40% 30% at 80% 10%, rgba(147, 51, 234, .45), transparent 70%),
    radial-gradient(35% 30% at 10% 80%, rgba(255, 46, 151, .3), transparent 70%);
  --fx-grid: rgba(217, 70, 239, .09); --num: "JetBrains Mono"; --r: 6px; --btn-r: 6px; --in-r: 6px;
}
html[data-theme="aurora"] {
  --bg: #0c0414; --card: rgba(44, 10, 50, .5); --card-2: rgba(60, 16, 70, .5); --dialog: rgba(26, 6, 32, .94);
  --ink: #FFF0FA; --muted: #D7A9CC; --line: rgba(255, 79, 180, .2); --edge: rgba(255, 121, 198, .45);
  --brand: #FFB3E0; --pink: #FF4FB4; --pink-l: #FF9BD2; --a1: #C026D3; --a2: #FF4FB4;
  --edge-grad: linear-gradient(135deg, rgba(255, 121, 198, .9), rgba(168, 85, 247, .35) 50%, rgba(96, 165, 250, .65));
  --btn-grad: linear-gradient(120deg, #FF4FB4, #C026D3 55%, #7C3AED);
  --text-grad: linear-gradient(90deg, #FFE0F3, #FF79C6 50%, #D8B4FE);
  --accent-glow: rgba(255, 79, 180, .45); --active-bg: linear-gradient(90deg, rgba(255, 79, 180, .28), rgba(192, 38, 211, .12));
  --glow: 0 14px 44px -14px rgba(0, 0, 0, .85), 0 0 34px -6px rgba(255, 79, 180, .4);
  --fx-aurora: radial-gradient(45% 35% at 20% 15%, rgba(255, 79, 180, .55), transparent 70%),
    radial-gradient(40% 35% at 85% 30%, rgba(192, 38, 211, .45), transparent 70%),
    radial-gradient(45% 35% at 50% 100%, rgba(96, 165, 250, .3), transparent 70%);
  --fx-grid: rgba(255, 121, 198, .05); --num: "Kanit"; --r: 22px; --btn-r: 999px; --in-r: 16px;
}

/* --- ส่วนที่ใช้ร่วมกันทุกธีมล้ำสมัย --- */
html[data-theme] body { font-family: Kanit, Sarabun, "Leelawadee UI", Tahoma, sans-serif; background: var(--bg); background-image: none; }
html[data-theme] body::before, html[data-theme] body::after { content: ""; position: fixed; pointer-events: none; }
html[data-theme] body::after {   /* แสงออโรร่าเคลื่อนช้า ๆ */
  inset: -15%; z-index: -2; background: var(--fx-aurora); filter: blur(40px); animation: aio-drift 26s ease-in-out infinite alternate; }
html[data-theme] body::before {  /* ตารางเส้นเรืองแสง */
  inset: 0; z-index: -1;
  background: linear-gradient(var(--fx-grid) 1px, transparent 1px) 0 0 / 46px 46px, linear-gradient(90deg, var(--fx-grid) 1px, transparent 1px) 0 0 / 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%); }
html[data-theme="cyber"] body::before {
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px),
    linear-gradient(var(--fx-grid) 1px, transparent 1px) 0 0 / 32px 32px, linear-gradient(90deg, var(--fx-grid) 1px, transparent 1px) 0 0 / 32px 32px; }
@keyframes aio-drift { from { transform: translate3d(-3%, -2%, 0) rotate(0deg); } to { transform: translate3d(3%, 3%, 0) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { html[data-theme] body::after { animation: none; } }

html[data-theme] :is(h1, h2, h3, .name, nav.tabs a, .btn, .top .brand) { font-weight: 600; }
html[data-theme] h1 { font-size: 26px; background: var(--text-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-theme] :is(.card, .stat, .item, .doc, .shiftbar, .ptile, table.t) {
  border: 1px solid transparent; border-radius: var(--r);
  background: linear-gradient(var(--card), var(--card)) padding-box, var(--edge-grad) border-box;
  box-shadow: var(--glow); }
html[data-theme] .card.soft { background: linear-gradient(var(--card-2), var(--card-2)) padding-box, var(--edge-grad) border-box; }
html[data-theme] :is(.item, .ptile):hover { transform: translateY(-2px); box-shadow: var(--glow), 0 0 26px var(--accent-glow); }
html[data-theme] .ptile { transition: transform .15s, box-shadow .2s; }
html[data-theme] .stat { position: relative; overflow: hidden; }
html[data-theme] .stat::before { content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 2px; background: var(--edge-grad); filter: blur(.3px); }
html[data-theme] :is(.money, .stat .v, .paytotal, .ptile .pp, .code, .num, .chart .axis text, .change b) { font-family: var(--num), Kanit, sans-serif; letter-spacing: .02em; }
html[data-theme] .stat .v:not(.bad):not(.ok):not(.warn), html[data-theme] .paytotal, html[data-theme] .sum .total .money {
  background: var(--text-grad); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none;
  filter: drop-shadow(0 0 12px var(--accent-glow)); }
html[data-theme] .stat .v { font-size: 24px; }
html[data-theme] .ptile .pp, html[data-theme] .code { color: var(--brand); text-shadow: 0 0 10px var(--accent-glow); }

/* แถบบน */
html[data-theme] .top { background: var(--top-bg, rgba(4, 4, 16, .55)); border-bottom: 0; box-shadow: 0 10px 30px -18px var(--accent-glow); }
html[data-theme] .top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--edge-grad); box-shadow: 0 0 12px var(--accent-glow); }
html[data-theme] .top .brand { background: var(--text-grad); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 10px var(--accent-glow)); }
.themes { display: flex; gap: 4px; align-items: center; font-size: 12px; opacity: .9; }
.themes button { border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: var(--ink); cursor: pointer; width: 26px; height: 26px; padding: 0 !important; border-radius: 50% !important; font-size: 12px; font-weight: 700; }
.themes button.on { background: var(--btn-grad, var(--grad)) !important; box-shadow: 0 0 12px var(--accent-glow, rgba(236,72,153,.5)); }

/* เมนูข้าง + ไอคอนเส้น */
nav.tabs .ic svg { width: 20px; height: 20px; display: block; }
html[data-theme] nav.tabs { background: var(--nav-bg, rgba(4, 4, 16, .45)); border-right: 1px solid var(--line); }
html[data-theme] nav.tabs a { color: var(--muted); border-radius: calc(var(--r) * .6); transition: color .15s, background .15s; }
html[data-theme] nav.tabs a:hover { color: var(--ink); }
html[data-theme] nav.tabs a.on { color: #fff; background: var(--active-bg); box-shadow: inset 3px 0 0 var(--a2), 0 0 22px -4px var(--accent-glow); }
html[data-theme] nav.tabs a.on .ic { color: var(--a2); filter: drop-shadow(0 0 6px var(--a2)); }
@media (max-width: 760px) {
  html[data-theme] nav.tabs { background: var(--nav-bg-m, rgba(4, 4, 16, .88)); border-top: 1px solid var(--line); }
  html[data-theme] nav.tabs a.on { box-shadow: inset 0 -3px 0 var(--a2), 0 0 22px -4px var(--accent-glow); }
  .themes span { display: none; }
}

/* ปุ่ม + ช่องกรอก */
html[data-theme] .btn { background: var(--btn-grad); border-radius: var(--btn-r); box-shadow: 0 6px 22px -6px var(--accent-glow); transition: filter .15s, transform .1s; }
html[data-theme] .btn:hover:not(:disabled) { filter: brightness(1.15); }
html[data-theme] .btn:active:not(:disabled) { transform: scale(.98); }
html[data-theme] .btn.alt { background: linear-gradient(var(--dialog), var(--dialog)) padding-box, var(--edge-grad) border-box;
  border: 1px solid transparent; color: var(--ink); box-shadow: none; }
html[data-theme] .btn.ghost { background: transparent; color: var(--brand); box-shadow: none; }
html[data-theme] .btn.okc { background: linear-gradient(120deg, #10B981, #06B6D4 45%, var(--a1)); }
html[data-theme] :is(input[type=text], input[type=search], input[type=tel], input[type=number], input[type=date], input[type=password], select, textarea) {
  background: var(--input-bg, rgba(0, 0, 0, .35)); border-color: var(--line); border-radius: var(--in-r); }
html[data-theme] :is(input, select, textarea):focus { outline: 1px solid var(--a2); box-shadow: 0 0 0 3px var(--accent-glow), 0 0 20px var(--accent-glow); }
html[data-theme] :is(.chip, .seg button) { background: var(--chip-bg, rgba(255, 255, 255, .04)); border-color: var(--line); }
html[data-theme] :is(.chip.on, .seg button.on) { background: var(--btn-grad); box-shadow: 0 0 16px var(--accent-glow); }
html[data-theme] .badge.red { background: var(--pink); box-shadow: 0 0 12px var(--pink); }
html[data-theme] .tabs2 button.on { color: var(--brand); border-color: var(--a2); }
html[data-theme] table.t th { background: var(--chip-bg, rgba(255, 255, 255, .04)); }
html[data-theme] .notice.info { background: var(--active-bg); }
html[data-theme] dialog { background: var(--dialog); border-radius: calc(var(--r) + 4px);
  box-shadow: 0 0 0 1px var(--edge), 0 30px 80px rgba(0, 0, 0, .7), 0 0 50px -10px var(--accent-glow); }
html[data-theme] .hbar .fill { background: var(--btn-grad); }
html[data-theme] .login h1 { font-size: 30px; }
html[data-theme] .login .logo { filter: drop-shadow(0 0 18px var(--accent-glow)); }

/* ---------- โลโก้บริษัท / ร้าน / ฟีนิกซ์ (รูปพื้นดำ ใช้ screen ให้พื้นดำกลืนไปกับพื้นหลัง) ---------- */
.co-logo { display: block; width: 150px; height: 150px; margin: 0 auto 4px; mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(circle, #000 58%, transparent 72%); mask-image: radial-gradient(circle, #000 58%, transparent 72%);
  filter: drop-shadow(0 0 22px rgba(56, 189, 248, .45)) brightness(1.15); }
.login h1 { margin-top: 0; }
.shopline { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); margin: -6px 0 16px; font-size: 14px; }
.shopline img { width: 34px; height: 34px; border-radius: 50%; mix-blend-mode: screen; box-shadow: 0 0 0 1px var(--edge); }
.login form { position: relative; }
.mascot { position: absolute; right: -175px; bottom: -30px; width: 150px; pointer-events: none; animation: aio-float 4s ease-in-out infinite; }
.mascot img { width: 150px; height: 150px; display: block; mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(circle, #000 52%, transparent 70%); mask-image: radial-gradient(circle, #000 52%, transparent 70%);
  filter: drop-shadow(0 0 18px rgba(250, 204, 21, .35)); }
.mascot .bubble { position: absolute; left: -20px; top: -26px; white-space: nowrap; font-size: 12px; padding: 5px 10px; border-radius: 12px 12px 4px 12px;
  background: rgba(10, 16, 42, .9); border: 1px solid var(--edge); color: var(--ink); box-shadow: 0 0 14px var(--accent-glow, rgba(56,189,248,.3)); }
@keyframes aio-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (max-width: 900px) {
  .mascot { position: relative; right: auto; bottom: auto; margin: 30px auto -6px; width: 120px; }
  .mascot img { width: 120px; height: 120px; }
  .mascot .bubble { left: 50%; top: -24px; transform: translateX(-50%); }
  .co-logo { width: 120px; height: 120px; }
}
@media (prefers-reduced-motion: reduce) { .mascot { animation: none; } }
.hd-logo { width: 38px; height: 38px; margin: -4px -4px -4px -6px; mix-blend-mode: screen; flex-shrink: 0;
  -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 72%); mask-image: radial-gradient(circle, #000 55%, transparent 72%); filter: brightness(1.25); }
.shopchip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 2px 10px 2px 2px; border-radius: 999px;
  border: 1px solid var(--edge); background: rgba(255, 255, 255, .04); color: var(--ink); white-space: nowrap; }
.shopchip img { width: 26px; height: 26px; border-radius: 50%; mix-blend-mode: screen; }
.top .brand { flex: 0 1 auto; }
.top .brand .sub { font-size: 12px; font-weight: 500; opacity: .75; margin-left: 6px; letter-spacing: .5px; }
.hd-logo { border-radius: 50%; }
.login h1 { font-size: 34px !important; letter-spacing: 1px; }
.co-logo { width: 170px; height: 170px; filter: drop-shadow(0 0 24px rgba(0, 229, 255, .5)) drop-shadow(0 0 40px rgba(255, 46, 151, .35)) brightness(1.15); }
.top .who { margin-left: auto; }
@media (max-width: 760px) { .shopchip { padding-right: 2px; font-size: 0; gap: 0; } .top .brand { font-size: 16px; } }
.cart-empty img { display: block; width: 120px; height: 120px; margin: 0 auto 6px; mix-blend-mode: screen; filter: brightness(1.15);
  -webkit-mask-image: radial-gradient(circle, #000 50%, transparent 70%); mask-image: radial-gradient(circle, #000 50%, transparent 70%);
  animation: aio-float 4s ease-in-out infinite; }
.rc-logo { display: block; width: 26mm; height: 26mm; margin: 0 auto 2px; filter: invert(1) grayscale(1) contrast(1.3); }

/* =====================================================================
   โทนสีอ่านง่าย 4 แบบ (ให้เจ้าของเลือก 18 พ.ย.) — ตัวเลขใช้ Kanit อ่านชัด · การ์ดทึบ · สีเน้นแค่จุดสำคัญ
   noir = เงิน-ดำ (เข้ากับโลโก้ดื่มด่ำ) · gold = ดำ-ทอง · wine = ไวน์แดง · light = สว่าง สะอาดตา
   ===================================================================== */
html:is([data-theme="noir"], [data-theme="gold"], [data-theme="wine"], [data-theme="light"]) {
  --num: "Kanit"; --r: 14px; --btn-r: 10px; --in-r: 10px; --fx-grid: transparent;
}
html[data-theme="noir"] {
  --bg: #0a0a0c; --card: #141417; --card-2: #1b1b1f; --dialog: #141417; --top-bg: rgba(10, 10, 12, .92); --nav-bg: #0e0e11; --nav-bg-m: #0e0e11;
  --input-bg: #0e0e11; --chip-bg: #1d1d22;
  --ink: #F4F4F5; --muted: #A1A1AA; --line: rgba(255, 255, 255, .09); --edge: rgba(255, 255, 255, .22);
  --brand: #FFFFFF; --pink: #F472B6; --pink-l: #F9A8D4; --a1: #D4D4D8; --a2: #F472B6;
  --edge-grad: linear-gradient(135deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .06) 50%, rgba(244, 114, 182, .35));
  --btn-grad: linear-gradient(180deg, #F4F4F5, #A1A1AA); --text-grad: linear-gradient(90deg, #FFFFFF, #E4E4E7);
  --accent-glow: rgba(255, 255, 255, .12); --active-bg: rgba(255, 255, 255, .08);
  --glow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px -16px rgba(0, 0, 0, .9);
  --fx-aurora: radial-gradient(40% 30% at 85% 0%, rgba(244, 114, 182, .12), transparent 70%), radial-gradient(40% 30% at 10% 10%, rgba(255, 255, 255, .06), transparent 70%);
  --c1: #A1A1AA; --c2: #F472B6; --btn-ink: #111114;
}
html[data-theme="gold"] {
  --bg: #0b0906; --card: #15120c; --card-2: #1c1810; --dialog: #15120c; --top-bg: rgba(11, 9, 6, .92); --nav-bg: #0f0d08; --nav-bg-m: #0f0d08;
  --input-bg: #0f0d08; --chip-bg: #1f1a10;
  --ink: #FBF6EA; --muted: #B5A98E; --line: rgba(212, 175, 55, .16); --edge: rgba(212, 175, 55, .45);
  --brand: #F5D27A; --pink: #E8B44C; --pink-l: #F5D27A; --a1: #B8860B; --a2: #F5D27A;
  --edge-grad: linear-gradient(135deg, rgba(245, 210, 122, .7), rgba(212, 175, 55, .12) 50%, rgba(245, 210, 122, .5));
  --btn-grad: linear-gradient(180deg, #F7DC8C, #C9962E); --text-grad: linear-gradient(90deg, #FFF3CF, #F5D27A);
  --accent-glow: rgba(245, 210, 122, .18); --active-bg: rgba(245, 210, 122, .12);
  --glow: 0 10px 30px -16px rgba(0, 0, 0, .9), 0 0 22px -12px rgba(245, 210, 122, .25);
  --fx-aurora: radial-gradient(40% 30% at 85% 0%, rgba(245, 210, 122, .14), transparent 70%);
  --c1: #9A7B2F; --c2: #F5D27A; --btn-ink: #1A1408;
}
html[data-theme="wine"] {
  --bg: #0f0508; --card: #1a0a0f; --card-2: #220e14; --dialog: #1a0a0f; --top-bg: rgba(15, 5, 8, .92); --nav-bg: #13060a; --nav-bg-m: #13060a;
  --input-bg: #13060a; --chip-bg: #261018;
  --ink: #FFF1F2; --muted: #C9A3AC; --line: rgba(251, 113, 133, .15); --edge: rgba(251, 113, 133, .4);
  --brand: #FDA4AF; --pink: #F43F5E; --pink-l: #FDA4AF; --a1: #9F1239; --a2: #FB7185;
  --edge-grad: linear-gradient(135deg, rgba(251, 113, 133, .6), rgba(159, 18, 57, .15) 50%, rgba(253, 186, 116, .45));
  --btn-grad: linear-gradient(135deg, #E11D48, #9F1239); --text-grad: linear-gradient(90deg, #FFE4E6, #FDA4AF);
  --accent-glow: rgba(244, 63, 94, .25); --active-bg: rgba(244, 63, 94, .14);
  --glow: 0 10px 30px -16px rgba(0, 0, 0, .9), 0 0 24px -12px rgba(244, 63, 94, .35);
  --fx-aurora: radial-gradient(40% 30% at 85% 0%, rgba(225, 29, 72, .22), transparent 70%), radial-gradient(40% 30% at 5% 30%, rgba(253, 186, 116, .08), transparent 70%);
  --c1: #9F1239; --c2: #FB7185; --btn-ink: #fff;
}
html[data-theme="light"] {
  --bg: #F6F7FB; --card: #FFFFFF; --card-2: #F8F5FF; --dialog: #FFFFFF; --top-bg: rgba(255, 255, 255, .92); --nav-bg: #FFFFFF; --nav-bg-m: #FFFFFF;
  --input-bg: #FFFFFF; --chip-bg: #F1F2F7;
  --ink: #161827; --muted: #5E6378; --line: #E4E6EE; --edge: #D7D9E4;
  --brand: #BE185D; --pink: #DB2777; --pink-l: #BE185D; --a1: #7C3AED; --a2: #DB2777;
  --edge-grad: linear-gradient(#E4E6EE, #E4E6EE);
  --btn-grad: linear-gradient(135deg, #DB2777, #7C3AED); --text-grad: linear-gradient(90deg, #161827, #161827);
  --accent-glow: rgba(219, 39, 119, .15); --active-bg: rgba(219, 39, 119, .08);
  --glow: 0 1px 2px rgba(20, 24, 40, .06), 0 4px 14px rgba(20, 24, 40, .05);
  --fx-aurora: none; --ok: #059669; --warn: #B45309; --bad: #DC2626;
  --c1: #7C3AED; --c2: #DB2777; --btn-ink: #fff; color-scheme: light;
}
/* ปุ่มหลักสีอ่อน (เงิน / ทอง) ใช้ตัวอักษรเข้ม */
html:is([data-theme="noir"], [data-theme="gold"]) .btn:not(.alt):not(.ghost):not(.okc):not(.danger),
html:is([data-theme="noir"], [data-theme="gold"]) :is(.chip.on, .seg button.on) { color: var(--btn-ink); }
html:is([data-theme="noir"], [data-theme="gold"], [data-theme="wine"], [data-theme="light"]) .stat .v:not(.bad):not(.ok):not(.warn) { filter: none; }
html:is([data-theme="noir"], [data-theme="gold"], [data-theme="wine"], [data-theme="light"]) :is(.ptile .pp, .code) { text-shadow: none; }
html:is([data-theme="noir"], [data-theme="gold"], [data-theme="wine"], [data-theme="light"]) .stat::before { opacity: .55; }
html:is([data-theme="noir"], [data-theme="gold"], [data-theme="wine"]) .btn.okc { background: linear-gradient(135deg, #10B981, #047857); }
html[data-theme="light"] .btn.okc { background: linear-gradient(135deg, #059669, #0D9488); }
/* ธีมสว่าง: ปรับสิ่งที่ทำไว้สำหรับพื้นมืด */
html[data-theme="light"] body::after { display: none; }
html[data-theme="light"] :is(.hd-logo, .co-logo, .cart-empty img, .shopline img) { mix-blend-mode: multiply; filter: invert(1) contrast(1.2); }
html[data-theme="light"] .badge { background: #F3E8FF; color: #6D28D9; }
html[data-theme="light"] .badge.grey { background: #EEF0F4; color: var(--muted); }
html[data-theme="light"] .notice { background: #FFF7E6; color: #7A4B00; border-color: #F5D9A8; }
html[data-theme="light"] .notice.info { background: #FDF2F8; color: #831843; border-color: #FBCFE8; }
html[data-theme="light"] .top::after { box-shadow: none; }
html[data-theme="light"] nav.tabs a.on { color: var(--brand); }
html[data-theme="light"] .chart .tip { background: #fff; color: var(--ink); }
html[data-theme="light"] .chart .grid line { stroke: #E9EAF0; }
html[data-theme="light"] .qty .qv { background: #fff; }
html[data-theme="light"] .paybar { background: #fff; border-color: var(--line); color: var(--ink); }

html:is([data-theme="noir"], [data-theme="gold"], [data-theme="wine"], [data-theme="light"]) h1 { background: none; color: var(--ink); }
html:is([data-theme="noir"], [data-theme="gold"], [data-theme="wine"], [data-theme="light"]) .login h1 { background: var(--text-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* =====================================================================
   ธีม "ดื่มด่ำ Future Bar" (botanic) — ฐานเงิน-ดำ + เขียวมรกต (ต้นไม้) + อำพัน (เครื่องดื่ม) + ระแนงไม้เข้ม
   ===================================================================== */
html[data-theme^="bar"] {
  --num: "Kanit"; --r: 14px; --btn-r: 10px; --in-r: 10px; --fx-grid: transparent;
  --bg: #070807; --card: rgba(16, 17, 16, .82); --card-2: rgba(22, 24, 22, .85); --dialog: #121412;
  --top-bg: rgba(8, 9, 8, .78); --nav-bg: rgba(8, 9, 8, .72); --nav-bg-m: rgba(8, 9, 8, .94); --input-bg: rgba(5, 6, 5, .7); --chip-bg: rgba(255, 255, 255, .05);
  --ink: #F5F5F4; --muted: #A8A29E; --line: rgba(255, 255, 255, .09); --edge: rgba(255, 255, 255, .28);
  --brand: #F5F5F4; --pink: #F5B451; --pink-l: #FCD9A0; --a1: #D6D3D1; --a2: #F5B451; --amber: #F5B451;
  --edge-grad: linear-gradient(135deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .05) 45%, rgba(245, 180, 81, .45));
  --btn-grad: linear-gradient(180deg, #FAFAF9, #BDBAB7); --text-grad: linear-gradient(90deg, #FFFFFF, #E7E5E4 55%, #FCD9A0);
  --accent-glow: rgba(245, 180, 81, .25); --active-bg: linear-gradient(90deg, rgba(255, 255, 255, .1), rgba(245, 180, 81, .06));
  --glow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 14px 34px -18px rgba(0, 0, 0, .95), 0 0 26px -14px rgba(245, 180, 81, .3);
  --fx-aurora: none; --c1: #A8A29E; --c2: #F5B451; --btn-ink: #0C0A09;
}
html[data-theme^="bar"] .btn:not(.alt):not(.ghost):not(.okc):not(.danger),
html[data-theme^="bar"] :is(.chip.on, .seg button.on) { color: var(--btn-ink); }
html[data-theme^="bar"] .btn:not(.alt):not(.ghost):not(.okc):not(.danger) { box-shadow: 0 0 0 1px rgba(255,255,255,.4) inset, 0 8px 26px -10px rgba(245, 180, 81, .45); }
html[data-theme^="bar"] .btn.okc { background: linear-gradient(135deg, #FCD9A0, #D97706); color: #1C1004; }
html[data-theme^="bar"] :is(.card, .stat, .item, .doc, .shiftbar, .ptile, table.t) { backdrop-filter: blur(12px) saturate(120%); -webkit-backdrop-filter: blur(12px) saturate(120%); }
html[data-theme^="bar"] .stat .v:not(.bad):not(.ok):not(.warn) { filter: drop-shadow(0 0 10px rgba(255, 255, 255, .18)); }
html[data-theme^="bar"] :is(.ptile .pp, .code) { color: #FCD9A0; text-shadow: 0 0 10px rgba(245, 180, 81, .35); }
html[data-theme^="bar"] h1 { background: var(--text-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-theme^="bar"] h1.row { background: none; color: var(--ink); }
html[data-theme^="bar"] .co-logo { filter: drop-shadow(0 0 22px rgba(255, 255, 255, .35)) drop-shadow(0 0 50px rgba(245, 180, 81, .35)) brightness(1.2); }
html[data-theme^="bar"] .badge { background: rgba(255, 255, 255, .1); color: #E7E5E4; }
html[data-theme^="bar"] .notice.info { background: rgba(255, 255, 255, .06); color: #F5F5F4; border-color: rgba(255, 255, 255, .2); }

/* ---------- โทนสีของ Future Bar: ฟ้า · น้ำเงิน · ม่วง · ชมพู (ฉากเดิม เปลี่ยนแค่สีไฟ/น้ำ/สีเน้น) ---------- */
html:is([data-theme="barneon"], [data-theme="barblue"], [data-theme="barpink"], [data-theme="barflux"]) {
  --edge: rgba(255, 255, 255, .26); --btn-ink: #0A0A14;
}
/* นีออนผสม: ฟ้า → น้ำเงิน → ม่วง → ชมพู */
html:is([data-theme="barneon"], [data-theme="barflux"]) {
  --a2: #38BDF8; --pink: #F472B6; --pink-l: #F9A8D4; --c1: #60A5FA; --c2: #F472B6;
  --glow1: rgba(139, 92, 246, .55); --glow2: rgba(56, 189, 248, .5); --glow3: rgba(236, 72, 153, .45); --glow4: rgba(59, 130, 246, .2);
  --lq1: #7DD3FC; --lq2: #8B5CF6; --lq3: #12062B; --lq-line: rgba(186, 230, 253, .8);
  --bub-edge: rgba(224, 242, 254, .6); --bub-fill: rgba(196, 181, 253, .1); --accent-glow: rgba(139, 92, 246, .35);
  --edge-grad: linear-gradient(135deg, rgba(56, 189, 248, .6), rgba(139, 92, 246, .2) 50%, rgba(244, 114, 182, .6));
  --text-grad: linear-gradient(90deg, #E0F2FE, #C4B5FD 50%, #FBCFE8);
  --active-bg: linear-gradient(90deg, rgba(56, 189, 248, .18), rgba(244, 114, 182, .1));
  --btn-grad: linear-gradient(120deg, #7DD3FC, #A5B4FC 50%, #F9A8D4);
}
/* ฟ้า-น้ำเงินเด่น แซมชมพู */
html[data-theme="barblue"] {
  --a2: #38BDF8; --pink: #38BDF8; --pink-l: #7DD3FC; --c1: #3B82F6; --c2: #38BDF8;
  --glow1: rgba(37, 99, 235, .6); --glow2: rgba(56, 189, 248, .5); --glow3: rgba(244, 114, 182, .3); --glow4: rgba(56, 189, 248, .18);
  --lq1: #BAE6FD; --lq2: #2563EB; --lq3: #050B24; --lq-line: rgba(224, 242, 254, .85);
  --bub-edge: rgba(224, 242, 254, .65); --bub-fill: rgba(125, 211, 252, .12); --accent-glow: rgba(56, 189, 248, .35);
  --edge-grad: linear-gradient(135deg, rgba(125, 211, 252, .65), rgba(37, 99, 235, .2) 50%, rgba(244, 114, 182, .45));
  --text-grad: linear-gradient(90deg, #FFFFFF, #BAE6FD 60%, #FBCFE8);
  --active-bg: linear-gradient(90deg, rgba(56, 189, 248, .2), rgba(37, 99, 235, .08));
  --btn-grad: linear-gradient(180deg, #E0F2FE, #7DD3FC);
}
/* ม่วง-ชมพูเด่น แซมฟ้า */
html[data-theme="barpink"] {
  --a2: #F472B6; --pink: #F472B6; --pink-l: #F9A8D4; --c1: #A855F7; --c2: #F472B6;
  --glow1: rgba(236, 72, 153, .55); --glow2: rgba(168, 85, 247, .55); --glow3: rgba(56, 189, 248, .3); --glow4: rgba(236, 72, 153, .18);
  --lq1: #FBCFE8; --lq2: #C026D3; --lq3: #1A0620; --lq-line: rgba(252, 231, 243, .85);
  --bub-edge: rgba(252, 231, 243, .65); --bub-fill: rgba(244, 114, 182, .12); --accent-glow: rgba(236, 72, 153, .38);
  --edge-grad: linear-gradient(135deg, rgba(244, 114, 182, .65), rgba(168, 85, 247, .25) 50%, rgba(125, 211, 252, .45));
  --text-grad: linear-gradient(90deg, #FDF2F8, #F9A8D4 50%, #D8B4FE);
  --active-bg: linear-gradient(90deg, rgba(244, 114, 182, .2), rgba(168, 85, 247, .1));
  --btn-grad: linear-gradient(120deg, #F9A8D4, #D8B4FE);
}
html:is([data-theme="barneon"], [data-theme="barblue"], [data-theme="barpink"], [data-theme="barflux"]) :is(.ptile .pp, .code) { color: var(--pink-l); text-shadow: 0 0 10px var(--accent-glow); }
html:is([data-theme="barneon"], [data-theme="barblue"], [data-theme="barpink"], [data-theme="barflux"]) .btn.okc { background: linear-gradient(120deg, var(--c1), var(--c2)); color: #fff; }
html:is([data-theme="barneon"], [data-theme="barblue"], [data-theme="barpink"], [data-theme="barflux"]) .btn:not(.alt):not(.ghost):not(.okc):not(.danger) { box-shadow: 0 0 0 1px rgba(255,255,255,.45) inset, 0 8px 26px -10px var(--accent-glow); }
html:is([data-theme="barneon"], [data-theme="barblue"], [data-theme="barpink"], [data-theme="barflux"]) .hbar .fill { box-shadow: 0 0 10px var(--accent-glow); }
html:is([data-theme="barneon"], [data-theme="barblue"], [data-theme="barpink"], [data-theme="barflux"]) .co-logo { filter: drop-shadow(0 0 22px rgba(255, 255, 255, .3)) drop-shadow(0 0 50px var(--accent-glow)) brightness(1.2); }

/* =====================================================================
   ธีมหลัก "command" — Burgundy & Gunmetal Metallic Command Center (สเปกเจ้าของ 19 พ.ย.)
   ดำ #08090C · Gunmetal #30343B · Burgundy #651D35 · Metallic Red #A33D5B · Titanium #E4E6EB
   แผงโลหะขัด มุมตัดเฉียง เส้นแดงเรือง · ตัวเลข/ปุ่มอ่านง่าย กดเร็ว
   ===================================================================== */
html[data-theme="command"] {
  --k-black: #08090C; --k-gun: #30343B; --k-bur: #651D35; --k-red: #A33D5B; --k-ti: #E4E6EB;
  --num: "Kanit"; --r: 4px; --btn-r: 4px; --in-r: 4px; --fx-grid: transparent; --cut: 14px;
  --bg: #08090C; --card: #17191E; --card-2: #1D2026; --dialog: #15171B;
  --top-bg: linear-gradient(180deg, #24272D, #131519); --nav-bg: linear-gradient(180deg, #15171B, #0C0D10); --nav-bg-m: #101115;
  --input-bg: #0D0E12; --chip-bg: linear-gradient(180deg, #2A2E35, #1B1E23);
  --ink: #E4E6EB; --muted: #9AA0AA; --line: rgba(228, 230, 235, .1); --edge: rgba(163, 61, 91, .6);
  --brand: #E4E6EB; --pink: #A33D5B; --pink-l: #D9839C; --a1: #651D35; --a2: #C24D70;
  --ok: #4ADE80; --warn: #FBBF24; --bad: #F05A7E;
  --edge-grad: linear-gradient(135deg, rgba(228, 230, 235, .28), rgba(48, 52, 59, .4) 45%, rgba(163, 61, 91, .7));
  --btn-grad: linear-gradient(180deg, #C04A6C 0%, #8E2B4B 45%, #651D35 100%);
  --text-grad: linear-gradient(180deg, #FFFFFF 0%, #E4E6EB 55%, #A9AEB7 100%);
  --accent-glow: rgba(163, 61, 91, .45); --active-bg: linear-gradient(90deg, #7A2341, #4A1426);
  --glow: inset 0 0 0 1px rgba(228, 230, 235, .09), inset 0 1px 0 rgba(255, 255, 255, .12);
  --fx-aurora: radial-gradient(50% 30% at 50% -8%, rgba(163, 61, 91, .28), transparent 70%);
  --c1: #651D35; --c2: #D9839C;
}
html[data-theme="command"] body { font-weight: 400; }
html[data-theme="command"] body::after { filter: blur(30px); }
/* แผงโลหะ: ไล่เงาโลหะ + เส้นแดงมุมซ้ายบน + มุมตัดเฉียง */
html[data-theme="command"] :is(.card, .stat, .item, .doc, .shiftbar, .ptile, table.t) {
  border: 0; border-radius: 0; box-shadow: var(--glow);
  background:
    linear-gradient(90deg, var(--k-red) 0, rgba(163, 61, 91, 0) 38%) 0 0 / 100% 2px no-repeat,
    linear-gradient(160deg, #262A31 0%, #17191E 42%, #121418 70%, #1B1E23 100%);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  backdrop-filter: none; -webkit-backdrop-filter: none; }
html[data-theme="command"] .card.soft { background: linear-gradient(160deg, #2A2E35, #1A1C21); }
html[data-theme="command"] .stat::before { display: none; }
html[data-theme="command"] :is(.item, .ptile):hover { transform: none; box-shadow: var(--glow), inset 0 0 0 1px rgba(163, 61, 91, .7), inset 0 0 24px rgba(163, 61, 91, .25); }
html[data-theme="command"] .ptile:active, html[data-theme="command"] .ptile.hit { background: linear-gradient(160deg, #5A1A31, #2A0E19); }
/* ตัวเลข: ขาวไทเทเนียม ชัด ไม่เรืองจนอ่านยาก */
html[data-theme="command"] .stat .v:not(.bad):not(.ok):not(.warn), html[data-theme="command"] .paytotal, html[data-theme="command"] .sum .total .money {
  background: var(--text-grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: none; text-shadow: none; }
html[data-theme="command"] .stat .v { font-size: 26px; font-weight: 600; }
html[data-theme="command"] .stat .k { color: var(--muted); letter-spacing: .3px; }
html[data-theme="command"] :is(.ptile .pp, .code) { color: #F1A7BD; text-shadow: none; font-weight: 600; }
html[data-theme="command"] .ptile .pp { font-size: 17px; }
html[data-theme="command"] h1 { background: var(--text-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-theme="command"] h1.row { background: none; color: var(--k-ti); }
/* แถบบน: โลหะ + เส้นแดงเรืองด้านล่าง */
html[data-theme="command"] .top { background: var(--top-bg); box-shadow: 0 6px 24px -8px rgba(0, 0, 0, .9); }
html[data-theme="command"] .top::after { height: 2px; background: linear-gradient(90deg, transparent, var(--k-red) 20%, #E06C8C 50%, var(--k-red) 80%, transparent); box-shadow: 0 0 14px rgba(163, 61, 91, .8); }
html[data-theme="command"] .top .brand { background: var(--text-grad); -webkit-background-clip: text; background-clip: text; filter: none; letter-spacing: .5px; }
html[data-theme="command"] .top .brand .sub { color: #C9CDD4; -webkit-text-fill-color: #C9CDD4; text-transform: uppercase; letter-spacing: 2px; font-size: 10px; }
html[data-theme="command"] .top button { background: linear-gradient(180deg, #3A3E46, #24272D); border: 1px solid rgba(228, 230, 235, .15); }
/* เมนูข้าง: แผงโลหะเข้ม · เมนูที่เลือก = เบอร์กันดีเงา + แถบแดงเรือง */
html[data-theme="command"] nav.tabs { background: var(--nav-bg); border-right: 1px solid rgba(228, 230, 235, .07); box-shadow: inset -1px 0 0 rgba(0, 0, 0, .6); }
html[data-theme="command"] nav.tabs a { color: #B9BEC7; border-radius: 0; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
html[data-theme="command"] nav.tabs a:hover { background: rgba(228, 230, 235, .05); color: #fff; }
html[data-theme="command"] nav.tabs a.on { background: linear-gradient(90deg, #8E2B4B, #651D35 60%, #3E1121); color: #fff;
  box-shadow: inset 3px 0 0 #E06C8C, inset 0 1px 0 rgba(255, 255, 255, .2), 0 0 18px rgba(163, 61, 91, .5); }
html[data-theme="command"] nav.tabs a.on .ic { color: #fff; filter: drop-shadow(0 0 6px #E06C8C); }
@media (max-width: 760px) { html[data-theme="command"] nav.tabs a.on { box-shadow: inset 0 -3px 0 #E06C8C, 0 0 18px rgba(163, 61, 91, .5); } }
/* ปุ่ม: หลัก = เบอร์กันดีโลหะ · รอง = gunmetal · ชำระเงิน = แดงโลหะใหญ่ */
html[data-theme="command"] .btn { border-radius: 0; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  background: var(--btn-grad); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(255, 255, 255, .08); font-weight: 600; letter-spacing: .2px; }
html[data-theme="command"] .btn.alt { background: linear-gradient(180deg, #3D424A, #2A2E35 50%, #1F2227); color: var(--k-ti); border: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(228, 230, 235, .12); }
html[data-theme="command"] .btn.ghost { background: transparent; color: #E89AB0; box-shadow: none; clip-path: none; }
html[data-theme="command"] .btn.okc { background: linear-gradient(180deg, #D45A7E, #A33D5B 45%, #6E2039); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 0 22px rgba(163, 61, 91, .55); }
html[data-theme="command"] .btn.danger { background: linear-gradient(180deg, #E0466B, #9F1239); }
html[data-theme="command"] .paybtn { font-size: 22px; min-height: 62px; }
html[data-theme="command"] :is(input[type=text], input[type=search], input[type=tel], input[type=number], input[type=date], input[type=password], select, textarea) {
  background: #0D0E12; border: 1px solid #30343B; border-radius: 4px; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6); }
html[data-theme="command"] :is(input, select, textarea):focus { outline: 1px solid var(--k-red); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6), 0 0 0 3px rgba(163, 61, 91, .3); }
html[data-theme="command"] :is(.chip, .seg button) { background: linear-gradient(180deg, #2A2E35, #1B1E23); border: 1px solid rgba(228, 230, 235, .12); color: #D3D6DC; border-radius: 3px; }
html[data-theme="command"] :is(.chip.on, .seg button.on) { background: linear-gradient(180deg, #A33D5B, #651D35); border-color: #C24D70; color: #fff; box-shadow: 0 0 12px rgba(163, 61, 91, .5); }
html[data-theme="command"] .qty { border-color: #30343B; border-radius: 3px; }
html[data-theme="command"] .qty button { background: linear-gradient(180deg, #2E3239, #1F2227); color: #fff; }
html[data-theme="command"] .qty .qv { background: #0D0E12; }
html[data-theme="command"] .badge { background: rgba(163, 61, 91, .22); color: #F3B6C8; border-radius: 3px; }
html[data-theme="command"] .badge.grey { background: rgba(228, 230, 235, .08); color: var(--muted); }
html[data-theme="command"] .badge.red { background: #C24D70; box-shadow: 0 0 10px rgba(194, 77, 112, .8); }
html[data-theme="command"] table.t th { background: linear-gradient(180deg, #2A2E35, #1E2126); color: #C9CDD4; }
html[data-theme="command"] .notice { background: rgba(251, 191, 36, .1); color: #FDE68A; border: 1px solid rgba(251, 191, 36, .25); border-radius: 3px; }
html[data-theme="command"] .notice.info { background: rgba(163, 61, 91, .14); color: #F5D0DB; border-color: rgba(163, 61, 91, .4); }
html[data-theme="command"] dialog { background: linear-gradient(160deg, #23262C, #121418); border-radius: 0;
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  box-shadow: inset 0 0 0 1px rgba(228, 230, 235, .12), inset 0 2px 0 var(--k-red); }
html[data-theme="command"] .hbar .fill { background: linear-gradient(90deg, #651D35, #A33D5B 60%, #E06C8C); box-shadow: 0 0 10px rgba(163, 61, 91, .6); }
html[data-theme="command"] .hbar .track { background: #0D0E12; }
html[data-theme="command"] .paybar { background: linear-gradient(180deg, #24272D, #131519); border-top: 2px solid var(--k-red); }
html[data-theme="command"] .cline, html[data-theme="command"] .sum { border-color: rgba(228, 230, 235, .08); }
html[data-theme="command"] .co-logo { mix-blend-mode: screen; filter: drop-shadow(0 0 20px rgba(228, 230, 235, .25)) drop-shadow(0 0 40px rgba(163, 61, 91, .6)) brightness(1.2); }
/* วงแหวน HUD รอบโลโก้หน้าเข้าระบบ */
.logo-ring { position: relative; width: 190px; height: 190px; margin: 0 auto 6px; display: grid; place-items: center; }
.logo-ring .co-logo { margin: 0; width: 150px; height: 150px; }
.logo-ring::before, .logo-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
html[data-theme="command"] .logo-ring::before { border: 2px solid transparent; border-top-color: #E06C8C; border-right-color: rgba(163, 61, 91, .6);
  box-shadow: 0 0 18px rgba(163, 61, 91, .55); animation: fx-spin 6s linear infinite; }
html[data-theme="command"] .logo-ring::after { inset: 10px; border: 1px dashed rgba(228, 230, 235, .3); animation: fx-spin 18s linear infinite reverse; }
@keyframes fx-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .logo-ring::before, .logo-ring::after { animation: none !important; } }
/* พื้นหลัง command: โครงโลหะโค้ง + พื้นสะท้อน + คลื่นแสงขยับ */
.fx-main .arcs { display: none; }
html[data-theme="command"] .fx-main .arcs { display: inline; }
html[data-theme="command"] .fx-bg .stars { opacity: .35; }
html[data-theme="command"] .fx-bg .floor line { opacity: .28; }
html[data-theme="command"] .fx-bg .flow path { stroke-width: 2.4; }
html[data-theme="command"] .fx-bg .orb { opacity: .55; }
html[data-theme="command"] body:has(.shell) .fx-bg .flow { opacity: .55; }
.fx-main .arcs .runner { stroke-dasharray: 140 2200; animation: fx-run 7s linear infinite; }
.fx-main .arcs .horizon { animation: fx-hz 5s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes fx-run { to { stroke-dashoffset: -2340; } }
@keyframes fx-hz { from { opacity: .45; transform: scaleX(.8); } to { opacity: 1; transform: scaleX(1); } }
html[data-theme="command"] body:has(.shell) .fx-main .arcs { opacity: .6; }
@media (max-width: 760px) { html[data-theme="command"] .fx-main .arcs path { opacity: .25; } }

/* =====================================================================
   หน้าบริษัท PHOENIX CENTRAL PLATFORM (หน้าแรกสุด ก่อนเลือกธุรกิจ) — โทนน้ำเงินห้องบัญชาการ
   ===================================================================== */
body:has(.portal) .fx-bg { display: none; }
body:has(.portal) { background: #020617; }
.portal { min-height: 100vh; color: #E2E8F0; font-family: Kanit, Sarabun, sans-serif; overflow-x: hidden;
  background: radial-gradient(120% 70% at 50% 0%, #0B1B3D 0%, #050B1E 45%, #020617 100%); }
.pt-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px; padding: 12px 28px;
  background: linear-gradient(180deg, rgba(2, 6, 23, .9), rgba(2, 6, 23, .55)); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(56, 189, 248, .18); }
.pt-logo { display: flex; align-items: center; gap: 10px; }
.pt-logo img { width: 46px; height: 46px; mix-blend-mode: screen; filter: brightness(1.3) drop-shadow(0 0 8px rgba(56, 189, 248, .5));
  -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 72%); mask-image: radial-gradient(circle, #000 55%, transparent 72%); }
.pt-logo b { display: block; font-family: Orbitron, Kanit, sans-serif; letter-spacing: 3px; font-size: 18px; color: #F1F5F9; }
.pt-logo small { display: block; font-size: 9px; letter-spacing: 3px; color: #94A3B8; }
.pt-nav { flex: 1; display: flex; justify-content: center; gap: 6px; }
.pt-nav button { background: none; border: 0; color: #CBD5E1; padding: 8px 14px; cursor: pointer; font-size: 15px; border-bottom: 2px solid transparent; }
.pt-nav button.on, .pt-nav button:hover { color: #7DD3FC; border-color: #38BDF8; text-shadow: 0 0 10px rgba(56, 189, 248, .6); }
.pt-login { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid #38BDF8; border-radius: 10px; color: #E0F2FE;
  text-decoration: none; box-shadow: 0 0 14px rgba(56, 189, 248, .35), inset 0 0 12px rgba(56, 189, 248, .15); }
.pt-login svg { width: 18px; height: 18px; }
.pt-hero { position: relative; height: min(76vh, 720px); min-height: 520px; overflow: hidden; }
.pt-hall { position: absolute; inset: 0; width: 100%; height: 100%; }
.pt-lights { animation: pt-lights 9s linear infinite; }
@keyframes pt-lights { to { stroke-dashoffset: -464; } }
.pt-dots { animation: pt-rot 40s linear infinite; }
@keyframes pt-rot { from { transform: translateX(0); } to { transform: translateX(-240px); } }
.pt-meridians ellipse { transform-box: fill-box; transform-origin: center; animation: pt-mer 8s linear infinite; }
.pt-meridians ellipse:nth-child(2) { animation-delay: -2s; } .pt-meridians ellipse:nth-child(3) { animation-delay: -4s; } .pt-meridians ellipse:nth-child(4) { animation-delay: -6s; }
@keyframes pt-mer { 0% { transform: scaleX(1); } 50% { transform: scaleX(.05); } 100% { transform: scaleX(1); } }
.pt-spin { transform-box: fill-box; transform-origin: center; animation: pt-dash 6s linear infinite; }
@keyframes pt-dash { to { stroke-dashoffset: -330; } }
.pt-panel { animation: pt-float 6s ease-in-out infinite alternate; }
@keyframes pt-float { to { opacity: .7; } }
.pt-center { position: absolute; left: 0; right: 0; top: 4%; text-align: center; padding: 0 16px; }
.pt-emblem { display: block; margin: 0 auto; width: clamp(220px, 30vw, 340px); height: auto; aspect-ratio: 1; mix-blend-mode: screen;
  filter: contrast(1.35) brightness(1.08) drop-shadow(0 0 22px rgba(125, 211, 252, .5));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent), linear-gradient(transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent), linear-gradient(transparent, #000 5%, #000 95%, transparent);
  mask-composite: intersect; }
.pt-title { margin: -6px 0 0; font-family: Orbitron, Kanit, sans-serif; font-weight: 700; font-size: clamp(44px, 8vw, 92px); letter-spacing: .12em;
  background: linear-gradient(180deg, #FFFFFF 10%, #CBD5E1 50%, #64748B 90%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px rgba(56, 189, 248, .45)); }
.pt-sub { font-family: Orbitron, Kanit, sans-serif; letter-spacing: .3em; font-size: clamp(16px, 2.4vw, 30px); color: #E2E8F0; margin-top: -14px; text-shadow: 0 0 16px rgba(56, 189, 248, .6); }
.pt-desc { color: #CBD5E1; margin: 14px auto 18px; max-width: 640px; font-size: clamp(14px, 1.6vw, 18px); }
.pt-cta { display: inline-flex; align-items: center; gap: 10px; padding: 14px 34px; font-size: 18px; color: #fff; cursor: pointer; font-family: inherit;
  border: 1px solid #38BDF8; background: linear-gradient(180deg, rgba(14, 165, 233, .35), rgba(2, 6, 23, .8));
  clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 16px 100%, 0 50%);
  box-shadow: inset 0 0 18px rgba(56, 189, 248, .5); }
.pt-cta svg { width: 20px; height: 20px; }
.pt-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 0 28px; margin-top: -40px; position: relative; z-index: 2; }
.pt-card { position: relative; display: flex; align-items: flex-start; gap: 12px; min-height: 170px; padding: 20px 18px; overflow: hidden; color: #F8FAFC;
  text-decoration: none; border-radius: 10px; border: 1px solid rgba(148, 163, 184, .3); background: #0B1324;
  box-shadow: 0 18px 40px -20px #000, inset 0 1px 0 rgba(255, 255, 255, .08); transition: transform .2s, box-shadow .2s; }
.pt-card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px -18px #000, 0 0 24px -4px var(--pc, #38BDF8); border-color: var(--pc, #38BDF8); }
.pt-art { position: absolute; inset: 0; z-index: 0; opacity: .9; }
.pt-office { --pc: #38BDF8; } .pt-office .pt-art { background: linear-gradient(115deg, rgba(11, 19, 36, .95) 30%, rgba(11, 19, 36, .2)),
  repeating-linear-gradient(90deg, rgba(56, 189, 248, .25) 0 2px, transparent 2px 22px), linear-gradient(180deg, #0E3A6B, #082246); }
.pt-duem { --pc: #F59E0B; border-color: rgba(245, 158, 11, .55); } .pt-duem .pt-art { background: linear-gradient(115deg, rgba(20, 12, 4, .95) 30%, rgba(20, 12, 4, .15)),
  radial-gradient(40% 60% at 80% 70%, rgba(245, 158, 11, .7), transparent 70%), linear-gradient(180deg, #3B2306, #120A02); }
.pt-cafe { --pc: #F9A8D4; } .pt-cafe .pt-art { background: linear-gradient(115deg, rgba(36, 14, 26, .95) 30%, rgba(36, 14, 26, .2)),
  radial-gradient(30% 45% at 78% 72%, #E7C9B5 0 30%, #8B5A3C 31% 60%, transparent 61%), linear-gradient(180deg, #5B2A43, #24101C); }
.pt-new { --pc: #CBD5E1; } .pt-new .pt-art { background: linear-gradient(115deg, rgba(15, 23, 42, .95) 30%, rgba(15, 23, 42, .3)),
  repeating-radial-gradient(120% 80% at 110% 120%, rgba(203, 213, 225, .35) 0 2px, transparent 2px 18px), linear-gradient(180deg, #1E293B, #0F172A); }
.pt-ic, .pt-txt, .pt-go, .pt-soon { position: relative; z-index: 1; }
.pt-ic svg { width: 40px; height: 40px; color: #F1F5F9; }
.pt-txt b { display: block; font-size: 20px; letter-spacing: .5px; }
.pt-txt small { color: #CBD5E1; font-size: 14px; }
.pt-go { position: absolute; right: 14px; top: 14px; } .pt-go svg { width: 22px; height: 22px; }
.pt-soon { position: absolute; left: 18px; bottom: 14px; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #E2E8F0; }
.pt-foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 0; margin: 34px 0 0; padding: 18px 16px 28px; color: #CBD5E1; font-size: 13px; letter-spacing: 2px;
  border-top: 1px solid rgba(56, 189, 248, .15); }
.pt-foot span { padding: 0 22px; border-right: 1px solid rgba(148, 163, 184, .4); }
.pt-foot span:last-child { border: 0; }
.pt-foot b { color: #38BDF8; }
@media (max-width: 900px) {
  .pt-cards { grid-template-columns: repeat(2, 1fr); padding: 0 14px; gap: 12px; margin-top: -20px; }
  .pt-nav { display: none; } .pt-top { justify-content: space-between; padding: 10px 14px; }
  .pt-hero { height: 560px; min-height: 0; } .pt-panel { display: none; }
  .pt-card { min-height: 130px; } .pt-txt b { font-size: 17px; }
}
@media (max-width: 480px) { .pt-cards { grid-template-columns: 1fr; } .pt-emblem { width: 220px; } .pt-foot span { padding: 4px 10px; border: 0; } }
@media (prefers-reduced-motion: reduce) { .portal * { animation: none !important; } }

/* =====================================================================
   หน้าเข้าร้านดื่มด่ำ (ภาพ 1) + หน้าแรกร้านหลังเข้าระบบ (แผงศูนย์บัญชาการ)
   ===================================================================== */
.sg-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 24px; border-bottom: 1px solid rgba(163, 61, 91, .35);
  background: linear-gradient(180deg, rgba(36, 39, 45, .85), rgba(19, 21, 25, .7)); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; }
.sg-brand { display: flex; align-items: center; gap: 10px; }
.sg-brand img { width: 46px; height: 46px; mix-blend-mode: screen; border-radius: 50%; }
.sg-brand b { display: block; font-size: 22px; line-height: 1.35; padding-top: 2px; background: var(--text-grad, linear-gradient(#fff, #bbb)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sg-brand small { display: block; font-size: 9px; letter-spacing: 2.5px; color: #C9CDD4; }
.sg-back { color: #E4E6EB; text-decoration: none; font-size: 14px; padding: 6px 12px; border: 1px solid rgba(228, 230, 235, .2); border-radius: 4px; }
.shopgate .login { margin-top: 3vh; max-width: 420px; }
.sg-word { text-align: center; font-family: Orbitron, Kanit, sans-serif; font-weight: 700; letter-spacing: .18em; font-size: 34px; margin-top: 4px;
  background: linear-gradient(180deg, #FFFFFF, #E4E6EB 50%, #8E939C); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgba(163, 61, 91, .6)); }
.sg-sub { text-align: center; letter-spacing: .45em; font-size: 11px; color: #E06C8C; margin-top: 2px; }
.sg-tag { text-align: center; font-size: 19px; font-weight: 600; margin: 10px 0 2px; color: #E4E6EB; }
.shopgate .shopline { margin: 0 0 16px; }
.sg-feats { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 0; margin: 26px auto 24px; max-width: 1100px; padding: 0 12px; }
.sg-feats > div { display: flex; align-items: center; gap: 10px; padding: 4px 18px; border-right: 1px solid rgba(228, 230, 235, .15); color: #E4E6EB; }
.sg-feats > div:last-child { border: 0; }
.sg-feats svg { width: 28px; height: 28px; color: #E06C8C; flex-shrink: 0; }
.sg-feats b { display: block; font-size: 14px; } .sg-feats small { display: block; font-size: 9px; letter-spacing: 1.5px; color: #9AA0AA; }
@media (max-width: 760px) { .sg-feats > div { border: 0; padding: 4px 10px; width: 50%; } .sg-word { font-size: 28px; } }

.hq { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr) minmax(250px, 320px); gap: 16px; align-items: start; }
.hq-col { display: grid; gap: 14px; }
.hq-panel { padding: 16px; background: linear-gradient(90deg, #A33D5B 0, rgba(163, 61, 91, 0) 38%) 0 0 / 100% 2px no-repeat, linear-gradient(160deg, #262A31, #17191E 42%, #121418 70%, #1B1E23);
  box-shadow: inset 0 0 0 1px rgba(228, 230, 235, .09), inset 0 1px 0 rgba(255, 255, 255, .12);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
.hq-h { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.hq-h b { display: block; letter-spacing: 1px; font-size: 16px; } .hq-h small { color: #9AA0AA; font-size: 13px; }
.hq-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 2px solid #A33D5B; box-shadow: 0 0 14px rgba(163, 61, 91, .6), inset 0 0 10px rgba(163, 61, 91, .4); flex-shrink: 0; }
.hq-ic svg { width: 22px; height: 22px; }
.hq-big { font-size: 40px; font-weight: 600; line-height: 1.1; } .hq-big small { font-size: 16px; color: #9AA0AA; }
.hq-chips { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: #9AA0AA; margin: 6px 0 10px; } .hq-chips b { color: #E4E6EB; }
.hq-spark { display: flex; align-items: flex-end; gap: 5px; height: 54px; }
.hq-spark i { flex: 1; background: linear-gradient(180deg, #E06C8C, #651D35); border-radius: 2px 2px 0 0; box-shadow: 0 0 8px rgba(163, 61, 91, .5); }
.hq-row { display: flex; align-items: center; gap: 10px; padding: 11px 6px; border-bottom: 1px solid rgba(228, 230, 235, .07); color: #E4E6EB; text-decoration: none; }
.hq-row span:not(.hq-ri) { flex: 1; } .hq-row b { font-size: 20px; } .hq-row em { color: #9AA0AA; font-style: normal; font-size: 20px; }
.hq-row:hover { background: rgba(163, 61, 91, .12); }
.hq-row.ok { background: linear-gradient(90deg, rgba(163, 61, 91, .3), transparent); } .hq-row.ok b { color: #fff; }
.hq-ri svg { width: 20px; height: 20px; color: #E06C8C; }
.hq-center { text-align: center; padding-top: 8px; }
.hq-ring { width: 230px; height: 230px; } .hq-ring .co-logo { width: 180px; height: 180px; }
.hq-today { margin: 14px auto 12px; } .hq-today small { display: block; color: #9AA0AA; } .hq-today b { font-size: 42px; font-weight: 600;
  background: linear-gradient(180deg, #fff, #E4E6EB 55%, #A9AEB7); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hq-sell { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; padding: 14px 30px; text-decoration: none; }
.hq-sell svg { width: 22px; height: 22px; }
.hq-stock { display: flex; gap: 12px; align-items: center; }
.ring { width: 118px; height: 118px; flex-shrink: 0; }
.ring .rt { fill: none; stroke: rgba(228, 230, 235, .08); stroke-width: 10; }
.ring .rv { fill: none; stroke: #C24D70; stroke-width: 10; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(194, 77, 112, .8)); }
.ring .rn { fill: #E4E6EB; font: 600 28px Kanit, sans-serif; } .ring .rp { font-size: 14px; } .ring .rl { fill: #9AA0AA; font: 10px Kanit, sans-serif; }
.hq-low { flex: 1; min-width: 0; display: grid; gap: 7px; font-size: 12px; }
.hq-low span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hq-low i { display: block; height: 6px; background: #0D0E12; border-radius: 3px; } .hq-low u { display: block; height: 100%; background: linear-gradient(90deg, #651D35, #E06C8C); border-radius: 3px; }
.hq-cats { display: grid; grid-template-columns: 1.5fr repeat(5, 1fr); gap: 12px; margin-top: 18px; }
.hq-cat { display: flex; align-items: center; gap: 12px; padding: 18px 14px; color: #E4E6EB; text-decoration: none;
  background: linear-gradient(160deg, #262A31, #15171B 60%, #1B1E23); box-shadow: inset 0 0 0 1px rgba(228, 230, 235, .1), inset 0 1px 0 rgba(255, 255, 255, .12);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); transition: box-shadow .2s; }
.hq-cat:hover { box-shadow: inset 0 0 0 1px #A33D5B, inset 0 0 26px rgba(163, 61, 91, .3); }
.hq-cat svg { width: 40px; height: 40px; color: #E4E6EB; flex-shrink: 0; filter: drop-shadow(0 0 6px rgba(163, 61, 91, .7)); }
.hq-cat b { display: block; font-size: 17px; white-space: nowrap; } .hq-cat small { display: block; font-size: 11px; letter-spacing: 1.2px; color: #9AA0AA; }
.hq-catalog { background: linear-gradient(120deg, #7A2341, #3E1121 60%, #1B1E23); box-shadow: inset 0 0 0 1px #A33D5B, 0 0 20px -6px rgba(163, 61, 91, .7); }
.hq-catalog em { margin-left: auto; font-style: normal; font-size: 24px; }
@media (max-width: 1100px) { .hq { grid-template-columns: 1fr 1fr; } .hq-center { grid-column: 1 / -1; order: -1; } .hq-cats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .hq { grid-template-columns: minmax(0, 1fr); } .hq-cats { grid-template-columns: repeat(2, 1fr); } .hq-catalog { grid-column: 1 / -1; } .hq-ring { width: 180px; height: 180px; } .hq-ring .co-logo { width: 140px; height: 140px; } }

/* =====================================================================
   ปรับตามภาพเจ้าของ (19 พ.ย. รอบ 2): แดงไวน์เข้มแต่สว่างขึ้น · ใช้ภาพที่ส่งมาเป็นพื้นหลัง · เอฟเฟกต์เพิ่ม
   ===================================================================== */
html[data-theme="command"] {
  --k-red: #C21E48; --k-bur: #7A0F2E; --edge: rgba(225, 29, 72, .65);
  --btn-grad: linear-gradient(180deg, #E8466E 0%, #B8183F 45%, #7A0F2E 100%);
  --accent-glow: rgba(225, 29, 72, .55); --active-bg: linear-gradient(90deg, #B8183F, #6E0D29);
  --c1: #8E1236; --c2: #FF6B8E; --pink-l: #FF8FAB; --a2: #F43F67;
}
/* ภาพพื้นหลัง: แบบหน้าดื่มด่ำของเจ้าของ (เบลอให้ตัวหนังสือในภาพหาย เหลือสีและแสง) */
.fx-photo, .fx-sparks { display: none; }
html[data-theme="command"] :is(.fx-photo, .fx-sparks) { display: block; }
.fx-photo { position: absolute; inset: -30px; z-index: 0; background: url("brand/bg-duemdam.webp") center / cover no-repeat;
  filter: blur(14px) saturate(1.35) brightness(.95); opacity: .85; transform: scale(1.04); }
.fx-photo::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 60% at 50% 45%, rgba(8, 9, 12, .15), rgba(8, 9, 12, .55) 70%, rgba(8, 9, 12, .85)); }
html[data-theme="command"] .fx-main { position: absolute; inset: 0; z-index: 2; }
html[data-theme="command"] body:has(.shell) .fx-photo { opacity: .5; }
/* ประกายไฟแดงลอยขึ้น */
.fx-sparks { position: absolute; inset: 0; z-index: 3; overflow: hidden; }
.fx-sparks i { position: absolute; bottom: -10px; border-radius: 50%; background: #FF7A9A; box-shadow: 0 0 6px 2px rgba(255, 60, 100, .8), 0 0 14px rgba(225, 29, 72, .6);
  animation: fx-ember linear infinite; }
@keyframes fx-ember { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 12% { opacity: 1; } 60% { transform: translate(24px, -55vh) scale(1); opacity: .9; }
  100% { transform: translate(-16px, -105vh) scale(.4); opacity: 0; } }
/* แสงวาบวิ่งผ่านแผงโลหะ */
html[data-theme="command"] :is(.stat, .hq-panel, .hq-cat, .pt-card) { position: relative; overflow: hidden; }
html[data-theme="command"] :is(.stat, .hq-panel, .hq-cat)::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .1) 48%, rgba(255, 140, 170, .12) 52%, transparent 62%);
  transform: translateX(-120%); animation: fx-shine 7s ease-in-out infinite; }
html[data-theme="command"] .hq-panel:nth-child(2)::after, html[data-theme="command"] .stat:nth-child(2)::after { animation-delay: 1.2s; }
html[data-theme="command"] .stat:nth-child(3)::after { animation-delay: 2.4s; } html[data-theme="command"] .stat:nth-child(4)::after { animation-delay: 3.6s; }
@keyframes fx-shine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
/* เส้นแดงด้านบนเต้นเป็นจังหวะ */
html[data-theme="command"] .top::after { background: linear-gradient(90deg, transparent, #C21E48 20%, #FF6B8E 50%, #C21E48 80%, transparent); animation: fx-pulse-red 3s ease-in-out infinite; }
@keyframes fx-pulse-red { 0%, 100% { box-shadow: 0 0 10px rgba(225, 29, 72, .6); opacity: .8; } 50% { box-shadow: 0 0 22px rgba(255, 70, 110, 1); opacity: 1; } }
html[data-theme="command"] .logo-ring::before { border-top-color: #FF4D78; border-right-color: rgba(225, 29, 72, .7); box-shadow: 0 0 22px rgba(225, 29, 72, .75); }
html[data-theme="command"] .hq-ic { border-color: #E11D48; box-shadow: 0 0 16px rgba(225, 29, 72, .7), inset 0 0 12px rgba(225, 29, 72, .45); }
html[data-theme="command"] :is(.hq-panel, .card, .stat, .item, .doc, .shiftbar, .ptile, table.t) {
  background: linear-gradient(90deg, #E11D48 0, rgba(225, 29, 72, 0) 40%) 0 0 / 100% 2px no-repeat, linear-gradient(160deg, rgba(42, 46, 53, .9), rgba(21, 23, 28, .88) 45%, rgba(16, 17, 21, .9) 70%, rgba(30, 33, 38, .9)); }
html[data-theme="command"] .hq-catalog { background: linear-gradient(120deg, #B8183F, #6E0D29 55%, rgba(27, 30, 35, .92)); }
html[data-theme="command"] .ring .rv { stroke: #F43F67; filter: drop-shadow(0 0 7px rgba(244, 63, 103, .9)); }
html[data-theme="command"] .hq-spark i, html[data-theme="command"] .hq-low u { background: linear-gradient(180deg, #FF6B8E, #8E1236); }
html[data-theme="command"] .sg-sub { color: #FF6B8E; }

/* ภาพขวดเครื่องดื่ม + น้ำกระเซ็น (ตัดจากภาพหน้าดื่มด่ำของเจ้าของ) */
.hero-bottles { width: min(560px, 100%); aspect-ratio: 610 / 250; margin: 6px auto 0; background: url("brand/bg-duemdam.webp") no-repeat;
  background-size: 274% auto; background-position: 49% 64.6%;
  -webkit-mask-image: radial-gradient(ellipse 52% 55% at 50% 52%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 52% 55% at 50% 52%, #000 62%, transparent 100%);
  filter: saturate(1.15) brightness(1.1) drop-shadow(0 0 30px rgba(225, 29, 72, .45)); animation: fx-hover 6s ease-in-out infinite alternate; }
@keyframes fx-hover { from { transform: translateY(0); } to { transform: translateY(-6px); } }
.shopgate .hero-bottles { width: min(520px, 100%); margin: -4px auto 4px; }
/* รูปบนการ์ดหมวดสินค้า (ตัดจากภาพ) */
.cat-art { width: 76px; height: 76px; flex-shrink: 0; background: url("brand/bg-duemdam.webp") no-repeat; border-radius: 6px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 74%); mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 74%);
  filter: brightness(1.15) saturate(1.1); }
.cat-art.beer { background-size: 1453% auto; background-position: 31.8% 84.1%; }
.cat-art.spirits { background-size: 1493% auto; background-position: 45.8% 84.2%; }
.cat-art.wine { background-size: 1453% auto; background-position: 60.5% 84.7%; }
.cat-art.rtd { background-size: 1520% auto; background-position: 74.6% 84%; }
.cat-art.catalog { background-size: 1393% auto; background-position: 8.7% 81.9%; }
.hq-cat .cat-art + svg { display: none; }
/* หน้าบริษัท: ใช้ภาพห้องบัญชาการของเจ้าของเป็นพื้นหลัง + การ์ดใช้ภาพจริงจากภาพ */
.portal { position: relative; }
.portal::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: min(100vh, 980px); z-index: 0; pointer-events: none;
  background: url("brand/bg-phoenix.webp") center top / cover no-repeat; filter: blur(9px) saturate(1.25) brightness(.9); opacity: .9;
  -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.portal > * { position: relative; z-index: 1; }
.pt-top { position: sticky; z-index: 10; }
.pt-hall { opacity: .85; }
/* รูปบนการ์ด: ใช้เฉพาะส่วนภาพมุมขวาล่างของการ์ดในภาพต้นแบบ (ไม่ติดตัวหนังสือเดิม) */
.pt-card .pt-art { left: 30%; top: 40%; right: 0; bottom: 0; inset: 40% 0 0 30%; opacity: 1;
  background: url("brand/bg-phoenix.webp") no-repeat !important;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%), linear-gradient(transparent, #000 35%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 30%), linear-gradient(transparent, #000 35%); mask-composite: intersect; }
.pt-office .pt-art { background-size: 660% auto !important; background-position: 12.6% 84.3% !important; }
.pt-duem .pt-art { background-size: 649% auto !important; background-position: 40.1% 84.4% !important; }
.pt-cafe .pt-art { background-size: 658% auto !important; background-position: 67.6% 84.3% !important; }
.pt-new .pt-art { background-size: 654% auto !important; background-position: 95.3% 84.3% !important; }
.pt-office { background: linear-gradient(160deg, #0B2346, #06142B) !important; }
.pt-duem { --pc: #FF2D55; background: linear-gradient(160deg, #5C0A1F, #2A0510) !important; border-color: #E11D48 !important;
  box-shadow: 0 0 0 1px rgba(255, 45, 85, .5), 0 0 26px -4px rgba(255, 45, 85, .7), inset 0 0 20px rgba(225, 29, 72, .25) !important; }
.pt-cafe { background: linear-gradient(160deg, #4A1E33, #1F0C17) !important; }
.pt-new { background: linear-gradient(160deg, #1E293B, #0B1120) !important; }

/* =====================================================================
   หน้าขายแบบภาพที่ 2 (ศูนย์ขาย): แถบหมวดซ้าย · ค้นหา · แผงตัวเลข · การ์ดสินค้า · บิลขวา
   ===================================================================== */
.pos.pos3 { grid-template-columns: 210px minmax(0, 1fr) 380px; }
.pos-side { position: sticky; top: 64px; display: flex; flex-direction: column; gap: 2px; padding: 10px 8px;
  background: linear-gradient(180deg, rgba(30, 33, 38, .92), rgba(14, 15, 18, .92)); box-shadow: inset 0 0 0 1px rgba(228, 230, 235, .08);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }
.ps-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px; margin-bottom: 6px; color: #fff;
  background: linear-gradient(90deg, #B8183F, #6E0D29); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 0 18px rgba(225, 29, 72, .45);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.ps-head svg { width: 22px; height: 22px; } .ps-head b { font-size: 17px; }
.ps-label { font-size: 12px; color: #9AA0AA; padding: 8px 10px 4px; letter-spacing: .5px; }
.ps-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; background: none; border: 0; color: #D7DAE0; cursor: pointer;
  font: inherit; text-align: left; text-decoration: none; border-left: 2px solid transparent; }
.ps-item svg { width: 22px; height: 22px; flex-shrink: 0; color: #C9CDD4; }
.ps-item span { flex: 1; } .ps-item em { font-style: normal; font-size: 12px; color: #8E939C; }
.ps-item:hover { background: rgba(225, 29, 72, .1); color: #fff; }
.ps-item.on { background: linear-gradient(90deg, rgba(225, 29, 72, .32), transparent); border-left-color: #FF4D78; color: #fff; }
.ps-item.on svg { color: #FF6B8E; filter: drop-shadow(0 0 5px rgba(255, 77, 120, .8)); }
.ps-sep { height: 1px; background: rgba(228, 230, 235, .1); margin: 8px 6px; }
.pos-search { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; position: relative; }
.pos-search .ps-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #9AA0AA; pointer-events: none; }
.pos-search .ps-ic svg { width: 22px; height: 22px; }
.pos-search #pq { flex: 1; padding-left: 46px; min-height: 54px; font-size: 17px; }
.pos-search select { width: auto; min-height: 54px; }
.pos-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.pst { display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: linear-gradient(90deg, #E11D48 0, rgba(225, 29, 72, 0) 40%) 0 100% / 100% 2px no-repeat, linear-gradient(160deg, rgba(42, 46, 53, .92), rgba(18, 20, 24, .92));
  box-shadow: inset 0 0 0 1px rgba(228, 230, 235, .1); clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.pst svg { width: 34px; height: 34px; color: #E4E6EB; flex-shrink: 0; }
.pst small { display: block; color: #9AA0AA; font-size: 12px; } .pst b { font-size: 18px; white-space: nowrap; }
.pos-chips { display: none; }
.pg-head { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 8px; }
.pg-head b { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; }
.pg-head svg { width: 20px; height: 20px; color: #FF4D78; fill: rgba(255, 77, 120, .35); }
.pgrid2 { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.pcard { display: flex; flex-direction: column; gap: 4px; padding: 12px; cursor: pointer; position: relative;
  background: linear-gradient(160deg, rgba(40, 43, 50, .94), rgba(18, 20, 24, .94) 60%, rgba(27, 30, 35, .94));
  box-shadow: inset 0 0 0 1px rgba(228, 230, 235, .1), inset 0 1px 0 rgba(255, 255, 255, .1);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); transition: box-shadow .15s, transform .12s; }
.pcard:hover { box-shadow: inset 0 0 0 1px #E11D48, inset 0 0 24px rgba(225, 29, 72, .22); }
.pcard.hit { transform: scale(.97); box-shadow: inset 0 0 0 2px #FF4D78, inset 0 0 30px rgba(225, 29, 72, .45); }
.pcard.out { opacity: .72; }
.pc-img { height: 96px; display: grid; place-items: center; margin: -2px -2px 4px;
  background: radial-gradient(60% 70% at 50% 60%, rgba(225, 29, 72, .28), transparent 70%); }
.pc-img .cat-art { width: 96px; height: 96px; }
.pc-img > svg { width: 56px; height: 56px; color: #C9CDD4; filter: drop-shadow(0 0 8px rgba(225, 29, 72, .6)); }
.pc-name { font-weight: 600; font-size: 15px; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-sub { font-size: 12px; color: #9AA0AA; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-stock { align-self: flex-start; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: rgba(228, 230, 235, .1); color: #D7DAE0; }
.pc-stock.warn { background: rgba(251, 191, 36, .15); color: #FCD34D; } .pc-stock.bad { background: rgba(244, 63, 94, .18); color: #FF8FAB; }
.pc-price { font-size: 22px; font-weight: 700; color: #FF5A82; text-shadow: 0 0 12px rgba(225, 29, 72, .45); font-variant-numeric: tabular-nums; }
.pc-price s { font-size: 13px; color: #8E939C; font-weight: 400; text-shadow: none; }
.pc-act { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.pc-act .qty button { width: 30px; height: 34px; }
.pc-act .qty .qv { min-width: 30px; text-align: center; padding: 0 4px; font-weight: 700; background: #0D0E12; height: 34px; line-height: 34px; }
.pc-add { flex: 1; min-height: 36px !important; padding: 6px 8px !important; font-size: 14px !important; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.pc-add svg { width: 16px; height: 16px; }
@media (max-width: 1280px) { .pos.pos3 { grid-template-columns: minmax(0, 1fr) 360px; } .pos-side { display: none; } .pos-chips { display: flex; } }
@media (max-width: 1000px) { .pos.pos3 { grid-template-columns: minmax(0, 1fr); } .pos-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .pgrid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pos-search select { display: none; } .pos-search #pq { font-size: 15px; }
  .pc-img { height: 80px; } .pc-img .cat-art { width: 80px; height: 80px; } .pc-price { font-size: 19px; }
  .pc-act { flex-wrap: wrap; } .pc-add { flex-basis: 100%; }
  .pst svg { width: 26px; height: 26px; } .pst b { font-size: 15px; }
}

.charts.one { grid-template-columns: minmax(0, 1fr); } .charts.one .chart svg { max-height: 300px; }
/* ---------- ธีม barflux: ไม่มีระแนง · ก้อนแสงเปลี่ยนรูป · ไฟสปอตไลต์ · ฟอง · ของเหลว ---------- */
.fx-blobs, .fx-rays { display: none; }
html[data-theme="barflux"] .fx-slats { display: none !important; }
html[data-theme="barflux"] :is(.fx-blobs, .fx-rays) { display: block; }
html[data-theme="barflux"] { --bg: #04050E; }
html[data-theme="barflux"] .fx-glow { background:
    radial-gradient(70% 50% at 50% 110%, rgba(139, 92, 246, .45), transparent 70%),
    radial-gradient(60% 50% at 50% -10%, rgba(30, 64, 175, .35), transparent 70%),
    linear-gradient(180deg, #050617, #04050E 60%, #070418); }
/* ก้อนแสงลอยเปลี่ยนรูป (โค้งแบบธรรมชาติ) */
.fx-blobs { position: absolute; inset: 0; z-index: 2; filter: blur(70px); }
.fx-blobs i { position: absolute; width: 42vmax; height: 42vmax; opacity: .55; mix-blend-mode: screen;
  border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; animation: fx-morph 22s ease-in-out infinite alternate, fx-drift 30s ease-in-out infinite alternate; }
.fx-blobs i:nth-child(1) { background: #38BDF8; left: -12vmax; top: -10vmax; }
.fx-blobs i:nth-child(2) { background: #2563EB; right: -14vmax; top: 20vh; animation-duration: 26s, 34s; animation-delay: -6s, -10s; }
.fx-blobs i:nth-child(3) { background: #8B5CF6; left: 25vw; bottom: -18vmax; animation-duration: 19s, 28s; animation-delay: -12s, -4s; }
.fx-blobs i:nth-child(4) { background: #EC4899; right: 8vw; top: -16vmax; width: 32vmax; height: 32vmax; animation-duration: 24s, 26s; animation-delay: -3s, -15s; }
@keyframes fx-morph {
  0% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
  50% { border-radius: 63% 37% 38% 62% / 55% 61% 39% 45%; }
  100% { border-radius: 36% 64% 52% 48% / 37% 52% 48% 63%; } }
@keyframes fx-drift { from { transform: translate(0, 0) rotate(0deg) scale(1); } to { transform: translate(6vw, 5vh) rotate(40deg) scale(1.12); } }
/* ไฟสปอตไลต์ส่ายจากด้านบน (ไฟบาร์) */
.fx-rays { position: absolute; inset: 0; z-index: 3; overflow: hidden; }
.fx-rays i { position: absolute; top: -8vh; width: 26vw; min-width: 200px; height: 115vh; transform-origin: 50% 0;
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%); filter: blur(10px); mix-blend-mode: screen; opacity: .5;
  animation: fx-swing 11s ease-in-out infinite alternate; }
.fx-rays i:nth-child(1) { left: 6vw; background: linear-gradient(180deg, rgba(56, 189, 248, .55), rgba(56, 189, 248, 0) 75%); }
.fx-rays i:nth-child(2) { left: 37vw; background: linear-gradient(180deg, rgba(167, 139, 250, .5), rgba(167, 139, 250, 0) 75%); animation-duration: 14s; animation-delay: -5s; }
.fx-rays i:nth-child(3) { left: 68vw; background: linear-gradient(180deg, rgba(244, 114, 182, .55), rgba(244, 114, 182, 0) 75%); animation-duration: 12s; animation-delay: -8s; }
@keyframes fx-swing { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
/* หน้าทำงาน: แสงลดลงให้อ่านตัวเลขสบายตา */
html[data-theme="barflux"] body:has(.shell) .fx-blobs { opacity: .55; }
html[data-theme="barflux"] body:has(.shell) .fx-rays { opacity: .45; }
@media (prefers-reduced-motion: reduce) { .fx-blobs i, .fx-rays i { animation: none !important; } }

/* ---------- ฉากหลัง Future Bar ---------- */
.fx-glow, .fx-slats, .fx-leaves, .fx-liquid, .fx-bubbles { display: none; }
html[data-theme^="bar"] :is(.fx-glow, .fx-slats, .fx-liquid, .fx-bubbles) { display: block; }
html[data-theme^="bar"] .fx-main .floor, html[data-theme^="bar"] .fx-main .orb { display: none; }
html[data-theme^="bar"] .fx-main { position: absolute; inset: 0; z-index: 4; }
html[data-theme^="bar"] .fx-bg .flow path { stroke-width: 1.8; }
/* ไฟลอดระแนง (อยู่หลังไม้) */
.fx-glow { position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(60% 45% at 50% 108%, var(--glow1, rgba(245, 180, 81, .5)), transparent 70%),
    radial-gradient(40% 35% at 12% 100%, var(--glow2, rgba(245, 180, 81, .45)), transparent 70%),
    radial-gradient(40% 40% at 90% 95%, var(--glow3, rgba(255, 237, 213, .25)), transparent 70%),
    radial-gradient(50% 30% at 50% -5%, var(--glow4, rgba(245, 180, 81, .18)), transparent 70%), #050605;
  animation: fx-breathe 10s ease-in-out infinite alternate; }
@keyframes fx-breathe { from { filter: brightness(.85); } to { filter: brightness(1.15); } }
/* ระแนงไม้น้ำตาลเข้มออกดำ มีร่องให้แสงลอด */
.fx-slats { position: absolute; inset: 0; z-index: 2;
  background:
    repeating-linear-gradient(90deg, rgba(255, 230, 200, .018) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, transparent 0 5px, #0d0906 5px, #2a1c12 14px, #23170f 30px, #160f0a 42px, #0a0705 46px);
  -webkit-mask-image: linear-gradient(90deg, #000 0, rgba(0, 0, 0, .92) 22%, rgba(0, 0, 0, .55) 50%, rgba(0, 0, 0, .92) 78%, #000 100%);
  mask-image: linear-gradient(90deg, #000 0, rgba(0, 0, 0, .92) 22%, rgba(0, 0, 0, .55) 50%, rgba(0, 0, 0, .92) 78%, #000 100%); }
.fx-slats::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent 30%, transparent 70%, rgba(0, 0, 0, .25)); }
/* ใบไม้ห้อยจากมุมบน */
.fx-leaves { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; }
.fx-leaves .frond { transform-box: view-box; animation: fx-sway 7s ease-in-out infinite alternate; }
@keyframes fx-sway { from { transform: rotate(-2.2deg); } to { transform: rotate(2.2deg); } }
/* ของเหลวเรืองแสงด้านล่าง */
.fx-liquid { position: absolute; left: 0; right: 0; bottom: 0; height: 22vh; min-height: 120px; z-index: 3; overflow: hidden; }
.fx-liquid svg { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; }
.fx-liquid .w1 { animation: fx-wave 14s linear infinite; }
.fx-liquid .w2 { animation: fx-wave 9s linear infinite reverse; opacity: .7; }
@keyframes fx-wave { to { transform: translateX(-50%); } }
/* ฟองอากาศลอยขึ้น */
.fx-bubbles { position: absolute; inset: 0; z-index: 3; overflow: hidden; }
.fx-bubbles i { position: absolute; bottom: -20px; border-radius: 50%;
  border: 1px solid var(--bub-edge, rgba(255, 245, 230, .55)); background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .7), var(--bub-fill, rgba(252, 217, 160, .08)) 45%, transparent 70%);
  box-shadow: 0 0 8px var(--accent-glow, rgba(245, 180, 81, .35)); animation: fx-rise linear infinite; }
@keyframes fx-rise {
  0% { transform: translate(0, 0) scale(.6); opacity: 0; }
  10% { opacity: .9; }
  50% { transform: translate(14px, -45vh) scale(1); }
  85% { opacity: .5; }
  100% { transform: translate(-10px, -92vh) scale(1.15); opacity: 0; } }
@media (max-width: 760px) { .fx-liquid { height: 16vh; } }
/* หน้าทำงาน (หลังเข้าระบบ): ของเหลวเตี้ยและจางลง ไม่บังตัวหนังสือ */
html[data-theme^="bar"] body:has(.shell) .fx-liquid { height: 8vh; min-height: 56px; opacity: .55; }
html[data-theme^="bar"] body:has(.shell) .fx-glow { filter: brightness(.7); animation: none; }
html[data-theme^="bar"] .hbar .fill { box-shadow: 0 0 10px rgba(245, 180, 81, .35); }

/* ---------- พื้นหลังล้ำสมัย (.fx-bg ใน index.html) ---------- */
.fx-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.fx-main { width: 100%; height: 100%; display: block; }
.fx-bg .floor line { stroke-width: 1; opacity: .35; }
.fx-bg .flow path { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 1 13; animation: fx-flow 6s linear infinite; }
.fx-bg .flow.glow path { stroke-width: 6; opacity: .35; stroke-dasharray: none; animation: none; }
.fx-bg .stars circle { opacity: .25; animation: fx-twinkle 6s ease-in-out infinite; }
.fx-bg .orb { transform-box: fill-box; transform-origin: center; animation: fx-pulse 9s ease-in-out infinite alternate; }
.fx-bg .o2 { animation-duration: 12s; }
@keyframes fx-flow { to { stroke-dashoffset: -280; } }
@keyframes fx-twinkle { 0%, 100% { opacity: .15; } 50% { opacity: .8; } }
@keyframes fx-pulse { from { transform: scale(.9); opacity: .75; } to { transform: scale(1.08); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fx-bg * { animation: none !important; } }
html[data-theme="holo"] .fx-bg .orb { opacity: .5; }            /* holo มีแสงออโรร่าอยู่แล้ว */
html[data-theme="light"] .fx-bg { opacity: .45; }
html[data-theme="light"] .fx-bg .stars { display: none; }
html[data-theme="light"] .top { color: var(--ink); }
html[data-theme="light"] .top button { color: var(--ink); background: var(--chip-bg); }
/* การ์ดโปร่งขึ้นนิดให้เห็นพื้นหลัง แต่ตัวหนังสือยังชัด */
html:is([data-theme="noir"], [data-theme="gold"], [data-theme="wine"]) :is(.card, .stat, .item, .doc, .shiftbar, .ptile, table.t) {
  background: linear-gradient(color-mix(in srgb, var(--card) 86%, transparent), color-mix(in srgb, var(--card) 86%, transparent)) padding-box, var(--edge-grad) border-box;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

@media print {
  body { background: #fff !important; }
  .fx-bg { display: none; }
  html[data-theme] body::before, html[data-theme] body::after { display: none; }
}

/* ---------------------------------------------------------------- โหมดออฟไลน์ (แถบบอกสถานะเน็ต) */
#netbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px);
  border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 9px 16px; font: 600 14px/1.3 Kanit, Sarabun, sans-serif;
  color: #fff; cursor: pointer; box-shadow: 0 8px 28px rgba(0,0,0,.5); backdrop-filter: blur(8px); text-align: center; }
#netbar[hidden] { display: none; }
#netbar.off { background: linear-gradient(135deg, #8a2a1c, #c2521f); animation: netpulse 2.2s ease-in-out infinite; }
#netbar.sync { background: linear-gradient(135deg, #30343B, #4a505a); }
#netbar.bad { background: linear-gradient(135deg, #651D35, #A33D5B); }
@keyframes netpulse { 50% { box-shadow: 0 0 0 6px rgba(194,82,31,.25), 0 8px 28px rgba(0,0,0,.5); } }
@media (max-width: 760px) { #netbar { bottom: 74px; font-size: 13px; } }

/* ---------------------------------------------------------------- สแกนด้วยกล้อง */
.scanner { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; flex-direction: column; color: #fff; }
.sc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: #111318; font-size: 16px; }
.sc-view { position: relative; flex: 1; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.sc-view video { width: 100%; height: 100%; object-fit: cover; }
.sc-frame { position: absolute; width: min(78vw, 420px); height: min(44vw, 240px); border: 3px solid rgba(255,255,255,.9); border-radius: 16px;
  box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
.sc-frame::after { content: ''; position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: #ff4d6d; box-shadow: 0 0 10px #ff4d6d; animation: scline 1.6s ease-in-out infinite; }
@keyframes scline { 0%, 100% { transform: translateY(-80px); } 50% { transform: translateY(80px); } }
.sc-msg { padding: 16px; min-height: 64px; text-align: center; font: 600 18px/1.35 Kanit, Sarabun, sans-serif; background: #111318; }
.sc-msg.ok { background: #14532d; } .sc-msg.bad { background: #7f1d1d; }

/* ---------------------------------------------------------------- ส่งของ */
.badge.green, html[data-theme] .badge.green { background: #166534; color: #fff; }
.dl-scan { width: 100%; font-size: 20px; padding: 18px; margin: 10px 0; }
.dl-find { gap: 8px; margin-bottom: 14px; } .dl-find input { flex: 1; min-width: 0; }
.dl-cust { margin: 8px 0; }
.dl-prog { padding: 12px 14px; border-radius: 12px; font: 600 17px Kanit, Sarabun, sans-serif; background: rgba(255,255,255,.06); margin: 8px 0; }
.dl-prog.ok { background: #14532d; color: #fff; } .dl-prog.bad { background: #7f1d1d; color: #fff; }
.dl-items { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.dl-it { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.dl-it.ok { border-color: #22c55e; background: rgba(34,197,94,.12); }
.dl-it.part { border-color: #f59e0b; }
.dl-it.bad { border-color: #ef4444; background: rgba(239,68,68,.14); }
.dl-n { font-size: 15px; white-space: nowrap; } .dl-n b { font-size: 22px; }
.rc .qr { width: 34mm; margin: 6px auto 0; } .rc .qr svg { width: 100%; height: auto; display: block; }
.rc .sign { margin-top: 14px; }
.sc-warn { padding: 10px 16px; background: #7c2d12; color: #fff; font-size: 14px; line-height: 1.4; }
.sc-view.off video { display: none; }
.sc-photo { margin: 0 16px 16px; justify-content: center; font-size: 17px; padding: 14px; cursor: pointer; }
.sc-top .grow { flex: 1; } .sc-top [data-go] { font-size: 15px; padding: 9px 14px; white-space: nowrap; }
