/* CarbonLens v3 — แดชบอร์ดแบบ bento · Inventory Map แบบไทล์สมมาตร · หน้าโครงการ · หน้าข้อมูล · ปุ่มธีม · ยืนยันทดลอง Pro
   สีทั้งหมดอ้าง token ใน app.css (โหมดมืดสลับ token ใน theme-dark.css) */

/* ---------------------------------------------------------------- ปุ่มสลับธีม */
.theme-btn { position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; cursor: pointer; color: var(--ink-2);
  background: rgba(255, 255, 255, .78); border: 1px solid rgba(255, 255, 255, .7); backdrop-filter: blur(10px); box-shadow: var(--sh-1); overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s; }
.theme-btn:hover { transform: translateY(-1px) rotate(-8deg); box-shadow: var(--sh-2); }
.theme-ic { position: relative; width: 18px; height: 18px; display: block; }
.theme-ic .ico { position: absolute; inset: 0; transition: transform .5s var(--ease), opacity .3s; }
.theme-ic .ico:last-child { transform: translateY(26px) rotate(-70deg); opacity: 0; }
.theme-ic.is-dark .ico:first-child { transform: translateY(-26px) rotate(70deg); opacity: 0; }
.theme-ic.is-dark .ico:last-child { transform: none; opacity: 1; color: #F2C94C; }
.theme-switching, .theme-switching *, .theme-switching *::before, .theme-switching *::after { transition: background-color .3s, border-color .3s, color .3s, fill .3s !important; }
.pj-actions { display: flex; align-items: center; gap: 10px; }

/* ---------------------------------------------------------------- ยืนยันทดลอง Pro */
.tc { display: flex; flex-direction: column; gap: 14px; }
.tc-hero { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #13241C, #1F6F4A 70%, #2E8B5E); }
.tc-ic { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; flex: none; color: var(--gold-ink); background: linear-gradient(135deg, var(--gold-1), var(--gold-2)); box-shadow: 0 10px 22px -10px rgba(201, 162, 39, .9); }
.tc-hero b { display: block; font-size: 16px; } .tc-hero span { font-size: 13px; color: rgba(255, 255, 255, .75); }
.tc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: 13.5px; }
.tc-list li { display: flex; gap: 7px; align-items: flex-start; } .tc-list .ico { color: var(--green); margin-top: 3px; flex: none; }
.tc-terms { list-style: none; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-soft); font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.tc-terms li { display: flex; gap: 8px; align-items: flex-start; } .tc-terms .ico { margin-top: 2px; flex: none; }

/* ---------------------------------------------------------------- Dashboard */
.dash { gap: 16px; }
.dash .grid { gap: 16px; }
.dash .card-head { padding: 16px 18px 0; } .dash .card-body { padding: 14px 18px 18px; }
.dstrip { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 14px; font-size: 13.5px; color: var(--amber-txt);
  background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 28%, transparent); }
.dstrip > .ico { flex: none; color: var(--amber); }
.dstrip > span { flex: 1; min-width: 0; }
.dstrip-bar { width: 120px; height: 6px; border-radius: 9px; overflow: hidden; flex: none; background: color-mix(in srgb, var(--amber) 22%, transparent); }
.dstrip-bar i { display: block; height: 100%; border-radius: 9px; background: var(--amber); }
.dstrip a { display: inline-flex; gap: 4px; align-items: center; font-weight: 600; color: var(--amber-txt); white-space: nowrap; }

