/* =========================================================================
   bmsgo.life — design system v1.0.1
   White paper, forest-green ink, lime accent. Matches FW 2.0.1 (the ESP32 web
   dashboard and the CYD TFT use the same palette), so the device and the site
   read as one product.
   ========================================================================= */
:root{
  color-scheme:light;
  --paper:#ffffff;
  --surface:#f3f6f1;      /* soft card / section background */
  --surface2:#e8ede4;     /* rails, tracks, empty states     */
  --line:#e0e7dc;
  --line2:#cfdcc8;
  --ink:#12301f;          /* primary text                    */
  --brand:#1b4332;        /* darkest green — headings, CTAs   */
  --brand2:#2d6a4f;       /* mid green — values, links        */
  --accent:#b7e34b;       /* lime — highlights, active pills  */
  --accent-ink:#22380b;
  --mint:#e8f3e2;
  --muted:#6d8073;
  --ok:#2f8a4f;
  --warn:#c07d0b;
  --bad:#c8452f;
  --info:#2f6f8f;
  --radius:16px;
  --shadow:0 1px 2px rgba(18,48,31,.06), 0 8px 24px rgba(18,48,31,.05);
  --mono:ui-monospace,SFMono-Regular,"Cascadia Mono",Menlo,Consolas,monospace;
  --sidebar-w:264px;
  --topbar-h:64px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--paper);color:var(--ink);
  font:15px/1.55 "Segoe UI",-apple-system,BlinkMacSystemFont,Roboto,
       "Noto Sans Thai","Sarabun",Arial,sans-serif;
}
a{color:var(--brand2);text-decoration:none}
a:hover{text-decoration:underline}
code,kbd,.mono{font-family:var(--mono);font-size:.92em}
.wrap{max-width:1180px;margin:0;padding:26px 30px 30px;margin-left:var(--sidebar-w)}
.narrow{max-width:880px}

