/* หน้าภาพรวมแบบ "ห้องควบคุม" จอเดียวไม่เลื่อน (js/twin/overview.js) — เฉพาะหน้าคอม
   เลย์เอาต์กว้าง 1600 px แล้วย่อ/ขยายด้วย transform: scale ให้พอดีหน้าจอ (ความสูงยืดตามสัดส่วน) */
html[data-mobile] #ovFit, html[data-mobile] #ovdBack { display: none !important; }
html:not([data-mobile]) #page-overview.ov-dash-on.active { max-width: none !important; display: block !important; }
html:not([data-mobile]) #page-overview.ov-dash-on > :not(#ovFit) { display: none !important; }
html:not([data-mobile]) #page-overview:not(.ov-dash-on) > #ovFit { display: none; }
#ovdBack { display: none; }
html:not([data-mobile]) #page-overview:not(.ov-dash-on) > #ovdBack {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; margin-bottom: 8px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(60, 240, 255, .5); background: rgba(60, 240, 255, .08); color: #3cf0ff; font: 700 13px 'Sarabun', system-ui, sans-serif;
}
/* อยู่หน้าแดชบอร์ด: ซ่อนหัวแอป (ปุ่มต่างๆ ถูกย้ายเข้าแถบ AI-BEMS แล้ว) + ล็อกเปลือกแอปให้เท่าความสูงจอ ไม่ให้หน้าเลื่อน */
html.ovd-on, html.ovd-on body { overflow: hidden; }
html.ovd-on body > div.flex.min-h-screen { height: 100vh; min-height: 0; }
html.ovd-on #sidebar { height: 100vh; }
html.ovd-on main#mainContent { overflow: hidden !important; padding: 14px 20px 14px !important; }

#ovFit { margin: 0 auto; position: relative; }
.ovd {
  --ovd-card: #0d1220; --ovd-line: #1c2536; --ovd-fg: #d7deec; --ovd-mut: #8b96ac; --ovd-acc: #3cf0ff; --ovd-ok: #39ff9e; --ovd-warn: #ffb020; --ovd-bad: #ff3b5c;
  --ovd-grid: rgba(139, 150, 172, .14); --ovd-soft: rgba(139, 150, 172, .1);
  position: relative; transform-origin: top left; width: 1600px; box-sizing: border-box; color: var(--ovd-fg); font-family: 'Sarabun', system-ui, sans-serif;
  display: grid; gap: 12px;
  /* ซ้าย: KPI / ไฟฟ้า+เซนเซอร์ / กล้อง+แจ้งเตือน   ขวา: digital twin (ใหญ่ ด้านบน) + ควบคุม (ล่าง) */
  grid-template-columns: minmax(0, 1fr) 800px; grid-template-rows: 118px minmax(0, 1fr) 300px;
  grid-template-areas: "kpi twin" "mid twin" "bot ctl";
}
html:not(.dark) .ovd {
  --ovd-card: #ffffff; --ovd-line: #e2e8f0; --ovd-fg: #1e293b; --ovd-mut: #64748b; --ovd-acc: #0891b2; --ovd-ok: #059669; --ovd-warn: #d97706; --ovd-bad: #dc2626;
  --ovd-grid: rgba(100, 116, 139, .18); --ovd-soft: rgba(100, 116, 139, .09);
}
.ovd * { box-sizing: border-box; }
.ovd-top { grid-area: top; } .ovd-kpis { grid-area: kpi; } .ovd-mid { grid-area: mid; } .ovd-bot { grid-area: bot; } .ovd-twin { grid-area: twin; } .ovd-cam { grid-area: ctl; }

