/* 独立业务页 (碳足迹核算 / 碳收支时空动态) — 与主平台暗色主题一致, 页面可滚动 */
body.page, html.page { overflow: auto; height: auto; min-height: 100vh; }
.page-main { padding: calc(var(--header-h) + 18px) 20px 40px; max-width: 1400px; margin: 0 auto; }
.module-tabs a.tab { text-decoration: none; display: inline-block; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
@media (max-width: 1180px) { .grid.two { grid-template-columns: 1fr; } }
.card {
    background: rgba(10, 16, 30, .72); border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 16px; padding: 16px 18px; min-width: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
    transition: border-color .22s cubic-bezier(.2,.8,.2,1), transform .22s cubic-bezier(.2,.8,.2,1);
}
.card:hover { border-color: rgba(125, 211, 252, .32); }
.card h2 { font-size: 14px; color: #e0f2fe; margin-bottom: 10px; font-weight: 600; }
.card h3 { font-size: 12.5px; color: #94a3b8; margin: 12px 0 6px; font-weight: 600; }
.muted { color: #64748b; font-size: 11.5px; line-height: 1.55; }
.kpi .v { font-size: 22px; font-weight: 700; color: #7dd3fc; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 11.5px; color: #94a3b8; margin-top: 2px; }
.kpi .s { font-size: 10.5px; color: #64748b; margin-top: 4px; }
.tier { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 4px; margin-left: 6px;
        border: 1px solid currentColor; vertical-align: middle; }
.tier.OFFICIAL, .tier.OFFICIAL-FACTORS { color: #4ade80; }
.tier.ESTIMATED { color: #fbbf24; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 6px 8px; border-bottom: 1px solid rgba(148, 163, 184, .12); text-align: left; }
.tbl th { color: #94a3b8; font-weight: 600; background: rgba(30, 41, 59, .5); position: sticky; top: 0; }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl tr { transition: background .15s linear; }
.tbl tbody tr:hover td { background: rgba(56, 189, 248, .08); }
.tbl-wrap { max-height: 360px; overflow: auto; }
.inp, .sel {
    background: rgba(8, 12, 22, .9); color: #e2e8f0; border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 10px; padding: 7px 10px; font-size: 12.5px; width: 100%;
}
.row-actions .inp, .row-actions .sel { width: auto; min-width: 128px; }
.inp:focus, .sel:focus { outline: 2px solid rgba(56, 189, 248, .5); outline-offset: 1px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.btn-primary {
    background: linear-gradient(180deg, #0ea5e9, #0284c7); border: 1px solid rgba(186,230,253,.35); color: #fff; border-radius: 999px;
    padding: 7px 16px; font-size: 12.5px; cursor: pointer;
}
.btn-primary { transition: filter .2s, transform .2s cubic-bezier(.2,.8,.2,1); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: scale(.97); }
.seg button { transition: background .2s, color .2s; }
.btn-danger { background: transparent; border: 1px solid rgba(248, 113, 113, .4); color: #fca5a5;
              border-radius: 6px; padding: 3px 8px; font-size: 11.5px; cursor: pointer; }
.formula { font-family: Consolas, 'Courier New', monospace; font-size: 11.5px; color: #cbd5e1;
           background: rgba(30, 41, 59, .6); padding: 8px 10px; border-radius: 6px; line-height: 1.7; white-space: pre-wrap; }
.err { color: #fca5a5; font-size: 12px; margin-top: 6px; min-height: 16px; }
#dynMap { height: 460px; border-radius: 10px; }
.chart-box { position: relative; height: 280px; }
.legend-bar { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #94a3b8; margin-top: 6px; }
.legend-bar .ramp { flex: 1; height: 8px; border-radius: 4px; }
.seg { display: inline-flex; border: 1px solid rgba(148, 163, 184, .28); border-radius: 999px; overflow: hidden; }
.seg button { background: transparent; border: 0; color: #94a3b8; padding: 6px 12px; font-size: 12px; cursor: pointer; }
.seg button.on { background: rgba(14, 165, 233, .2); color: #e0f2fe; }