/* ---- sidebar admin shell ------------------------------------------------ */
.shell-chrome{display:contents}
.sidebar{position:fixed;top:0;left:0;bottom:0;width:var(--sidebar-w);z-index:50;
  background:linear-gradient(195deg,var(--brand) 0%,#122a1c 78%);
  color:#eaf3e6;display:flex;flex-direction:column;
  box-shadow:2px 0 18px rgba(9,26,16,.18);transition:transform .25s ease}
.sidebar .brand{display:flex;align-items:center;gap:12px;padding:22px 20px;
  font-weight:800;font-size:19px;color:#fff;letter-spacing:-.3px;line-height:1;flex:0 0 auto}
.sidebar .brand:hover{text-decoration:none}
.sidebar .mark{width:38px;height:38px;border-radius:11px;background:rgba(255,255,255,.12);
  color:var(--accent);display:grid;place-items:center;font-size:13px;font-weight:800;
  letter-spacing:.3px;border:1px solid rgba(255,255,255,.16);flex:0 0 auto}
.sidebar .brandtxt b.dim{color:rgba(234,243,230,.55);font-weight:700}
.sidebar-nav{flex:1 1 auto;overflow-y:auto;padding:10px 14px 14px;display:flex;flex-direction:column;gap:3px}
.nav-link{display:flex;align-items:center;gap:12px;padding:11px 13px;border-radius:11px;
  color:rgba(234,243,230,.82);font-size:14.5px;font-weight:600;white-space:nowrap;
  transition:background .15s,color .15s}
.nav-link .ic{width:19px;height:19px;flex:0 0 19px}
.nav-link:hover{background:rgba(255,255,255,.08);color:#fff;text-decoration:none}
.nav-link[aria-current="page"]{background:linear-gradient(135deg,var(--accent),#9fd63f);
  color:var(--accent-ink);box-shadow:0 4px 12px rgba(0,0,0,.18)}
.sidebar-foot{flex:0 0 auto;padding:14px 20px 18px;font-size:11px;line-height:1.6;
  color:rgba(234,243,230,.5);border-top:1px solid rgba(255,255,255,.09)}
.sidebar-backdrop{display:none;position:fixed;inset:0;background:rgba(9,26,16,.45);z-index:45}
.sidebar-backdrop.on{display:block}

.topbar{position:sticky;top:0;z-index:40;margin-left:var(--sidebar-w);height:var(--topbar-h);
  display:flex;align-items:center;gap:14px;padding:0 26px;
  background:rgba(255,255,255,.85);backdrop-filter:blur(14px) saturate(1.3);
  border-bottom:1px solid var(--line);box-shadow:0 2px 14px rgba(18,48,31,.04)}
.topbar-title{display:flex;align-items:center;gap:10px;font-weight:800;font-size:16.5px;
  color:var(--brand);letter-spacing:-.2px}
.topbar-title .ic{width:20px;height:20px;color:var(--brand2)}
.topbar-actions{margin-left:auto;display:flex;align-items:center;gap:10px}
.burger{display:none;background:var(--surface);border:1px solid var(--line2);
  color:var(--brand);border-radius:11px;width:38px;height:38px;flex:0 0 38px;
  align-items:center;justify-content:center;font-size:18px;line-height:1;cursor:pointer;
  transition:background .16s}
.burger:hover{background:var(--mint)}

@media (max-width:960px){
  .sidebar{transform:translateX(-100%)}
  .sidebar.open{transform:translateX(0)}
  .topbar,.wrap{margin-left:0}
  .burger{display:inline-flex}
}
@media (max-width:640px){
  .wrap{padding:16px}
  .topbar{padding:0 14px;gap:10px}
  .topbar-title{font-size:14.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .topbar-actions .btn span:not(.livedot){display:none}
}

/* ---- headings / sections ---------------------------------------------- */
h1{font-size:30px;line-height:1.2;letter-spacing:-.6px;color:var(--brand);margin:0 0 8px}
h2{font-size:21px;letter-spacing:-.3px;color:var(--brand);margin:34px 0 12px}
h3{font-size:16px;color:var(--brand);margin:20px 0 8px}
.lede{color:var(--muted);font-size:16px;max-width:70ch;margin:0 0 18px}
.sec{display:flex;align-items:center;gap:10px;margin:30px 2px 14px}
.sec h2{margin:0;font-size:18px}
.sec .more{margin-left:auto;font-size:13px;font-weight:700}
.eyebrow{font-size:12px;font-weight:700;letter-spacing:.10em;text-transform:uppercase;
  color:var(--brand2)}

/* ---- surfaces ---------------------------------------------------------- */
.card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);
  padding:16px 18px;box-shadow:var(--shadow)}
.card.soft{background:var(--surface);box-shadow:none}
.grid{display:grid;gap:14px}
.g2{grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}
.g3{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.g4{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
.note{background:var(--mint);border:1px solid var(--line2);border-left:4px solid var(--brand2);
  border-radius:10px;padding:12px 14px;margin:14px 0}
.note.warn{background:#fdf4e3;border-left-color:var(--warn)}
.note.bad{background:#fdecea;border-left-color:var(--bad)}
.note b{color:var(--brand)}

/* ---- buttons / pills --------------------------------------------------- */
.btn{display:inline-flex;align-items:center;gap:7px;padding:9px 16px;border-radius:10px;
  border:1px solid var(--line2);background:var(--paper);color:var(--brand);
  font-size:14px;font-weight:700;cursor:pointer;font-family:inherit}
.btn:hover{background:var(--mint);text-decoration:none}
.btn.primary{background:var(--brand);border-color:var(--brand);color:#fff}
.btn.primary:hover{background:var(--brand2)}
.btn.lime{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.btn.lime:hover{background:#a8d93c}
.btn.sm{padding:6px 11px;font-size:12.5px;border-radius:8px}
.btn:disabled{opacity:.5;cursor:not-allowed}
.pill{display:inline-block;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:700;
  background:var(--surface);border:1px solid var(--line);color:var(--muted)}
.pill.ok{background:var(--mint);border-color:var(--brand2);color:var(--brand)}
.pill.lime{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.pill.bad{background:#fdecea;border-color:#f0b6ab;color:#8e2c1c}
.pill.warn{background:#fdf4e3;border-color:#eccf94;color:#7a5205}

/* ---- copy-to-clipboard ------------------------------------------------- */
.copy{display:inline-flex;align-items:center;gap:6px;padding:2px 8px;border-radius:8px;
  border:1px solid var(--line2);background:var(--surface);color:var(--brand);
  font:600 12.5px/1.6 var(--mono);cursor:pointer}
.copy:hover{background:var(--mint)}
.copy.done{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.copybox{display:flex;align-items:stretch;gap:0;border:1px solid var(--line2);border-radius:10px;
  overflow:hidden;background:var(--surface)}
.copybox code{flex:1;padding:10px 12px;overflow-x:auto;white-space:pre;color:var(--ink)}
.copybox button{border:0;border-left:1px solid var(--line2);background:var(--paper);
  color:var(--brand);font-weight:700;font-size:12.5px;padding:0 14px;cursor:pointer}
.copybox button:hover{background:var(--mint)}

/* ---- LINE OpenChat CTA --------------------------------------------------- */
.line-cta{display:flex;align-items:center;gap:16px;margin:18px 0 26px;padding:16px 20px;
  border-radius:18px;text-decoration:none;color:#fff;
  background:linear-gradient(120deg,#06c755,#04a648 65%,#038a3c);
  box-shadow:0 10px 26px rgba(6,199,85,.30),inset 0 1px 0 rgba(255,255,255,.18);
  transition:transform .18s,box-shadow .18s}
.line-cta:hover{text-decoration:none;transform:translateY(-2px);
  box-shadow:0 14px 32px rgba(6,199,85,.38),inset 0 1px 0 rgba(255,255,255,.18)}
.line-ic{flex:0 0 46px;width:46px;height:46px;border-radius:13px;background:rgba(255,255,255,.2);
  display:grid;place-items:center;border:1px solid rgba(255,255,255,.3)}
.line-ic svg{width:26px;height:26px}
.line-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.line-body b{font-size:16px;letter-spacing:-.2px}
.line-body small{font-size:12.5px;color:rgba(255,255,255,.9);font-weight:500}
.line-btn{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;padding:10px 18px;
  border-radius:999px;background:#fff;color:#04a648;font-weight:800;font-size:13.5px;
  white-space:nowrap;transition:gap .18s}
.line-cta:hover .line-btn{gap:10px}
.line-btn .arr{font-weight:800}
@media (max-width:640px){
  .line-cta{flex-wrap:wrap;padding:14px 16px}
  .line-body{flex:1 1 100%;order:1}
  .line-ic{order:0}
  .line-btn{order:2;margin-left:62px}
}

/* ---- stats ------------------------------------------------------------- */
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.stat{background:var(--paper);border:1px solid var(--line);border-top:3px solid var(--brand2);
  border-radius:14px;padding:14px 16px;box-shadow:var(--shadow)}
.stat:nth-child(4n+1){border-top-color:var(--brand2)}
.stat:nth-child(4n+2){border-top-color:var(--accent)}
.stat:nth-child(4n+3){border-top-color:var(--info)}
.stat:nth-child(4n+4){border-top-color:var(--warn)}
.stat b{display:block;font-size:27px;font-weight:800;color:var(--brand);
  font-variant-numeric:tabular-nums;line-height:1.15}
.stat small{color:var(--muted);font-size:12.5px}
.livedot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--ok);
  margin-right:6px;animation:pulse 1.9s infinite}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(47,138,79,.45)}
  70%{box-shadow:0 0 0 9px rgba(47,138,79,0)}100%{box-shadow:0 0 0 0 rgba(47,138,79,0)}}

/* ---- tables ------------------------------------------------------------ */
.tablewrap{overflow-x:auto;border:1px solid var(--line);border-radius:var(--radius);
  background:var(--paper)}
table{border-collapse:collapse;width:100%;min-width:520px;font-size:14px}
th,td{padding:10px 14px;text-align:left;border-bottom:1px solid var(--line);white-space:nowrap}
th{background:var(--surface);color:var(--brand);font-size:12px;text-transform:uppercase;
  letter-spacing:.05em;position:sticky;top:0}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover{background:var(--mint)}
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}
.rank{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:8px;
  background:var(--surface2);color:var(--muted);font-size:12px;font-weight:800}
.rank.rank-g1{background:linear-gradient(135deg,#ffd75a,#f0a52c);color:#4a2f00}
.rank.rank-g2{background:linear-gradient(135deg,#e2e8de,#c3cfbd);color:#2b3a2f}
.rank.rank-g3{background:linear-gradient(135deg,#e0b183,#bb8146);color:#3a2200}

/* ---- leaderboard cards ------------------------------------------------- */
.boards{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}
.board{border:1px solid var(--line);border-radius:var(--radius);background:var(--paper);
  padding:15px 16px;box-shadow:var(--shadow)}
.board h3{margin:0 0 4px;font-size:14px;color:var(--brand)}
.board .cap{font-size:11.5px;color:var(--muted);margin-bottom:8px}
.board ol{margin:0;padding:0;list-style:none;counter-reset:r}
.board li{counter-increment:r;display:flex;align-items:center;gap:9px;padding:7px 0;
  border-top:1px solid var(--line)}
.board li:first-child{border-top:0}
.board li::before{content:counter(r);width:22px;height:22px;flex:0 0 22px;border-radius:7px;
  background:var(--surface2);display:grid;place-items:center;font-size:11px;font-weight:800;
  color:var(--muted)}
.board li:nth-child(1)::before{background:linear-gradient(135deg,#ffd75a,#f0a52c);color:#4a2f00}
.board li:nth-child(2)::before{background:linear-gradient(135deg,#e2e8de,#c3cfbd);color:#2b3a2f}
.board li:nth-child(3)::before{background:linear-gradient(135deg,#e0b183,#bb8146);color:#3a2200}
.board li .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:var(--ink);font-weight:600}
.board li .nm small{display:block;color:var(--muted);font-size:11px;font-weight:400;
  font-family:var(--mono)}
.board li .val{font-weight:800;color:var(--brand);font-variant-numeric:tabular-nums}
.board .foot{margin-top:10px;padding-top:9px;border-top:1px solid var(--line);
  text-align:right;font-size:12.5px;font-weight:700}

/* ---- device cards ------------------------------------------------------ */
.devs{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(268px,1fr))}
.dev{display:block;border:1px solid var(--line);border-radius:var(--radius);padding:14px 15px;
  background:var(--paper);box-shadow:var(--shadow);transition:transform .18s,box-shadow .18s;
  position:relative;color:inherit}
.dev:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(18,48,31,.10);text-decoration:none}
.dev .top{display:flex;align-items:center;gap:8px;margin-bottom:9px}
.dev .top b{font-family:var(--mono);font-size:13.5px;color:var(--brand)}
.dev .st{width:8px;height:8px;border-radius:50%;background:var(--ok);flex:0 0 8px}
.dev .st.off{background:var(--line2);animation:none}
.dev .meta{margin-left:auto;font-size:11px;color:var(--muted)}
.bt{display:flex;align-items:center;gap:9px;padding:7px 0;border-top:1px solid var(--line)}
.bt:first-of-type{border-top:0}
.bt .nm{width:72px;font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap}
.mini{position:relative;height:8px;border-radius:5px;background:var(--surface2);flex:1;overflow:hidden}
.mini>i{display:block;height:100%;border-radius:5px;transition:width .8s}
.bt .pc{width:42px;text-align:right;font-weight:800;font-size:13px;font-variant-numeric:tabular-nums}
.bt .w{width:58px;text-align:right;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.bt.crit,.bt.warn{margin:0 -8px;padding:7px 8px;border-radius:8px;border-top-color:transparent}
.bt.crit{background:#fdecea}
.bt.warn{background:#fdf4e3}
.bt .pill{padding:2px 8px;font-size:10.5px;flex:0 0 auto}
.warnpin{position:absolute;top:11px;right:12px;font-size:13px;color:var(--warn)}
.warnpin.crit{color:var(--bad)}

/* ---- risk strip -------------------------------------------------------- */
.risks{display:flex;gap:10px;overflow-x:auto;padding:2px 2px 8px}
.risk{flex:0 0 auto;border-radius:12px;padding:9px 13px;border:1px solid var(--line);
  background:var(--paper);font-size:13px;white-space:nowrap;color:var(--ink)}
.risk:hover{text-decoration:none;background:var(--mint)}
.risk.crit{border-color:#f0b6ab;background:#fdecea}
.risk.warn{border-color:#eccf94;background:#fdf4e3}
.risk .lv{font-weight:800}
.risk.crit .lv{color:#8e2c1c} .risk.warn .lv{color:#7a5205}
.risk b{font-family:var(--mono);color:var(--brand)}

/* ---- misc -------------------------------------------------------------- */
.empty{color:var(--muted);text-align:center;padding:34px;background:var(--surface);
  border:1px dashed var(--line2);border-radius:var(--radius)}
.foot{text-align:center;color:var(--muted);font-size:12.5px;margin:34px 0 16px;
  padding-top:18px;border-top:1px solid var(--line)}
.foot a{margin:0 7px}
.steps{counter-reset:s;list-style:none;padding:0;margin:0}
.steps>li{counter-increment:s;position:relative;padding:0 0 18px 42px;
  border-left:2px solid var(--line);margin-left:13px}
.steps>li:last-child{border-left-color:transparent;padding-bottom:0}
.steps>li::before{content:counter(s);position:absolute;left:-14px;top:-2px;width:26px;height:26px;
  border-radius:50%;background:var(--brand);color:var(--accent);display:grid;place-items:center;
  font-size:12px;font-weight:800}
.steps>li h3{margin:0 0 4px}
.kv{display:flex;justify-content:space-between;gap:12px;padding:7px 0;
  border-bottom:1px dashed var(--line);font-size:14px}
.kv:last-child{border-bottom:0}
.kv b{color:var(--brand);text-align:right}
.faq{border:1px solid var(--line);border-radius:12px;background:var(--paper);margin-bottom:8px}
.faq summary{padding:12px 15px;cursor:pointer;font-weight:700;color:var(--brand);list-style:none}
.faq summary::-webkit-details-marker{display:none}
.faq summary::before{content:"+";display:inline-block;width:18px;font-weight:800;color:var(--brand2)}
.faq[open] summary::before{content:"−"}
.faq .body{padding:0 15px 14px;color:var(--ink)}
pre{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:12px 14px;
  overflow-x:auto;font-family:var(--mono);font-size:12.5px;line-height:1.6;margin:10px 0}
.bar{height:10px;border-radius:6px;background:var(--surface2);overflow:hidden;margin:10px 0}
.bar>i{display:block;height:100%;width:0;background:var(--brand2);transition:width .3s}

/* ---- mobile ------------------------------------------------------------ */
@media (max-width:820px){
  .burger{display:block}
  .menu{display:none;position:absolute;top:100%;left:0;right:0;flex-direction:column;
    align-items:stretch;background:rgba(255,255,255,.97);backdrop-filter:blur(14px);
    border-bottom:1px solid var(--line);padding:10px 14px 16px;gap:4px;box-shadow:var(--shadow)}
  .menu.open{display:flex}
  .menu a{padding:13px 15px;border-radius:11px;font-size:16px}
  .menu a[aria-current="page"]::after{display:none}
}
@media (max-width:640px){
  .wrap{padding:14px}
  h1{font-size:24px}
  .stats{grid-template-columns:repeat(2,1fr)}
  .stat b{font-size:22px}
  .boards{grid-template-columns:1fr}
  .devs{grid-template-columns:1fr}
  .risks{flex-direction:column;overflow-x:visible}
  .risk{white-space:normal;width:100%}
}

/* ---- QR block (scan-to-open, shown at the very bottom of the page) ----- */
.qrblock{margin:22px auto 6px;max-width:340px}
.qrblock-inner{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);
  box-shadow:var(--shadow);padding:20px;display:flex;flex-direction:column;align-items:center;gap:12px}
.qrblock-canvas{width:240px;height:240px;border-radius:10px}
.qrblock-cap{display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center}
.qrblock-title{font-weight:800;color:var(--brand);font-size:14.5px}
.qrblock-hint{color:var(--muted);font-size:12px}
.qrblock-save{display:inline-flex;align-items:center;gap:7px;padding:9px 16px;border-radius:10px;
  background:var(--brand);border:1px solid var(--brand);color:#fff;font-weight:700;font-size:13.5px;
  cursor:pointer}
.qrblock-save:hover{background:var(--brand2)}

/* =========================================================================
   bmsgo.life — public dashboard refresh
   Calm, high-contrast surfaces inspired by the supplied product reference.
   Kept as an override layer so all existing pages and live widgets retain
   their established markup and behavior.
   ========================================================================= */
:root{--paper:#fff;--surface:#f7f9f7;--surface2:#edf3ed;--line:#e8ede9;--line2:#d9e4db;
  --ink:#14261d;--brand:#075d33;--brand2:#14934d;--accent:#b5ed65;--accent-ink:#124024;
  --mint:#edf9ef;--muted:#718078;--radius:18px;--shadow:0 2px 4px rgba(17,45,29,.02),0 11px 30px rgba(17,45,29,.055)}
body{background:#fbfcfb;color:var(--ink);font-family:"Noto Sans Thai","Sarabun","Segoe UI",sans-serif}
.wrap{max-width:1440px;padding:24px 30px 34px;margin-left:var(--sidebar-w);transition:margin-left .25s ease}
.sidebar{background:#fff;color:var(--ink);border-right:1px solid var(--line);box-shadow:none;transition:transform .25s ease}
.sidebar .brand{height:94px;justify-content:center;padding:0 21px;color:var(--ink);border-bottom:1px solid var(--line);overflow:hidden}
.sidebar .brand-logo{display:block;width:210px;height:94px;object-fit:cover;object-position:center}
.sidebar-nav{padding:18px 13px;gap:5px}.nav-link{color:#4d5b54;border:1px solid transparent;padding:11px 13px;border-radius:11px;font-size:14px}
.nav-link:hover{background:var(--mint);color:var(--brand)}.nav-link[aria-current="page"]{background:linear-gradient(100deg,#0c753e,#14954c);color:#fff;box-shadow:0 8px 19px rgba(16,130,67,.18)}
.sidebar-foot{padding:16px 22px 20px;color:#5b6a62;border-top:1px solid var(--line);font-weight:700}.sidebar-foot small{font-weight:500;font-size:11px;color:var(--muted)}
.topbar{height:76px;margin-left:var(--sidebar-w);padding:0 30px;background:rgba(255,255,255,.9);border-bottom:1px solid var(--line);box-shadow:none;transition:margin-left .25s ease}
.topbar-title{font-size:17px;color:var(--ink)}.topbar-title .ic{color:var(--brand)}.burger{display:inline-flex;border:0;width:42px;height:42px;border-radius:50%;background:#fff;box-shadow:0 5px 16px rgba(16,44,28,.09);font-size:20px}
.burger:hover{background:var(--mint)}.live-button{border-color:#d7ebda;background:#f3fbf4;color:var(--brand);border-radius:999px}
body.sidebar-collapsed .sidebar{transform:translateX(calc(-1 * var(--sidebar-w)))}body.sidebar-collapsed .topbar,body.sidebar-collapsed .wrap{margin-left:0}
h1{font-size:31px;color:var(--ink);letter-spacing:-.75px}h2{color:var(--ink)}.lede{color:var(--muted)}
.card,.board,.dev,.tablewrap{border-color:var(--line);box-shadow:var(--shadow)}.card{padding:18px 20px}.card.soft{background:#f8fbf8}.btn{border-color:var(--line2);border-radius:10px}.btn.primary{background:linear-gradient(125deg,#087039,#119750);border:0}.btn.lime{background:#e9f9d2;border-color:#e0f3c5;color:var(--brand)}
.energy-hero{min-height:210px;padding:31px 35px;border-radius:21px;border-color:#e4eee4;background:linear-gradient(116deg,#fbfefd 0%,#f2fbf4 52%,#e0f5e2 100%);box-shadow:none}
.energy-hero:before{content:"";position:absolute;right:6%;bottom:-55px;width:250px;height:145px;border-radius:120px 120px 0 0;background:linear-gradient(150deg,rgba(8,112,57,.09),rgba(181,237,101,.44));box-shadow:-110px 32px 0 -35px rgba(22,147,77,.1);pointer-events:none}.energy-hero:after{right:-80px;top:-145px;border-color:rgba(181,237,101,.18)}
.energy-hero .hero-product{position:absolute;z-index:0;right:-2%;top:4%;width:70%;height:94%;object-fit:contain;object-position:right center;pointer-events:none;filter:drop-shadow(0 12px 18px rgba(13,76,39,.08))}.energy-hero>h1,.energy-hero>p,.energy-hero>.energy-kicker,.energy-hero>.hero-actions{position:relative;z-index:2}.energy-hero h1,.energy-hero p{max-width:52%}
 .energy-hero h1{font-size:32px;max-width:650px}.energy-hero p{max-width:700px}.energy-kicker{color:var(--brand);background:#e8f8eb;border:1px solid #d6efda}
 .hero-actions{position:relative;z-index:1;display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:22px}
 .energy-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:10px 15px;border:1px solid var(--line2);
   border-radius:10px;background:#fff;color:var(--brand);font:inherit;font-weight:800;cursor:pointer;white-space:nowrap}
 .energy-btn:hover{text-decoration:none;background:#f8fcf6}
 .energy-btn.primary{background:linear-gradient(125deg,#087039,#119750);border-color:#087039;color:#fff}
 .energy-btn.lime{background:#e9f9d2;border-color:#e0f3c5;color:var(--brand)}
.energy-stats{gap:14px;margin:18px 0}.energy-stat{display:block;min-height:110px;border-radius:17px;border-color:var(--line);box-shadow:var(--shadow);background:#fff;color:inherit;text-decoration:none;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}.energy-stat:hover{border-color:#9ed2aa;box-shadow:0 12px 26px rgba(12,72,38,.11);transform:translateY(-2px);text-decoration:none}.energy-stat:focus-visible{outline:3px solid rgba(20,147,77,.3);outline-offset:3px}.energy-stat b{color:var(--ink)}.energy-stat .stat-icon{background:#ecf9ed}.energy-stat:nth-child(2) .stat-icon{background:#fff7df}.energy-stat:nth-child(3) .stat-icon{background:#edf8f3}.energy-stat:nth-child(4) .stat-icon{background:#eff5ff}.energy-stat:nth-child(5) .stat-icon{background:#fff0ef}.energy-stat .stat-action{margin-top:12px;color:var(--brand2);font-size:12px;font-weight:800}
.section-title{margin:29px 0 14px}.section-title h2{font-size:19px}.bms-online-card,.inv-card,.ir-card{border-color:var(--line);border-radius:17px;box-shadow:var(--shadow)}.energy-empty,.empty{background:#f8fbf8;border-color:#d9e7db;border-radius:16px}
.dev:hover,.board:hover,.bms-online-card:hover{box-shadow:0 15px 30px rgba(12,72,38,.1)}.stat{border-top:0;border-left:3px solid var(--brand2);border-radius:16px}.foot{margin-top:44px;padding:22px 0 8px}.foot a{color:var(--brand2)}
.dashboard-grid{display:grid;grid-template-columns:1.35fr .9fr;gap:16px;margin-top:8px}.dashboard-panel{background:#fff;border:1px solid var(--line);border-radius:18px;padding:20px;box-shadow:var(--shadow)}.dashboard-panel h2{font-size:18px;margin:0 0 6px}.dashboard-panel>p{color:var(--muted);margin:0 0 16px;font-size:13px}.quick-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.quick-link{display:flex;align-items:center;gap:11px;border:1px solid var(--line);border-radius:14px;padding:13px;color:var(--ink);background:#fff;font-weight:700}.quick-link:hover{background:var(--mint);text-decoration:none;border-color:#cde5d1}.quick-link .qicon{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:#edf9ef;color:var(--brand);font-size:17px}.quick-link small{display:block;color:var(--muted);font-weight:500;font-size:11.5px}.privacy-card{background:linear-gradient(140deg,#f4fbf4,#e8f7ea);border-color:#d4ead8}.privacy-card .shield{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:#fff;color:var(--brand);font-size:22px;margin-bottom:12px}.seo-copy{margin-top:22px;padding:18px 20px;background:#f8fbf8;border:1px solid var(--line);border-radius:16px;color:var(--muted);font-size:13px}.seo-copy h2{font-size:16px;margin:0 0 5px}.phone-flash-home{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:18px;padding:20px 22px;border:1px solid #b9dfbd;border-radius:19px;background:linear-gradient(120deg,#f0fff0,#e2f6e6);box-shadow:0 8px 24px rgba(22,102,47,.08)}.phone-flash-home h2{margin:8px 0 4px;color:var(--brand);font-size:22px}.phone-flash-home p{margin:0;color:#456052;font-size:14px;max-width:720px}.phone-flash-home .energy-btn{flex:0 0 auto}
@media(max-width:960px){.sidebar .brand{height:84px}.sidebar .brand-logo{width:190px;height:84px}.topbar,.wrap{margin-left:0}.topbar{height:68px;padding:0 16px}.wrap{padding:17px}.sidebar{box-shadow:12px 0 38px rgba(12,42,25,.15)}body.sidebar-collapsed .sidebar{transform:translateX(-100%)}body.sidebar-collapsed .topbar,body.sidebar-collapsed .wrap{margin-left:0}.dashboard-grid{grid-template-columns:1fr}.energy-hero .hero-product{right:-10%;width:78%;opacity:.56}.energy-hero h1,.energy-hero p{max-width:68%}}
@media(max-width:640px){.energy-hero{padding:24px 20px;min-height:0}.energy-hero h1{font-size:27px}.energy-hero:before{opacity:.5;right:-100px}.energy-hero .hero-product{display:none}.energy-hero h1,.energy-hero p{max-width:none}.energy-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.energy-stat{min-height:94px;padding:13px}.energy-stat .stat-icon{width:33px;height:33px;font-size:17px}.energy-stat b{font-size:22px}.quick-links{grid-template-columns:1fr}.topbar-actions .live-button span:last-child{display:none}.phone-flash-home{display:block;padding:18px}.phone-flash-home .energy-btn{width:100%;margin-top:14px}}

/* Home hero: a fixed visual stage prevents the transparent source canvas
   from expanding the header on wide screens. */
.home-hero{height:242px;min-height:242px}
.home-hero .hero-product{top:auto;right:-14px;bottom:-30px;width:auto;height:282px;max-width:none;object-fit:contain}
@media(max-width:960px){.home-hero{height:230px;min-height:230px}.home-hero .hero-product{right:-74px;bottom:-27px;height:260px;opacity:.48}.home-hero h1,.home-hero p{max-width:66%}}
@media(max-width:640px){.home-hero{height:auto;min-height:0}.home-hero .hero-product{display:none}.home-hero h1,.home-hero p{max-width:none}}

/* Keep the LINE community CTA visible on the home hero while preserving the
   illustrated layout on wide screens. */
.home-hero{height:auto;min-height:242px}
.home-hero .line-cta{position:relative;z-index:2;max-width:58%}
@media(max-width:960px){.home-hero .line-cta{max-width:72%}}
@media(max-width:640px){.home-hero .line-cta{max-width:none}}

/* ---- floating community links ----------------------------------------- */
.social-float{position:fixed;right:24px;bottom:24px;z-index:44;display:flex;flex-direction:column;align-items:flex-end;gap:10px;font-size:13px}
.social-float-panel{display:none;width:292px;padding:10px;border:1px solid #d9eadb;border-radius:18px;background:rgba(255,255,255,.96);box-shadow:0 14px 38px rgba(8,67,34,.16);backdrop-filter:blur(14px);transform:translateY(8px) scale(.96);transform-origin:bottom right;transition:opacity .18s ease,transform .18s ease;opacity:0;pointer-events:none}.social-float.is-open .social-float-panel{display:block;opacity:1;transform:none;pointer-events:auto}
.social-float-head{display:flex;align-items:center;gap:7px;padding:3px 6px 9px;color:var(--brand);font-size:12px;font-weight:800}.social-float-status{width:8px;height:8px;border-radius:50%;background:#57c66c;box-shadow:0 0 0 4px #e4f7e7}
.social-float-link{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px 8px;border-radius:12px;color:var(--ink);transition:background .15s ease,transform .15s ease}.social-float-link:hover{background:#f0f9f1;text-decoration:none;transform:translateX(-2px)}
.social-float-link b,.social-float-link small{display:block}.social-float-link b{font-size:12.5px;line-height:1.3}.social-float-link small{margin-top:1px;color:var(--muted);font-size:11px;line-height:1.3}.social-float-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;color:#fff}.social-float-icon svg{width:21px;height:21px}.social-float-link.line .social-float-icon{background:linear-gradient(135deg,#06c755,#03a945)}.social-float-link.facebook .social-float-icon{background:linear-gradient(135deg,#1877f2,#0f60c7)}.social-float-link.facebook-group .social-float-icon{background:linear-gradient(135deg,#2488f4,#1264cb)}.social-float-link.tiktok .social-float-icon{background:linear-gradient(135deg,#151515,#384047)}.social-float-arrow{color:#79a687;font-size:15px;font-weight:800}
.social-float-toggle{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border:1px solid #08733e;border-radius:999px;background:linear-gradient(125deg,#087039,#149750);box-shadow:0 8px 22px rgba(8,112,57,.28);color:#fff;font:800 13px/1 "Noto Sans Thai","Sarabun","Segoe UI",sans-serif;cursor:pointer}.social-float-toggle svg{width:18px;height:18px}.social-float-toggle:hover{background:linear-gradient(125deg,#086633,#108544)}.social-float-toggle:focus-visible,.social-float-link:focus-visible{outline:3px solid rgba(20,147,77,.32);outline-offset:3px}.social-float.is-open .social-float-toggle{background:#fff;color:var(--brand);border-color:#cfe6d3;box-shadow:0 8px 22px rgba(8,112,57,.16)}
@media(max-width:960px){.social-float{right:16px;bottom:16px;z-index:44}}
@media(max-width:420px){.social-float{right:12px;bottom:12px}.social-float-panel{width:min(292px,calc(100vw - 24px))}.social-float-toggle{width:45px;height:45px;padding:0;justify-content:center}.social-float-toggle span{display:none}}

/* ---- privacy policy ---------------------------------------------------- */
.privacy-page{max-width:970px}.privacy-hero{position:relative;overflow:hidden;padding:43px 46px 38px;border:1px solid #d9ecdc;border-radius:22px;background:linear-gradient(128deg,#f9fffa 0%,#effaf0 55%,#e0f3d7 100%)}.privacy-hero:after{content:"";position:absolute;right:-72px;bottom:-95px;width:260px;height:260px;border:34px solid rgba(91,188,79,.13);border-radius:50%;pointer-events:none}.privacy-hero h1{position:relative;z-index:1;font-size:clamp(31px,5vw,48px);letter-spacing:-1.4px;margin:9px 0 13px}.privacy-hero>p{position:relative;z-index:1;max-width:680px;margin:0;color:#4f6856;font-size:16px;line-height:1.75}.privacy-meta{position:relative;z-index:1;display:flex;flex-wrap:wrap;gap:8px;margin-top:19px}.privacy-meta span{padding:5px 10px;border:1px solid #cfe5d2;border-radius:999px;background:rgba(255,255,255,.72);color:#4c6e55;font-size:12px;font-weight:700}.privacy-hero .hero-actions{margin-top:22px}.privacy-summary{display:flex;align-items:flex-start;gap:14px;margin:20px 0;padding:19px 20px;border:1px solid #d6e8d9;border-radius:17px;background:#fff;box-shadow:var(--shadow)}.privacy-summary-icon{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:12px;background:#e7f8d7;color:#1d672f;font-size:19px;font-weight:900}.privacy-summary b{color:var(--brand);font-size:15px}.privacy-summary p{margin:3px 0 0;color:var(--muted);font-size:13.5px;line-height:1.65}.privacy-toc{display:flex;flex-wrap:wrap;gap:8px;margin:28px 0 7px;padding-bottom:21px;border-bottom:1px solid var(--line)}.privacy-toc a{padding:6px 11px;border:1px solid var(--line2);border-radius:999px;background:#fff;color:var(--brand);font-size:12px;font-weight:800}.privacy-toc a:hover{background:var(--mint);text-decoration:none}.privacy-section{padding:29px 2px 2px}.privacy-section .eyebrow{margin:0 0 7px}.privacy-section h2{margin:0 0 11px;font-size:25px;letter-spacing:-.6px}.privacy-section p{max-width:780px;margin:0 0 13px;color:#43594a;line-height:1.78}.privacy-section strong{color:var(--brand)}.privacy-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}.privacy-card{min-height:175px;padding:19px 20px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:var(--shadow)}.privacy-card>span{display:inline-flex;align-items:center;justify-content:center;width:27px;height:27px;border-radius:9px;background:#e9f8dd;color:#27693a;font-size:11px;font-weight:900}.privacy-card h3{margin:12px 0 5px;font-size:16px;letter-spacing:-.25px}.privacy-card p{margin:0;color:var(--muted);font-size:13px;line-height:1.68}.privacy-list{display:grid;gap:8px;margin:0;padding:0;list-style:none}.privacy-list li{position:relative;padding:11px 15px 11px 39px;border:1px solid var(--line);border-radius:12px;background:#fff;color:#43594a;line-height:1.62}.privacy-list li:before{content:"✓";position:absolute;left:14px;top:11px;color:#198448;font-weight:900}.privacy-section .note{margin:15px 0}.privacy-browser{margin-top:17px;padding:18px 20px;border:1px solid #d9eadc;border-radius:16px;background:#f5fbf5}.privacy-browser h3{margin:0 0 5px;font-size:16px}.privacy-browser p{margin:0;font-size:13.5px}.privacy-closing{padding-bottom:18px}
@media(max-width:640px){.privacy-hero{padding:29px 22px 27px}.privacy-hero h1{font-size:31px}.privacy-summary{padding:16px}.privacy-summary-icon{flex-basis:34px;width:34px;height:34px}.privacy-grid{grid-template-columns:1fr}.privacy-section{padding-top:25px}.privacy-section h2{font-size:22px}.privacy-card{min-height:0}.privacy-toc{margin-top:22px}.privacy-toc a{font-size:11.5px}}