/* ---------- แถบบน (รวมปุ่มจากหัวแอป) ---------- */
.ovd-top { display: flex; align-items: center; gap: 14px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--ovd-line); background: var(--ovd-card); }
.ovd-slot { display: flex; align-items: center; gap: 8px; flex: none; }
.ovd-slot.r { margin-left: auto; }
.ovd-brand { display: flex; align-items: baseline; gap: 14px; min-width: 0; flex: 1; }
.ovd-brand b { font-size: 21px; color: var(--ovd-acc); letter-spacing: .5px; white-space: nowrap; }
.ovd-brand span { font-size: 13.5px; color: var(--ovd-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovd-btn { min-height: 34px; padding: 0 14px; border-radius: 9px; cursor: pointer; border: 1px solid var(--ovd-acc); background: transparent; color: var(--ovd-acc); font: 700 12.5px 'Sarabun', system-ui, sans-serif; white-space: nowrap; }
.ovd-btn.ghost { border-color: var(--ovd-line); color: var(--ovd-mut); }
.ovd-btn:hover { background: var(--ovd-soft); }

/* ---------- KPI ---------- */
.ovd-kpis { display: grid; grid-template-columns: 1.75fr .55fr 1.3fr; gap: 12px; min-height: 0; }
.ovd-k { position: relative; padding: 8px 16px; border-radius: 14px; border: 1px solid var(--ovd-line); background: var(--ovd-card); display: flex; flex-direction: column; justify-content: center; min-width: 0; overflow: hidden; }
.ovd-k .lab { font-size: 12px; font-weight: 700; color: var(--ovd-acc); letter-spacing: .3px; white-space: nowrap; }
.ovd-k .big { display: flex; align-items: baseline; gap: 8px; line-height: 1.05; margin-top: 2px; }
.ovd-k .big b { font-size: 40px; font-variant-numeric: tabular-nums; } .ovd-k .big small { font-size: 15px; color: var(--ovd-mut); }
.ovd-k .sub { font-size: 11.5px; color: var(--ovd-mut); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovd-k .side { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); text-align: right; font-size: 12px; line-height: 1.65; color: var(--ovd-warn); }
.ovd-k .side div:last-child { color: var(--ovd-mut); }
.ovd-k-occ .big b { font-size: 36px; }
.ovd-k-clim .clim { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 2px; }
.ovd-k-clim .c { display: flex; flex-direction: column; border-left: 3px solid var(--ovd-ok); padding-left: 9px; }
.ovd-k-clim .c[data-lvl="warn"] { border-color: var(--ovd-warn); } .ovd-k-clim .c[data-lvl="crit"] { border-color: var(--ovd-bad); } .ovd-k-clim .c[data-lvl="unk"] { border-color: var(--ovd-mut); }
.ovd-k-clim .c span { font-size: 11.5px; color: var(--ovd-mut); } .ovd-k-clim .c b { font-size: 25px; line-height: 1.1; font-variant-numeric: tabular-nums; } .ovd-k-clim .c small { font-size: 11px; color: var(--ovd-mut); }
.ovd-k-clim .c[data-lvl="warn"] b { color: var(--ovd-warn); } .ovd-k-clim .c[data-lvl="crit"] b { color: var(--ovd-bad); }
.ovd-k-clim .sub[data-lvl="ok"] { color: var(--ovd-ok); } .ovd-k-clim .sub[data-lvl="warn"] { color: var(--ovd-warn); } .ovd-k-clim .sub[data-lvl="crit"] { color: var(--ovd-bad); }

/* ---------- แผง ---------- */
.ovd-mid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px; min-height: 0; }
.ovd-bot { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px; min-height: 0; }
.ovd-p { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; border-radius: 14px; border: 1px solid var(--ovd-line); background: var(--ovd-card); }
.ovd-ph { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px 0; min-height: 30px; }
.ovd-ph h3 { margin: 0; font: 700 16px 'Sarabun', system-ui, sans-serif; color: var(--ovd-acc); letter-spacing: .2px; }
.ovd-pb { flex: 1; min-height: 0; padding: 8px 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.ovd-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ovd-tiles .tile { padding: 9px 12px; border-radius: 11px; background: var(--ovd-soft); border: 1px solid transparent; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ovd-tiles .tile[data-on="1"] { border-color: rgba(57, 255, 158, .4); }
.ovd-tiles .n { font-size: 12px; color: var(--ovd-mut); } .ovd-tiles b { font-size: 24px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.ovd-tiles small { font-size: 11px; color: var(--ovd-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovd-tiles .bar { height: 5px; margin-top: 4px; border-radius: 3px; background: var(--ovd-grid); overflow: hidden; } .ovd-tiles .bar i { display: block; height: 100%; background: var(--ovd-acc); }
.ovd-tiles .tile:nth-child(2) .bar i { background: var(--ovd-ok); }
.ovd-ch { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 4px; }
.ovd-chh { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ovd-mut); }
.ovd-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--ovd-soft); }
.ovd-seg button { min-width: 34px; height: 22px; border: 0; border-radius: 6px; background: transparent; color: var(--ovd-mut); font: 700 11px 'Sarabun', system-ui, sans-serif; cursor: pointer; }
.ovd-seg button.on { background: var(--ovd-acc); color: #00121a; }
.ovd .cv { position: relative; flex: 1; min-height: 0; }
.ovd .cv canvas { position: absolute; left: 0; top: 0; width: 100% !important; height: 100% !important; }
.ovd .nodata { position: absolute; left: 0; right: 0; top: 6px; display: flex; justify-content: center; text-align: center; padding: 0 20px; font-size: 12px; color: var(--ovd-warn); pointer-events: none; z-index: 1; }
.ovd-sens .ovd-pb { overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; }
.ovd-sgrid.many { grid-template-columns: repeat(4, 1fr); gap: 6px; } .ovd-sgrid.many .sc2 { padding: 4px 8px; } .ovd-sgrid.many b { font-size: 14px; line-height: 1.25; }
.ovd-sgrid.many2 { grid-template-columns: repeat(5, 1fr); } .ovd-sgrid.many2 b { font-size: 12.5px; } .ovd-sgrid.many2 small { display: none; }
.ovd-sgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-content: start; }
.ovd-sgrid .sc2 { padding: 6px 10px; border-radius: 10px; background: var(--ovd-soft); min-width: 0; border-left: 3px solid transparent; }
.ovd-sgrid .sc2.sys { border-left-color: var(--ovd-acc); }
.ovd-sgrid .h { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ovd-mut); }
.ovd-sgrid .h span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovd-sgrid .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ovd-bad); }
.ovd-sgrid .sc2[data-on="1"] .dot { background: var(--ovd-ok); }
.ovd-sgrid b { display: block; font-size: 16px; line-height: 1.35; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovd-sgrid small { display: block; font-size: 10.5px; color: var(--ovd-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 12px; }
.ovd .note { margin: 0; font-size: 11px; line-height: 1.4; color: var(--ovd-mut); }

/* ---------- กล้อง / แจ้งเตือน ---------- */
.camwrap { position: relative; flex: 1; min-height: 0; border-radius: 10px; overflow: hidden; background: #05070d; }
.camwrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.camwrap img[hidden], .camph[hidden], .camtag[hidden], .ovd-btn[hidden] { display: none !important; }
.camph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 14px; text-align: center; color: #8b96ac; font-size: 12.5px; }
.camph p { margin: 0; line-height: 1.5; }
.camtag { position: absolute; left: 8px; top: 8px; padding: 3px 9px; border-radius: 6px; background: rgba(0, 0, 0, .6); color: #39ff9e; font: 700 11px 'Sarabun', system-ui, sans-serif; }
.alerts { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
.alerts .a { display: flex; flex: none; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 9px; font-size: 12.5px; line-height: 1.35; border: 1px solid; }
.alerts .a span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.alerts .a i { flex: none; width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; }
.alerts .a.ok { background: rgba(57, 255, 158, .08); border-color: rgba(57, 255, 158, .45); } .alerts .a.ok i { background: var(--ovd-ok); }
.alerts .a.warn { background: rgba(255, 176, 32, .09); border-color: rgba(255, 176, 32, .5); } .alerts .a.warn i { background: var(--ovd-warn); }
.alerts .a.crit { background: rgba(255, 59, 92, .09); border-color: rgba(255, 59, 92, .5); } .alerts .a.crit i { background: var(--ovd-bad); }
.alerts .more { margin: 0; font-size: 11.5px; color: var(--ovd-mut); }

/* ---------- ช่อง digital twin (ใหญ่) ---------- */
.ovd-twin .ovd-pb { padding: 6px 10px 10px; }
#ovd .ovd-twin-card { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
#ovd .ovd-twin-card > div:first-child { display: none; }
#ovd .ovd-twin-card .tw-host { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#ovd .tw { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#ovd .tw-bar { margin-bottom: 6px; } #ovd .tw-hint, #ovd .tw-chips, #ovd .tw-side, #ovd .tw-3dhint, #ovd .tw-note { display: none !important; }
#ovd .tw-seg button { min-height: 30px; min-width: 52px; font-size: 12.5px; padding: 0 12px; }
#ovd .tw-panes { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#ovd .tw-pane { flex: 1; min-height: 0; height: 100%; }
#ovd .tw-pane[hidden] { display: none !important; }
#ovd .tw-pane[data-view="2d"] { display: flex; justify-content: center; flex-wrap: nowrap; }
#ovd .tw-plan { flex: 1; max-width: none; min-width: 0; margin: 0; height: 100%; display: flex; justify-content: center; }
#ovd .tw-plan svg { height: 100%; width: auto; max-width: 100%; max-height: none; }
#ovd .tw-frame { height: 100% !important; min-height: 0 !important; border-radius: 10px; }
#ovd .tw-scada { height: 100%; max-width: none; margin: 0; display: flex; align-items: center; }
#ovd .tw-scada svg { width: 100%; height: 100%; max-height: none; }

/* ---------- ควบคุม (ง่ายเหมือนหน้ามือถือ): ไทล์ + ฉาก + วงแหวนอุณหภูมิ ---------- */
.ovd-ctl .ovd-pb { gap: 8px; padding-top: 8px; padding-bottom: 8px; }
.ovd .ctiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ovd .ct { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 8px 12px 9px; text-align: left; cursor: pointer; border-radius: 14px; border: 1px solid rgba(139, 150, 172, .28); background: var(--ovd-soft); color: var(--ovd-mut); font-family: 'Sarabun', system-ui, sans-serif; transition: background .2s, border-color .2s; }
.ovd .ct .ic { display: flex; } .ovd .ctop { display: flex; align-items: center; justify-content: space-between; }
.ovd .ct .toggle-track { flex: none; }
.ovd .ct:focus-visible { outline: 2px solid var(--ovd-acc); outline-offset: 2px; } .ovd .ct b { font-size: 14px; color: inherit; line-height: 1.2; } .ovd .ct small { font-size: 11.5px; opacity: .9; }
.ovd .ct.on { background: linear-gradient(145deg, rgba(60, 240, 255, .2), rgba(57, 255, 158, .1)); border-color: rgba(60, 240, 255, .55); color: var(--ovd-fg); }
.ovd .ct.on .ic { color: var(--ovd-acc); }
.ovd .ct:active, .ovd .sc:active { transform: scale(.97); }
.ovd .crow { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.ovd .scn { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.ovd .sc { flex: 1 1 0; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--ovd-line); background: var(--ovd-soft); color: var(--ovd-fg); font: 700 14px 'Sarabun', system-ui, sans-serif; cursor: pointer; text-align: left; }
.ovd .sc .ic { display: flex; color: var(--ovd-acc); }
.ovd .sc.busy { opacity: .55; pointer-events: none; border-color: var(--ovd-acc); }
.ovd .dial { position: relative; height: 100%; aspect-ratio: 220 / 192; justify-self: start; margin-left: 6px; min-height: 0; }   /* ชิดซ้าย: เว้นมุมขวาล่างให้ปุ่มแชท AI ลอย ไม่ทับวงแหวน */
.ovd .dialsvg { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; }
.ovd .dialsvg .trk { stroke: rgba(139, 150, 172, .25); } .ovd .dialsvg .thumb { fill: #fff; }
.ovd .dial.off .thumb { fill: #94a3b8; }
.ovd .dialc { position: absolute; left: 50%; top: 57.3%; width: 52%; aspect-ratio: 1; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; padding: 0; font-family: 'Sarabun', system-ui, sans-serif; text-align: center; }
.ovd .dialc .rs { font-size: 9.5px; color: var(--ovd-mut); line-height: 1.15; max-width: 100%; }
.ovd .dialc b { font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; } .ovd .dial.off .dialc b { color: var(--ovd-mut); }
.ovd .dialc .rr { font-size: 10px; color: var(--ovd-mut); }
.ovd .ovd-ctl .note { min-height: 14px; }
.ovd-mid .ovd-ctl .ct { min-height: 128px; justify-content: space-between; }
.ovd-mid .ovd-ctl .ctiles { flex: none; }
.ovd-ctl .ovd-pb { position: relative; }
.ovd .sheet { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; gap: 8px; padding: 8px 14px 10px; overflow-y: auto; background: var(--ovd-card); }
.ovd .sheet[hidden] { display: none; }
.ovd .sh-h { display: flex; align-items: center; justify-content: space-between; }
.ovd .sh-h b { font-size: 15px; }
.ovd .sh-x { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--ovd-soft); color: var(--ovd-fg); cursor: pointer; font-size: 14px; }
.ovd .sheet .g { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--ovd-line); }
.ovd .sheet .g .l { font-size: 12px; color: var(--ovd-mut); }
.ovd .sheet .g.toggle, .ovd .sheet .g.step { flex-direction: row; align-items: center; justify-content: space-between; }
.ovd .sheet .g.toggle .l, .ovd .sheet .g.step .l { font-size: 13.5px; color: var(--ovd-fg); }
.ovd .sheet .g.dis { opacity: .45; pointer-events: none; }
.ovd .sheet .opts { display: flex; gap: 6px; }
.ovd .sheet .opts button { flex: 1; min-height: 34px; padding: 0 6px; border-radius: 10px; cursor: pointer; border: 1px solid rgba(139, 150, 172, .3); background: var(--ovd-soft); color: var(--ovd-fg); font: 700 13px 'Sarabun', system-ui, sans-serif; white-space: nowrap; }
.ovd .sheet .opts button.on { background: var(--ovd-acc); border-color: var(--ovd-acc); color: #00121a; }
.ovd .sheet .stepbox { display: flex; align-items: center; gap: 10px; }
.ovd .sheet .stepbox b { min-width: 58px; text-align: center; font-size: 20px; font-variant-numeric: tabular-nums; }
.ovd .sheet .stp { width: 44px; height: 34px; border-radius: 10px; border: 1px solid var(--ovd-acc); background: transparent; color: var(--ovd-acc); font-size: 20px; line-height: 1; cursor: pointer; }
/* แถวสุดท้ายเว้นมุมขวา ไม่ให้ปุ่มแชท AI ลอยบัง */
.ovd .sheet .g:last-of-type .opts { margin-right: 66px; }
.ovd .sheet .g.toggle:last-of-type { padding-right: 66px; }
.ovd .sheet .hint { margin: 0; font-size: 11.5px; line-height: 1.45; color: var(--ovd-mut); }
.ovd-toast { position: absolute; left: 50%; bottom: 22px; transform: translate(-50%, 16px); z-index: 20; max-width: 760px; padding: 11px 18px; border-radius: 12px; font-size: 14px; background: #0d1220; color: #eaf3ff; border: 1px solid #3cf0ff; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.ovd-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- การ์ด "ค่าไฟตามประเภท" ที่ย้ายไปอยู่หน้าวิเคราะห์พลังงาน ---------- */
.ovd-costcard .ovd-costrow { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.ovd-costcard .pie { position: relative; width: 220px; height: 200px; flex: none; }
.ovd-costcard .pie canvas { width: 100% !important; height: 100% !important; }
.ovd-costcard .pie .pc { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.ovd-costcard .pie .pc b { font-size: 18px; font-variant-numeric: tabular-nums; } .ovd-costcard .pie .pc small { font-size: 12px; opacity: .7; }
.ovd-costcard .leg { display: flex; flex-direction: column; gap: 6px; min-width: 200px; }
.ovd-costcard .leg > div { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ovd-costcard .leg i { width: 11px; height: 11px; border-radius: 3px; } .ovd-costcard .leg span { flex: 1; } .ovd-costcard .leg b { font-variant-numeric: tabular-nums; }
.ovd-costcard .note { margin: 10px 0 0; font-size: 12px; opacity: .7; }
.ovd .scn { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.ovd.ovd-short .scn { flex-direction: row; flex: none; }
.ovd.ovd-short .sc { min-height: 52px; padding: 0 10px; font-size: 13px; }
.ovd.ovd-short .ovd-mid .ovd-ctl .ct { min-height: 96px; }

/* คนในห้อง + สภาพอากาศ บนการ์ด twin */
.ovd-tw-strip { flex: none; display: flex; gap: 8px; }
.ovd-tw-strip .ovd-k { padding: 6px 12px; background: var(--ovd-soft); border-color: transparent; border-radius: 11px; }
.ovd-tw-strip .ovd-k-occ { flex: none; min-width: 96px; }
.ovd-tw-strip .ovd-k-clim { flex: 1; }
.ovd-tw-strip .ovd-k-occ .big b { font-size: 28px; } .ovd-tw-strip .ovd-k .big small { font-size: 12px; }
.ovd-tw-strip .ovd-k-clim .c b { font-size: 21px; }
.ovd-tw-strip .ovd-k-clim .clim { gap: 10px; }
.ovd-tw-strip .sub { font-size: 10.5px; }
#ovd .tw-chips { display: none !important; }

.camwrap .camoff { position: absolute; right: 10px; top: 10px; min-height: 28px; padding: 0 10px; background: rgba(5, 7, 13, .7); color: #d7deec; border-color: rgba(255,255,255,.3); }

.ovd .camtools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.ovd .ovd-sel { min-height: 34px; max-width: 230px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--ovd-line); background: var(--ovd-card); color: var(--ovd-fg); font: 600 12.5px 'Sarabun', system-ui, sans-serif; }

/* ชื่อระบบอยู่บนแถบบนของแอป (แทนช่องค้นหา) เฉพาะหน้า overview — แถบ AI-BEMS เดิมในแดชบอร์ดถูกซ่อน */
.ovd-top { display: none !important; }
.ovd-hbrand { display: none; align-items: baseline; gap: 14px; min-width: 0; flex: 1; }
html.ovd-on .ovd-hbrand { display: flex; }
html.ovd-on .topbar-search { display: none !important; }
.ovd-hbrand b { font-size: 21px; color: #0891b2; letter-spacing: .5px; white-space: nowrap; }
html.dark .ovd-hbrand b { color: #3cf0ff; }
.ovd-hbrand span { font-size: 13.5px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.dark .ovd-hbrand span { color: #8b96ac; }

.alerts .a .tm { flex: none; margin-left: auto; padding-left: 8px; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--ovd-mut); white-space: nowrap; }
.alerts .a span { flex: 1; min-width: 0; }

/* ช่องกรอกจำนวนวันย้อนหลังเอง */
.ovd-seg .ovd-days { width: 38px; height: 22px; border: 0; border-radius: 6px; background: var(--ovd-soft); color: var(--ovd-mut); font: 700 11px 'Sarabun', system-ui, sans-serif; text-align: center; -moz-appearance: textfield; }
.ovd-seg .ovd-days::-webkit-outer-spin-button, .ovd-seg .ovd-days::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ovd-seg .ovd-days.on { background: var(--ovd-acc); color: #00121a; }
.ovd-seg .ovd-dl { align-self: center; padding: 0 4px 0 2px; font: 700 11px 'Sarabun', system-ui, sans-serif; color: var(--ovd-mut); }