.bento { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.bx-hero { padding: 20px 22px; gap: 8px; }
.kh-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi-hero .kpi-value .mono { font-size: 42px; }
.kpi-hero .spark { max-width: none; height: auto; min-height: 50px; flex: 1 1 50px; }
.kh-bar { display: flex; gap: 3px; height: 7px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .12); flex: none; }
.kh-bar i { display: block; height: 100%; }
.kh-scopes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kh-scopes > div { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08); min-width: 0; }
.kh-scopes span { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: rgba(255, 255, 255, .7); }
.kh-scopes span i { width: 8px; height: 8px; border-radius: 3px; }
.kh-scopes b { font-size: 17px; color: #fff; } .kh-scopes em { font-style: normal; font-size: 11.5px; color: rgba(255, 255, 255, .6); }
.kh-sep { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: auto; padding-top: 9px; border-top: 1px dashed rgba(255, 255, 255, .14); font-size: 12px; color: rgba(255, 255, 255, .72); }
.kh-sep span { display: inline-flex; gap: 5px; align-items: center; } .kh-sep b { color: #fff; } .kh-sep .warn { color: #F5C27A; }
.kh-sep em { font-style: normal; margin-left: auto; font-size: 11.5px; opacity: .7; }
.dash-pro .kpi-hero { box-shadow: inset 0 0 0 1px rgba(247, 215, 116, .35), var(--sh-2); }

.ready-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.rc-top { display: flex; gap: 16px; align-items: center; }
.rc-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; } .rc-t > b { font-size: 18px; }
.rc-eyebrow { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.rc-ok .rc-t > b { color: var(--green); } .rc-mid .rc-t > b, .rc-low .rc-t > b { color: var(--amber-txt); }
.rc-parts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.rc-parts a { display: grid; grid-template-columns: minmax(0, 1fr) auto 72px 48px; gap: 4px 10px; align-items: center; padding: 5px 6px; border-radius: 8px; color: var(--ink); font-size: 13px; }
.rc-parts a:hover { background: var(--surface-2); }
.rc-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-parts em { font-style: normal; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.rc-bar { height: 6px; border-radius: 9px; background: var(--track); overflow: hidden; }
.rc-bar i { display: block; height: 100%; border-radius: 9px; background: var(--amber); transition: width .8s var(--ease); }
.rc-parts a.full .rc-bar i { background: var(--green); }
.rc-parts b { text-align: right; font-size: 12.5px; } .rc-parts b small { color: var(--faint); font-weight: 400; }
.rc-next { display: flex; flex-direction: column; gap: 5px; padding-top: 10px; border-top: 1px dashed var(--line); margin-top: auto; }
.rc-next h6 { margin: 0 0 1px; font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: .03em; }
.rc-next a { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 8px 4px 10px; border-radius: 10px; font-size: 13px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-soft); transition: border-color .2s, transform .2s var(--ease); }
.rc-next a:hover { border-color: var(--green); transform: translateX(2px); }
.rc-next .mono { font-size: 12px; font-weight: 600; color: var(--green); }
.rc-nl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-next em { font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.rc-next a.err { background: var(--danger-soft); border-color: transparent; } .rc-next a.err > .ico:first-child { color: var(--danger); }

.facts { display: grid; grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fact { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 0 12px; align-items: center; min-width: 0; padding: 10px 14px; border-radius: 16px;
  background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); border: 1px solid var(--line-soft); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.fact:hover { transform: translateX(-2px); box-shadow: var(--sh-2); border-color: var(--line); }
.fact-ic { grid-row: 1 / 3; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.fact-l { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.fact b { grid-column: 3; grid-row: 1 / 3; font-size: 20px; font-weight: 600; line-height: 1.2; text-align: right; }
.fact em { grid-column: 2; font-style: normal; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fact-bar { grid-column: 2 / 4; height: 4px; border-radius: 9px; background: var(--track); margin-top: 6px; overflow: hidden; }
.fact-bar i { display: block; height: 100%; border-radius: 9px; background: var(--green); }

.g-8-4 { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.donut-wrap.compact { flex-direction: column; gap: 12px; }
.donut-wrap.compact .legend { width: 100%; min-width: 0; }
.donut-wrap.compact .legend li a { grid-template-columns: 10px minmax(0, 1fr) auto 36px; padding: 5px 6px; font-size: 12.5px; }
.donut-wrap.compact .legend li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-rank { background: color-mix(in srgb, var(--sc, var(--green)) 14%, var(--surface)); color: var(--sc, var(--ink)); border: 0; }
.hot { gap: 12px; }
.sep li { justify-content: flex-start; gap: 10px; padding: 9px 0; }
.sep li > div { flex: 1; min-width: 0; } .sep li > .mono { white-space: nowrap; }
.sep li.off { opacity: .55; }
.sep-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-soft); }
.sep-ic.leaf { background: var(--green-soft); color: var(--green); border-color: transparent; }
.obs-count { display: flex; gap: 6px; flex-wrap: wrap; }
.oc { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.oc-error { background: var(--danger-soft); color: var(--danger); } .oc-warn { background: var(--amber-soft); color: var(--amber-txt); } .oc-info { background: var(--green-soft); color: var(--green); }
.obs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

/* Infographic */
.scope-ig { grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; }
.sig-stage { background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.ig-num { fill: var(--ink); } .ig-sub { fill: var(--muted); } .ig-bio-box { fill: var(--green-soft); } .ig-bio-t { fill: var(--green); } .ig-bio-v { fill: var(--ink); }
.sig-seam { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: .8; }
.sig-seg { transition: filter .2s; } .sig-seg.on { filter: brightness(1.22) saturate(1.1); }
.sig-tile { transition: fill-opacity .25s; }
.sig-tip { position: absolute; z-index: 3; transform: translate(14px, -50%); pointer-events: none; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; white-space: nowrap;
  background: #14201B; color: #fff; border-left: 3px solid var(--sc); box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .5); animation: pop .15s var(--ease); }
.sig-tip > .mono { color: rgba(255, 255, 255, .6); } .sig-tip div { color: rgba(255, 255, 255, .78); margin-top: 1px; }
.sig-hint { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.sig-side { min-width: 0; }
.sig-ov { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.sig-ov .sig-row { flex: 1 1 auto; }
.sig-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 92px 62px; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; border-radius: 14px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-soft); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.sig-row:hover, .sig-row.on { border-color: var(--sc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc) 14%, transparent); }
.sig-row .sig-ic { width: 36px; height: 36px; }
.sig-row-m { min-width: 0; }
.sig-row-h { display: flex; gap: 6px; align-items: baseline; } .sig-row-h b { font-size: 14px; } .sig-row-h span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sig-row-s { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sig-row-s b { color: var(--ink-2); font-family: var(--mono); }
.sig-row-v { display: flex; flex-direction: column; text-align: right; } .sig-row-v b { font-size: 16px; } .sig-row-v em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--sc); }
.mspark { display: block; width: 100%; }
.sig-split { margin-top: auto; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--line); }
.sig-split-h { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); } .sig-split-h b { color: var(--ink); font-family: var(--mono); }
.sig-split-bar { display: flex; gap: 3px; height: 8px; border-radius: 99px; overflow: hidden; margin: 8px 0 6px; }
.sig-split-bar i { display: block; } .sig-split-bar i:first-child { background: linear-gradient(90deg, #1F6F4A, #E0A526); } .sig-split-bar i:last-child { background: #3E8E9E; }
.sig-split p { margin: 0; font-size: 11.5px; color: var(--faint); }
.sig-detail { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; }
.sig-dh .icon-btn { margin-left: auto; }
.sig-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 0; } .sig-big b { font-size: 30px; font-weight: 600; } .sig-big small { font-size: 12.5px; color: var(--muted); }
.sig-sec h6 { margin: 0 0 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: .03em; }
.mbars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; height: 54px; align-items: end; }
.mbars span { height: 100%; display: flex; align-items: flex-end; }
.mbars i { display: block; width: 100%; border-radius: 3px 3px 1px 1px; transform-origin: bottom; animation: growy .6s var(--ease) backwards; animation-delay: calc(var(--i) * 30ms); }
@keyframes growy { from { transform: scaleY(0); } }
.mbars-x { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--faint); margin-top: 3px; }
.sig-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; }
.sig-items li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: center; }
.sig-items a { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sig-items a .mono { color: var(--muted); margin-right: 6px; font-size: 11.5px; }
.sig-items .bar { grid-column: 1 / -1; }
.sig-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gas-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.gas-chips span { font-size: 11.5px; font-family: var(--mono); padding: 2px 8px; border-radius: 99px; color: var(--ink-2); background: color-mix(in srgb, var(--sc) 12%, var(--surface)); }
.gas-chips span b { font-family: var(--font); margin-right: 4px; }
.sig-dq b { display: block; font-size: 16px; } .sig-dq span { font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------------------------- Inventory Map */
.mapbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 14px 18px; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); border: 1px solid var(--line-soft); }
.mb-score { display: flex; gap: 12px; align-items: center; } .mb-score > div > b { display: block; font-size: 14.5px; }
.mb-score span { font-size: 12.5px; color: var(--muted); } .mb-score span b { color: var(--ink); }
.mb-status { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mb-track { display: flex; gap: 3px; height: 10px; border-radius: 99px; overflow: hidden; }
.mb-track i { display: block; transition: opacity .2s; } .mb-track i.dim { opacity: .2; }
.mb-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.mb-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 12.5px; color: var(--ink-2); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.mb-chip b { font-size: 12px; color: var(--muted); } .mb-chip:hover { border-color: var(--line-strong); }
.mb-chip.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.mb-next { display: flex; align-items: center; gap: 12px; max-width: 340px; padding: 10px 14px; border-radius: 14px; color: #fff; background: linear-gradient(120deg, #13241C, #1F6F4A); transition: transform .2s var(--ease), box-shadow .2s; }
.mb-next:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.mb-next > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mb-next > div > span { font-size: 11.5px; color: rgba(255, 255, 255, .65); }
.mb-next b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mb-next b .mono { color: var(--mint); margin-right: 4px; }
.mb-next-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: rgba(125, 219, 163, .16); color: var(--mint); }
.mb-next.hot { animation: pulse-ring 2.4s ease-out infinite; }
.map-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.vmap { display: flex; flex-direction: column; gap: 12px; }
.vmap-cols { display: grid; grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr); align-items: stretch; }
.mzone { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 18px 16px 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--sh-1); }
.mzone::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--zc); }
.mzone-in { color: #fff; border: 0; background: radial-gradient(120% 120% at 100% 0%, #24704C 0%, #17402D 45%, #0F1F18 100%); box-shadow: 0 24px 50px -28px rgba(15, 26, 21, .8); }
.mzone-in::before { background: linear-gradient(90deg, var(--mint), #F2C94C); }
.mz-head { display: flex; align-items: center; gap: 10px; }
.mz-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; color: var(--zc); background: color-mix(in srgb, var(--zc) 13%, var(--surface)); }
.mzone-in .mz-ic { background: rgba(125, 219, 163, .16); color: var(--mint); }
.mz-t { flex: 1; min-width: 0; } .mz-t h4 { font-size: 15.5px; } .mz-t span { font-size: 12px; color: var(--muted); }
.mz-v { text-align: right; } .mz-v b { display: block; font-size: 22px; line-height: 1.15; } .mz-v span { font-size: 11.5px; color: var(--muted); }
.mzone-in .mz-t span, .mzone-in .mz-v span, .mzone-in .mz-prog { color: rgba(255, 255, 255, .65); }
.mz-prog { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--muted); }
.mz-bar { flex: 1; height: 5px; border-radius: 9px; background: var(--track); overflow: hidden; }
.mz-bar i { display: block; height: 100%; border-radius: 9px; background: var(--green); transition: width .8s var(--ease); }
.mzone-in .mz-bar { background: rgba(255, 255, 255, .12); } .mzone-in .mz-bar i { background: var(--mint); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 8px; flex: 1; align-content: start; }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 3px; min-height: 96px; padding: 10px 11px 9px 13px; border-radius: 14px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); transition: transform .18s var(--ease), box-shadow .2s, border-color .2s, opacity .2s; }
.tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--st, var(--line-strong)); }
.tile:hover { transform: translateY(-2px); box-shadow: var(--sh-1); border-color: var(--line-strong); }
.tile.sel { box-shadow: 0 0 0 2px var(--ink); }
.tile.dim { opacity: .25; }
.tile-done { --st: var(--green); background: color-mix(in srgb, var(--green) 6%, var(--surface)); }
.tile-part { --st: var(--amber); background: color-mix(in srgb, var(--amber) 7%, var(--surface)); }
.tile.tile-na { --st: transparent; color: var(--muted); background: repeating-linear-gradient(135deg, var(--surface-2) 0 8px, var(--line-soft) 8px 16px); }
.tile-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.tile-code { font-size: 15px; font-weight: 700; }
.tile-pct { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--line-soft); color: var(--muted); }
.tile-done .tile-pct { background: var(--green); color: #fff; } .tile-part .tile-pct { background: var(--amber-soft); color: var(--amber-txt); }
.tile-nat { font-size: 10.5px; font-weight: 700; color: var(--faint); letter-spacing: .04em; }
.tile-name { font-size: 12.5px; font-weight: 500; line-height: 1.35; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-na .tile-name { color: var(--muted); }
.tile-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; min-height: 14px; }
.tile-foot .mono { font-size: 11px; color: var(--muted); }
.tile-heat { flex: 1; height: 4px; border-radius: 9px; background: var(--track); overflow: hidden; }
.tile-heat i { display: block; height: 100%; width: var(--heat); border-radius: 9px; background: linear-gradient(90deg, #F2C14E, #E05A2B); transition: width .8s var(--ease); }
.mzone-in .tile { color: #fff; background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
.mzone-in .tile:hover { border-color: rgba(255, 255, 255, .35); }
.mzone-in .tile.sel { box-shadow: 0 0 0 2px #fff; }
.mzone-in .tile-name { color: rgba(255, 255, 255, .82); } .mzone-in .tile-foot .mono { color: rgba(255, 255, 255, .7); }
.mzone-in .tile-heat { background: rgba(255, 255, 255, .12); }
.mzone-in .tile-done { --st: var(--mint); background: rgba(125, 219, 163, .14); }
.mzone-in .tile-done .tile-pct { background: var(--mint); color: #0F1F18; }
.mzone-in .tile-part { --st: #F2C14E; background: rgba(242, 193, 78, .12); }
.mzone-in .tile-part .tile-pct { background: rgba(242, 193, 78, .25); color: #FBE3A6; }
.mzone-in .tile-none .tile-pct { background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .7); }
.mzone-in .tile.tile-na { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0 8px, rgba(255, 255, 255, .08) 8px 16px); }

.vlink { position: relative; display: grid; place-items: center; }
.vlink-line { position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 5px, transparent 5px 10px); animation: march10 1s linear infinite; }
@keyframes march10 { to { background-position: 10px 0; } }
.vlink i { position: absolute; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--mint); opacity: 0;
  top: calc(50% - 3.5px + (var(--k) - 1) * 30px); animation: vflow 1.8s linear infinite; animation-delay: calc(var(--k) * -.6s); }
@keyframes vflow { 0% { left: 0; opacity: 0; } 20%, 80% { opacity: 1; } 100% { left: calc(100% - 7px); opacity: 0; } }
.vlink-ic { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--green); border: 1px solid var(--line-soft); box-shadow: var(--sh-1); }

.spine-track { position: relative; display: flex; gap: 4px; height: 12px; }
.spine-seg { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, color-mix(in srgb, var(--zc) 45%, transparent), var(--zc)); }
.spine-dots { position: absolute; inset: 0; overflow: hidden; border-radius: 99px; pointer-events: none; }
.spine-dots i { position: absolute; top: 3px; left: -2%; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px #fff, 0 0 12px var(--mint); animation: chainflow 7s linear infinite; animation-delay: calc(var(--i) * -.58s); }

/* ---------------------------------------------------------------- Projects */
.pjh { position: relative; overflow: hidden; margin: 4px 40px 0; padding: 34px 36px; border-radius: 28px; color: #fff; background: #0F1C16; box-shadow: 0 30px 60px -40px rgba(15, 26, 21, .9); }
.pjh-bg { position: absolute; inset: 0; background: url('../assets/header_bg.jpg') right center / cover; opacity: .4; }
.pjh-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, #0F1C16 0%, rgba(15, 28, 22, .92) 42%, rgba(23, 64, 45, .5) 100%); }
.pjh-glow { position: absolute; width: 520px; height: 520px; right: -120px; top: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(125, 219, 163, .32), transparent 65%); animation: drift 14s ease-in-out infinite; pointer-events: none; }
.pjh-in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; align-items: center; }
.pjh-eyebrow { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: .05em; color: var(--mint); }
.pjh h1 { font-size: clamp(24px, 2.8vw, 34px); margin: 6px 0 14px; letter-spacing: -.015em; }
.pjh-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pjh .chip { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .14); color: #fff; }
.pjh-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pjh-stat { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); backdrop-filter: blur(8px); min-width: 0; }
.pjh-stat > span { font-size: 12px; color: rgba(255, 255, 255, .65); }
.pjh-stat b { font-size: 26px; font-weight: 600; } .pjh-stat b small { font-size: 14px; color: rgba(255, 255, 255, .55); font-weight: 500; }
.pips { display: flex; gap: 4px; } .pips i { flex: 1; height: 6px; border-radius: 9px; background: rgba(255, 255, 255, .14); }
.pips i.on { background: var(--mint); box-shadow: 0 0 8px rgba(125, 219, 163, .6); }
.pjh-bar { height: 6px; border-radius: 9px; overflow: hidden; background: rgba(255, 255, 255, .12); }
.pjh-bar i { display: block; height: 100%; border-radius: 9px; background: var(--mint); transition: width 1s var(--ease); }
.pjh-bar.gold i { background: linear-gradient(90deg, var(--gold-1), var(--gold-2)); }
.pj-sec { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 26px 40px 14px; }
.pj-sec h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.pj-sec h2 .mono { font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--green-soft); color: var(--green); }
.slots { margin-top: 0; }
.slot { min-height: 0; }
.slot-full { padding: 0; gap: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line-soft); }
.slot-cover { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 14px 36px 16px; color: #fff;
  background: radial-gradient(130% 160% at 0% 0%, color-mix(in srgb, var(--sc) 55%, #0F1C16), #0F1C16 85%); }
.slot-cover::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1.3px); background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(100deg, transparent 20%, #000); mask-image: linear-gradient(100deg, transparent 20%, #000); }
.slot-cover .slot-emoji { position: relative; z-index: 1; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); box-shadow: none; }
.slot-cover-t { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.slot-year { font-size: 12px; color: var(--mint); } .slot-sector { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-cover .slot-menu { position: relative; z-index: 4; align-self: flex-start; }
.slot-cover .icon-btn { color: rgba(255, 255, 255, .8); } .slot-cover .icon-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.slot-cover .menu { color: var(--ink); }
.slot-body { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; gap: 10px; margin-top: -22px; padding: 16px 18px; border-radius: 20px 20px 0 0; background: var(--surface); }
.slot-name { font-size: 18px; margin: 0; }
.slot-org { display: flex; gap: 6px; align-items: center; margin-top: -6px; font-size: 12.5px; color: var(--muted); }
.slot-kpis { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.slot-kpis > div { display: flex; flex-direction: column; min-width: 0; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-soft); }
.slot-kpis span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.slot-kpis b { font-size: 18px; font-weight: 600; } .slot-kpis b small { font-size: 12px; color: var(--muted); } .slot-kpis b.ok { color: var(--green); }
.slot-viz { display: flex; flex-direction: column; gap: 6px; }
.slot-spark { display: block; width: 100%; height: 40px; }
.slot-scope { display: flex; gap: 2px; height: 7px; border-radius: 99px; overflow: hidden; } .slot-scope i { display: block; }
.slot-scope-l { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.slot-scope-l span { display: inline-flex; gap: 5px; align-items: center; } .slot-scope-l i { width: 8px; height: 8px; border-radius: 2px; } .slot-scope-l b { color: var(--ink-2); }
.slot-empty-note { display: flex; gap: 8px; align-items: center; padding: 12px; border-radius: 12px; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line); }
.slot-full .slot-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.slot-foot .muted { display: inline-flex; gap: 5px; align-items: center; }
.slot-glare { z-index: 3; }
.slot-empty { min-height: 360px; padding: 0; gap: 0; cursor: default; justify-content: stretch; }
.slot-empty-main { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; border: 0; background: none; font: inherit; color: var(--muted); cursor: pointer; }
.slot-empty-main b { color: var(--ink); font-size: 17px; }
.slot-empty-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; padding: 0 14px 14px; }
.slot-empty-opts button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; transition: border-color .2s, color .2s; }
.slot-empty-opts button:hover { border-color: var(--green); color: var(--green); }
.slot-locked { min-height: 360px; }

/* ---------------------------------------------------------------- Data & XLSX */
.store-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--sh-1); }
.sb-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--green-soft); color: var(--green); }
.sb-t { flex: 1; min-width: 0; display: flex; flex-direction: column; } .sb-t b { font-size: 14.5px; } .sb-t span { font-size: 12.5px; color: var(--muted); }
.sb-live { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--green); background: var(--green-soft); white-space: nowrap; }
.sb-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: blink 2s ease-in-out infinite; }
.fcard { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--sh-1); }
.fcard::after { content: ''; position: absolute; right: -90px; top: -90px; width: 240px; height: 240px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--fc) 20%, transparent), transparent 70%); }
.fcard-co { --fc: #1F6F4A; } .fcard-ef { --fc: #C26A0B; }
.fc-head { display: flex; gap: 14px; align-items: center; position: relative; z-index: 1; }
.fc-doc { position: relative; flex: none; width: 50px; height: 60px; padding: 8px; border-radius: 8px 16px 8px 8px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--fc) 80%, white), var(--fc)); box-shadow: 0 12px 24px -14px var(--fc); }
.fc-doc::before { content: ''; position: absolute; right: 0; top: 0; width: 14px; height: 14px; border-radius: 0 16px 0 6px; background: rgba(255, 255, 255, .35); }
.fc-doc span { position: absolute; top: 8px; left: 7px; font: 700 9px/1 var(--mono); letter-spacing: .06em; color: #fff; }
.fc-doc i { display: block; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .55); } .fc-doc i:nth-of-type(2) { width: 70%; } .fc-doc i:nth-of-type(3) { width: 45%; }
.fc-t { min-width: 0; } .fc-t h3 { font-size: 17px; } .fc-t span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fc-meta > div { display: flex; flex-direction: column; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-soft); }
.fc-meta b { font-size: 18px; } .fc-meta span { font-size: 11.5px; color: var(--muted); }
.fc-sheets { display: flex; flex-wrap: wrap; gap: 5px; }
.fc-sheets span { font-family: var(--mono); font-size: 11px; padding: 3px 8px; border-radius: 6px; color: color-mix(in srgb, var(--fc) 75%, var(--ink));
  background: color-mix(in srgb, var(--fc) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--fc) 20%, transparent); }
