/* CarbonLens — design tokens จาก docs/03 + ขยายสำหรับ UI จริง */
:root {
  --ground: #F5F6F2; --surface: #FFFFFF; --surface-2: #FAFBF8; --ink: #14201B; --ink-2: #2A3832; --muted: #4F5A55; --faint: #7C8781;
  --line: #DCE0DA; --line-soft: #E9ECE7; --line-strong: #B8C0BB; --track: #E6EAE5;
  --green: #1F6F4A; --green-2: #17573A; --green-soft: #E3F0E8; --mint: #7DDBA3;
  --amber: #C26A0B; --amber-txt: #8A4A05; --amber-soft: #FBEBD7; --danger: #B3261E; --danger-soft: #FBE7E5;
  --side: #0F1A15; --side-active: #26352E;
  --c1: #14201B; --c2: #1F6F4A; --c3: #5AA37B; --c4: #C26A0B; --c5: #DDA75E; --c6: #93A19A;
  --r: 18px; --r-sm: 12px; --r-xs: 8px;
  --sh-1: 0 1px 2px rgba(20, 32, 27, .05), 0 10px 30px -18px rgba(20, 32, 27, .22);
  --sh-2: 0 2px 6px rgba(20, 32, 27, .06), 0 24px 48px -24px rgba(20, 32, 27, .32);
  --font: 'IBM Plex Sans Thai', 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--ground); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--green); text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.3; }
code { font-family: var(--mono); font-size: .88em; background: var(--line-soft); padding: 1px 6px; border-radius: 5px; }
.mono { font-family: var(--mono); font-feature-settings: 'tnum'; letter-spacing: -.01em; }
.muted { color: var(--muted); } .small { font-size: 13px; } .r { text-align: right; } .nowrap { white-space: nowrap; }
.txt-green { color: var(--green); font-weight: 600; } .txt-amber { color: var(--amber-txt); } .txt-danger { color: var(--danger); font-weight: 600; }
.ico { flex: none; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 6px; }

/* ---------------- boot ---------------- */
.boot, .boot-error { min-height: 100vh; display: grid; place-items: center; gap: 16px; color: var(--muted); align-content: center; }
.boot-error .card { max-width: 560px; }
.boot-spin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--green); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- layout ---------------- */
.app { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 40; color: #E8EFEA;
  background: var(--side) url('../assets/panel_bg.jpg') center bottom / cover no-repeat; }
.sidebar::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 20, 15, .92) 0%, rgba(10, 20, 15, .78) 45%, rgba(10, 20, 15, .15) 100%); }
.side-inner { position: relative; height: 100%; display: flex; flex-direction: column; padding: 22px 16px 18px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; color: #fff; }
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.brand-sub { font-size: 11.5px; color: rgba(232, 239, 234, .55); letter-spacing: .04em; }
.nav { display: flex; flex-direction: column; gap: 14px; }
.nav-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(232, 239, 234, .4); padding: 0 12px 6px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: rgba(232, 239, 234, .74); font-size: 14.5px; transition: background .2s, color .2s; min-height: 44px; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(125, 219, 163, .18), rgba(125, 219, 163, .04)); box-shadow: inset 0 0 0 1px rgba(125, 219, 163, .16); }
.nav-item.active::before { content: ''; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--mint); box-shadow: 0 0 12px var(--mint); }
.nav-item.active .ico { color: var(--mint); }
.nav-count { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 11.5px; padding: 1px 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: rgba(232, 239, 234, .8); }
.nav-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: #F08A5D; box-shadow: 0 0 0 3px rgba(240, 138, 93, .2); }
.side-foot { margin-top: auto; padding-top: 22px; }
.org-card { padding: 14px 14px; border-radius: 14px; background: rgba(10, 20, 15, .55); border: 1px solid rgba(125, 219, 163, .14); backdrop-filter: blur(10px); }
.org-name { font-weight: 600; font-size: 13.5px; color: #fff; }
.org-meta { font-size: 12px; color: rgba(232, 239, 234, .55); }
.org-total { margin-top: 8px; font-size: 12px; color: rgba(232, 239, 234, .6); }
.org-total .mono { font-size: 20px; color: var(--mint); font-weight: 600; margin-right: 4px; }
.save-note { display: flex; gap: 6px; align-items: center; font-size: 11.5px; color: rgba(232, 239, 234, .5); padding: 10px 4px 0; }

.main { flex: 1; margin-left: 272px; min-width: 0; height: 100vh; overflow-y: auto; }
.menu-btn { display: none; }
.hero { position: relative; height: 232px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: #EEF5F0 url('../assets/header_bg.jpg') right center / cover no-repeat; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(247, 250, 247, .96) 0%, rgba(247, 250, 247, .82) 38%, rgba(247, 250, 247, 0) 62%), linear-gradient(0deg, var(--ground) 0%, rgba(245, 246, 242, 0) 42%); }
.hero-inner { position: relative; padding: 30px 40px 0; max-width: 760px; }
.crumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.hero h1 { font-size: 30px; font-weight: 700; letter-spacing: -.015em; margin: 6px 0 4px; }
.hero-sub { margin: 0; color: var(--muted); max-width: 560px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; background: rgba(255, 255, 255, .78); border: 1px solid rgba(20, 32, 27, .08); font-size: 12.5px; color: var(--ink-2); backdrop-filter: blur(6px); }
.chip-link:hover { border-color: var(--green); color: var(--green); }
.content { padding: 0 40px 56px; margin-top: -34px; position: relative; max-width: 1560px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-5-7 { grid-template-columns: 5fr 7fr; } .g-7-5 { grid-template-columns: 7fr 5fr; }

/* ---------------- card ---------------- */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--sh-1); border: 1px solid rgba(20, 32, 27, .05); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; flex-wrap: wrap; }
.card-head h3 { font-size: 16px; font-weight: 600; }
.card-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 18px 22px 22px; }
.card-head + .card-body { padding-top: 14px; }
.sec-label { font-size: 12.5px; letter-spacing: .04em; color: var(--muted); font-weight: 600; margin: 4px 2px 10px; }