.fc-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: stretch; margin-top: auto; }
.fc-actions .link { grid-column: 1 / -1; justify-self: start; display: inline-flex; gap: 5px; align-items: center; min-height: 30px; }
.drop-sm { flex-direction: row; gap: 10px; padding: 8px 14px; justify-content: center; text-align: left; }
.drop-sm span { font-size: 12.5px; } .drop-sm b { color: var(--ink); }
.org-set .card-head { align-items: flex-start; }
.og-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.og { min-width: 0; margin: 0; padding: 10px 14px 14px; border-radius: 16px; border: 1px solid var(--line-soft); background: var(--surface-2); }
.og legend { display: flex; align-items: center; gap: 8px; padding: 0 6px; font-weight: 600; font-size: 13.5px; color: var(--ink); }
.og-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.og-fields { display: flex; flex-direction: column; gap: 10px; }
.og-save { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 22px; border-top: 1px solid var(--line-soft); border-radius: 0 0 var(--r) var(--r); background: var(--surface-2); font-size: 13px; color: var(--muted); }
.og-save > span { margin-right: auto; }
.og-save.on { background: var(--amber-soft); color: var(--amber-txt); } .og-save.on > span::before { content: '● '; }
.danger-zone { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; border: 1px dashed color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 4%, var(--surface)); }
.danger-zone > div { flex: 1; min-width: 0; display: flex; flex-direction: column; } .danger-zone b { font-size: 14px; } .danger-zone span { font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1360px) {
  .bento { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .bx-hero { grid-column: 1 / -1; }
  .scope-ig { grid-template-columns: minmax(0, 1fr) 330px; }
  .kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1200px) {
  .scope-ig { grid-template-columns: minmax(0, 1fr); }
  .vmap-cols { grid-template-columns: minmax(0, 1fr); }
  .vlink { height: 34px; } .vlink-ic { transform: rotate(90deg); } .vlink i { display: none; }
  .vlink-line { left: 50%; right: auto; top: 4px; bottom: 4px; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--line-strong) 0 5px, transparent 5px 10px); animation: none; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); grid-auto-rows: auto; }
  .pjh-in { grid-template-columns: minmax(0, 1fr); }
  .og-groups { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
  .g-8-4 { grid-template-columns: minmax(0, 1fr); }
  .donut-wrap.compact { flex-direction: row; flex-wrap: wrap; } .donut-wrap.compact .legend { flex: 1; min-width: 220px; width: auto; }
  .mapbar { grid-template-columns: minmax(0, 1fr); gap: 14px; } .mb-next { max-width: none; }
  .obs-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .pjh { margin: 0 16px; padding: 24px 20px; } .pj-sec { padding: 20px 16px 12px; }
  .og-groups { grid-template-columns: minmax(0, 1fr); }
  .fc-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fc-actions { grid-template-columns: minmax(0, 1fr); }
  .tc-list { grid-template-columns: 1fr; }
  .dstrip { flex-wrap: wrap; } .dstrip-bar { display: none; }
  .sig-row { grid-template-columns: 36px minmax(0, 1fr) auto; } .sig-row .mspark { display: none; }
  .kh-sep em { margin-left: 0; }
  .theme-btn { width: 42px; height: 42px; }
  .slot-empty, .slot-locked { min-height: 240px; }
  .og-save { padding: 12px 16px; flex-wrap: wrap; }
  .danger-zone { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .fact b { font-size: 18px; }
  .pjh-stats { grid-template-columns: 1fr 1fr; } .pjh-stat b { font-size: 20px; }
  .rc-parts a { grid-template-columns: minmax(0, 1fr) auto 44px; } .rc-bar { display: none; }
  .kh-scopes b { font-size: 15px; } .kpi-hero .kpi-value .mono { font-size: 34px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .sig-two { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .vlink i, .spine-dots i, .vlink-line, .pjh-glow, .mbars i, .sb-live i, .mb-next.hot { animation: none !important; }
  .vlink i, .spine-dots i { display: none; }
  .theme-ic .ico { transition: none; }
}
@media print { .theme-btn, .map-tools, .dstrip a { display: none !important; } }

/* ===================== v3.1 · สมัครแล้วกลับหน้าเข้าสู่ระบบ ===================== */
.auth-created { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--green-soft); border: 1px solid color-mix(in srgb, var(--green) 30%, transparent); animation: rise .35s var(--ease) backwards; }
.auth-created .ac-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; flex: none; }
.auth-created b { display: block; font-size: 14px; color: var(--ink); }
.auth-created span { font-size: 12.5px; color: var(--muted); }

/* ===================== Splash หลังเข้าสู่ระบบ ===================== */
.splash { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; cursor: pointer; color: #E8F2EC; background: #0B1511; transition: opacity .25s ease; }
.splash.out { opacity: 0; }
.sp-bg { position: absolute; inset: 0; background:
  radial-gradient(60% 50% at 50% 38%, rgba(76, 187, 134, .22), transparent 70%),
  radial-gradient(40% 40% at 80% 90%, rgba(194, 106, 11, .14), transparent 70%); }
.sp-in { position: relative; width: min(360px, calc(100vw - 32px)); text-align: center; animation: rise .45s var(--ease) backwards; }
.sp-ring { position: relative; width: 112px; height: 112px; margin: 0 auto 18px; }
.sp-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sp-track { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 3; }
.sp-prog { fill: none; stroke: #7DDBA3; stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset .45s var(--ease); filter: drop-shadow(0 0 6px rgba(125, 219, 163, .55)); }
.sp-logo { position: absolute; inset: 0; display: grid; place-items: center; animation: spPulse 1.6s ease-in-out infinite; }
@keyframes spPulse { 50% { transform: scale(1.06); } }
.splash h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.01em; color: #fff; }
.sp-org { margin: 4px 0 20px; font-size: 13.5px; color: #9FB5AA; }
.sp-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; text-align: left; }
.sp-steps li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); color: #7F948A; transition: all .3s var(--ease); }
.sp-steps li b { font-weight: 500; font-size: 13.5px; }
.sp-steps li em { font-style: normal; font-size: 11.5px; opacity: .8; }
.sp-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .06); }
.sp-steps li.now { color: #E8F2EC; border-color: rgba(125, 219, 163, .35); background: rgba(125, 219, 163, .08); }
.sp-steps li.now .sp-ic { animation: spPulse 1s ease-in-out infinite; }
.sp-steps li.done { color: #CFE3D8; }
.sp-steps li.done .sp-ic { background: #2A8F5A; color: #fff; }
.sp-bar { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.sp-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4CBB86, #7DDBA3); transition: width .45s var(--ease); }
.sp-skip { margin-top: 14px; font-size: 11.5px; color: #6F857A; }

/* ===================== กรอบมาตรฐาน ===================== */
.std-hero { border-radius: var(--r); padding: 20px 22px; background: linear-gradient(135deg, #12201A, #1A2D24 60%, #23352B); color: #E8F2EC; box-shadow: var(--sh-1); display: grid; gap: 14px; }
.sh-main { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.sh-k { display: flex; gap: 26px; }
.sh-k div { display: grid; gap: 2px; }
.sh-k b { font-size: 30px; font-weight: 600; line-height: 1; color: #fff; }
.sh-k span { font-size: 12px; color: #9FB5AA; white-space: nowrap; }
.sh-cover { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.shc { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); color: #7F948A; transition: all .25s var(--ease); }
.shc-ic { grid-row: span 2; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); }
.shc-l { font-size: 11.5px; line-height: 1.25; }
.shc b { font-size: 16px; color: #fff; opacity: .4; }
.shc.on { color: #CFE3D8; border-color: rgba(125, 219, 163, .3); background: rgba(125, 219, 163, .07); }
.shc.on .shc-ic { background: #2A8F5A; color: #fff; }
.shc.on b { opacity: 1; }
.sh-reuse { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(125, 219, 163, .1); color: #CFE3D8; font-size: 13px; }
.sh-reuse b { color: #fff; font-weight: 600; }
.std-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.std-demo { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.std-group { display: grid; gap: 10px; }
.sg-head { display: flex; align-items: center; gap: 10px; }
.sg-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.sg-head em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: auto; }
.sg-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: var(--gc); }
.std-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stdc { position: relative; text-align: left; display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line-soft); box-shadow: var(--sh-1); cursor: pointer; color: var(--ink); font: inherit; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.stdc:hover:not(:disabled) { transform: translateY(-2px); border-color: color-mix(in srgb, var(--gc) 45%, var(--line)); }
.stdc:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.stdc.on { border-color: var(--gc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gc) 14%, transparent), var(--sh-1); }
.stdc.locked { cursor: default; opacity: 1; background: linear-gradient(180deg, color-mix(in srgb, var(--gc) 7%, var(--surface)), var(--surface)); }
.stdc-top { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.stdc-mono { min-width: 46px; height: 40px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; color: var(--gc); background: color-mix(in srgb, var(--gc) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gc) 22%, transparent); }
.stdc-t { min-width: 0; display: grid; }
.stdc-t b { font-size: 14px; font-weight: 600; line-height: 1.3; }
.stdc-t span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stdc-check { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; color: #fff; transition: all .2s var(--ease); }
.stdc.on .stdc-check, .stdc.locked .stdc-check { background: var(--gc); border-color: var(--gc); }
.stdc-line { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; min-height: 2.9em; }
.stdc-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stdc-st, .stdc-rec, .stdc-watch { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 8px; border-radius: 99px; font-weight: 500; }
.stdc-st.ok { background: var(--green-soft); color: var(--green); }
.stdc-st.info { background: color-mix(in srgb, #3E6E9E 14%, var(--surface)); color: #3E6E9E; }
.stdc-st.soon { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-soft); }
.stdc-rec { background: var(--amber-soft); color: var(--amber-txt); }
.stdc-watch { background: var(--danger-soft); color: var(--danger); }
.stdc-th { margin-left: auto; display: inline-flex; gap: 3px; }
.stdc-th i { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.std-matrix .sm-scroll { overflow-x: auto; }
.sm-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.sm-t th, .sm-t td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); text-align: center; }
.sm-t th:first-child, .sm-t td:first-child { text-align: left; white-space: nowrap; }
.sm-t th { font-weight: 500; color: var(--muted); font-size: 11.5px; vertical-align: bottom; }
.sm-t th span { display: block; margin-top: 3px; white-space: nowrap; }
.sm-mono { display: inline-block; min-width: 50px; font-size: 11px; color: var(--muted); }
.sm-live { font-style: normal; font-size: 10.5px; padding: 1px 6px; border-radius: 99px; background: var(--green-soft); color: var(--green); margin-left: 4px; }
.sm-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.sm-dot.live { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
@media (max-width: 1200px) { .sh-main { grid-template-columns: 1fr; gap: 16px; } .std-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .sh-cover { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .std-grid { grid-template-columns: 1fr; } .sh-cover { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sh-k { gap: 18px; } .sh-k b { font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { .sp-logo, .sp-steps li.now .sp-ic { animation: none; } .stdc:hover:not(:disabled) { transform: none; } }

/* ===================== v3.2 · ชุดฟีเจอร์ใหม่ ===================== */
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.row-between h3 { margin: 0; font-size: 15px; }
.stack-sm { display: grid; gap: 10px; }
.form-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.input-unit.sm { width: 110px; }
.bar { height: 5px; border-radius: 5px; background: var(--track); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--green); border-radius: inherit; transition: width .5s var(--ease); }
.bar.green i { background: #2A8F5A; }
.copy-area { width: 100%; font-family: var(--mono); font-size: 12.5px; border-radius: 10px; border: 1px solid var(--line); padding: 10px; background: var(--surface-2); color: var(--ink); }
.consent { align-items: flex-start; font-size: 13px; line-height: 1.5; }
.consent a { color: var(--green); font-weight: 600; }
.side-links { display: flex; justify-content: space-between; gap: 8px; padding: 0 4px 8px; font-size: 11.5px; }
.side-links a { color: #8FA79B; text-decoration: none; } .side-links a:hover { color: #fff; }
.save-st { color: #8FA79B; } .save-st.saving { color: #E3C27A; } .save-st.error { color: #F2766B; }

/* แถบสรุปบนสุดของหน้าใหม่ (หลักฐาน / ซัพพลายเออร์ / ทีม) */
.ev-bar, .sup-bar, .team-bar { display: flex; align-items: center; gap: 28px; padding: 16px 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--sh-1); flex-wrap: wrap; }
.ev-bar > div:not(.evb-store), .sup-bar > div:not(.sup-actions), .team-bar > div:not(.sup-actions) { display: grid; gap: 2px; min-width: 110px; }
.ev-bar b, .sup-bar b, .team-bar b { font-size: 24px; font-weight: 600; line-height: 1.1; }
.ev-bar b small, .sup-bar b small, .team-bar b small { font-size: 13px; color: var(--muted); font-weight: 500; }
.ev-bar span, .sup-bar span, .team-bar span { font-size: 12px; color: var(--muted); }
.evb-store, .sup-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }

/* หลักฐาน */
.ev-up { display: grid; grid-template-columns: 200px 1fr; gap: 10px; align-items: stretch; margin-bottom: 12px; }
.ev-up .drop { margin: 0; }
.ev-filter { margin-bottom: 12px; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.ev-card { border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; background: var(--surface); display: grid; grid-template-rows: auto 1fr auto; transition: box-shadow .2s, transform .2s var(--ease); }
.ev-card:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.ev-open { border: 0; padding: 0; background: none; cursor: zoom-in; display: block; width: 100%; }
.ev-thumb { position: relative; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); overflow: hidden; }
.ev-thumb.md { height: 130px; } .ev-thumb.sm { width: 46px; height: 46px; border-radius: 9px; flex: none; }
.ev-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ev-thumb em { position: absolute; bottom: 6px; right: 6px; font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: #B3261E; color: #fff; }
.ev-meta { padding: 10px 12px 4px; display: grid; gap: 2px; min-width: 0; }
.ev-meta b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-meta > span { font-size: 11.5px; color: var(--muted); }
.ev-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.ev-tags em { font-style: normal; font-size: 10.5px; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-soft); }
.ev-tags em.ok { background: var(--green-soft); color: var(--green); border-color: transparent; }
.ev-tags em.ocr { background: var(--amber-soft); color: var(--amber-txt); border-color: transparent; }
.ev-act { display: flex; justify-content: flex-end; gap: 2px; padding: 0 6px 6px; }
.ev-empty { display: grid; justify-items: center; gap: 6px; padding: 34px 12px; text-align: center; color: var(--muted); }
.ev-empty b { color: var(--ink); } .ev-empty span { font-size: 13px; max-width: 420px; }
.ev-side h3 { margin: 0 0 10px; font-size: 15px; }
.ev-miss { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.ev-miss a { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 13px; background: var(--surface-2); }
.ev-miss a:hover { background: var(--green-soft); }
.ev-miss .mono { color: var(--muted); font-size: 12px; } .ev-miss b { color: var(--amber-txt); }
.ev-modal { display: grid; gap: 12px; }
.ev-hint { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.ev-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; max-height: 220px; overflow: auto; padding: 2px; }
.ev-pi { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 1.5px solid var(--line-soft); background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.ev-pi > div { flex: 1; min-width: 0; display: grid; } .ev-pi b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ev-pi span { font-size: 11px; color: var(--muted); }
.ev-pi.on { border-color: var(--green); background: var(--green-soft); }
.ev-pi.focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 20%, transparent); }
.ev-ck { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; color: #fff; flex: none; }
.ev-pi.on .ev-ck { background: var(--green); border-color: var(--green); }
.ev-focus { border-top: 1px solid var(--line-soft); padding-top: 12px; display: grid; gap: 8px; }
.ev-ft { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.ev-picked { margin-right: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.evidence.has { border-style: solid; border-color: color-mix(in srgb, var(--green) 45%, transparent); background: var(--green-soft); }
.ev-view { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.ev-img { background: var(--surface-2); border-radius: 12px; display: grid; place-items: center; min-height: 300px; max-height: 65vh; overflow: auto; }
.ev-img img { max-width: 100%; display: block; }
.ev-side2 { display: grid; gap: 12px; align-content: start; }
.ev-dl { margin: 0; display: grid; gap: 6px; }
.ev-dl div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; } .ev-dl dt { color: var(--muted); } .ev-dl dd { margin: 0; text-align: right; }
.ocr { display: grid; gap: 8px; }
.ocr-note { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.ocr-prog { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.ocr-prog .bar { margin: 0; } .ocr-prog .bar i { background: linear-gradient(90deg, #4CBB86, #7DDBA3); }
.ocr-res { display: grid; gap: 8px; }
.ocr-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; } .ocr-head b { font-size: 13.5px; } .ocr-head .link { margin-left: auto; }
.ocr-nums { display: flex; flex-wrap: wrap; gap: 6px; }
.ocr-num { display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); transition: all .15s; }
.ocr-num:hover:not(:disabled) { border-color: var(--green); background: var(--green-soft); }
.ocr-num:disabled { cursor: default; }
.ocr-num.ctx { border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.ocr-num em { font-style: normal; font-size: 10.5px; color: var(--amber-txt); }
.ocr-meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }

/* ไบโอแก๊ส */
.bg-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.bg-in h3 { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; font-size: 14.5px; } .bg-in h3:first-child { margin-top: 0; }
.bg-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--green); color: #fff; }
.bg-in small { font-size: 11px; margin-top: 2px; display: block; }
.bg-cod { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--muted); }
.bg-cod b { color: var(--ink); font-size: 15px; }
.bg-sys { display: grid; gap: 6px; }
.bg-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }
.bg-l { font-size: 13px; display: grid; gap: 1px; } .bg-l small { font-size: 10.5px; }
.bg-sum { text-align: right; font-size: 12.5px; color: var(--green); font-weight: 600; } .bg-sum.bad { color: var(--danger); }
.bg-out { display: grid; gap: 14px; }
.bg-total { display: grid; gap: 2px; } .bg-total span { font-size: 12.5px; color: var(--muted); } .bg-total b { font-size: 34px; font-weight: 600; line-height: 1.1; } .bg-total em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.bg-flow { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.bf { display: grid; grid-template-columns: 150px 1fr 90px; gap: 10px; align-items: center; font-size: 12.5px; }
.bf b { text-align: right; font-size: 12.5px; }
.bf-bar { height: 10px; border-radius: 6px; background: var(--track); overflow: hidden; }
.bf-bar i { display: block; height: 100%; border-radius: inherit; transition: width .5s var(--ease); }
.bf-generated i { background: #93A19A; } .bf-captured i { background: #2A8F5A; } .bf-released i { background: #C26A0B; }
.bf-note { font-size: 12px; color: var(--muted); }
.tver { background: linear-gradient(160deg, color-mix(in srgb, #2A8F5A 9%, var(--surface)), var(--surface)); display: grid; gap: 10px; }
.tver-h { display: flex; align-items: center; gap: 8px; }
.tver-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #1F6F4A; color: #fff; letter-spacing: .04em; }
.tver-k b { font-size: 30px; font-weight: 600; display: block; line-height: 1.1; color: var(--green); } .tver-k span { font-size: 12.5px; color: var(--muted); }
.tver-cmp { display: flex; align-items: center; gap: 12px; } .tver-cmp div { display: grid; } .tver-cmp span { font-size: 11.5px; color: var(--muted); } .tver-cmp b { font-size: 16px; }
.tver-notes { margin: 0; padding-left: 18px; font-size: 12px; color: var(--muted); display: grid; gap: 4px; }

/* ซัพพลายเออร์ */
.sup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.sup-card { border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); box-shadow: var(--sh-1); padding: 14px; display: grid; gap: 10px; }
.sup-card header { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.sup-card header b { font-size: 14px; display: block; } .sup-card header span { font-size: 11.5px; color: var(--muted); }
.sup-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.sup-ic.k-supplier { background: color-mix(in srgb, #3E6E9E 14%, var(--surface)); color: #3E6E9E; }
.sup-ic.k-transport { background: var(--amber-soft); color: var(--amber-txt); }
.sup-ic.k-service { background: var(--surface-2); color: var(--muted); }
.req { font-style: normal; font-size: 10.5px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.req.r-sent { background: var(--amber-soft); color: var(--amber-txt); } .req.r-received { background: var(--green-soft); color: var(--green); }
.sup-card dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.sup-card dt { font-size: 11px; color: var(--muted); } .sup-card dd { margin: 0; font-size: 13px; }
.sup-certs { display: flex; flex-wrap: wrap; gap: 4px; } .sup-certs span { font-size: 10.5px; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-soft); }
.sup-card footer { display: flex; align-items: center; gap: 2px; border-top: 1px solid var(--line-soft); padding-top: 8px; } .sup-card footer .btn { margin-right: auto; }
.sup-kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.sk { display: grid; justify-items: center; gap: 4px; padding: 10px 6px; border-radius: 12px; border: 1.5px solid var(--line-soft); background: var(--surface); font: inherit; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.sk.on { border-color: var(--green); color: var(--green); background: var(--green-soft); font-weight: 600; }
.plots { margin-top: 12px; display: grid; gap: 8px; }
.plots-h { display: flex; align-items: center; justify-content: space-between; } .plots-h b { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.plot { display: grid; grid-template-columns: 1.2fr 1fr 1fr .6fr 1fr 1.1fr auto; gap: 6px; align-items: center; }
.plot .input { min-height: 36px; padding: 0 8px; font-size: 12.5px; }
.plot-w { grid-column: 1 / -1; font-size: 11px; color: var(--amber-txt); }

/* ทีม */
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.task { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-soft); }
.task-ck { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; color: #fff; cursor: pointer; }
.task.s-done .task-ck { background: var(--green); border-color: var(--green); }
.task.s-done .task-t b { text-decoration: line-through; color: var(--muted); }
.task-t { display: grid; min-width: 0; } .task-t b { font-size: 13.5px; } .task-t span { font-size: 11.5px; color: var(--muted); }
.task-t em { font-style: normal; } .task-t em.late { color: var(--danger); font-weight: 600; }
.task-st { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line-soft); color: var(--muted); white-space: nowrap; }
.task-st.st-doing { background: color-mix(in srgb, #3E6E9E 14%, var(--surface)); color: #3E6E9E; border-color: transparent; }
.task-st.st-review { background: var(--amber-soft); color: var(--amber-txt); border-color: transparent; }
.task-st.st-done { background: var(--green-soft); color: var(--green); border-color: transparent; }
.members { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.members li { display: grid; grid-template-columns: auto 1fr auto auto auto auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.members li > div { display: grid; min-width: 0; } .members b { font-size: 13px; } .members span { font-size: 11.5px; color: var(--muted); }
.members em { font-style: normal; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--amber-soft); color: var(--amber-txt); }

/* เทียบปี */
.trend { display: grid; gap: 12px; }
.tr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tr-head h3 { margin: 0; font-size: 15px; }
.tr-base { font-size: 12.5px; color: var(--muted); padding: 4px 10px; border-radius: 99px; background: var(--surface-2); } .tr-base b { color: var(--ink); }
.tr-empty { display: grid; justify-items: center; gap: 4px; padding: 20px; text-align: center; color: var(--muted); } .tr-empty b { color: var(--ink); } .tr-empty span { font-size: 13px; }
.tr-body { display: grid; grid-template-columns: 1fr 260px; gap: 18px; align-items: stretch; }
.tr-bars { display: flex; align-items: flex-end; gap: 14px; height: 200px; padding: 0 4px; border-bottom: 1px solid var(--line); }
.tr-col { flex: 1; max-width: 90px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; position: relative; }
.tr-col > b { font-size: 12px; } .tr-col > span { font-size: 12px; color: var(--muted); position: absolute; bottom: -22px; }
.tr-col > em { position: absolute; bottom: -38px; font-style: normal; font-size: 10px; color: var(--amber-txt); }
.tr-stack { width: 100%; display: flex; flex-direction: column-reverse; border-radius: 8px 8px 2px 2px; overflow: hidden; opacity: .55; transition: height .6s var(--ease); }
.tr-col.cur .tr-stack { opacity: 1; box-shadow: 0 6px 18px -8px rgba(31, 111, 74, .6); }
.tr-col.base .tr-stack { outline: 2px dashed var(--amber); outline-offset: 2px; }
.tr-side { display: grid; gap: 8px; align-content: start; }
.tr-k { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 12.5px; }
.tr-k span { color: var(--muted); } .tr-k b { display: inline-flex; gap: 4px; align-items: center; font-size: 15px; }
.tr-k b.txt-green svg { transform: scaleY(-1); }
.tr-int { display: flex; align-items: baseline; gap: 6px; padding: 0 12px; font-size: 12px; color: var(--muted); } .tr-int b { font-size: 18px; color: var(--ink); } .tr-int em { font-style: normal; }
.trend .muted.small { margin: 32px 0 0; }

/* นโยบายความเป็นส่วนตัว */
.privacy { display: grid; gap: 14px; font-size: 13.5px; line-height: 1.65; }
.pv-head { display: flex; gap: 10px; align-items: center; color: var(--green); }
.pv-head b { display: block; color: var(--ink); font-size: 16px; } .pv-head span { font-size: 12px; color: var(--muted); }
.privacy h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 14px; }
.privacy h4 .mono { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-size: 12px; }
.privacy p, .privacy ul { margin: 0; } .privacy ul { padding-left: 20px; display: grid; gap: 3px; }

/* นำเข้าจากเบราว์เซอร์ */
.import-banner { margin: 0 auto 20px; max-width: 1200px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--amber-soft); color: var(--amber-txt); }
.import-banner > div { flex: 1; display: grid; } .import-banner b { color: var(--ink); } .import-banner span { font-size: 12.5px; }
.imp-row { align-items: flex-start; }

@media (max-width: 1100px) { .bg-grid, .tr-body, .ev-view { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .form-grid.g3 { grid-template-columns: 1fr 1fr; } .plot { grid-template-columns: 1fr 1fr 1fr; } .ev-up { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .form-grid.g3 { grid-template-columns: 1fr; } .bf { grid-template-columns: 110px 1fr 70px; }
  .ev-bar, .sup-bar, .team-bar { gap: 16px; } .evb-store, .sup-actions { margin-left: 0; width: 100%; }
  .sup-kinds { grid-template-columns: repeat(2, 1fr); } .task { grid-template-columns: auto 1fr auto; } .task .icon-btn { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ev-card:hover { transform: none; } }

/* v3.3 · Pro gate: กล่องอยู่ช่องเดียวกับภาพตัวอย่าง (grid) → กรอบสูงพอดีกล่องเสมอ ไม่ถูกตัดบน/ล่าง */
.pro-gate { display: grid; }
.pro-gate > .pg-preview, .pro-gate > .pg-card { grid-area: 1 / 1; }
.pro-gate > .pg-card { position: relative; left: auto; top: auto; transform: none; place-self: center; margin: 28px 14px; }
.pro-gate.pg-slim > .pg-card { width: min(560px, calc(100% - 28px)); padding: 18px 22px; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; text-align: left; align-items: center; }
.pro-gate.pg-slim .pg-lock { grid-row: span 3; margin: 0; }
.pro-gate.pg-slim h4 { margin: 2px 0 2px; } .pro-gate.pg-slim .pg-card > p { margin: 0 0 10px; }
.pro-gate.pg-slim .pg-actions { grid-column: 2; justify-content: flex-start; }
@media (max-width: 600px) { .pro-gate.pg-slim > .pg-card { grid-template-columns: 1fr; text-align: center; } .pro-gate.pg-slim .pg-lock { grid-row: auto; margin: 0 auto 8px; } .pro-gate.pg-slim .pg-actions { grid-column: 1; justify-content: center; } }
/* v3.3 · ไบโอแก๊ส: ช่อง % แสดงตัวเลขครบ + ซ้าย/ขวาสูงเท่ากัน */
.input-unit.sm { width: 124px; flex: none; }
.input-unit.sm .input { padding-right: 34px; text-align: right; }
.input-unit.sm em { right: 12px; }
.bg-grid { align-items: stretch; }
.bg-grid > .bg-in { height: 100%; }
.bg-grid > .stack { display: flex; flex-direction: column; gap: 16px; }
.bg-grid > .stack > .tver { flex: 1; align-content: start; }
/* v3.3 · ทีม: สถานะงานเป็น dropdown */
select.task-st[class] { font: inherit; font-size: 11.5px; padding: 3px 22px 3px 10px; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 11px) 52%, calc(100% - 7px) 52%; background-size: 4px 4px; background-repeat: no-repeat; }
select.task-st option { color: var(--ink); background: var(--surface); }