/* ---------------- buttons / inputs ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; font-weight: 600; font-size: 14px; transition: transform .15s var(--ease), box-shadow .2s, background .2s, border-color .2s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-primary { background: linear-gradient(180deg, #24804F, var(--green)); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 6px 16px -8px rgba(31, 111, 74, .7); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, #208049, var(--green-2)); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink-2); }
.btn-amber { background: var(--amber); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { color: var(--danger); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--line-soft); color: var(--ink); }
.link { background: none; border: 0; padding: 0; color: var(--green); cursor: pointer; font-weight: 600; font-size: 13px; }
.input { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); font: inherit; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
select.input { padding-right: 30px; }
.input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(31, 111, 74, .12); }
.input-sm { min-height: 36px; width: auto; }
textarea { width: 100%; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); font: inherit; resize: vertical; }
textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(31, 111, 74, .12); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.field > span { color: var(--ink-2); }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; min-height: 44px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--green); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.input-unit { position: relative; }
.input-unit .input { padding-right: 76px; }
.input-unit em { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12.5px; color: var(--muted); }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row-gap.end { justify-content: flex-end; margin-top: 16px; } .row-gap.center { justify-content: center; }
.actions-col { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.search { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); flex: 1; min-width: 220px; }
.search input { border: 0; outline: none; font: inherit; flex: 1; background: transparent; color: var(--ink); min-width: 0; }

/* segmented */
.seg { display: inline-flex; background: #EDF0EB; padding: 4px; border-radius: 12px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 0 14px; min-height: 36px; border-radius: 9px; cursor: pointer; color: var(--muted); font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s; }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(20, 32, 27, .14); }
.seg.sm button { min-height: 32px; padding: 0 10px; font-size: 12.5px; }

/* badges & pills */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--green-soft); color: var(--green); }
.badge-warn { background: var(--amber-soft); color: var(--amber-txt); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-muted { background: var(--line-soft); color: var(--muted); }
.badge-dark { background: var(--ink); color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.pill i { width: 8px; height: 8px; border-radius: 50%; }
.pill-done { color: var(--green); } .pill-done i { background: var(--green); }
.pill-part { color: var(--amber-txt); } .pill-part i { background: var(--amber); }
.pill-none { color: var(--muted); } .pill-none i { background: var(--line-strong); }
.pill-na { color: var(--faint); } .pill-na i { background: repeating-linear-gradient(45deg, #B8C0BB 0 2px, #fff 2px 4px); border: 1px solid var(--line-strong); }
.ghgp { display: inline-block; font-family: var(--mono); font-size: 10.5px; padding: 1px 6px; border-radius: 5px; background: var(--line-soft); color: var(--muted); font-weight: 500; }
.code-chip { font-family: var(--mono); font-size: 12px; padding: 2px 8px; border-radius: 6px; background: color-mix(in srgb, var(--cat) 10%, white); color: var(--cat); font-weight: 600; border: 1px solid color-mix(in srgb, var(--cat) 22%, white); }
.sdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.sdot-done { background: var(--green); } .sdot-part { background: var(--amber); } .sdot-none { background: var(--line-strong); }
.sdot-na { background: repeating-linear-gradient(45deg, #B8C0BB 0 2px, #fff 2px 4px); border: 1px solid var(--line-strong); }

/* bars */
.bar { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; flex: 1; }
.bar i { display: block; height: 100%; border-radius: 99px; transition: width .8s var(--ease); }
.bar.thin { height: 6px; }
.bar-row { display: flex; align-items: center; gap: 10px; }

/* ring / donut */
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { position: absolute; inset: 0; }
.ring-arc { transition: stroke-dasharray 1s var(--ease); }
.ring-label { position: relative; font-family: var(--mono); font-size: 11.5px; font-weight: 600; display: flex; align-items: baseline; gap: 1px; }
.ring-label b { font-size: 30px; } .ring-label small { font-size: 12px; color: var(--muted); }
.donut { position: relative; flex: none; }
.donut svg { overflow: visible; }
.donut-seg { transition: stroke-width .25s var(--ease), opacity .25s; }
.donut-seg.dim { opacity: .3; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-v { font-size: 26px; font-weight: 600; }
.donut-l { font-size: 12px; color: var(--muted); max-width: 120px; }
.donut-p { font-family: var(--mono); font-size: 13px; color: var(--green); }
.donut-wrap { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; justify-content: center; }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 220px; }
.legend li a { display: grid; grid-template-columns: 12px 1fr auto 44px; gap: 10px; align-items: center; padding: 9px 8px; border-radius: 9px; color: var(--ink); font-size: 13.5px; }
.legend li a:hover { background: var(--surface-2); }
.legend i { width: 12px; height: 12px; border-radius: 4px; }
.legend em { font-style: normal; color: var(--muted); font-family: var(--mono); font-size: 12px; text-align: right; }
.legend-row { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12.5px; color: var(--muted); }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.legend-row i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend-row i.dash { width: 16px; height: 0; border-top: 1.5px dashed var(--amber); border-radius: 0; }

/* ---------------- dashboard ---------------- */
.banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px 14px 14px; border-radius: 16px; background: linear-gradient(90deg, #FFF6EA, #FFFBF5); border: 1px solid #F1D9B8; box-shadow: var(--sh-1); }
.banner-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); flex: none; }
.banner-txt { flex: 1; font-size: 14px; color: var(--amber-txt); }
.banner-txt b { color: #6B3803; }
.kpis { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; gap: 20px; }
.kpi { position: relative; overflow: hidden; background: var(--surface); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--sh-1); border: 1px solid rgba(20, 32, 27, .05); display: flex; flex-direction: column; gap: 10px; }
.kpi-label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.kpi-label .dot { width: 8px; height: 8px; border-radius: 50%; }
.kpi-value { display: flex; align-items: baseline; gap: 8px; }
.kpi-value .mono { font-size: 32px; font-weight: 600; letter-spacing: -.03em; }
.kpi-value small { font-size: 13px; color: var(--muted); }
.kpi-foot { font-size: 12.5px; color: var(--muted); margin-top: auto; }
.kpi-hero { background: radial-gradient(120% 140% at 100% 0%, #2B8A5C 0%, #1A5B3D 38%, #12221B 100%); color: #fff; border: 0; box-shadow: var(--sh-2); }
.kpi-hero .kpi-label, .kpi-hero .kpi-foot, .kpi-hero small { color: rgba(255, 255, 255, .72); }
.kpi-hero .kpi-value .mono { font-size: 44px; }
.kpi-glow { position: absolute; right: -60px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(125, 219, 163, .35), transparent 70%); pointer-events: none; }
.mchart { position: relative; }
.mchart-svg { width: 100%; height: 230px; display: block; overflow: visible; }
.mchart .grid { stroke: var(--line-soft); stroke-width: 1; }
.mchart .axis { font-family: var(--mono); font-size: 10.5px; fill: var(--faint); }
.mchart .avgline { stroke: var(--amber); stroke-width: 1.2; stroke-dasharray: 4 4; }
.mbar rect { transition: opacity .2s; }
.mchart-svg:hover .mbar:not(.on) rect[fill^='var'] { opacity: .45; }
.tip { position: absolute; top: 0; transform: translate(-50%, -6px); background: var(--ink); color: #fff; padding: 10px 12px; border-radius: 10px; font-size: 12px; pointer-events: none; min-width: 150px; box-shadow: var(--sh-2); z-index: 5; }
.tip b { display: block; } .tip > .mono { font-size: 15px; display: block; margin-bottom: 4px; }
.tip-row { display: flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .8); }
.tip-row i { width: 8px; height: 8px; border-radius: 2px; } .tip-row .mono { margin-left: auto; }
.hot { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.hot li { display: flex; gap: 12px; align-items: flex-start; }
.hot-rank { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-soft); font-family: var(--mono); font-size: 12px; font-weight: 600; flex: none; }
.hot-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hot-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.hot-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-meta { font-size: 12px; color: var(--muted); }
.stackbar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; gap: 2px; margin-bottom: 14px; }
.stackbar i { display: block; min-width: 3px; }
.mini { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini th { font-weight: 500; color: var(--muted); font-size: 12px; text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line-soft); }
.mini td { padding: 7px 4px; border-bottom: 1px solid var(--line-soft); }
.mini th.r, .mini td.r { text-align: right; }
.mini .sw { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 8px; }
.sep-row td { color: var(--muted); background: var(--surface-2); }
.sep-row em, .calc-gas em { font-style: normal; font-size: 10.5px; margin-left: 6px; color: var(--amber-txt); background: var(--amber-soft); padding: 1px 5px; border-radius: 4px; }
.ready { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.ready-list { list-style: none; padding: 0; margin: 0; flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.ready-list li { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 9px; border-bottom: 1px dashed var(--line-soft); }
.ready-list li:last-child { border: 0; }
.sep { list-style: none; margin: 0; padding: 0; }
.sep li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.sep li:last-child { border: 0; }
.sep li div { display: flex; flex-direction: column; } .sep li b { font-weight: 600; font-size: 14px; } .sep li span { font-size: 12px; color: var(--muted); }
.obs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.obs li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 10px 11px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-soft); }
.obs li > div { flex: 1; display: flex; flex-direction: column; font-size: 13.5px; min-width: 0; }
.obs li span { font-size: 12.5px; color: var(--muted); }
.obs-error > .ico { color: var(--danger); } .obs-error { background: #FFF8F7 !important; border-color: #F3D2CE !important; }
.obs-warn > .ico { color: var(--amber); } .obs-info > .ico { color: var(--green); }

/* ---------------- inventory ---------------- */
.sumrow { display: grid; grid-template-columns: 1fr 1fr 1fr 1.6fr; gap: 16px; }
.sum { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--surface); border-radius: var(--r); box-shadow: var(--sh-1); border: 1px solid rgba(20, 32, 27, .05); color: var(--ink); }
.sum-l { font-weight: 600; font-size: 14.5px; } .sum-s { font-size: 12.5px; color: var(--muted); }
.sum-big { font-size: 34px; font-weight: 600; min-width: 64px; text-align: center; } .sum-big small { font-size: 16px; color: var(--muted); }
.sum-next { background: linear-gradient(120deg, #13241C, #1F6F4A); color: #fff; border: 0; transition: transform .2s var(--ease), box-shadow .2s; }
.sum-next:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.sum-next > div:nth-child(2) { flex: 1; }
.sum-next .sum-s { color: rgba(255, 255, 255, .66); }
.sum-next-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(125, 219, 163, .16); color: var(--mint); flex: none; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.imap { display: grid; grid-template-columns: 1fr 28px 1.06fr 28px 1fr; align-items: stretch; gap: 8px; }
.flow { display: grid; place-items: center; color: var(--line-strong); position: relative; }
.flow span { position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px dashed var(--line); }
.flow .ico { position: relative; background: var(--ground); padding: 2px 0; }
.zone { background: rgba(255, 255, 255, .55); border: 1px solid var(--line-soft); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.zone-in { background: var(--surface); border: 1.5px dashed #9FB5A8; box-shadow: var(--sh-1); }
.zone-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 2px 4px; }
.zone-head h4 { font-size: 15px; } .zone-head span { font-size: 12px; color: var(--muted); }
.zgroup-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-weight: 600; padding: 0 4px 8px; }
.zgroup-head em { font-style: normal; }
.nodes { display: flex; flex-direction: column; gap: 8px; }
.node { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .2s, border-color .2s; min-height: 68px; }
.node:hover { transform: translateY(-2px); box-shadow: var(--sh-1); border-color: var(--line-strong); }
.node.sel { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), var(--sh-1); }
.node-na { background: repeating-linear-gradient(135deg, #FAFBF8 0 8px, #F3F5F1 8px 16px); }
.node-na .node-name { color: var(--muted); }
.node-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.node-top { display: flex; align-items: center; gap: 6px; }
.node-code { font-size: 12px; font-weight: 600; color: var(--muted); }
.node-name { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.node-foot { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.node-t { margin-left: auto; color: var(--ink-2); font-weight: 500; }

/* drawer */
.overlay { position: fixed; inset: 0; background: rgba(15, 26, 21, .38); backdrop-filter: blur(3px); z-index: 80; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.overlay-drawer { place-items: stretch end; padding: 0; grid-template-rows: minmax(0, 1fr); } /* แถว grid ต้องไม่ยืดตามเนื้อหา ไม่งั้น drawer สูงเกินจอและเลื่อนในตัวไม่ได้ */
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.drawer { height: 100%; min-height: 0; max-height: 100dvh; background: var(--surface); box-shadow: -20px 0 60px -20px rgba(0, 0, 0, .35); display: flex; flex-direction: column; animation: slide .3s var(--ease); }
.dr-head { display: flex; gap: 14px; padding: 22px 22px 18px; border-bottom: 1px solid var(--line-soft); background: linear-gradient(180deg, color-mix(in srgb, var(--cat) 6%, white), white); }
.dr-icon, .pick-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--cat) 12%, white); color: var(--cat); border: 1px solid color-mix(in srgb, var(--cat) 20%, white); }
.dr-title { flex: 1; min-width: 0; }
.dr-eyebrow { font-size: 12px; color: var(--muted); }
.dr-title h3 { font-size: 20px; margin: 2px 0 8px; }
.dr-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.dr-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 22px; display: flex; flex-direction: column; gap: 20px; }
.dr-body h5 { font-size: 12px; letter-spacing: .05em; color: var(--muted); font-weight: 600; margin-bottom: 8px; text-transform: uppercase; }
.dr-body p { margin: 0; }
.dr-foot { display: flex; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line-soft); justify-content: flex-end; flex-wrap: wrap; background: var(--surface-2); }
.ticks, .docs { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ticks li { padding-left: 22px; position: relative; }
.ticks li::before { content: ''; position: absolute; left: 4px; top: 9px; width: 8px; height: 5px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.docs li { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-soft); font-size: 14px; }
.docs .ico { color: var(--green); }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--green-soft); color: #164B33; font-size: 13.5px; }
.callout .ico { margin-top: 2px; }
.callout p { margin: 4px 0 0; }
.callout-warn { background: var(--amber-soft); color: var(--amber-txt); }
.callout-muted { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-soft); }
.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.months span { font-size: 10.5px; text-align: center; padding: 6px 0; border-radius: 6px; background: var(--line-soft); color: var(--faint); }
.months span.on { background: var(--green); color: #fff; }
.sig { display: flex; flex-direction: column; gap: 10px; }
.sig-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13.5px; flex-wrap: wrap; }
.sig-result { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 14px; flex-wrap: wrap; }

/* modal */
.modal { width: 100%; background: var(--surface); border-radius: 20px; box-shadow: var(--sh-2); animation: pop .25s var(--ease); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 6px; }
.modal-head h3 { font-size: 18px; }
.modal-body { padding: 10px 22px 6px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px 20px; }
.kv { list-style: none; padding: 0; margin: 0; }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.kv li span { color: var(--muted); }

/* toast */
.toaster { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 120; align-items: center; pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: var(--sh-2); animation: pop .3s var(--ease); max-width: min(560px, calc(100vw - 32px)); }
.toast-ok .ico { color: var(--mint); } .toast-warn .ico { color: #F5B56B; } .toast-info .ico { color: #9FD3F0; }

/* tables */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl tfoot td { font-weight: 600; background: var(--surface-2); border-bottom: 0; }
.tbl.compact td, .tbl.compact th { padding: 8px 10px; }
.tbl-click tbody tr { cursor: pointer; transition: background .15s; }
.tbl-click tbody tr:hover { background: #F7FAF7; }
.row-off td { opacity: .55; }
.th-on { color: var(--green) !important; } .td-on { background: #F3F9F5; font-weight: 600; }
.sortable { cursor: pointer; user-select: none; } .sortable:hover { color: var(--ink); }
.tbl-meta { display: flex; justify-content: space-between; padding: 14px 18px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px; align-items: center; }
.filters .input { width: auto; min-width: 160px; }
.empty { padding: 48px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.empty-t { font-weight: 600; }

/* ---------------- guide ---------------- */
.pick-hero { display: flex; gap: 16px; align-items: center; }
.pick-hero h3 { font-size: 18px; } .pick-hero p { margin: 4px 0 0; }
.pick-hero-ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, #1F6F4A, #13241C); color: var(--mint); flex: none; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--sh-1); color: var(--ink); transition: transform .18s var(--ease), border-color .2s; }
.pick:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.pick-rec { border: 1.5px solid var(--green); }
.pick-na { opacity: .65; }
.pick-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pick-code { font-size: 12px; color: var(--muted); }
.pick-name { font-weight: 600; font-size: 14px; }
.wiz { display: grid; grid-template-columns: 260px minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.wiz-rail { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
.back { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; min-height: 32px; }
.wiz-sub { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--sh-1); }
.steps { list-style: none; margin: 0; padding: 6px; background: var(--surface); border-radius: 16px; box-shadow: var(--sh-1); display: flex; flex-direction: column; }
.steps li { display: flex; gap: 12px; padding: 12px 10px; border-radius: 12px; position: relative; align-items: flex-start; }
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 23px; top: 44px; bottom: -8px; width: 2px; background: var(--line-soft); }
.steps li.done:not(:last-child)::after { background: var(--green); }
.steps li.cur { background: var(--green-soft); }
.steps li > div { flex: 1; min-width: 0; }
.step-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--line-soft); color: var(--muted); font-family: var(--mono); font-size: 12.5px; font-weight: 600; flex: none; position: relative; z-index: 1; }
.steps li.done .step-dot, .steps li.cur .step-dot { background: var(--green); color: #fff; }
.step-t { font-weight: 600; font-size: 13.5px; } .step-a { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.q { display: flex; flex-direction: column; gap: 16px; animation: pop .3s var(--ease); }
.q-n { font-size: 12px; font-weight: 600; color: var(--green); letter-spacing: .05em; }
.q-t { font-size: 21px; font-weight: 600; line-height: 1.45; }
.q-foot { display: flex; justify-content: space-between; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line-soft); margin-top: 4px; padding-top: 16px; }
.opts3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.opt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; transition: border-color .2s, transform .18s var(--ease), box-shadow .2s; }
.opt:hover { border-color: var(--green); transform: translateY(-2px); }
.opt.on { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 111, 74, .12); }
.opt b { font-size: 16px; } .opt span:last-child { font-size: 12.5px; color: var(--muted); }
.opt-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); margin-bottom: 6px; }
.subform { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-soft); animation: pop .25s var(--ease); }
.routes { display: flex; flex-direction: column; gap: 10px; }
.route { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; transition: border-color .2s, transform .18s var(--ease); }
.route:hover, .route.on { border-color: var(--green); }
.route:hover { transform: translateX(3px); }
.route-main { flex: 1; display: flex; flex-direction: column; gap: 2px; } .route-main span { font-size: 13px; }
.route-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.q-chip { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px; }
.qhi { background: var(--green-soft); color: var(--green); } .qmid { background: #EEF2E3; color: #5B6A2A; } .qlo { background: var(--amber-soft); color: var(--amber-txt); }
.efline { display: flex; gap: 10px; align-items: center; font-size: 12.5px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.period-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.period-row .lbl { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.mgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.mcell { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.mcell .input { min-height: 40px; text-align: right; padding: 0 10px; }
.mgrid-note { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.evidence { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1.5px dashed var(--line-strong); background: var(--surface-2); cursor: pointer; text-align: left; color: var(--muted); transition: border-color .2s, background .2s; }
.evidence:hover { border-color: var(--green); background: #F4F9F5; }
.evidence > div { flex: 1; display: flex; flex-direction: column; min-width: 0; } .evidence b { color: var(--ink); font-size: 14px; } .evidence span { font-size: 12.5px; }
.review { display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; }
.rv { display: grid; grid-template-columns: 150px 1fr; gap: 2px 14px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.rv:last-child { border: 0; }
.rv > span { color: var(--muted); grid-row: span 2; } .rv em { font-style: normal; font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.done-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 24px; }
.done-check { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; box-shadow: 0 0 0 10px var(--green-soft); animation: pop .4s var(--ease); margin-bottom: 8px; }
.done-card h3 { font-size: 22px; }
.wiz-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.calc-card { border-radius: var(--r); padding: 18px; color: #fff; background: radial-gradient(130% 120% at 100% 0%, #2B8A5C 0%, #17402D 45%, #101D17 100%); box-shadow: var(--sh-2); }
.calc-l { font-size: 12.5px; color: rgba(255, 255, 255, .7); }
.calc-v { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 6px; }
.calc-v .mono { font-size: 38px; font-weight: 600; letter-spacing: -.03em; } .calc-v small { color: rgba(255, 255, 255, .7); }
.calc-note { font-size: 12px; color: rgba(255, 255, 255, .7); margin: 6px 0; }
.calc-gas { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.calc-gas th { color: rgba(255, 255, 255, .55); font-weight: 500; text-align: left; padding: 5px 2px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.calc-gas td { padding: 6px 2px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.calc-gas .r { text-align: right; }
.calc-gas .sep-row td { background: transparent; color: rgba(255, 255, 255, .55); }
.calc-f { margin-top: 10px; font-size: 11.5px; color: var(--mint); }
.help { background: var(--surface); border-radius: var(--r); padding: 18px; box-shadow: var(--sh-1); font-size: 13.5px; display: flex; flex-direction: column; gap: 8px; }
.help-h { display: flex; gap: 8px; align-items: center; font-weight: 600; color: var(--green); }
.help p { margin: 0; color: var(--ink-2); }
.help h6 { font-size: 12px; color: var(--muted); margin-top: 6px; }
.help ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.help details summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 6px 0; }
.help dl { margin: 0; } .help dt { font-weight: 600; margin-top: 8px; } .help dd { margin: 0; color: var(--muted); }

/* ledger drill-down */
.chain { display: flex; flex-direction: column; }
.ch-step { display: flex; gap: 14px; position: relative; padding-bottom: 16px; }
.ch-step:not(:last-of-type)::after { content: ''; position: absolute; left: 13px; top: 30px; bottom: 0; width: 2px; background: linear-gradient(var(--green), var(--green-soft)); }
.ch-n { width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-family: var(--mono); font-size: 12.5px; font-weight: 600; flex: none; }
.ch-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ch-t { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .03em; }
.ch-v { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ch-v.big { font-size: 26px; } .ch-v small { font-size: 13px; color: var(--muted); }
.ch-s { font-size: 12.5px; color: var(--muted); }
.lineage { font-size: 11px; color: var(--faint); padding: 8px 10px; background: var(--surface-2); border-radius: 8px; word-break: break-all; }
.hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.hist li { display: grid; grid-template-columns: 120px 1fr; gap: 10px; }
.editf { display: flex; flex-direction: column; gap: 12px; }

/* boundary */
.approaches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.appr, .gwpset { text-align: left; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line-soft); box-shadow: var(--sh-1); cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: border-color .2s, transform .18s var(--ease); }
.appr:hover, .gwpset:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.appr.on, .gwpset.on { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 111, 74, .1), var(--sh-1); }
.appr-top, .gwpset-h { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; position: relative; }
.on .radio { border-color: var(--green); } .on .radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--green); }
.appr p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.appr-fit { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.appr-num { margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }
.appr-num .mono { font-size: 22px; color: var(--ink); font-weight: 600; }
.cmp { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.cmp-h { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.cmp-row.on .cmp-h { font-weight: 700; color: var(--green); }
.cmp-s { font-size: 12px; color: var(--muted); margin-top: 4px; }
.facs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.fac { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; border: 1px solid var(--line-soft); background: var(--surface-2); }
.fac-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); flex: none; }
.fac-main { flex: 1; display: flex; flex-direction: column; font-size: 13px; color: var(--muted); min-width: 0; }
.fac-main b { color: var(--ink); font-size: 14.5px; }
.fac-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.fac-add { justify-content: center; border-style: dashed; cursor: pointer; color: var(--muted); font-weight: 600; min-height: 80px; }
.fac-add:hover { border-color: var(--green); color: var(--green); }

/* ef */
.gwpsets { display: grid; grid-template-columns: repeat(3, 1fr) 1.2fr; gap: 16px; }
.gwpset-v { font-size: 13px; color: var(--muted); } .gwpset-v .mono { font-size: 26px; color: var(--ink); font-weight: 600; }
.gwpset-d { font-size: 12.5px; font-family: var(--mono); color: var(--muted); }
.gwpset-d.up { color: var(--amber-txt); } .gwpset-d.down { color: var(--green); }
.gwp-note { display: flex; gap: 10px; font-size: 13px; color: var(--ink-2); padding: 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-soft); }
.ef-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.ef-stat { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line-soft); cursor: pointer; font-size: 13px; color: var(--muted); min-height: 44px; }
.ef-stat.on { border-color: var(--green); }
.ef-stat b { font-size: 16px; color: var(--ink); }

/* data */
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border-radius: 14px; border: 1.5px dashed var(--line-strong); background: var(--surface-2); text-align: center; cursor: pointer; color: var(--muted); transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--green); background: #F4F9F5; color: var(--green); }
.drop input { display: none; } .drop b { color: var(--ink); } .drop span { font-size: 12.5px; }

/* report */
.doc { display: flex; flex-direction: column; gap: 14px; }
.doc h4 { font-size: 15px; margin-top: 18px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.doc-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.doc-eyebrow { font-size: 12px; color: var(--green); font-weight: 600; letter-spacing: .04em; }
.doc-head h2 { font-size: 24px; margin: 4px 0 2px; }
.doc-meta { display: grid; grid-template-columns: repeat(3, auto); gap: 8px 28px; margin: 0; font-size: 13px; }
.doc-meta dt { color: var(--muted); font-size: 11.5px; } .doc-meta dd { margin: 0; font-weight: 600; }
.gas-tbl td:first-child { min-width: 260px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 20px; font-size: 13.5px; }
.checklist li { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.checklist li .ico { color: var(--danger); } .checklist li.ok { color: var(--ink); } .checklist li.ok .ico { color: var(--green); }

/* ---------------- responsive ---------------- */
@media (max-width: 1360px) {
  .wiz { grid-template-columns: 220px minmax(0, 1fr); } .wiz-side { grid-column: 1 / -1; position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .imap { grid-template-columns: 1fr; } .flow { height: 28px; } .flow span { left: 0; right: 0; top: 50%; bottom: auto; border-left: 0; border-top: 1px dashed var(--line); } .flow .ico { transform: rotate(90deg); }
  .kpis { grid-template-columns: repeat(2, 1fr); } .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .g-5-7, .g-7-5, .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .sumrow { grid-template-columns: 1fr 1fr; } .gwpsets { grid-template-columns: 1fr 1fr; } .approaches { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .3s var(--ease); }
  .sidebar.open { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .3); }
  .scrim { position: fixed; inset: 0; background: rgba(15, 26, 21, .4); z-index: 30; }
  .main { margin-left: 0; }
  .menu-btn { display: grid; place-items: center; position: fixed; top: 14px; left: 14px; z-index: 20; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px); cursor: pointer; }
  .hero { height: 220px; } .hero-inner { padding: 70px 16px 0; } .hero h1 { font-size: 24px; } .hero-sub { font-size: 14px; }
  .hero-bg::after { background: linear-gradient(90deg, rgba(247, 250, 247, .96), rgba(247, 250, 247, .8)), linear-gradient(0deg, var(--ground), transparent 40%); }
  .content { padding: 0 16px 40px; margin-top: -10px; }
  .wiz { grid-template-columns: minmax(0, 1fr); } .wiz-rail { position: static; } .wiz-side { grid-template-columns: 1fr; }
  .kpis, .sumrow, .gwpsets { grid-template-columns: minmax(0, 1fr); }
  .opts3 { grid-template-columns: 1fr; } .mgrid { grid-template-columns: repeat(3, 1fr); }
  .form-grid, .form-grid.g3 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; }
  .checklist { grid-template-columns: 1fr; } .doc-meta { grid-template-columns: repeat(2, auto); }
  .chips { display: none; }
  .banner { flex-wrap: wrap; } .banner-txt { flex: 1 1 200px; } .banner .btn { width: 100%; }
  .kpi-hero .kpi-value .mono { font-size: 38px; }
}
@media print {
  .sidebar, .hero, .menu-btn, .no-print, .toaster { display: none !important; }
  .main { margin: 0; height: auto; overflow: visible; } .content { margin: 0; padding: 0; }
  .card { box-shadow: none; border: 0; } body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
