:root {
  --brand: #00554b;
  --brand-strong: #003f38;
  --brand-soft: #e8f3f0;
  --interactive: #087c6c;
  --green: #009b4c;
  --cyan: #16a58c;
  --blue: #277bc0;
  --orange: #e67e16;
  --red: #d94848;
  --purple: #7162a1;
  --ink: #24312e;
  --ink-soft: #4f615d;
  --muted: #667873;
  --line: #dce5e2;
  --line-strong: #c4d1cd;
  --canvas: #f2f6f5;
  --surface: #ffffff;
  --surface-soft: #f7faf9;
  --focus: rgba(0, 85, 75, 0.24);
  --text-caption: 0.75rem;
  --text-secondary: 0.8125rem;
  --text-compact: 0.875rem;
  --text-body: 0.9375rem;
  --text-ui: 1rem;
  --text-label: 1.0625rem;
  --text-subheading: 1.125rem;
  --text-title: 1.25rem;
  --text-page-mobile: 1.5rem;
  --text-page-title: 1.75rem;
  --text-dialog-title: 1.875rem;
  --text-metric-large: 2rem;
  --text-metric-xlarge: 2.125rem;
  --sidebar-width: 236px;
  --sidebar-collapsed-width: 76px;
  --header-height: 72px;
  --z-sidebar: 30;
  --z-backdrop: 25;
  --z-assistant: 50;
  --z-dialog: 60;
  --z-toast: 70;
}

* { box-sizing: border-box; }

html { background: var(--canvas); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-kerning: normal;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.primary-button, .secondary-button, .text-button, .icon-button {
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease, opacity 160ms ease;
}
.primary-button {
  min-height: 44px;
  padding: 0 18px;
  color: #fff;
  background: var(--brand);
  border-radius: 8px;
  font-weight: 700;
}
.primary-button:hover { background: #006b5f; }
.primary-button:active, .secondary-button:active, .icon-button:active { transform: translateY(1px); }
.primary-button:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: .5; }
.secondary-button { min-height: 44px; padding: 0 18px; background: #eef3f1; border-radius: 8px; font-weight: 700; }
.secondary-button:hover { background: #e2ebe8; }
.text-button { display: inline-flex; gap: 4px; align-items: center; padding: 6px 0; color: var(--brand); background: transparent; font-size: var(--text-ui); font-weight: 700; }
.text-button .icon { width: 15px; height: 15px; }
.icon-button { display: grid; width: 40px; height: 40px; padding: 0; place-items: center; background: var(--surface-soft); border-radius: 8px; }
.icon-button:hover { background: var(--brand-soft); color: var(--brand); }
.icon-button .icon { width: 19px; height: 19px; }

/* Login */
.auth-pending, .auth-locked { overflow: hidden; }
.login-screen {
  position: relative;
  min-height: 100svh;
  overflow: auto;
  color: #edf8f5;
  background:
    radial-gradient(circle at 18% 16%, rgba(31, 199, 165, .18), transparent 34%),
    radial-gradient(circle at 88% 84%, rgba(240, 133, 25, .13), transparent 28%),
    #00483f;
}
.login-screen::after {
  position: fixed;
  right: -220px;
  bottom: -340px;
  width: 720px;
  height: 720px;
  border: 1px solid rgba(191, 241, 229, .13);
  border-radius: 50%;
  box-shadow: inset 0 0 0 110px rgba(0, 29, 25, .06), inset 0 0 0 220px rgba(0, 29, 25, .05);
  content: "";
  pointer-events: none;
}
.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: clamp(56px, 8vw, 124px);
  width: min(1160px, calc(100% - 64px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 50px 0;
  align-items: center;
}
.login-logo { display: grid; width: 276px; min-height: 82px; margin-bottom: clamp(44px, 7vh, 76px); padding: 10px 14px; place-items: center; background: #fff; border-radius: 10px; }
.login-logo img { display: block; width: 100%; height: auto; }
.login-station-code { margin-bottom: 18px; color: #94ccc0; font-family: "Segoe UI", system-ui, sans-serif; font-size: var(--text-body); font-weight: 700; letter-spacing: .12em; }
.login-story h1 { margin-bottom: 22px; color: #fff; font-size: clamp(42px, 4.4vw, 64px); font-weight: 760; line-height: 1.16; letter-spacing: -.035em; }
.login-story h1 em { color: #ffad5d; font-style: normal; }
.login-description { max-width: 650px; margin-bottom: 30px; color: #bddbd5; font-size: var(--text-subheading); line-height: 1.9; }
.login-flow { display: flex; max-width: 650px; padding: 17px 0; align-items: center; border-top: 1px solid rgba(255,255,255,.13); border-bottom: 1px solid rgba(255,255,255,.13); }
.login-flow span { color: #e2f3ef; font-size: var(--text-ui); white-space: nowrap; }
.login-flow i { position: relative; flex: 1 1 28px; min-width: 18px; height: 1px; margin: 0 11px; overflow: visible; background: rgba(158, 218, 205, .28); }
.login-flow i::after { position: absolute; top: -2px; right: 0; width: 5px; height: 5px; background: #31d2ad; border-radius: 50%; content: ""; animation: flow-pulse 2.8s ease-in-out infinite; }
@keyframes flow-pulse { 0%, 100% { transform: translateX(-30px); opacity: 0; } 50% { opacity: 1; } 80% { transform: translateX(0); opacity: 0; } }
.login-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 650px; margin: 26px 0 0; }
.login-facts div { padding-right: 18px; }
.login-facts div + div { padding-left: 18px; border-left: 1px solid rgba(255,255,255,.13); }
.login-facts dt { margin-bottom: 7px; color: #82b7ac; font-size: var(--text-compact); }
.login-facts dd { margin: 0; color: #f2faf8; font-size: var(--text-label); font-weight: 700; }
.login-panel { padding: 32px 34px 24px; color: var(--ink); background: #fff; border-radius: 14px; box-shadow: 0 28px 60px rgba(0, 32, 27, .3); }
.login-panel-head { display: flex; gap: 8px; margin-bottom: 26px; align-items: center; color: #4d746b; font-size: var(--text-body); }
.service-dot { width: 8px; height: 8px; background: #22a76f; border-radius: 50%; box-shadow: 0 0 0 5px rgba(34,167,111,.1); }
.login-panel h2 { margin-bottom: 8px; font-size: var(--text-dialog-title); letter-spacing: -.025em; }
.login-panel > p { margin-bottom: 22px; color: var(--muted); font-size: var(--text-ui); }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 23px; padding: 5px; background: #edf3f1; border-radius: 10px; }
.role-button { display: flex; gap: 9px; min-width: 0; padding: 11px 10px; align-items: center; color: #60716d; text-align: left; background: transparent; border: 0; border-radius: 7px; cursor: pointer; }
.role-button:hover { color: var(--brand); }
.role-button.is-active { color: var(--brand); background: #fff; box-shadow: 0 2px 5px rgba(36,49,46,.08); }
.role-button:disabled { cursor: not-allowed; opacity: .6; }
.role-button .icon { flex: 0 0 auto; width: 20px; height: 20px; }
.role-button span { min-width: 0; }
.role-button strong, .role-button small { display: block; }
.role-button strong { margin-bottom: 3px; font-size: var(--text-ui); }
.role-button small { overflow: hidden; font-size: var(--text-secondary); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.login-form { display: grid; gap: 15px; }
.login-credentials { display: grid; gap: 15px; }
.login-form label > span { display: block; margin-bottom: 7px; color: var(--ink-soft); font-size: var(--text-body); font-weight: 700; }
.login-form label > div { display: flex; height: 44px; padding: 0 12px; align-items: center; background: #f8faf9; border: 1px solid var(--line); border-radius: 8px; transition: border-color 160ms ease, box-shadow 160ms ease; }
.login-form label > div:focus-within { border-color: var(--interactive); box-shadow: 0 0 0 3px var(--focus); }
.login-form label .icon { flex: 0 0 auto; width: 17px; height: 17px; color: #71837e; }
.login-form input { width: 100%; min-width: 0; height: 100%; padding: 0 9px; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: var(--text-label); }
.login-form input::placeholder { color: #76847f; }
.login-form label button { display: grid; flex: 0 0 auto; width: 30px; height: 30px; padding: 0; place-items: center; color: #667873; background: transparent; border: 0; cursor: pointer; }
.login-feedback { margin: -4px 0 0; padding: 9px 11px; color: #a22f2f; background: #fff0ed; border-radius: 7px; font-size: var(--text-body); }
.login-submit { display: flex; width: 100%; margin-top: 2px; justify-content: space-between; align-items: center; }
.login-submit .icon { width: 17px; height: 17px; }
.login-safety { display: flex; gap: 9px; margin-top: 19px; padding: 12px; align-items: flex-start; color: #566864; background: #f3f7f6; border-radius: 8px; font-size: var(--text-compact); line-height: 1.6; }
.login-safety .icon { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; color: var(--brand); }
.login-panel footer { display: flex; margin-top: 20px; justify-content: space-between; color: #7d8c88; font-size: var(--text-secondary); }
.login-panel footer b { color: var(--brand); }

/* App shell */
.app-shell { min-height: 100svh; }
.sidebar {
  position: fixed;
  z-index: var(--z-sidebar);
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  padding: 20px 14px 14px;
  flex-direction: column;
  overflow-y: auto;
  color: #e9f5f2;
  background: var(--brand-strong);
  transition: width 200ms cubic-bezier(.22,1,.36,1), padding 200ms cubic-bezier(.22,1,.36,1), transform 220ms cubic-bezier(.22,1,.36,1);
}
.brand { display: block; min-height: 164px; padding: 0 2px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-logo { display: grid; width: 100%; height: 80px; padding: 8px 12px; place-items: center; background: #fff; border-radius: 10px; }
.brand-logo img { display: block; width: 100%; max-height: 64px; object-fit: contain; }
.brand > div:last-child { min-width: 0; margin-top: 12px; padding: 0 2px; }
.brand strong, .brand span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand strong { margin-bottom: 4px; color: #fff; font-size: var(--text-subheading); }
.brand span { color: #91bdb4; font-size: var(--text-secondary); }
.sidebar-collapse {
  display: flex; gap: 8px; width: 100%; min-height: 36px; margin-top: 10px; padding: 0 11px; justify-content: flex-end;
  align-items: center; color: #a9cec6; background: rgba(255,255,255,.055); border: 0; border-radius: 7px;
  cursor: pointer; font-size: var(--text-secondary); font-weight: 700; transition: color 160ms ease, background-color 160ms ease;
}
.sidebar-collapse:hover { color: #fff; background: rgba(255,255,255,.1); }
.sidebar-collapse .icon { width: 16px; height: 16px; transform: rotate(180deg); transition: transform 200ms cubic-bezier(.22,1,.36,1); }
.nav-list { display: grid; gap: 5px; margin-top: 20px; }
.nav-item { position: relative; display: flex; gap: 12px; width: 100%; min-height: 44px; padding: 0 13px; align-items: center; color: #afd0c9; text-align: left; background: transparent; border: 0; border-radius: 8px; cursor: pointer; transition: color 160ms ease, background-color 160ms ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.is-active { color: #fff; background: #087063; }
.nav-item .icon { flex: 0 0 auto; width: 19px; height: 19px; }
.nav-item span { font-size: var(--text-ui); font-weight: 700; }
.nav-item b { margin-left: auto; min-width: 24px; padding: 2px 6px; color: #ffd7b0; background: rgba(230,126,22,.18); border-radius: 999px; font-size: var(--text-secondary); text-align: center; }
.session { display: flex; gap: 9px; min-height: 62px; margin-top: auto; padding: 11px 8px; align-items: center; border-top: 1px solid rgba(255,255,255,.08); }
.session-avatar { display: grid; flex: 0 0 32px; height: 32px; place-items: center; color: #00483f; background: #b6e8dd; border-radius: 8px; font-size: var(--text-ui); font-weight: 800; }
.session > div { min-width: 0; }
.session strong, .session small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session strong { margin-bottom: 3px; color: #fff; font-size: var(--text-body); }
.session small { color: #8fb8af; font-size: var(--text-caption); }
.session button { display: grid; flex: 0 0 32px; height: 32px; margin-left: auto; padding: 0; place-items: center; color: #9cc3ba; background: transparent; border: 0; border-radius: 7px; cursor: pointer; }
.session button:hover { color: #fff; background: rgba(255,255,255,.08); }
.session .icon { width: 17px; height: 17px; }
.workspace { min-height: 100svh; margin-left: var(--sidebar-width); transition: margin-left 200ms cubic-bezier(.22,1,.36,1); }
.workspace-header {
  position: sticky; z-index: 20; top: 0; display: flex; height: var(--header-height); padding: 0 28px;
  justify-content: space-between; align-items: center; color: #fff; background: var(--brand);
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.station-heading {
  position: absolute; left: 50%; display: flex; gap: 10px; width: min(540px, calc(100% - 740px));
  justify-content: center; align-items: center; transform: translateX(-50%); text-align: center; pointer-events: none;
}
.header-brand-logo {
  display: block; flex: 0 0 auto; width: 96px; height: 36px; padding: 4px 6px; object-fit: contain;
  background: #fff; border-radius: 7px;
}
.station-heading > strong {
  display: block; overflow: hidden; color: #fff; font-size: 1.25rem; font-weight: 760; line-height: 1.2;
  letter-spacing: .005em; text-overflow: ellipsis; white-space: nowrap;
}
.header-actions { display: flex; gap: 10px; margin-left: auto; align-items: center; }
.header-info-card { display: flex; gap: 7px; min-height: 40px; padding: 0 11px; align-items: center; color: #f4fffc; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 8px; white-space: nowrap; }
.header-info-card .icon { flex: 0 0 auto; width: 17px; height: 17px; stroke-width: 1.8; }
.header-info-card > span { color: #d0e9e3; font-size: var(--text-secondary); }
.header-info-card strong { font-family: "Segoe UI", "Microsoft YaHei UI", system-ui, sans-serif; font-size: var(--text-body); font-variant-numeric: tabular-nums; }
.header-weather.is-stale { color: #ffe4b2; border-color: rgba(255,211,139,.3); }
.header-latest i { flex: 0 0 auto; width: 8px; height: 8px; background: #42c98a; border-radius: 50%; box-shadow: 0 0 0 4px rgba(66,201,138,.12); }
.header-updated-value { display: flex; gap: 5px; }
.status-chip { display: inline-flex; gap: 7px; min-height: 28px; padding: 0 10px; align-items: center; color: #18734f; background: #e8f7ef; border-radius: 999px; font-size: var(--text-compact); font-weight: 800; }
.status-chip::before { width: 6px; height: 6px; background: currentColor; border-radius: 50%; content: ""; }
.status-chip.is-warning { color: #a5570d; background: #fff2e4; }
.status-chip.is-stopped { color: #52625e; background: #e8eeec; }
.status-chip.is-alarm { color: #b63636; background: #fff0ee; }
.status-chip.is-offline { color: #5f6d69; background: #edf1f0; }
.workspace-header .status-chip { color: #e8fff8; background: rgba(255,255,255,.13); }
.workspace-header .status-chip { min-height: 26px; padding-inline: 8px; font-size: var(--text-caption); }
.workspace-header .status-chip.is-warning { color: #ffe1a8; background: rgba(151,83,8,.35); }
.workspace-header .status-chip.is-alarm { color: #ffd2cd; background: rgba(143,37,37,.42); }
.workspace-header .status-chip.is-offline { color: #d6e2df; background: rgba(25,50,45,.4); }
.workspace-header .icon-button { color: #fff; background: rgba(255,255,255,.1); }
.workspace-header .icon-button:hover { color: #fff; background: rgba(255,255,255,.18); }
.mobile-menu { display: none; }

@media (min-width: 1101px) {
  body.sidebar-collapsed .sidebar { width: var(--sidebar-collapsed-width); padding-inline: 10px; }
  body.sidebar-collapsed .workspace { margin-left: var(--sidebar-collapsed-width); }
  body.sidebar-collapsed .brand { min-height: 70px; padding: 0 0 12px; }
  body.sidebar-collapsed .brand-logo { width: 52px; height: 52px; margin: 0 auto; padding: 5px; }
  body.sidebar-collapsed .brand > div:last-child,
  body.sidebar-collapsed .sidebar-collapse span,
  body.sidebar-collapsed .nav-item span,
  body.sidebar-collapsed .nav-item b,
  body.sidebar-collapsed .session > div { display: none; }
  body.sidebar-collapsed .sidebar-collapse { padding: 0; justify-content: center; }
  body.sidebar-collapsed .sidebar-collapse .icon { transform: rotate(0); }
  body.sidebar-collapsed .nav-list { margin-top: 12px; }
  body.sidebar-collapsed .nav-item { padding: 0; justify-content: center; }
  body.sidebar-collapsed .session { padding-inline: 0; flex-direction: column; }
  body.sidebar-collapsed .session button { margin-left: 0; }
}

.page { display: none; padding: 28px; }
.page.is-active { display: block; animation: page-enter 220ms cubic-bezier(.22,1,.36,1); }
@keyframes page-enter { from { opacity: .55; transform: translateY(5px); } }
.page-title { display: flex; gap: 24px; margin-bottom: 24px; justify-content: space-between; align-items: flex-end; }
.page-title-heading { display: flex; gap: 14px; min-width: 0; align-items: center; }
.page-title-heading > div { min-width: 0; }
.page-title-icon { display: block; flex: 0 0 58px; width: 58px; height: 58px; object-fit: contain; }
.page-title p { margin-bottom: 6px; color: var(--interactive); font-size: var(--text-compact); font-weight: 800; }
.page-title h1 { margin-bottom: 7px; font-size: var(--text-page-title); letter-spacing: -.025em; }
.page-title-heading > div > span { color: var(--muted); font-size: var(--text-body); line-height: 1.7; }
/* Overview */
.kpi-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.kpi-strip article { display: flex; gap: 11px; min-width: 0; padding: 13px 14px; align-items: center; }
.kpi-strip article + article { border-left: 1px solid var(--line); }
.kpi-strip article > div { min-width: 0; min-height: 56px; }
.kpi-icon { flex: 0 0 56px; width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.kpi-strip span { display: block; margin-bottom: 5px; color: var(--muted); font-size: var(--text-secondary); line-height: 1.35; }
.kpi-strip strong { color: #183c35; font-family: "Segoe UI", system-ui, sans-serif; font-size: clamp(22px, 2vw, 30px); font-variant-numeric: tabular-nums; letter-spacing: -.025em; line-height: 1.15; }
.kpi-strip small { margin-left: 5px; color: #70817d; font-size: var(--text-secondary); }
.kpi-strip article.is-unavailable strong { color: #60736e; }
.weather-panel { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr); margin-bottom: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.weather-current { padding: 17px 19px 16px; background: #edf6f3; border-right: 1px solid var(--line); }
.weather-heading, .weather-forecast-head { display: flex; gap: 18px; justify-content: space-between; align-items: center; }
.weather-heading span, .weather-forecast-head span { display: block; margin-bottom: 4px; color: var(--interactive); font-size: var(--text-caption); font-weight: 800; }
.weather-heading h2, .weather-forecast-head h2 { margin: 0; font-size: var(--text-label); }
.weather-live { display: inline-flex !important; gap: 6px; margin: 0 !important; align-items: center; color: #247052 !important; white-space: nowrap; }
.weather-live i { width: 7px; height: 7px; background: #19a86e; border-radius: 50%; box-shadow: 0 0 0 4px rgba(25,168,110,.1); }
.weather-live b { font-size: var(--text-caption); font-weight: 800; }
.weather-panel.is-stale .weather-live, .weather-panel.is-error .weather-live { color: #9a570f !important; }
.weather-panel.is-stale .weather-live i, .weather-panel.is-error .weather-live i { background: var(--orange); box-shadow: 0 0 0 4px rgba(230,126,22,.1); }
.weather-now { display: flex; gap: 12px; margin-top: 12px; align-items: center; }
.weather-symbol { display: grid; flex: 0 0 46px; height: 46px; place-items: center; color: var(--brand); background: #fff; border-radius: 10px; }
.weather-symbol .icon { width: 26px; height: 26px; stroke-width: 1.6; }
.weather-temperature { display: flex; align-items: flex-start; font-family: "Segoe UI", system-ui, sans-serif; }
.weather-temperature strong { color: #153d35; font-size: 2.375rem; line-height: 1; letter-spacing: -.035em; }
.weather-temperature span { margin: 2px 0 0 2px; color: var(--muted); font-size: var(--text-compact); }
.weather-condition { min-width: 0; }
.weather-condition strong, .weather-condition small { display: block; }
.weather-condition strong { margin-bottom: 4px; font-size: var(--text-body); }
.weather-condition small { color: var(--muted); font-size: var(--text-caption); white-space: nowrap; }
.weather-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #d5e5e0; }
.weather-facts div + div { padding-left: 11px; border-left: 1px solid #d5e5e0; }
.weather-facts dt { margin-bottom: 4px; color: var(--muted); font-size: var(--text-caption); }
.weather-facts dd { margin: 0; overflow: hidden; font-size: var(--text-secondary); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.weather-forecast { min-width: 0; padding: 17px 18px 12px; }
.weather-forecast-head { margin-bottom: 10px; }
.weather-forecast-head small { color: var(--muted); font-size: var(--text-caption); }
.weather-days { display: grid; grid-template-columns: repeat(5, minmax(90px, 1fr)); }
.weather-day { min-width: 0; padding: 8px 13px 5px; border-left: 1px solid var(--line); text-align: center; }
.weather-day:first-child { border-left: 0; }
.weather-day > div { display: flex; gap: 5px; justify-content: center; align-items: baseline; }
.weather-day > div strong { font-size: var(--text-secondary); }
.weather-day > div span { color: var(--muted); font-size: var(--text-caption); }
.weather-day > .icon { width: 22px; height: 22px; margin: 8px 0 5px; color: var(--interactive); stroke-width: 1.6; }
.weather-day p { margin: 0 0 5px; color: var(--ink-soft); font-size: var(--text-caption); }
.weather-day b { display: block; font-family: "Segoe UI", system-ui, sans-serif; font-size: var(--text-body); font-style: normal; }
.weather-day b small { color: var(--muted); font-size: var(--text-secondary); font-weight: 600; }
.weather-day em { display: block; margin-top: 5px; color: #39755f; font-size: var(--text-caption); font-style: normal; }
.weather-day.is-loading { min-height: 104px; margin: 5px 10px; background: #edf3f1; border: 0; border-radius: 7px; }
.weather-empty { display: grid; grid-column: 1 / -1; min-height: 104px; place-items: center; color: var(--muted); font-size: var(--text-secondary); }
.overview-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; width: 100%; min-width: 0; margin-bottom: 18px; }
.twin-panel, .circuit-panel, .geothermal-module, .device-rail, .trend-panel, .analysis-chart, .pending-panel, .point-table-panel, .control-zone, .service-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.panel-head { display: flex; gap: 20px; padding: 19px 20px 16px; justify-content: space-between; align-items: flex-start; }
.panel-head.compact { padding: 17px 18px 14px; align-items: center; }
.panel-title-with-icon, .weather-title-with-icon, .service-title-with-icon, .control-title-with-icon { display: flex; gap: 12px; min-width: 0; align-items: center; }
.panel-title-with-icon > div, .weather-title-with-icon > div, .service-title-with-icon > div, .control-title-with-icon > div { min-width: 0; }
.module-kpi-icon { display: block; flex: 0 0 48px; width: 48px; height: 48px; object-fit: contain; }
.panel-index { display: block; margin-bottom: 5px; color: var(--interactive); font-size: var(--text-secondary); font-weight: 800; }
.panel-head h2, .control-zone-head h2 { margin-bottom: 4px; font-size: var(--text-subheading); }
.panel-head .twin-panel-title { display: flex; gap: 10px; margin: 0; align-items: center; white-space: nowrap; }
.twin-panel-title img { display: block; flex: 0 0 34px; width: 34px; height: 34px; object-fit: cover; border-radius: 6px; }
.panel-head p, .control-zone-head p { margin-bottom: 0; color: var(--muted); font-size: var(--text-secondary); line-height: 1.6; }
.twin-toolbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.segmented-control { display: flex; flex: 0 0 auto; gap: 3px; padding: 3px; background: #edf3f1; border-radius: 8px; }
.segmented-control button { min-height: 30px; padding: 0 11px; color: #63736f; background: transparent; border: 0; border-radius: 6px; cursor: pointer; font-size: var(--text-secondary); font-weight: 700; }
.segmented-control button.is-active { color: var(--brand); background: #fff; box-shadow: 0 1px 3px rgba(36,49,46,.1); }
.twin-display-control { background: #dcebe7; }
.twin-display-control button { min-width: 54px; }
.twin-display-control button.is-active { color: #fff; background: var(--brand); box-shadow: none; }
.twin-toolbar [hidden] { display: none !important; }
.twin-panel { position: relative; grid-column: 1 / -1; width: 100%; min-width: 0; max-width: 100%; overflow: hidden; }
changfeng-twin-3d, changfeng-twin-2d { display: block; width: 100%; max-width: 100%; height: clamp(460px, 46vw, 580px); overflow: hidden; border-top: 1px solid #14352f; border-bottom: 1px solid #14352f; }
changfeng-twin-3d[hidden], changfeng-twin-2d[hidden] { display: none; }
.device-twin-workspace { margin-bottom: 18px; }
.overview-only-twin { border-top: 0; }
.ground-temp-detail {
  padding: 18px;
  color: #e8f7f2;
  background: #0a2c26;
  border-bottom: 1px solid #173f37;
}
.ground-temp-detail[hidden] { display: none; }
.ground-temp-detail-head { display: flex; gap: 18px; justify-content: space-between; align-items: flex-start; }
.ground-temp-detail-head h3 { margin: 7px 0 4px; color: #fff; font-size: var(--text-label); }
.ground-temp-detail-head p { margin: 0; color: #a9cec4; font-size: var(--text-secondary); }
.simulation-badge {
  display: inline-flex; padding: 3px 7px; color: #ffe0a3; background: rgba(240,163,74,.13);
  border: 1px solid rgba(240,163,74,.46); border-radius: 5px; font-size: var(--text-caption); font-weight: 800;
}
.ground-temp-close {
  min-height: 34px; padding: 0 12px; color: #cce6df; background: transparent; border: 1px solid #41665e;
  border-radius: 7px; cursor: pointer; font-size: var(--text-secondary); font-weight: 700;
}
.ground-temp-close:hover { color: #fff; border-color: #80aa9f; }
.ground-temp-detail-body { display: grid; grid-template-columns: minmax(300px, .92fr) minmax(340px, 1.08fr); gap: 20px; margin-top: 16px; }
.ground-temp-profile {
  min-height: 245px; padding: 12px; background: rgba(4,27,23,.58); border: 1px solid #224d44; border-radius: 9px;
}
.ground-temp-profile svg { display: block; width: 100%; height: 245px; overflow: visible; }
.ground-temp-profile text { font-family: "Microsoft YaHei", sans-serif; }
.ground-temp-values { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; align-content: stretch; }
.ground-temp-value {
  display: grid; min-width: 0; padding: 12px 9px; align-content: center; background: rgba(255,255,255,.055);
  border: 1px solid #2c544c; border-radius: 8px; text-align: center;
}
.ground-temp-value.is-selected { background: rgba(240,163,74,.13); border-color: #d9953d; box-shadow: inset 0 3px 0 #f0a34a; }
.ground-temp-value small { color: #a8cbc2; font-size: var(--text-caption); }
.ground-temp-value strong { margin: 8px 0 4px; color: #fff; font-family: "Segoe UI", system-ui, sans-serif; font-size: 22px; font-variant-numeric: tabular-nums; }
.ground-temp-value span { color: #f4bd63; font-size: var(--text-caption); }
.twin-legend { display: flex; gap: 18px; padding: 11px 18px; justify-content: flex-end; color: var(--muted); background: #f7faf9; font-size: var(--text-secondary); }
.twin-legend span { display: inline-flex; gap: 6px; align-items: center; }
.twin-legend i { width: 7px; height: 7px; border-radius: 50%; }
.twin-legend .running { background: #16c98d; }
.twin-legend .standby { background: #f0a34a; }
.twin-legend .alarm { background: #ef5b5b; }
.twin-legend .offline { background: #667a75; }
.circuit-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; min-width: 0; padding-bottom: 15px; }
.circuit-panel > .panel-head, .gateway-summary { grid-column: 1 / -1; }
.circuit { margin: 0 15px 13px; padding: 15px; background: var(--surface-soft); border-radius: 9px; }
.source-circuit { box-shadow: inset 0 3px 0 #33a891; }
.load-circuit { box-shadow: inset 0 3px 0 #3d83be; }
.circuit-title { display: flex; margin-bottom: 16px; justify-content: space-between; align-items: center; }
.circuit-title span { color: var(--ink); font-size: var(--text-body); font-weight: 800; }
.circuit-title strong { color: var(--muted); font-size: var(--text-caption); font-weight: 600; }
.temperature-flow { display: grid; grid-template-columns: 1fr 55px 1fr; align-items: center; }
.temperature-flow > div { text-align: center; }
.temperature-flow small { display: block; margin-bottom: 5px; color: var(--muted); font-size: var(--text-caption); }
.temperature-flow strong { font-family: "Segoe UI", system-ui, sans-serif; font-size: var(--text-dialog-title); font-variant-numeric: tabular-nums; }
.temperature-flow span { margin-left: 2px; color: #71827e; font-size: var(--text-caption); }
.temperature-flow > i { position: relative; height: 2px; background: #b8d9d1; }
.load-circuit .temperature-flow > i { background: #c0d7e9; }
.temperature-flow > i::after { position: absolute; top: -3px; right: -1px; width: 6px; height: 8px; background: #3fa990; clip-path: polygon(0 0, 100% 50%, 0 100%); content: ""; }
.load-circuit .temperature-flow > i::after { background: #4388c0; }
.temperature-flow b { position: absolute; top: -2px; left: 0; width: 6px; height: 6px; background: #3fa990; border-radius: 50%; animation: circuit-flow 2.5s linear infinite; }
.load-circuit .temperature-flow b { background: #4388c0; }
@keyframes circuit-flow { from { transform: translateX(0); } to { transform: translateX(48px); } }
.circuit dl { display: grid; grid-template-columns: 1fr 1fr; margin: 15px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.circuit dl div + div { border-left: 1px solid var(--line); text-align: right; }
.circuit dt { margin-bottom: 4px; color: var(--muted); font-size: var(--text-caption); }
.circuit dd { margin: 0; font-size: var(--text-compact); font-weight: 700; }
.gateway-summary { margin: 4px 15px 0; padding: 14px 15px; color: #dff3ee; background: var(--brand); border-radius: 9px; }
.gateway-summary span, .gateway-summary strong, .gateway-summary small { display: block; }
.gateway-summary span { margin-bottom: 5px; color: #9ccfc4; font-size: var(--text-caption); }
.gateway-summary strong { margin-bottom: 5px; font-size: var(--text-compact); }
.gateway-summary small { color: #8abcb2; font-size: var(--text-caption); }
.geothermal-modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  min-width: 0;
  align-items: stretch;
}
.geothermal-module {
  display: flex;
  min-width: 0;
  min-height: 430px;
  overflow: hidden;
  align-self: stretch;
  flex-direction: column;
}
.geothermal-module-head {
  display: flex;
  gap: 18px;
  min-height: 82px;
  padding: 16px 18px;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.geothermal-module-title { display: flex; min-width: 0; gap: 12px; align-items: center; }
.geothermal-module-title h2 { margin: 0 0 4px; font-size: var(--text-subheading); }
.geothermal-module-title p { margin: 0; color: var(--muted); font-size: var(--text-secondary); }
.geothermal-module-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #08796b;
  background: #e3f3ef;
  border-radius: 9px;
}
.geothermal-module-icon .icon { width: 22px; height: 22px; }
.geothermal-module-icon img { display: block; width: 38px; height: 38px; object-fit: contain; }
.geothermal-module-icon.simulation-icon { color: #2c72a4; background: #e6f1f8; }
.simulation-head-actions { display: flex; flex: 0 0 auto; gap: 10px; align-items: center; }
.simulation-view-switch { display: flex; padding: 3px; background: #edf3f1; border-radius: 7px; }
.simulation-view-switch button {
  min-height: 32px;
  padding: 0 12px;
  color: #5b706b;
  background: transparent;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  font-size: var(--text-caption);
  font-weight: 800;
}
.simulation-view-switch button:hover { color: var(--brand); }
.simulation-view-switch button.is-active { color: #fff; background: var(--brand); }
.simulation-view-switch button:focus-visible {
  outline: 2px solid #328f7f;
  outline-offset: 2px;
}
.numerical-simulation-module .simulation-badge {
  gap: 6px;
  align-items: center;
  color: #286c91;
  background: #edf6fb;
  border-color: #b9d9e8;
  white-space: nowrap;
}
.numerical-simulation-module .simulation-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #3f91bd;
  border-radius: 50%;
}
.module-live-state {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  align-items: center;
  color: #176e58;
  background: #e8f5f0;
  border-radius: 7px;
  font-size: var(--text-caption);
}
.module-live-state i { width: 7px; height: 7px; background: #18b77f; border-radius: 50%; box-shadow: 0 0 0 4px rgba(24,183,127,.11); }
.module-live-state b { font-weight: 800; }
.fiber-monitor-content {
  display: grid;
  grid-template-columns: minmax(170px, .36fr) minmax(0, 1fr);
  gap: 18px;
  min-height: 282px;
  padding: 18px;
  flex: 1;
}
.fiber-borehole-model {
  position: relative;
  min-width: 0;
  min-height: 282px;
  margin: 0;
  overflow: hidden;
  background: #f4f1eb;
  border: 1px solid #d8d2c8;
  border-radius: 9px;
}
.fiber-borehole-model img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 282px;
  object-fit: contain;
  object-position: center;
}
.fiber-borehole-model figcaption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  z-index: 1;
  padding: 6px 8px;
  color: #f2fbf8;
  background: rgba(6, 51, 42, .88);
  border-radius: 6px;
  font-size: var(--text-caption);
  font-weight: 800;
  text-align: center;
}
.fiber-temperature-readings {
  position: relative;
  min-width: 0;
  min-height: 282px;
}
.fiber-reading {
  position: absolute;
  top: var(--fiber-depth-y, 50%);
  right: 0;
  left: 0;
  transform: translateY(-50%);
  display: grid;
  width: 100%;
  height: var(--fiber-reading-height, 50px);
  min-height: 42px;
  padding: 4px 4px 10px 14px;
  grid-template-columns: minmax(100px, 1fr) auto minmax(70px, auto);
  gap: 12px;
  align-items: center;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.fiber-reading::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 2px;
  left: 14px;
  height: 5px;
  background: #e6efec;
  border-radius: 3px;
}
.fiber-reading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 2px;
  background: #63a99a;
  border-radius: 1px;
  transform: translateY(-50%);
}
.fiber-temperature-block {
  position: absolute;
  bottom: 2px;
  left: 14px;
  z-index: 1;
  width: calc((100% - 18px) * var(--fiber-temperature-ratio, .5));
  height: 5px;
  background: var(--fiber-temperature-color, #55a99a);
  border-radius: 3px;
  pointer-events: none;
}
.fiber-reading:hover, .fiber-reading:focus-visible { background: #f1f8f5; outline: none; }
.fiber-reading > span { min-width: 0; }
.fiber-reading b, .fiber-reading small { display: block; }
.fiber-reading b { font-size: var(--text-compact); }
.fiber-reading small { color: var(--muted); font-size: var(--text-caption); }
.fiber-reading strong {
  color: #123f35;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}
.fiber-reading em { color: #5e7d75; font-size: var(--text-caption); font-style: normal; text-align: right; }
.fiber-reading-placeholder { display: grid; place-items: center; color: var(--muted); font-size: var(--text-secondary); }
.geothermal-simulation-field {
  position: relative;
  display: flex;
  min-height: 0;
  margin: 18px 18px 0;
  overflow: hidden;
  flex-direction: column;
  background: #092a25;
  border-radius: 9px;
}
.geothermal-simulation-field svg {
  display: block;
  width: 100%;
  height: 245px;
  min-height: 245px;
}
.geothermal-plane-canvas {
  display: block;
  width: 100%;
  height: var(--plane-canvas-height, 245px);
  min-height: 220px;
}
.simulation-loading {
  display: grid;
  min-height: 245px;
  padding: 24px;
  place-items: center;
  color: #a9cec4;
  font-size: var(--text-secondary);
  text-align: center;
}
.simulation-loading.is-error { color: #ffd0ca; }
.forecast-band-hot { fill: rgba(217, 72, 72, .18); }
.forecast-band-safe { fill: rgba(31, 143, 113, .08); }
.forecast-band-cold { fill: rgba(39, 123, 192, .18); }
.forecast-grid { stroke: #285148; stroke-width: 1; }
.forecast-threshold { stroke: #d9a05a; stroke-width: 1.2; stroke-dasharray: 5 5; }
.forecast-axis-label { fill: #9bc3b9; font-size: 11px; }
.forecast-line { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.forecast-line-maximum { stroke: #f2a553; }
.forecast-line-mean { stroke: #d9eee9; }
.forecast-line-minimum { stroke: #58b7e3; }
.forecast-point { stroke: #092a25; stroke-width: 1.2; }
.forecast-point-maximum { fill: #f2a553; }
.forecast-point-minimum { fill: #58b7e3; }
.forecast-risk-point { fill: #f25f5f; stroke: #ffe2dc; stroke-width: 3; }
.forecast-legend text { fill: #b8d7cf; font-size: 10px; }
.forecast-legend line { stroke-width: 2.6; }
.simulation-ground { fill: #0d3831; stroke: #2f665a; stroke-width: 2; }
.thermal-zone { transition: fill .25s ease, opacity .25s ease; }
.zone-outer { fill: #258bd2; opacity: .12; }
.zone-middle { fill: #258bd2; opacity: .2; }
.zone-inner { fill: #f28b3c; opacity: .32; }
.is-heating .zone-outer { fill: #f28b3c; }
.is-heating .zone-middle { fill: #f28b3c; }
.is-heating .zone-inner { fill: #258bd2; }
.is-idle .thermal-zone { fill: #72958c; opacity: .13; }
.simulation-well-grid circle { fill: #d9f2ec; stroke: #2aa78c; stroke-width: 3; }
.simulation-field-caption {
  position: static;
  display: flex;
  gap: 12px;
  min-height: 50px;
  padding: 10px 14px;
  justify-content: space-between;
  align-items: center;
  color: #eafff9;
  background: #0d3730;
  border-top: 1px solid rgba(169, 206, 196, .18);
  text-align: left;
}
.simulation-field-caption strong { font-size: var(--text-compact); white-space: nowrap; }
.simulation-field-caption span { color: #b9d8d0; font-size: var(--text-caption); text-align: right; }
.plane-field-caption { max-width: none; }
.simulation-strategy {
  display: flex;
  gap: 12px;
  min-height: 70px;
  margin: 12px 18px 14px;
  padding: 13px 14px;
  align-items: center;
  color: #225a4d;
  background: #edf7f3;
  border-radius: 8px;
}
.simulation-strategy.is-risk { color: #7d3f12; background: #fff2e5; }
.simulation-strategy-mark {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #16896e;
  background: #d8eee7;
  border-radius: 7px;
}
.simulation-strategy.is-risk .simulation-strategy-mark { color: #b95b14; background: #ffe0c0; }
.simulation-strategy-mark .icon { width: 17px; height: 17px; }
.simulation-strategy div { min-width: 0; }
.simulation-strategy strong { display: block; margin-bottom: 4px; font-size: var(--text-compact); }
.simulation-strategy p {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  max-width: none;
  margin: 0;
  color: inherit;
  font-size: var(--text-caption);
  line-height: 1.6;
}
.simulation-strategy-label { font-weight: 800; white-space: nowrap; }
.simulation-strategy-metric { white-space: nowrap; }
.simulation-strategy-live { color: #075f4f; font-weight: 700; }
.simulation-strategy-advice { flex-basis: 100%; white-space: normal; }
.numerical-simulation-module .geothermal-module-footer span { max-width: 74%; line-height: 1.45; }
.simulation-footer-actions { display: flex; flex: 0 0 auto; gap: 10px; align-items: center; }
.geothermal-module-footer {
  display: flex;
  gap: 12px;
  min-height: 47px;
  margin-top: auto;
  padding: 10px 18px;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  background: #f6f9f8;
  border-top: 1px solid var(--line);
  font-size: var(--text-caption);
}
.geothermal-module-footer button {
  min-height: 30px;
  padding: 0 9px;
  color: var(--interactive);
  background: transparent;
  border: 1px solid #9ecbc0;
  border-radius: 6px;
  cursor: pointer;
  font-size: var(--text-caption);
  font-weight: 800;
}
.geothermal-module-footer button:hover { color: #fff; background: var(--interactive); border-color: var(--interactive); }
.geothermal-module-footer strong { color: #487067; font-weight: 700; }
.overview-bottom { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.4fr); gap: 18px; }
.device-monitor-summary { margin-bottom: 18px; }
.overview-device-list { padding: 0 12px 12px; }
.overview-device { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; min-height: 55px; padding: 10px 7px; align-items: center; border-top: 1px solid #edf1f0; cursor: pointer; }
.overview-device:hover { background: #f6faf8; }
.overview-device > i { width: 8px; height: 8px; background: #16b47c; border-radius: 50%; }
.overview-device.is-standby > i { background: var(--orange); }
.overview-device.is-stopped > i { background: #71827d; }
.overview-device.is-alarm > i { background: var(--red); }
.overview-device.is-offline > i { background: #87928f; }
.overview-device strong, .overview-device small { display: block; }
.overview-device strong { margin-bottom: 3px; font-size: var(--text-compact); }
.overview-device small { color: var(--muted); font-size: var(--text-caption); }
.overview-device > span { color: #4f6862; font-size: var(--text-secondary); font-weight: 700; }
.trend-panel { min-width: 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: var(--text-caption); }
.chart-legend span { display: inline-flex; gap: 5px; align-items: center; }
.chart-legend i { width: 15px; height: 2px; background: var(--blue); }
.chart-legend .load-in { background: #3990cb; }
.chart-legend .load-out { background: #6ab9db; }
.chart-legend .source-in { background: #17a386; }
.chart-legend .source-out { background: #e67e16; }
.chart-canvas { min-height: 190px; padding: 0 12px 12px; }
.chart-canvas.large { min-height: 330px; padding: 4px 16px 16px; }
.chart-canvas svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: #dfe7e4; stroke-width: 1; }
.chart-axis { fill: #72827e; font: var(--text-secondary) "Segoe UI", sans-serif; }
.chart-line { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.3; }
.chart-area { opacity: .08; }
.chart-dot { stroke: #fff; stroke-width: 1.5; }
.chart-empty { display: grid; min-height: 180px; place-items: center; color: var(--muted); font-size: var(--text-compact); }

/* Device page */
.row-title { align-items: center; }
.search-field { display: flex; width: min(320px, 40vw); height: 40px; padding: 0 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.search-field:focus-within { border-color: var(--interactive); box-shadow: 0 0 0 3px var(--focus); }
.search-field .icon { flex: 0 0 auto; width: 17px; height: 17px; color: var(--muted); }
.search-field input { width: 100%; height: 100%; padding: 0 9px; background: transparent; border: 0; outline: 0; font-size: var(--text-body); }
.search-field input::placeholder { color: #74827f; }
.filter-tabs { display: flex; gap: 7px; margin-bottom: 16px; overflow-x: auto; }
.filter-tabs button { min-height: 34px; padding: 0 13px; color: var(--ink-soft); background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: var(--text-compact); font-weight: 700; white-space: nowrap; }
.filter-tabs button.is-active { color: #fff; background: var(--brand); border-color: var(--brand); }
.device-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .65fr); gap: 18px; align-items: start; }
.device-list { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.device-row { display: grid; grid-template-columns: 42px minmax(150px, 1fr) minmax(120px, .7fr) minmax(120px, .7fr) 86px 24px; gap: 12px; min-height: 72px; padding: 13px 16px; align-items: center; border-top: 1px solid var(--line); cursor: pointer; transition: background-color 150ms ease; }
.device-row:first-child { border-top: 0; }
.device-row:hover, .device-row.is-selected { background: #f4f9f7; }
.device-symbol { display: grid; width: 38px; height: 38px; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 9px; font-size: var(--text-body); font-weight: 900; }
.device-symbol.has-image { padding: 3px; overflow: hidden; background: #fff; border: 1px solid #d6e3df; }
.device-symbol.has-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.device-row strong, .device-row small { display: block; }
.device-row strong { margin-bottom: 4px; font-size: var(--text-body); }
.device-row small { color: var(--muted); font-size: var(--text-caption); }
.device-measure { color: #34524b; font-family: "Segoe UI", system-ui, sans-serif; font-size: var(--text-compact); font-weight: 700; }
.device-status { display: inline-flex; gap: 6px; align-items: center; font-size: var(--text-secondary); font-weight: 800; }
.device-status i { width: 7px; height: 7px; background: #16b47c; border-radius: 50%; }
.device-status.is-standby { color: #a45810; }
.device-status.is-standby i { background: var(--orange); }
.device-status.is-stopped { color: #5b6a66; }
.device-status.is-stopped i { background: #71827d; }
.device-status.is-alarm { color: #b93636; }
.device-status.is-alarm i { background: var(--red); }
.device-status.is-offline { color: #6a7673; }
.device-status.is-offline i { background: #87928f; }
.device-row > .icon { width: 17px; height: 17px; color: #8a9894; }
.device-detail { position: sticky; top: calc(var(--header-height) + 18px); min-height: 360px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.device-detail-hero { padding: 22px; color: #e8f5f2; background: var(--brand); }
.device-detail-hero.has-image { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding: 16px; align-items: stretch; }
.device-detail-image { display: grid; min-height: 126px; margin: 0; padding: 8px; place-items: center; overflow: hidden; background: #fff; border-radius: 8px; }
.device-detail-image img { display: block; width: 100%; height: 110px; object-fit: contain; }
.device-detail-copy { min-width: 0; }
.device-detail-copy > span { display: block; margin-bottom: 13px; color: #9ccfc4; font-size: var(--text-secondary); }
.device-detail-hero h2 { margin-bottom: 7px; font-size: var(--text-title); }
.device-detail-hero p { margin-bottom: 0; color: #afd5cd; font-size: var(--text-secondary); }
.device-detail-status { display: flex; margin-top: 18px; justify-content: space-between; align-items: center; }
.device-detail-status strong { font-size: var(--text-body); }
.device-detail-body { padding: 18px 20px 20px; }
.device-profile { margin-bottom: 18px; }
.device-profile h3 { margin: 0 0 7px; font-size: var(--text-label); }
.device-profile > p { margin: 0; color: var(--ink-soft); font-size: var(--text-secondary); line-height: 1.7; }
.device-specifications {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 14px 0 0;
  overflow: hidden;
  background: var(--line);
  border-radius: 8px;
}
.device-specifications div { min-width: 0; padding: 9px 10px; background: #f6f9f8; }
.device-specifications dt, .device-specifications dd { margin: 0; }
.device-specifications dt { margin-bottom: 3px; color: var(--muted); font-size: var(--text-caption); }
.device-specifications dd { color: var(--ink); font-size: var(--text-secondary); font-weight: 800; line-height: 1.45; }
.device-monitoring { margin-top: 10px; padding: 10px 11px; background: #edf7f3; border-radius: 8px; }
.device-monitoring strong, .device-monitoring span { display: block; }
.device-monitoring strong { margin-bottom: 4px; color: var(--interactive); font-size: var(--text-caption); }
.device-monitoring span { color: var(--ink-soft); font-size: var(--text-caption); line-height: 1.6; }
.detail-metrics { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.detail-metrics div { padding: 13px 0; border-top: 1px solid var(--line); }
.detail-metrics div:nth-child(odd) { padding-right: 12px; }
.detail-metrics div:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--line); }
.detail-metrics dt { margin-bottom: 5px; color: var(--muted); font-size: var(--text-caption); }
.detail-metrics dd { margin: 0; font-size: var(--text-body); font-weight: 700; }
.device-note { margin: 16px 0 0; padding: 12px; color: #5f6e6a; background: #f4f7f6; border-radius: 7px; font-size: var(--text-secondary); line-height: 1.7; }
.empty-device-list { padding: 60px 20px; color: var(--muted); text-align: center; font-size: var(--text-body); }

/* Realtime */
.data-source-box { min-width: 220px; padding: 12px 15px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.data-source-box small, .data-source-box strong, .data-source-box span { display: block; }
.data-source-box small { margin-bottom: 4px; color: var(--muted); font-size: var(--text-caption); }
.data-source-box strong { margin-bottom: 4px; font-size: var(--text-compact); }
.data-source-box span { color: var(--muted); font-family: "Segoe UI", system-ui, sans-serif; font-size: var(--text-caption); }
.service-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.room-electricity-section { margin-bottom: 16px; }
.room-electricity-section .service-group-head { flex-wrap: wrap; gap: 10px; }
.room-electricity-section .service-group-head > span { height: auto; min-height: 28px; white-space: normal; }
.room-meter-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 18px; gap: 18px; }
.room-meter-summary > div { min-width: 0; }
.room-meter-summary dt { margin-bottom: 4px; color: var(--pages-text-muted, var(--muted)); font-size: var(--text-secondary); }
.room-meter-summary dd { margin: 0; overflow-wrap: anywhere; }
.room-meter-summary strong { color: var(--pages-text-strong, var(--ink)); font-size: 1.375rem; font-variant-numeric: tabular-nums; }
.room-meter-summary small { margin-left: 5px; color: var(--pages-text-muted, var(--muted)); }
.room-meter-note { margin: 0; padding: 0 18px 14px; color: var(--pages-text-soft, var(--ink-soft)); font-size: var(--text-secondary); overflow-wrap: anywhere; }
.room-meter-note p { margin: 4px 0 0; }
.room-meter-details { border-top: 1px solid var(--pages-line, var(--line)); }
.room-meter-details summary { min-height: 44px; padding: 12px 18px; color: var(--pages-text, var(--ink)); cursor: pointer; }
.room-meter-details summary:hover { color: var(--pages-accent-strong, var(--brand)); }
.room-meter-details summary:focus-visible { outline: 2px solid var(--pages-accent, var(--brand)); outline-offset: -3px; }
.room-meter-electrical-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.room-meter-electrical-values .property-row { grid-template-columns: minmax(0, 1fr) auto; }
.room-meter-electrical-values .property-row dd { margin: 0; }
.room-meter-integration { margin: 12px 18px; color: var(--pages-text-soft, var(--ink-soft)); font-size: var(--text-secondary); }
.room-meter-integration > div { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 5px; }
.room-meter-integration dt { min-width: 6em; }
.room-meter-integration dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.room-electricity-section #roomMeterStatus[data-status="stale"], .room-electricity-section #roomMeterStatus[data-status="delayed"], .room-electricity-section #roomMeterStatus[data-status="error"] { color: var(--pages-text-strong, var(--ink)); background: rgba(202, 140, 43, .18); }
/* KPI notes remain available to assistive descriptions and card tooltips, without a visual row. */
#overviewPage .kpi-strip .kpi-data-state[hidden] { display: none; }
#overviewPage #overviewEnergyStatus { max-width: 12em; white-space: normal; text-align: right; line-height: 1.35; }
body.pages-v2 .control-item button:disabled { color: var(--pages-text-muted); background: transparent; border-color: var(--pages-line); cursor: not-allowed; opacity: .75; }
@media (max-width: 680px) {
  .room-meter-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; }
  .room-meter-electrical-values { grid-template-columns: 1fr; }
  .room-meter-note { padding-inline: 14px; }
}
.service-group { overflow: hidden; }
.service-group-head { display: flex; min-height: 64px; padding: 14px 17px; justify-content: space-between; align-items: center; background: #f7faf9; border-bottom: 1px solid var(--line); }
.service-group-head .module-kpi-icon { flex-basis: 46px; width: 46px; height: 46px; }
.service-group-head h2 { margin-bottom: 4px; font-size: var(--text-label); }
.service-group-head p { margin: 0; color: var(--muted); font-size: var(--text-caption); }
.service-group-head span { display: grid; min-width: 34px; height: 26px; padding: 0 7px; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 999px; font-size: var(--text-secondary); font-weight: 800; }
.property-list { margin: 0; }
.property-row { display: grid; grid-template-columns: minmax(140px, 1.1fr) minmax(130px, 1fr) auto; gap: 12px; min-height: 49px; padding: 10px 17px; align-items: center; border-top: 1px solid #edf1f0; }
.property-row:first-child { border-top: 0; }
.property-row dt { min-width: 0; }
.property-row dt strong, .property-row dt code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.property-row dt strong { margin-bottom: 3px; font-size: var(--text-secondary); }
.property-row dt code { color: #73827e; font-family: "Cascadia Mono", Consolas, monospace; font-size: var(--text-caption); }
.property-register { color: var(--muted); font-size: var(--text-caption); }
.property-value { text-align: right; }
.property-value strong { font-family: "Segoe UI", system-ui, sans-serif; font-size: var(--text-ui); font-variant-numeric: tabular-nums; }
.property-value small { margin-left: 3px; color: var(--muted); font-size: var(--text-caption); }
.boolean-value { display: inline-flex; gap: 5px; align-items: center; }
.boolean-value::before { width: 7px; height: 7px; background: #16b47c; border-radius: 50%; content: ""; }
.boolean-value.is-false::before { background: #8b9794; }
.control-zone { margin-top: 18px; overflow: hidden; }
.control-zone-head { display: flex; gap: 24px; padding: 19px 20px; justify-content: space-between; align-items: center; color: #eaf6f3; background: var(--brand); }
.control-zone-head .module-kpi-icon { padding: 4px; background: rgba(255,255,255,.94); border-radius: 9px; }
.control-zone-head .panel-index { color: #91c9be; }
.control-zone-head p { color: #add1c9; }
.control-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.control-item { display: flex; min-height: 68px; padding: 12px 18px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); }
.control-item:nth-child(even) { border-left: 1px solid var(--line); }
.control-item > div { min-width: 0; }
.control-item strong, .control-item small { display: block; }
.control-item strong { margin-bottom: 4px; font-size: var(--text-compact); }
.control-item small { color: var(--muted); font-size: var(--text-caption); }
.control-item button { flex: 0 0 auto; min-height: 32px; margin-left: 12px; padding: 0 11px; color: var(--brand); background: var(--brand-soft); border: 0; border-radius: 7px; cursor: pointer; font-size: var(--text-secondary); font-weight: 800; }
.control-item button:hover { color: #fff; background: var(--brand); }

/* Analysis */
.analysis-insights { display: grid; grid-template-columns: 1.15fr .85fr .85fr; gap: 16px; margin-bottom: 16px; }
.insight-primary, .insight-secondary { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 17px 18px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.insight-primary { color: #e8f7f3; background: var(--brand); border-color: var(--brand); }
.insight-kpi-icon { display: block; width: 56px; height: 56px; object-fit: contain; }
.insight-primary .insight-kpi-icon { padding: 4px; background: rgba(255,255,255,.94); border-radius: 10px; }
.insight-primary span, .insight-secondary span { display: block; margin-bottom: 8px; color: #90c5b9; font-size: var(--text-secondary); }
.insight-secondary span { color: var(--muted); }
.insight-primary strong, .insight-secondary strong { display: block; margin-bottom: 7px; font-size: var(--text-title); }
.insight-primary p, .insight-secondary p { margin: 0; color: #afd4cb; font-size: var(--text-secondary); line-height: 1.7; }
.insight-secondary p { color: var(--muted); }
.analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.analysis-chart { min-width: 0; overflow: hidden; }
.analysis-note { display: flex; gap: 13px; margin-top: 16px; padding: 16px 18px; align-items: flex-start; color: #684d2d; background: #fff5e9; border-radius: 9px; }
.analysis-note .icon { flex: 0 0 auto; width: 19px; height: 19px; color: var(--orange); }
.analysis-note strong { display: block; margin-bottom: 4px; font-size: var(--text-compact); }
.analysis-note p { margin: 0; font-size: var(--text-secondary); line-height: 1.7; }

/* Model algorithm workbench */
.model-page-title { align-items: center; }
.model-kernel-state { display: flex; gap: 11px; min-width: 254px; padding: 10px 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.model-kernel-state > div { min-width: 0; }
.model-kernel-state strong, .model-kernel-state small { display: block; }
.model-kernel-state strong { margin-bottom: 2px; font-size: var(--text-compact); }
.model-kernel-state small { color: var(--muted); font-size: var(--text-caption); }
.model-source-bar { display: grid; grid-template-columns: 180px 180px 170px minmax(300px, 1fr); margin-bottom: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.model-source-bar > div { min-width: 0; padding: 13px 15px; }
.model-source-bar > div + div { border-left: 1px solid var(--line); }
.model-source-bar span, .model-source-bar strong, .model-source-bar small { display: block; }
.model-source-bar span { margin-bottom: 4px; color: var(--muted); font-size: var(--text-caption); }
.model-source-bar strong { color: #19483e; font-size: var(--text-body); }
.model-source-bar small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: var(--text-caption); text-overflow: ellipsis; white-space: nowrap; }
.model-source-bar .model-source-boundary { display: flex; gap: 11px; align-items: center; color: #6b4a27; background: #fff6eb; }
.model-source-boundary .icon { flex: 0 0 auto; width: 19px; height: 19px; color: var(--orange); }
.model-source-boundary p { max-width: 72ch; margin: 0; font-size: var(--text-secondary); line-height: 1.65; }
.model-category-rail { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 16px; overflow: hidden; background: #e2eae8; border-radius: 10px; }
.model-category-rail button { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; min-height: 82px; padding: 12px 14px; align-items: center; color: var(--ink-soft); background: var(--surface); border: 0; cursor: pointer; text-align: left; transition: background-color 180ms ease, color 180ms ease; }
.model-category-rail button + button { border-left: 1px solid var(--line); }
.model-category-rail button:hover { background: #f0f6f4; }
.model-category-rail button.is-active { color: #fff; background: var(--brand); }
.model-category-rail img { display: block; width: 46px; height: 46px; object-fit: contain; }
.model-category-rail span, .model-category-rail strong, .model-category-rail small { display: block; min-width: 0; }
.model-category-rail strong { margin-bottom: 3px; font-size: var(--text-body); }
.model-category-rail small { overflow: hidden; color: var(--muted); font-size: var(--text-caption); text-overflow: ellipsis; white-space: nowrap; }
.model-category-rail button.is-active small { color: #c9e5de; }
.model-category-rail b { display: grid; width: 24px; height: 24px; place-items: center; color: var(--interactive); background: var(--brand-soft); border-radius: 50%; font-size: var(--text-caption); }
.model-category-rail button.is-active b { color: var(--brand); background: #fff; }
.model-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.model-review-panel { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-width: 0; min-height: 660px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.model-index { min-width: 0; background: #f6f9f8; border-right: 1px solid var(--line); }
.model-index > header { display: flex; gap: 10px; min-height: 76px; padding: 14px 15px; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.model-index header span { display: block; margin-bottom: 3px; color: var(--interactive); font-size: var(--text-caption); font-weight: 800; }
.model-index header h2 { margin: 0; font-size: var(--text-ui); }
.model-index header > small { flex: 0 0 auto; color: var(--muted); font-size: var(--text-caption); }
.model-list { display: grid; }
.model-list-loading { padding: 18px 15px; color: var(--muted); font-size: var(--text-secondary); }
.model-list button { position: relative; width: 100%; min-height: 88px; padding: 14px 15px 14px 34px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; text-align: left; }
.model-list button::before { position: absolute; top: 19px; left: 16px; width: 8px; height: 8px; background: #9aa9a5; border-radius: 50%; content: ""; }
.model-list button[data-model-status="limited"]::before { background: var(--orange); }
.model-list button[data-model-status="available"]::before { background: var(--green); }
.model-list button:hover { background: #edf4f2; }
.model-list button.is-active { background: #e5f1ee; box-shadow: inset -3px 0 0 var(--brand); }
.model-list button strong, .model-list button span, .model-list button small { display: block; }
.model-list button strong { margin-bottom: 5px; font-size: var(--text-compact); }
.model-list button span { color: var(--ink-soft); font-size: var(--text-caption); line-height: 1.55; }
.model-list button small { margin-top: 7px; color: var(--muted); font-size: var(--text-caption); }
.model-detail { min-width: 0; padding: 20px; }
.model-detail-head { display: flex; gap: 20px; min-height: 84px; justify-content: space-between; align-items: flex-start; }
.model-detail-head > div { min-width: 0; }
.model-detail-head > div > span { display: block; margin-bottom: 4px; color: var(--interactive); font-size: var(--text-caption); font-weight: 800; }
.model-detail-head h2 { margin-bottom: 5px; font-size: var(--text-title); }
.model-detail-head p { max-width: 65ch; margin: 0; color: var(--muted); font-size: var(--text-secondary); line-height: 1.65; }
.model-evidence-spine { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 24px minmax(0, 1fr); margin: 15px 0 20px; overflow: hidden; color: #e9f8f4; background: #17483e; border-radius: 9px; }
.model-evidence-spine > div { min-width: 0; padding: 13px 14px; }
.model-evidence-spine span, .model-evidence-spine strong, .model-evidence-spine small { display: block; }
.model-evidence-spine span { margin-bottom: 4px; color: #a9d0c6; font-size: var(--text-caption); }
.model-evidence-spine strong { overflow: hidden; font-size: var(--text-compact); text-overflow: ellipsis; white-space: nowrap; }
.model-evidence-spine small { margin-top: 3px; color: #bcd8d1; font-size: var(--text-caption); }
.model-evidence-spine > i { display: grid; place-items: center; color: #8fb9af; background: #123d35; }
.model-evidence-spine .icon { width: 16px; height: 16px; }
.model-detail-section { margin-top: 18px; }
.model-section-heading { display: flex; gap: 12px; margin-bottom: 9px; justify-content: space-between; align-items: center; }
.model-section-heading h3 { margin: 0; font-size: var(--text-compact); }
.model-section-heading span { color: var(--muted); font-size: var(--text-caption); }
.model-inputs { display: flex; flex-wrap: wrap; gap: 7px; }
.model-input { display: inline-flex; overflow: hidden; align-items: stretch; background: #f2f6f5; border-radius: 6px; font-size: var(--text-caption); }
.model-input strong { padding: 6px 8px; font-weight: 700; }
.model-input span { padding: 6px 8px; color: #36675c; background: #dcece8; }
.model-method-section > p { margin: 0 0 9px; color: var(--ink-soft); font-size: var(--text-secondary); line-height: 1.7; }
.model-method-section code { display: block; overflow-x: auto; padding: 11px 12px; color: #1d5045; background: #edf4f2; border-radius: 7px; font-family: Consolas, "SFMono-Regular", monospace; font-size: var(--text-secondary); white-space: nowrap; }
.model-evidence-list { display: grid; margin: 18px 0 0; border-top: 1px solid var(--line); }
.model-evidence-list > div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.model-evidence-list dt { color: var(--muted); font-size: var(--text-caption); font-weight: 700; }
.model-evidence-list dd { margin: 0; color: var(--ink-soft); font-size: var(--text-secondary); line-height: 1.65; }
.model-assistant-shortcut { cursor: pointer; text-align: left; transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.model-assistant-shortcut:hover { border-color: #a9c7c0; box-shadow: 0 8px 22px rgba(14,61,52,.08); transform: translateY(-1px); }
.model-assistant-shortcut > .icon { flex: 0 0 auto; margin-left: auto; color: var(--interactive); }
.model-assistant-entry { display: grid; gap: 17px; padding: 22px; overflow: hidden; color: #eaf7f3; background: linear-gradient(150deg, #164f44, #0d3d35 68%, #12372f); border: 1px solid #1c5e51; border-radius: 11px; box-shadow: 0 14px 30px rgba(15,56,48,.12); }
.model-assistant-entry-mark { display: grid; width: 48px; height: 48px; place-items: center; color: #bce4da; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; }
.model-assistant-entry-mark .icon { width: 25px; height: 25px; }
.model-assistant-entry span, .model-assistant-entry h2, .model-assistant-entry p { display: block; }
.model-assistant-entry span { margin-bottom: 5px; color: #9fcfc3; font-size: var(--text-caption); font-weight: 800; letter-spacing: .04em; }
.model-assistant-entry h2 { margin-bottom: 8px; font-size: var(--text-subheading); }
.model-assistant-entry p { margin: 0; color: #c3ddd7; font-size: var(--text-secondary); line-height: 1.75; }
.model-assistant-entry .secondary-button { display: inline-flex; gap: 8px; width: 100%; color: #164d42; align-items: center; justify-content: center; background: #f3f8f6; }
.model-assistant-entry .secondary-button:hover { background: #fff; }

/* Wingzhen carbon assistant: one authenticated global instance. */
.yizhen-assistant-root {
  --yizhen-assistant-bg: #fff;
  --yizhen-assistant-canvas: #f7f9fa;
  --yizhen-assistant-surface: #f1f5f6;
  --yizhen-assistant-ink: #122033;
  --yizhen-assistant-ink-soft: #405267;
  --yizhen-assistant-muted: #58687a;
  --yizhen-assistant-border: #dbe3e8;
  --yizhen-assistant-border-strong: #b7c5ce;
  --yizhen-assistant-green: #178b52;
  --yizhen-assistant-green-strong: #0b6f3b;
  --yizhen-assistant-green-soft: #e5f5eb;
  --yizhen-assistant-blue-strong: #0b568f;
  --yizhen-assistant-blue-soft: #e6f2fb;
  --yizhen-assistant-launcher-width: 88px;
  --yizhen-assistant-launcher-height: 94px;
  position: fixed;
  z-index: var(--z-assistant);
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  overflow: visible;
  color: var(--yizhen-assistant-ink);
  pointer-events: none;
}
.yizhen-assistant-root button, .yizhen-assistant-root textarea { font: inherit; }
.yizhen-assistant-root button { border: 0; cursor: pointer; }
.yizhen-assistant-root button:disabled { cursor: not-allowed; opacity: .48; }
.yizhen-assistant-root svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.yizhen-assistant-backdrop { display: none; }
.yizhen-assistant-panel {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  width: min(430px, calc(100vw - 44px));
  height: min(720px, calc(100dvh - 36px));
  max-height: min(720px, calc(100svh - 36px));
  overflow: hidden;
  flex-direction: column;
  opacity: 1;
  background: var(--yizhen-assistant-bg);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(18,32,51,.22);
  pointer-events: auto;
  animation: yizhen-assistant-panel-in 230ms cubic-bezier(.22,1,.36,1);
}
.yizhen-assistant-header { display: flex; min-height: 64px; padding: 9px 11px 9px 14px; align-items: center; justify-content: space-between; gap: 12px; color: var(--yizhen-assistant-ink); background: var(--yizhen-assistant-bg); border-bottom: 1px solid var(--yizhen-assistant-border); }
.yizhen-assistant-identity { display: flex; gap: 10px; min-width: 0; align-items: center; }
.yizhen-assistant-avatar { position: relative; display: block; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; overflow: hidden; background: var(--yizhen-assistant-blue-soft); border-radius: 50%; box-shadow: inset 0 0 0 1px #9fcce7; }
.yizhen-assistant-avatar img { position: absolute; top: -18px; left: -14px; width: 73px; height: auto; max-width: none; }
.yizhen-assistant-identity h2 { margin: 0; overflow: hidden; font-size: var(--text-compact); font-weight: 700; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.yizhen-assistant-identity p { display: flex; gap: 6px; margin: 4px 0 0; align-items: center; color: var(--yizhen-assistant-muted); font-size: 10px; }
.yizhen-assistant-connection-dot { width: 7px; height: 7px; background: #d4a351; border-radius: 50%; box-shadow: 0 0 0 3px rgba(212,163,81,.14); }
.yizhen-assistant-connection-dot[data-state="online"] { background: var(--yizhen-assistant-green); box-shadow: 0 0 0 3px var(--yizhen-assistant-green-soft); }
.yizhen-assistant-connection-dot[data-state="demo"] { background: #78b9ef; box-shadow: 0 0 0 3px rgba(120,185,239,.15); }
.yizhen-assistant-connection-dot[data-state="offline"], .yizhen-assistant-connection-dot[data-state="unavailable"] { background: #ef8b81; box-shadow: 0 0 0 3px rgba(239,139,129,.14); }
.yizhen-assistant-header-actions { display: flex; gap: 3px; flex: 0 0 auto; }
.yizhen-assistant-icon-button { display: grid; width: 36px; height: 36px; place-items: center; color: var(--yizhen-assistant-muted); background: transparent; border-radius: 50%; }
.yizhen-assistant-icon-button:hover { color: var(--yizhen-assistant-ink); background: var(--yizhen-assistant-surface); }
.yizhen-assistant-current-context { flex: 0 0 auto; padding: 10px 14px 9px; color: var(--yizhen-assistant-muted); background: var(--yizhen-assistant-bg); border-bottom: 1px solid var(--yizhen-assistant-border); font-size: 10px; }
.yizhen-assistant-context-status { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.yizhen-assistant-context-status time { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.yizhen-assistant-context-live { display: inline-flex; gap: 6px; align-items: center; color: var(--yizhen-assistant-green-strong); font-weight: 700; }
.yizhen-assistant-context-live > i { width: 6px; height: 6px; background: var(--yizhen-assistant-green); border-radius: 50%; }
.yizhen-assistant-source-row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.yizhen-assistant-source-chip { display: inline-flex; gap: 4px; min-height: 25px; padding: 4px 7px; align-items: center; color: var(--yizhen-assistant-ink-soft); background: var(--yizhen-assistant-surface); border-radius: 6px; font-size: 9px; line-height: 1.2; }
.yizhen-assistant-source-chip b { font-weight: 750; }
.yizhen-assistant-source-chip > span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yizhen-assistant-source-chip svg { width: 13px; height: 13px; }
.yizhen-assistant-source-chip.is-interface { color: var(--yizhen-assistant-blue-strong); background: var(--yizhen-assistant-blue-soft); }
.yizhen-assistant-source-chip.is-platform { color: var(--yizhen-assistant-green-strong); background: var(--yizhen-assistant-green-soft); }
.yizhen-assistant-source-chip.is-mode { color: #4e4b73; background: #f0eff8; }
.yizhen-assistant-context-privacy { margin-top: 7px; color: var(--yizhen-assistant-muted); font-size: 9px; }
.yizhen-assistant-context-privacy summary { display: flex; width: max-content; min-height: 22px; align-items: center; cursor: pointer; }
.yizhen-assistant-context-privacy p { max-width: 62ch; margin: 3px 0 0; color: var(--yizhen-assistant-ink-soft); line-height: 1.55; }
.yizhen-assistant-message-list { min-height: 0; padding: 14px 15px 18px; overflow-y: auto; overscroll-behavior: contain; flex: 1 1 auto; background: var(--yizhen-assistant-canvas); scrollbar-color: var(--yizhen-assistant-border-strong) transparent; }
.yizhen-assistant-empty { display: flex; gap: 10px; min-height: 88px; padding: 14px 2px; align-items: flex-start; color: var(--yizhen-assistant-muted); }
.yizhen-assistant-empty-icon { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; color: var(--yizhen-assistant-green-strong); background: var(--yizhen-assistant-green-soft); border-radius: 50%; }
.yizhen-assistant-empty-icon svg { width: 17px; height: 17px; }
.yizhen-assistant-empty strong { display: block; color: var(--yizhen-assistant-ink); font-size: var(--text-secondary); }
.yizhen-assistant-empty p { max-width: 44ch; margin: 4px 0 0; color: var(--yizhen-assistant-ink-soft); font-size: 10px; line-height: 1.65; }
.yizhen-assistant-message-row { display: flex; gap: 8px; margin-bottom: 14px; align-items: flex-start; }
.yizhen-assistant-message-row.is-user { justify-content: flex-end; }
.yizhen-assistant-message-avatar { position: relative; display: block; flex: 0 0 30px; width: 30px; height: 30px; margin-top: 2px; overflow: hidden; background: var(--yizhen-assistant-blue-soft); border-radius: 50%; box-shadow: inset 0 0 0 1px #aed2e9; }
.yizhen-assistant-message-avatar img { position: absolute; top: -12px; left: -9px; width: 49px; height: auto; max-width: none; }
.yizhen-assistant-message-bubble { max-width: min(82%, 320px); min-width: 50px; padding: 10px 11px; color: var(--yizhen-assistant-ink); background: var(--yizhen-assistant-bg); border: 0; border-radius: 5px 13px 13px; box-shadow: 0 1px 3px rgba(18,32,51,.09); }
.yizhen-assistant-message-row.is-user .yizhen-assistant-message-bubble { color: #fff; background: var(--yizhen-assistant-green-strong); border-radius: 13px 5px 13px 13px; box-shadow: none; }
.yizhen-assistant-message-row.is-error .yizhen-assistant-message-bubble { color: #713732; background: #fff2f0; border-color: #efd1cd; }
.yizhen-assistant-message-bubble > p { margin: 0; overflow-wrap: anywhere; font-size: var(--text-secondary); line-height: 1.75; white-space: pre-wrap; }
.yizhen-assistant-typing { display: inline-flex; gap: 4px; min-height: 20px; align-items: center; }
.yizhen-assistant-typing i { width: 5px; height: 5px; background: #6e9690; border-radius: 50%; animation: yizhen-assistant-typing 1s ease-in-out infinite; }
.yizhen-assistant-typing i:nth-child(2) { animation-delay: 120ms; }
.yizhen-assistant-typing i:nth-child(3) { animation-delay: 240ms; }
.yizhen-assistant-stream-cursor { display: inline-block; width: 2px; height: 1em; margin-left: 3px; vertical-align: -2px; background: var(--interactive); animation: yizhen-assistant-cursor 800ms steps(2, end) infinite; }
.yizhen-assistant-evidence { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--yizhen-assistant-border); }
.yizhen-assistant-evidence summary { color: var(--yizhen-assistant-green-strong); cursor: pointer; font-size: var(--text-caption); font-weight: 800; line-height: 1.55; }
.yizhen-assistant-evidence ul { display: grid; gap: 8px; margin: 9px 0 0; padding: 0; list-style: none; }
.yizhen-assistant-evidence li { padding: 6px 7px; background: var(--yizhen-assistant-surface); border-radius: 5px; }
.yizhen-assistant-evidence strong, .yizhen-assistant-evidence span { display: block; overflow-wrap: anywhere; }
.yizhen-assistant-evidence strong { color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
.yizhen-assistant-evidence span { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.yizhen-assistant-navigation { display: grid; gap: 6px; margin-top: 10px; }
.yizhen-assistant-navigation button { display: flex; min-height: 36px; padding: 7px 8px 7px 10px; align-items: center; justify-content: space-between; color: #226154; background: #edf5f2; border: 1px solid #d1e3de; border-radius: 7px; font-size: var(--text-caption); font-weight: 800; text-align: left; }
.yizhen-assistant-navigation button:hover { background: #e1efeb; }
.yizhen-assistant-navigation svg { width: 14px; height: 14px; }
.yizhen-assistant-message-actions { display: flex; gap: 5px 9px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.yizhen-assistant-message-actions button { display: inline-flex; gap: 5px; min-height: 30px; padding: 3px 6px; align-items: center; color: #4a746b; background: transparent; border-radius: 6px; font-size: 11px; }
.yizhen-assistant-message-actions button:hover { color: var(--brand); background: #edf5f2; }
.yizhen-assistant-message-actions svg { width: 14px; height: 14px; }
.yizhen-assistant-demo-label { margin-left: auto; color: #316b9d; font-size: 11px; font-weight: 800; }
.yizhen-assistant-quick-prompts { display: flex; gap: 7px; padding: 10px 12px; overflow-x: auto; background: #fff; border-top: 1px solid var(--line); scrollbar-width: thin; }
.yizhen-assistant-quick-prompts button { flex: 0 0 auto; min-height: 34px; max-width: 250px; padding: 6px 10px; overflow: hidden; color: #355f56; background: #f0f5f3; border: 1px solid #dce7e4; border-radius: 8px; font-size: var(--text-caption); text-overflow: ellipsis; white-space: nowrap; }
.yizhen-assistant-quick-prompts button:hover { color: var(--brand); background: #e5f0ed; }
.yizhen-assistant-composer { padding: 9px 13px 10px; background: var(--yizhen-assistant-bg); border-top: 1px solid var(--yizhen-assistant-border); }
.yizhen-assistant-composer-meta, .yizhen-assistant-composer-foot { display: flex; gap: 10px; min-height: 24px; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.yizhen-assistant-composer-meta { padding-bottom: 6px; }
.yizhen-assistant-composer-meta > button { display: inline-flex; gap: 5px; padding: 3px 0; flex: 0 0 auto; align-items: center; color: #4d7169; background: transparent; font-size: 11px; }
.yizhen-assistant-composer-meta > button > span { display: inline-flex; width: 24px; height: 14px; padding: 2px; align-items: center; background: #c5d1ce; border-radius: 999px; transition: background-color 160ms ease; }
.yizhen-assistant-composer-meta > button i { display: block; width: 10px; height: 10px; background: #fff; border-radius: 50%; transition: transform 160ms ease; }
.yizhen-assistant-composer-meta > button[aria-pressed="true"] > span { background: var(--interactive); }
.yizhen-assistant-composer-meta > button[aria-pressed="true"] i { transform: translateX(10px); }
.yizhen-assistant-composer-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; min-height: 76px; padding: 9px 8px 8px 11px; align-items: end; background: var(--yizhen-assistant-bg); border: 1px solid var(--yizhen-assistant-border-strong); border-radius: 12px; transition: border-color 160ms ease, box-shadow 160ms ease; }
.yizhen-assistant-composer-box:focus-within { border-color: var(--yizhen-assistant-green); box-shadow: 0 0 0 3px var(--yizhen-assistant-green-soft); }
.yizhen-assistant-composer-box textarea { width: 100%; max-height: 120px; min-height: 46px; padding: 3px 4px; overflow-y: auto; color: var(--ink); background: transparent; border: 0; outline: 0; resize: none; font-size: var(--text-secondary); line-height: 1.55; }
.yizhen-assistant-composer-box textarea::placeholder { color: #81918d; }
.yizhen-assistant-composer-actions { display: flex; gap: 4px; align-items: center; }
.yizhen-assistant-voice-button, .yizhen-assistant-send-button, .yizhen-assistant-stop-button { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 8px; }
.yizhen-assistant-voice-button { color: #477069; background: transparent; }
.yizhen-assistant-voice-button:hover { background: #e8f0ee; }
.yizhen-assistant-voice-button.is-listening { color: #fff; background: #a94747; }
.yizhen-assistant-send-button { color: #fff; background: var(--interactive); }
.yizhen-assistant-send-button:hover { background: var(--brand); }
.yizhen-assistant-stop-button { color: #fff; background: #a94747; }
.yizhen-assistant-composer-foot { padding-top: 6px; align-items: flex-start; line-height: 1.45; }
.yizhen-assistant-composer-foot > span:first-child { max-width: 30ch; }
.yizhen-assistant-composer-foot > span:last-child { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.yizhen-assistant-composer-foot .is-error { color: #a3403a; }
.yizhen-assistant-launcher-wrap { position: fixed; right: max(22px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); width: var(--yizhen-assistant-launcher-width); height: var(--yizhen-assistant-launcher-height); pointer-events: auto; transition: opacity 140ms ease, transform 180ms cubic-bezier(.22,1,.36,1); }
.yizhen-assistant-launcher-wrap.is-hidden { opacity: 0; pointer-events: none; transform: translateY(8px) scale(.96); }
.yizhen-assistant-launcher { position: relative; width: 100%; height: 100%; padding: 0; overflow: hidden; background: var(--yizhen-assistant-blue-soft); border-radius: 44px 44px 14px 14px; box-shadow: 0 4px 8px rgba(18,32,51,.2); opacity: .6; filter: saturate(.88); transition: opacity 180ms ease, filter 180ms ease, transform 210ms cubic-bezier(.22,1,.36,1), box-shadow 210ms ease; }
.yizhen-assistant-launcher::before { position: absolute; z-index: 1; inset: 6px; border: 1px solid rgba(23,139,82,.7); border-radius: 38px 38px 10px 10px; content: ""; pointer-events: none; }
.yizhen-assistant-launcher:hover { opacity: .7; filter: saturate(.94); transform: translateY(-2px); box-shadow: 0 5px 8px rgba(18,32,51,.23); }
.yizhen-assistant-launcher:focus-visible { opacity: .82; filter: saturate(1); border-radius: 44px 44px 14px 14px; outline: 3px solid rgba(23,139,82,.42); outline-offset: 3px; }
.yizhen-assistant-launcher:active { opacity: 1; filter: saturate(1); transform: none; }
.yizhen-assistant-launcher img { position: absolute; z-index: 2; top: -32%; left: -23%; width: 150%; height: auto; max-width: none; pointer-events: none; }
.yizhen-assistant-launcher-status { position: absolute; z-index: 3; right: 7px; bottom: 7px; width: 12px; height: 12px; background: #d4a351; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 2px 6px rgba(13,54,46,.2); }
.yizhen-assistant-launcher-status[data-state="online"] { background: #29ae73; }
.yizhen-assistant-launcher-status[data-state="demo"] { background: #4c98d5; }
.yizhen-assistant-launcher-status[data-state="unavailable"], .yizhen-assistant-launcher-status[data-state="offline"] { background: #c95a52; }
.yizhen-assistant-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

@keyframes yizhen-assistant-panel-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes yizhen-assistant-typing { 0%, 55%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes yizhen-assistant-cursor { 50% { opacity: 0; } }

/* Energy and carbon */
.carbon-page-title { align-items: flex-end; }
.carbon-market-status {
  display: grid;
  grid-template-columns: 8px auto;
  gap: 2px 8px;
  min-width: 168px;
  padding: 11px 14px;
  align-items: center;
  color: var(--brand);
  background: #e7f4f0;
  border: 1px solid #cfe5df;
  border-radius: 9px;
}
.carbon-market-status i { grid-row: 1 / 3; width: 8px; height: 8px; background: #24b985; border-radius: 50%; box-shadow: 0 0 0 4px rgba(36,185,133,.12); }
.carbon-market-status span { color: var(--muted); font-size: var(--text-caption); }
.carbon-market-status strong { font-family: "Segoe UI", system-ui, sans-serif; font-size: var(--text-compact); font-variant-numeric: tabular-nums; }
.carbon-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.carbon-kpis article {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 14px;
  min-height: 126px;
  padding: 20px;
  align-items: center;
}
.carbon-kpis article + article { border-left: 1px solid var(--line); }
.carbon-kpis img { width: 70px; height: 70px; object-fit: contain; }
.carbon-kpis span, .carbon-kpis em { display: block; }
.carbon-kpis span { margin-bottom: 5px; color: var(--muted); font-size: var(--text-secondary); }
.carbon-kpis strong {
  color: #073d35;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: clamp(28px, 2.25vw, 40px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
}
.carbon-kpis small { margin-left: 5px; color: var(--muted); font-size: var(--text-caption); }
.carbon-kpis em { margin-top: 5px; overflow: hidden; color: #73847f; font-size: var(--text-caption); font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.carbon-chart-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 16px; margin-bottom: 16px; }
.carbon-chart-card { min-width: 0; overflow: hidden; }
.carbon-source-link {
  display: inline-flex;
  min-height: 34px;
  padding: 0 12px;
  align-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 7px;
  font-size: var(--text-secondary);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.carbon-source-link:hover { color: #fff; background: var(--brand); }
.carbon-chart { height: 320px; padding: 4px 12px 12px; }
.carbon-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.carbon-chart .grid-line { stroke: #e7eeec; stroke-width: 1; }
.carbon-chart .axis-label { fill: #6f7f7b; font-size: 11px; }
.carbon-chart .bar { fill: #58bba5; }
.carbon-chart .bar:hover { fill: #008f7b; }
.carbon-chart .line { fill: none; stroke: #ef8d2e; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.carbon-chart .price-area { fill: url("#carbonPriceGradient"); }
.carbon-chart .price-line { fill: none; stroke: #008f7b; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.carbon-chart .point { fill: #fff; stroke: #008f7b; stroke-width: 2; }
.carbon-chart .current-point { fill: #ef8d2e; stroke: #fff; stroke-width: 3; }
.carbon-chart .empty-state { display: grid; height: 100%; place-items: center; color: var(--muted); font-size: var(--text-secondary); }
.carbon-accounting-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 16px; }
.carbon-accounting-card { padding: 20px; }
.carbon-card-heading { display: flex; gap: 12px; margin-bottom: 18px; align-items: center; }
.carbon-card-heading > span { display: grid; flex: 0 0 36px; height: 36px; place-items: center; color: #fff; background: var(--brand); border-radius: 8px; font-family: "Segoe UI", system-ui, sans-serif; font-size: var(--text-secondary); font-weight: 800; }
.carbon-card-heading small { display: block; margin-bottom: 2px; color: var(--interactive); font-size: var(--text-caption); font-weight: 800; }
.carbon-card-heading h2 { margin: 0; font-size: var(--text-label); }
.carbon-emission-compare { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 14px; align-items: center; }
.carbon-emission-compare > div { min-width: 0; padding: 15px 16px; background: #f3f8f6; border-radius: 9px; }
.carbon-emission-compare > div.is-result { color: #fff; background: var(--brand); }
.carbon-emission-compare span, .carbon-emission-compare strong { display: block; }
.carbon-emission-compare span { margin-bottom: 6px; color: var(--muted); font-size: var(--text-caption); }
.carbon-emission-compare .is-result span, .carbon-emission-compare .is-result small { color: #a9d4ca; }
.carbon-emission-compare strong { display: inline; font-family: "Segoe UI", system-ui, sans-serif; font-size: var(--text-title); font-variant-numeric: tabular-nums; }
.carbon-emission-compare small { margin-left: 4px; color: var(--muted); font-size: var(--text-caption); }
.carbon-emission-compare > i { color: #9aaba6; font-family: "Segoe UI", system-ui, sans-serif; font-size: 24px; font-style: normal; font-weight: 300; }
.carbon-method-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; background: var(--line); border-radius: 8px; }
.carbon-method-facts div { padding: 12px; background: #f5f9f8; }
.carbon-method-facts dt { margin-bottom: 5px; color: var(--muted); font-size: var(--text-caption); }
.carbon-method-facts dd { margin: 0; color: var(--brand); font-family: "Segoe UI", system-ui, sans-serif; font-size: var(--text-compact); font-weight: 800; }
.carbon-formula { margin: 14px 0 0; padding: 11px 13px; color: #fff; background: #123f37; border-radius: 8px; font-family: "Cascadia Mono", Consolas, monospace; font-size: var(--text-compact); text-align: center; }
.carbon-data-notice { display: flex; gap: 13px; margin-top: 16px; padding: 15px 17px; align-items: flex-start; color: #654923; background: #fff5e7; border: 1px solid #f4dfbf; border-radius: 9px; }
.carbon-data-notice.is-ready { color: #165f4c; background: #eaf6f2; border-color: #cae7df; }
.carbon-data-notice .icon { flex: 0 0 auto; width: 19px; height: 19px; color: var(--orange); }
.carbon-data-notice.is-ready .icon { color: #1e9b74; }
.carbon-data-notice strong { display: block; margin-bottom: 4px; font-size: var(--text-compact); }
.carbon-data-notice p { margin: 0; font-size: var(--text-secondary); line-height: 1.7; }

/* Quality */
.quality-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.quality-summary article { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; min-height: 96px; padding: 14px 18px; align-items: center; }
.quality-summary article + article { border-left: 1px solid var(--line); }
.quality-summary img { display: block; width: 58px; height: 58px; object-fit: contain; }
.quality-summary article > div { min-width: 0; }
.quality-summary span { display: block; margin-bottom: 8px; color: var(--muted); font-size: var(--text-secondary); }
.quality-summary strong { color: var(--brand); font-family: "Segoe UI", system-ui, sans-serif; font-size: var(--text-metric-large); }
.quality-summary small { margin-left: 4px; color: var(--muted); font-size: var(--text-caption); }
.quality-summary .needs-action { background: #fff8f0; }
.quality-summary .needs-action strong { color: var(--orange); }
.quality-workspace { display: grid; grid-template-columns: minmax(270px, .65fr) minmax(0, 1.65fr); gap: 16px; align-items: start; }
.pending-panel ol { margin: 0; padding: 0 16px 16px; list-style: none; }
.pending-panel li { display: flex; gap: 12px; padding: 14px 4px; border-top: 1px solid var(--line); }
.pending-panel li > span { flex: 0 0 auto; color: var(--orange); font-family: "Segoe UI", system-ui, sans-serif; font-size: var(--text-compact); font-weight: 800; }
.pending-panel strong { display: block; margin-bottom: 5px; font-size: var(--text-compact); }
.pending-panel p { margin: 0; color: var(--muted); font-size: var(--text-caption); line-height: 1.7; }
.point-table-panel { min-width: 0; overflow: hidden; }
.table-toolbar { display: flex; min-height: 64px; padding: 12px 16px; justify-content: space-between; align-items: center; background: #f7faf9; border-bottom: 1px solid var(--line); }
.table-toolbar h2 { margin-bottom: 4px; font-size: var(--text-label); }
.table-toolbar span { display: block; color: var(--muted); font-size: var(--text-caption); }
.table-toolbar select { min-height: 34px; padding: 0 30px 0 10px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 7px; font-size: var(--text-secondary); }
.table-scroll { max-height: 620px; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { position: sticky; z-index: 2; top: 0; padding: 10px 12px; color: #667873; background: #f2f6f5; font-size: var(--text-caption); text-align: left; white-space: nowrap; }
td { padding: 11px 12px; border-top: 1px solid #edf1f0; font-size: var(--text-caption); vertical-align: middle; }
td code { display: block; max-width: 180px; overflow: hidden; color: #4c6a63; font-family: "Cascadia Mono", Consolas, monospace; font-size: var(--text-caption); text-overflow: ellipsis; white-space: nowrap; }
.point-name { display: block; margin-bottom: 3px; font-size: var(--text-secondary); font-weight: 700; }
.status-label { display: inline-flex; min-height: 23px; padding: 0 7px; align-items: center; color: #1e704f; background: #e9f6ef; border-radius: 999px; font-size: var(--text-caption); font-weight: 800; white-space: nowrap; }
.status-label.is-pending { color: #9a570f; background: #fff1e1; }

/* Dialog and toast */
.control-dialog { width: min(520px, calc(100% - 32px)); padding: 0; color: var(--ink); background: #fff; border: 0; border-radius: 12px; box-shadow: 0 22px 54px rgba(14, 35, 30, .28); }
.control-dialog::backdrop { background: rgba(12, 30, 26, .56); backdrop-filter: blur(3px); }
.control-dialog form { padding: 22px; }
.energy-cube-dialog { width: min(1120px, calc(100% - 32px)); max-height: min(880px, calc(100vh - 40px)); overflow: auto; }
.energy-cube-dialog-body { padding: 24px; }
.energy-cube-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 18px;
  overflow: hidden;
  background: var(--line);
  border-radius: 9px;
}
.energy-cube-status div { min-width: 0; padding: 12px 14px; background: #f3f8f6; }
.energy-cube-status span, .energy-cube-status strong { display: block; }
.energy-cube-status span { margin-bottom: 5px; color: var(--muted); font-size: var(--text-caption); }
.energy-cube-status strong { font-size: var(--text-compact); line-height: 1.5; }
.energy-cube-models { overflow: hidden; background: #f7faf9; border-radius: 10px; }
.energy-cube-models-head {
  display: flex;
  gap: 16px;
  min-height: 68px;
  padding: 13px 16px;
  justify-content: space-between;
  align-items: center;
  color: #173e36;
  background: #eaf5f2;
}
.energy-cube-models-head > div { flex: 0 0 auto; }
.energy-cube-models-head span { display: block; margin-bottom: 3px; color: var(--interactive); font-size: var(--text-caption); font-weight: 800; }
.energy-cube-models-head h3 { margin: 0; font-size: var(--text-label); }
.energy-cube-models-head p {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  color: #4f6861;
  font-size: var(--text-secondary);
  line-height: 1.6;
  text-align: right;
  white-space: nowrap;
}
.energy-cube-model-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding-top: 22px;
  background: #fff;
  border-top: 1px solid #dce9e5;
}
.energy-cube-model-grid::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 10%;
  left: 10%;
  height: 1px;
  background: #8fc5dc;
}
.energy-cube-model {
  --model-color: #3d8fc3;
  --model-soft: #e8f3fa;
  position: relative;
  min-width: 0;
  padding: 12px 14px 16px;
  text-align: center;
}
.energy-cube-model + .energy-cube-model { border-left: 1px solid #e4ecea; }
.energy-cube-model::before {
  content: "";
  position: absolute;
  top: -11px;
  left: calc(50% - 4px);
  width: 8px;
  height: 8px;
  background: var(--model-color);
  border: 2px solid #fff;
  border-radius: 50%;
}
.energy-cube-model-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin: 0 auto 8px;
  place-items: center;
  color: var(--model-color);
  background: var(--model-soft);
  border-radius: 50%;
}
.energy-cube-model-icon .icon { width: 22px; height: 22px; }
.energy-cube-model-icon img { display: block; width: 36px; height: 36px; object-fit: contain; }
.energy-cube-model h4 { margin: 0; color: var(--model-color); font-size: var(--text-compact); }
.energy-cube-model > p { min-height: 40px; margin: 5px 0 10px; color: #5b706a; font-size: var(--text-caption); line-height: 1.55; }
.energy-cube-model ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.energy-cube-model li {
  display: flex;
  gap: 7px;
  min-height: 34px;
  padding: 7px 9px;
  align-items: center;
  color: #304d46;
  background: #f3f7f6;
  border-radius: 6px;
  font-size: var(--text-caption);
  font-weight: 700;
  text-align: left;
}
.energy-cube-model li::before { content: ""; flex: 0 0 6px; width: 6px; height: 6px; background: var(--model-color); border-radius: 50%; }
.energy-cube-model.model-optimize, .energy-cube-model.model-fault { --model-color: #c96b25; --model-soft: #fff0e3; }
.energy-cube-model.model-dispatch { --model-color: #376fb4; --model-soft: #eaf1fb; }
.energy-cube-model.model-carbon { --model-color: #16867e; --model-soft: #e3f5f2; }
.energy-cube-guardrails {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 52px;
  padding: 10px 14px;
  align-items: center;
  background: #eef5f3;
  border-top: 1px solid #dce9e5;
}
.energy-cube-guardrails strong { margin-right: 3px; color: #244b41; font-size: var(--text-caption); }
.energy-cube-guardrails span { padding: 5px 8px; color: #49675f; background: #fff; border-radius: 5px; font-size: var(--text-caption); white-space: nowrap; }
.energy-cube-note { margin: 14px 0 0; color: var(--muted); font-size: var(--text-caption); line-height: 1.65; }
.energy-cube-dialog .dialog-actions { padding: 0 24px 24px; }
.dialog-head { display: flex; gap: 12px; margin-bottom: 18px; align-items: center; }
.dialog-icon { display: grid; flex: 0 0 42px; height: 42px; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 9px; }
.dialog-icon .icon { width: 21px; height: 21px; }
.energy-cube-dialog .dialog-icon img { display: block; width: 38px; height: 38px; object-fit: contain; }
.dialog-head small { display: block; margin-bottom: 3px; color: var(--interactive); font-size: var(--text-caption); font-weight: 800; }
.dialog-head h2 { margin: 0; font-size: var(--text-title); }
.dialog-head > button { display: grid; width: 34px; height: 34px; margin-left: auto; padding: 0; place-items: center; color: var(--muted); background: #f3f6f5; border: 0; border-radius: 7px; cursor: pointer; font-size: var(--text-page-title); line-height: 1; }
.dialog-context { margin-bottom: 16px; padding: 12px 13px; color: #52645f; background: #f3f7f6; border-radius: 8px; font-size: var(--text-secondary); line-height: 1.7; }
.dialog-field { display: block; margin-top: 14px; }
.dialog-field > span { display: block; margin-bottom: 7px; color: var(--ink-soft); font-size: var(--text-compact); font-weight: 700; }
.dialog-field input, .dialog-field select, .dialog-field textarea { width: 100%; min-height: 42px; padding: 9px 11px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; outline: 0; font-size: var(--text-body); }
.dialog-field textarea { min-height: 76px; resize: vertical; line-height: 1.6; }
.dialog-field input:focus, .dialog-field select:focus, .dialog-field textarea:focus { border-color: var(--interactive); box-shadow: 0 0 0 3px var(--focus); }
.confirm-check { display: flex; gap: 10px; margin-top: 16px; padding: 12px; align-items: flex-start; color: #5a6a66; background: #fff7ed; border-radius: 8px; font-size: var(--text-secondary); line-height: 1.6; cursor: pointer; }
.confirm-check input { flex: 0 0 auto; width: 17px; height: 17px; margin: 0; accent-color: var(--brand); }
.dialog-feedback { margin: 12px 0 0; padding: 9px 11px; color: #a23232; background: #fff0ee; border-radius: 7px; font-size: var(--text-secondary); }
.dialog-actions { display: flex; gap: 9px; margin-top: 20px; justify-content: flex-end; }
.toast-region { position: fixed; z-index: var(--z-toast); right: 20px; bottom: 20px; display: grid; gap: 9px; width: min(360px, calc(100% - 40px)); pointer-events: none; }
.toast { display: flex; gap: 10px; padding: 12px 14px; align-items: flex-start; color: #eaf8f4; background: #153f37; border-radius: 9px; box-shadow: 0 10px 26px rgba(12,36,31,.22); animation: toast-enter 200ms ease-out; }
.toast.is-error { color: #fff; background: #9e3636; }
.toast strong, .toast span { display: block; }
.toast strong { margin-bottom: 3px; font-size: var(--text-compact); }
.toast span { color: #b9d7d0; font-size: var(--text-caption); line-height: 1.5; }
.toast.is-error span { color: #ffd9d5; }
@keyframes toast-enter { from { opacity: 0; transform: translateY(8px); } }
.mobile-backdrop { position: fixed; z-index: var(--z-backdrop); inset: 0; background: rgba(8,28,24,.5); }

/* Responsive */
@media (max-width: 1180px) {
  .station-heading { width: min(540px, calc(100% - 620px)); }
  .header-weather-location, .header-weather-condition { display: none; }
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-strip article:nth-child(3) { border-left: 0; }
  .kpi-strip article:nth-child(n+3) { border-top: 1px solid var(--line); }
  .weather-panel { grid-template-columns: 1fr; }
  .weather-current { border-right: 0; border-bottom: 1px solid var(--line); }
  .overview-main { grid-template-columns: 1fr; }
  .analysis-grid { grid-template-columns: 1fr; }
  .carbon-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .carbon-kpis article:nth-child(3) { border-left: 0; }
  .carbon-kpis article:nth-child(n+3) { border-top: 1px solid var(--line); }
  .carbon-chart-grid, .carbon-accounting-grid { grid-template-columns: 1fr; }
  .model-source-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .model-source-boundary { grid-column: 1 / -1; border-top: 1px solid var(--line); border-left: 0 !important; }
  .model-workspace { grid-template-columns: 1fr; }
  .model-assistant-entry { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
  .model-assistant-entry .secondary-button { width: auto; white-space: nowrap; }
}

@media (max-width: 960px) {
  .energy-cube-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .energy-cube-model-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1px;
    padding-top: 0;
    background: #dfe9e6;
  }
  .energy-cube-model-grid::before, .energy-cube-model::before { display: none; }
  .energy-cube-model { grid-column: span 2; background: #fff; }
  .energy-cube-model:nth-child(n+4) { grid-column: span 3; }
  .energy-cube-model + .energy-cube-model { border-left: 0; }
}

@media (max-width: 900px) {
  changfeng-twin-3d, changfeng-twin-2d { height: 400px; min-height: 400px; }
  :root { --sidebar-width: 224px; }
  .login-shell { grid-template-columns: 1fr; width: min(580px, calc(100% - 40px)); padding: 34px 0; }
  .login-panel { order: -1; }
  .login-story { order: 0; padding: 20px 8px 0; }
  .login-logo { margin-bottom: 36px; }
  .login-story h1 { font-size: clamp(36px, 8vw, 52px); }
  .sidebar { transform: translateX(-100%); }
  body.nav-open .sidebar { transform: translateX(0); }
  .workspace { margin-left: 0; }
  .sidebar-collapse { display: none; }
  .mobile-menu { display: grid; margin-right: 12px; }
  .mobile-menu span { width: 17px; height: 2px; background: #fff; }
  .mobile-menu span + span { margin-top: 3px; }
  .station-heading { position: static; left: auto; flex: 1 1 auto; gap: 9px; width: auto; min-width: 0; justify-content: flex-start; transform: none; text-align: left; }
  .header-brand-logo { width: 96px; height: 36px; padding: 4px 6px; }
  .station-heading > strong { font-size: var(--text-label); }
  .page { padding: 22px; }
  .geothermal-modules { grid-template-columns: 1fr; }
  .geothermal-module { min-height: 0; }
  .overview-bottom, .device-layout, .quality-workspace { grid-template-columns: 1fr; }
  .device-detail { position: static; }
  .service-sections { grid-template-columns: 1fr; }
  .analysis-insights { grid-template-columns: 1fr 1fr; }
  .insight-primary { grid-column: 1 / -1; }
  .model-category-rail { display: flex; overflow-x: auto; }
  .model-category-rail button { flex: 0 0 210px; }
  .model-review-panel { grid-template-columns: 220px minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .login-shell { width: min(100% - 28px, 480px); gap: 34px; }
  .login-story { padding-top: 4px; }
  .login-logo { width: 220px; min-height: 65px; margin-bottom: 28px; }
  .login-story h1 { font-size: 2.25rem; }
  .login-description { font-size: var(--text-label); line-height: 1.75; }
  .login-flow { display: grid; grid-template-columns: 1fr auto 1fr; gap: 7px; }
  .login-flow i { display: none; }
  .login-flow span { padding: 6px; text-align: center; background: rgba(255,255,255,.05); border-radius: 6px; }
  .login-facts { grid-template-columns: 1fr; gap: 12px; }
  .login-facts div, .login-facts div + div { padding: 0; border-left: 0; }
  .login-facts dt, .login-facts dd { display: inline; }
  .login-facts dt { margin-right: 10px; }
  .login-panel { padding: 26px 22px 20px; }
  .role-switch { grid-template-columns: 1fr; }
  .workspace-header { height: 64px; padding: 0 14px; }
  .station-heading { gap: 7px; }
  .header-brand-logo { width: 68px; height: 30px; padding: 3px 4px; border-radius: 5px; }
  .station-heading > strong { font-size: var(--text-compact); }
  .header-actions { flex: 0 0 auto; gap: 7px; }
  .header-info-card { min-height: 38px; padding-inline: 8px; gap: 5px; }
  .header-weather-location, .header-weather-condition, .header-latest-label, .header-updated-value > span:first-child { display: none; }
  .page { padding: 18px 14px 84px; }
  .page-title, .row-title { display: block; margin-bottom: 18px; }
  .page-title h1 { font-size: var(--text-page-mobile); }
  .page-title-heading > div > span { display: block; }
  .page-title-heading { align-items: flex-start; }
  .page-title-icon { flex-basis: 50px; width: 50px; height: 50px; }
  .search-field { width: 100%; margin-top: 14px; }
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-strip article:nth-child(3) { border-left: 0; }
  .kpi-strip article:nth-child(n+3) { border-top: 1px solid var(--line); }
  .kpi-strip article:nth-child(4) { border-left: 1px solid var(--line); }
  .kpi-strip article { padding: 14px; }
  .weather-current { padding: 15px; }
  .weather-forecast { padding: 15px 0 10px; overflow: hidden; }
  .weather-forecast-head { padding: 0 15px; }
  .weather-days { grid-template-columns: repeat(5, minmax(112px, 1fr)); overflow-x: auto; }
  .weather-day { padding-inline: 10px; }
  .weather-now { gap: 9px; }
  .weather-symbol { flex-basis: 42px; height: 42px; }
  .weather-temperature strong { font-size: var(--text-metric-xlarge); }
  .weather-facts div + div { padding-left: 8px; }
  .panel-head { display: block; padding: 16px; }
  .segmented-control { margin-top: 12px; }
  .segmented-control button { flex: 1; }
  changfeng-twin-3d, changfeng-twin-2d { height: 330px; min-height: 330px; }
  .ground-temp-detail { padding: 15px; }
  .ground-temp-detail-body { grid-template-columns: 1fr; }
  .ground-temp-values { grid-template-columns: repeat(5, minmax(96px, 1fr)); overflow-x: auto; }
  .twin-legend { justify-content: flex-start; overflow-x: auto; }
  .circuit-panel { display: block; }
  .geothermal-modules { grid-template-columns: 1fr; }
  .geothermal-module { min-height: 0; }
  .fiber-monitor-content { grid-template-columns: minmax(136px, .36fr) minmax(0, 1fr); padding: 15px; }
  .geothermal-simulation-field { margin: 15px 15px 0; }
  .numerical-simulation-module .geothermal-module-head { flex-wrap: wrap; align-items: flex-start; }
  .simulation-head-actions { width: 100%; justify-content: space-between; }
  .simulation-view-switch { flex: 1; }
  .simulation-view-switch button { flex: 1; }
  .simulation-field-caption { align-items: flex-start; flex-direction: column; gap: 3px; }
  .simulation-field-caption span { text-align: left; }
  .numerical-simulation-module .geothermal-module-footer { align-items: stretch; flex-direction: column; }
  .numerical-simulation-module .geothermal-module-footer span { max-width: none; }
  .simulation-footer-actions { justify-content: space-between; }
  .overview-bottom { display: block; }
  .trend-panel { margin-top: 16px; }
  .chart-legend { margin-top: 8px; }
  .device-row { grid-template-columns: 40px minmax(0, 1fr) auto 18px; min-height: 68px; padding: 12px; }
  .device-row > .device-measure:nth-of-type(1), .device-row > .device-measure:nth-of-type(2) { display: none; }
  .data-source-box { margin-top: 13px; }
  .property-row { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 13px; }
  .property-register { display: none; }
  .control-list { grid-template-columns: 1fr; }
  .control-item:nth-child(even) { border-left: 0; }
  .analysis-insights, .quality-summary { grid-template-columns: 1fr 1fr; }
  .carbon-page-title .carbon-market-status { margin-top: 12px; }
  .carbon-kpis { grid-template-columns: 1fr; }
  .carbon-kpis article + article { border-top: 1px solid var(--line); border-left: 0; }
  .carbon-kpis article { grid-template-columns: 60px minmax(0, 1fr); min-height: 104px; padding: 15px; }
  .carbon-kpis img { width: 60px; height: 60px; }
  .carbon-chart { height: 280px; padding-inline: 4px; }
  .carbon-emission-compare { grid-template-columns: 1fr; }
  .carbon-emission-compare > i { display: none; }
  .carbon-method-facts { grid-template-columns: 1fr; }
  .model-kernel-state { width: 100%; min-width: 0; margin-top: 13px; }
  .model-source-bar { grid-template-columns: 1fr 1fr; }
  .model-source-bar > div:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--line); border-left: 0; }
  .model-source-bar > div:nth-child(4) { border-top: 1px solid var(--line); }
  .model-source-boundary { grid-column: 1 / -1; }
  .model-category-rail button { flex-basis: 196px; min-height: 76px; grid-template-columns: 42px minmax(0, 1fr) auto; }
  .model-category-rail img { width: 42px; height: 42px; }
  .model-review-panel { display: block; min-height: 0; }
  .model-index { border-right: 0; border-bottom: 1px solid var(--line); }
  .model-list { grid-template-columns: 1fr 1fr; }
  .model-list button:nth-child(odd) { border-right: 1px solid var(--line); }
  .model-detail { padding: 16px; }
  .model-detail-head { display: block; }
  .model-detail-head > .status-chip { margin-top: 10px; }
  .model-evidence-spine { grid-template-columns: 1fr; }
  .model-evidence-spine > i { height: 22px; transform: rotate(90deg); }
  .model-evidence-list > div { grid-template-columns: 1fr; gap: 5px; }
  .model-assistant-entry { grid-template-columns: auto minmax(0, 1fr); padding: 18px; }
  .model-assistant-entry .secondary-button { grid-column: 1 / -1; width: 100%; }
  .insight-primary { grid-column: 1 / -1; }
  .quality-summary article:nth-child(3) { border-left: 0; }
  .quality-summary article:nth-child(n+3) { border-top: 1px solid var(--line); }
  .table-scroll { max-height: none; }
  th:nth-child(3), td:nth-child(3), th:nth-child(4), td:nth-child(4) { display: none; }
  .control-dialog form { padding: 18px; }
  .energy-cube-dialog-body { padding: 18px; }
  .energy-cube-status { grid-template-columns: 1fr; }
  .energy-cube-models-head { display: block; }
  .energy-cube-models-head p { margin-top: 8px; text-align: left; white-space: normal; }
  .energy-cube-model-grid { grid-template-columns: 1fr; }
  .energy-cube-model, .energy-cube-model:nth-child(n+4) { grid-column: auto; }
  .energy-cube-model > p { min-height: 0; }
  .energy-cube-dialog .dialog-actions { padding: 0 18px 18px; }
}

@media (max-width: 640px) {
  .yizhen-assistant-root { --yizhen-assistant-launcher-width: 88px; --yizhen-assistant-launcher-height: 100px; }
  .yizhen-assistant-backdrop { position: fixed; inset: 0; display: block; background: rgba(6,27,23,.48); pointer-events: auto; animation: yizhen-assistant-backdrop-in 160ms ease-out; }
  .yizhen-assistant-panel { inset: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); width: auto; height: auto; max-height: none; border-radius: 14px; }
  .yizhen-assistant-header { min-height: 66px; padding: 9px 8px 9px 12px; }
  .yizhen-assistant-avatar { flex-basis: 40px; width: 40px; height: 40px; }
  .yizhen-assistant-icon-button { width: 42px; height: 42px; }
  .yizhen-assistant-current-context { padding-inline: 12px; }
  .yizhen-assistant-message-list { min-height: 0; padding: 14px 11px 16px; }
  .yizhen-assistant-message-bubble { max-width: calc(100% - 34px); }
  .yizhen-assistant-quick-prompts { padding-inline: 10px; }
  .yizhen-assistant-composer { padding: 8px 9px 9px; }
  .yizhen-assistant-composer-meta { gap: 6px; }
  .yizhen-assistant-composer-box { min-height: 60px; }
  .yizhen-assistant-composer-foot > span:first-child { max-width: 25ch; }
  .yizhen-assistant-launcher-wrap { right: max(12px, env(safe-area-inset-right)); bottom: calc(84px + env(safe-area-inset-bottom)); }
}

@keyframes yizhen-assistant-backdrop-in { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* T022 responsive hardening: phones, tablets, desktop and control-room displays. */
html {
  min-width: 0;
  overflow-x: clip;
}

body, .app-shell, .workspace, .page { min-width: 0; }
body { overflow-x: clip; }
img, canvas, video { max-width: 100%; }

.login-shell {
  padding-top: max(50px, env(safe-area-inset-top));
  padding-bottom: max(50px, env(safe-area-inset-bottom));
}

.sidebar {
  padding-top: max(20px, env(safe-area-inset-top));
  padding-right: max(14px, env(safe-area-inset-right));
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  padding-left: max(14px, env(safe-area-inset-left));
}

.workspace-header {
  height: calc(var(--header-height) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  padding-right: max(28px, env(safe-area-inset-right));
  padding-left: max(28px, env(safe-area-inset-left));
}

.page {
  width: 100%;
  max-width: 2320px;
  margin-inline: auto;
  padding-right: max(28px, env(safe-area-inset-right));
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  padding-left: max(28px, env(safe-area-inset-left));
}

.page > *,
.page-title,
.panel-head,
.geothermal-module-head,
.table-toolbar,
.control-zone-head,
.model-detail,
.energy-cube-dialog-body { min-width: 0; }

.table-scroll {
  max-width: 100%;
  overscroll-behavior-inline: contain;
}

.table-scroll table { min-width: 860px; }

.control-dialog {
  max-height: calc(100dvh - max(24px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom)));
  overflow: auto;
  overscroll-behavior: contain;
}

.toast-region {
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
}

.yizhen-assistant-panel {
  max-height: min(760px, calc(100dvh - max(48px, env(safe-area-inset-top)) - env(safe-area-inset-bottom)));
  overscroll-behavior: contain;
}

.yizhen-assistant-launcher-wrap { bottom: max(20px, env(safe-area-inset-bottom)); }

/* The layout becomes a drawer when the permanent rail leaves too little working width. */
@media (max-width: 1100px) {
  :root { --sidebar-width: 244px; }

  .yizhen-assistant-root {
    --yizhen-assistant-launcher-width: 72px;
    --yizhen-assistant-launcher-height: 84px;
  }

  button,
  input,
  select,
  textarea,
  [role="button"] { min-height: 44px; }
  button, [role="button"] { min-width: 44px; }
  .icon-button,
  .session button,
  .login-form label button,
  .dialog-head > button { width: 44px; height: 44px; }
  .page :is(button, input, select, textarea, [role="button"]) { min-height: 44px; }

  .sidebar {
    width: min(84vw, var(--sidebar-width));
    transform: translateX(-105%);
    box-shadow: 14px 0 36px rgba(4, 29, 24, .24);
  }

  body.nav-open .sidebar { transform: translateX(0); }
  .workspace { margin-left: 0; }
  .sidebar-collapse { display: none; }
  .mobile-menu { display: grid; flex: 0 0 44px; width: 44px; height: 44px; margin-right: 12px; }
  .mobile-menu span { width: 18px; height: 2px; background: #fff; }
  .mobile-menu span + span { margin-top: 4px; }
  .station-heading {
    position: static;
    left: auto;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    justify-content: flex-start;
    transform: none;
    text-align: left;
  }
  .page {
    padding-top: 22px;
    padding-right: max(22px, env(safe-area-inset-right));
    padding-bottom: max(22px, env(safe-area-inset-bottom));
    padding-left: max(22px, env(safe-area-inset-left));
  }
  .geothermal-modules, .overview-bottom, .device-layout, .quality-workspace, .service-sections { grid-template-columns: 1fr; }
  .device-detail { position: static; }
}

@media (max-width: 767px) {
  :root {
    --header-height: 64px;
    --text-body: 1rem;
    --text-ui: 1rem;
  }

  body { font-size: 16px; }

  .yizhen-assistant-root {
    --yizhen-assistant-launcher-width: 72px;
    --yizhen-assistant-launcher-height: 84px;
  }

  .login-shell {
    width: min(100% - 24px, 500px);
    gap: 24px;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  .login-panel { padding: 24px 18px 20px; }
  .login-panel footer { gap: 8px 16px; flex-wrap: wrap; }
  .login-story { padding-inline: 4px; }
  .login-flow { grid-template-columns: 1fr; }
  .login-flow span { min-height: 44px; padding: 10px 12px; text-align: left; }

  .workspace-header {
    min-height: calc(var(--header-height) + env(safe-area-inset-top));
    height: auto;
    padding-top: env(safe-area-inset-top);
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
  }
  .mobile-menu { margin-right: 8px; }
  .station-heading > strong { font-size: var(--text-compact); }
  .header-actions { gap: 6px; }
  .header-info-card { min-height: 44px; }

  .page {
    padding-top: 18px;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .page-title { gap: 14px; }
  .page-title-heading { gap: 10px; }
  .page-title-heading > div > span,
  .panel-head p,
  .control-zone-head p,
  .model-detail dd,
  .analysis-note p,
  .carbon-data-notice p { overflow-wrap: anywhere; }

  .kpi-strip article { gap: 8px; padding: 11px 10px; }
  .kpi-icon { flex-basis: 42px; width: 42px; height: 42px; }
  .kpi-strip article > div { min-height: 48px; }
  .kpi-strip strong { font-size: 1.4rem; }

  .panel-head,
  .control-zone-head,
  .geothermal-module-head { padding: 15px 14px; }
  .twin-toolbar { width: 100%; justify-content: flex-start; }
  .segmented-control { max-width: 100%; overflow-x: auto; }
  .segmented-control button { min-width: 64px; min-height: 44px; }
  changfeng-twin-3d, changfeng-twin-2d { height: clamp(270px, 70vw, 330px); min-height: clamp(270px, 70vw, 330px); }

  .weather-days,
  .ground-temp-values,
  .twin-legend,
  .model-category-rail,
  .filter-tabs {
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
  }
  .weather-day,
  .ground-temp-values > *,
  .twin-legend > *,
  .model-category-rail > *,
  .filter-tabs > * { scroll-snap-align: start; }

  .fiber-monitor-content { grid-template-columns: minmax(118px, .4fr) minmax(0, 1fr); gap: 10px; padding: 14px; }
  .geothermal-simulation-field { min-width: 0; }
  .simulation-view-switch button,
  .geothermal-module-footer button,
  .ground-temp-close { min-height: 44px; }

  .chart-canvas,
  .carbon-chart { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
  .chart-canvas svg { min-width: 560px; }
  .carbon-chart svg { min-width: 620px; }

  .device-row {
    grid-template-columns: 44px minmax(0, 1fr) 24px;
    gap: 7px 10px;
    min-height: 104px;
    padding: 12px;
    align-items: center;
  }
  .device-symbol { grid-row: 1 / 5; width: 44px; height: 44px; }
  .device-row > div { grid-column: 2 / 4; }
  .device-row > .device-measure {
    display: block !important;
    grid-column: 2 / 4;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .device-row > .device-status { grid-column: 2; }
  .device-row > .icon { grid-column: 3; }
  .device-detail-hero.has-image { grid-template-columns: 88px minmax(0, 1fr); }
  .device-detail-image { min-height: 104px; }
  .device-detail-image img { height: 88px; }

  .property-row { grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 12px 13px; }
  .property-row > * { grid-column: 1; }
  .property-register {
    display: block !important;
    overflow-wrap: anywhere;
  }
  .property-value { justify-self: start; }

  .analysis-insights, .quality-summary { grid-template-columns: 1fr 1fr; }
  .analysis-insights > *, .quality-summary > * { min-width: 0; }
  .carbon-accounting-card { padding: 16px 14px; }
  .carbon-formula { overflow-x: auto; text-align: left; white-space: nowrap; }
  .model-source-bar { grid-template-columns: 1fr; }
  .model-source-bar > div,
  .model-source-bar > div:nth-child(3),
  .model-source-bar > div:nth-child(4),
  .model-source-boundary { grid-column: auto; border-top: 1px solid var(--line); border-left: 0; }
  .model-source-bar > div:first-child { border-top: 0; }
  .model-method-section code { max-width: 100%; }

  .table-toolbar { gap: 12px; flex-wrap: wrap; align-items: flex-start; }
  .table-toolbar select { width: 100%; min-height: 44px; }
  .table-scroll { max-height: min(620px, 66dvh); }
  .table-scroll table { min-width: 860px; }
  th:nth-child(3), td:nth-child(3), th:nth-child(4), td:nth-child(4) { display: table-cell; }

  .control-dialog {
    width: calc(100% - max(16px, env(safe-area-inset-left)) - max(16px, env(safe-area-inset-right)));
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
    margin-block: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-bottom));
  }
  .control-dialog form, .energy-cube-dialog-body { padding: 16px 14px; }
  .dialog-head > button { flex: 0 0 44px; width: 44px; height: 44px; }
  .dialog-actions { position: sticky; bottom: 0; margin-inline: -14px; margin-bottom: -16px; padding: 12px 14px max(12px, env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
  .energy-cube-dialog .dialog-actions { padding: 12px 14px max(12px, env(safe-area-inset-bottom)); }

  .toast-region {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(100% - max(24px, env(safe-area-inset-left)) - max(24px, env(safe-area-inset-right)));
  }

  .yizhen-assistant-panel {
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
  }
  .yizhen-assistant-message-list { overscroll-behavior: contain; }
  .yizhen-assistant-composer { padding-bottom: max(9px, env(safe-area-inset-bottom)); }
  .yizhen-assistant-composer-foot { gap: 4px 10px; flex-wrap: wrap; }
  .yizhen-assistant-launcher-wrap { bottom: max(18px, env(safe-area-inset-bottom)); }
}

@media (max-width: 480px) {
  .workspace-header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 6px 8px;
    padding-bottom: 8px;
  }
  .mobile-menu { grid-column: 1; grid-row: 1; margin: 0; }
  .station-heading { grid-column: 2; grid-row: 1; }
  .header-brand-logo { width: 66px; }
  .station-heading > strong { white-space: normal; line-height: 1.25; }
  .header-actions { grid-column: 1 / -1; grid-row: 2; width: 100%; margin: 0; }
  .header-info-card { flex: 1 1 0; justify-content: center; }
  .header-weather-location, .header-weather-condition, .header-latest-label { display: inline; }
  .header-updated-value > span:first-child { display: none; }

  .page-title-icon { flex-basis: 44px; width: 44px; height: 44px; }
  .page-title h1 { font-size: 1.375rem; }
  .page-title p { font-size: var(--text-secondary); }
  .page-title-heading > div > span { font-size: var(--text-compact); }
  .weather-facts { grid-template-columns: 1fr; gap: 8px; }
  .weather-facts div + div { padding: 8px 0 0; border-top: 1px solid #d5e5e0; border-left: 0; }
  .fiber-monitor-content { grid-template-columns: 1fr; }
  .fiber-borehole-model { max-width: 220px; margin-inline: auto; }
  .simulation-head-actions, .simulation-footer-actions { gap: 8px; flex-wrap: wrap; }
  .simulation-view-switch { flex-basis: 100%; }
  .device-detail-hero.has-image { grid-template-columns: 1fr; }
  .device-detail-image { min-height: 120px; }
  .device-specifications { grid-template-columns: 1fr; }
  .analysis-insights, .quality-summary { grid-template-columns: 1fr; }
  .analysis-insights > *,
  .quality-summary article,
  .quality-summary article:nth-child(3),
  .quality-summary article:nth-child(n+3) { border-left: 0; border-top: 1px solid var(--line); }
  .analysis-insights > *:first-child, .quality-summary article:first-child { border-top: 0; }
  .model-list { grid-template-columns: 1fr; }
  .model-list button:nth-child(odd) { border-right: 0; }
  .model-evidence-list > div { grid-template-columns: 1fr; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions > button { width: 100%; }
  .yizhen-assistant-panel { border-radius: 12px; }
  .yizhen-assistant-current-context { overflow-wrap: anywhere; }
}

@media (max-width: 359px) {
  .login-shell { width: calc(100% - 16px); }
  .login-panel { padding-inline: 14px; }
  .login-logo { width: 190px; }
  .login-story h1 { font-size: 2rem; }
  .page { padding-inline: max(8px, env(safe-area-inset-left)); }
  .kpi-strip article { padding-inline: 8px; }
  .kpi-icon { flex-basis: 36px; width: 36px; height: 36px; }
  .kpi-strip strong { font-size: 1.25rem; }
  .header-info-card { padding-inline: 6px; }
  .header-info-card > span { font-size: var(--text-caption); }
  .yizhen-assistant-panel { inset-inline: max(4px, env(safe-area-inset-left)) max(4px, env(safe-area-inset-right)); }
}

@media (orientation: landscape) and (max-height: 520px) {
  :root { --header-height: 56px; }
  .login-shell {
    width: min(920px, calc(100% - 32px));
    min-height: 100dvh;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    align-items: start;
  }
  .workspace-header { min-height: calc(var(--header-height) + env(safe-area-inset-top)); padding-bottom: 0; }
  .page { padding-top: 14px; }
  changfeng-twin-3d, changfeng-twin-2d { height: 260px; min-height: 260px; }
  .sidebar .brand { min-height: 118px; }
  .sidebar .brand-logo { height: 56px; }
  .sidebar .nav-list { margin-top: 10px; }
  .yizhen-assistant-panel { inset-block: max(4px, env(safe-area-inset-top)) max(4px, env(safe-area-inset-bottom)); }
  .yizhen-assistant-header { min-height: 58px; }
}

@media (max-height: 760px) and (min-width: 1101px) {
  :root { --header-height: 64px; }
  .sidebar { padding-top: 12px; }
  .brand { min-height: 132px; }
  .brand-logo { height: 62px; }
  .brand > div:last-child { margin-top: 8px; }
  .nav-list { margin-top: 12px; }
  .page { padding-top: 20px; }
  .control-dialog { max-height: calc(100dvh - 20px); }
  .energy-cube-dialog { max-height: calc(100dvh - 20px); }
}

@media (pointer: coarse) {
  button,
  select,
  input,
  textarea,
  [role="button"],
  .nav-item,
  .overview-device,
  .device-row { min-height: 44px; }
  .icon-button,
  .session button,
  .login-form label button,
  .dialog-head > button { min-width: 44px; width: 44px; height: 44px; }
}

@media (hover: none) {
  .model-assistant-shortcut:hover,
  .yizhen-assistant-launcher:hover { transform: none; }
}

@media (min-width: 1920px) {
  :root { --sidebar-width: 260px; --header-height: 78px; }
  .page { padding: 34px; }
  .sidebar { padding-inline: 18px; }
  .kpi-strip article { padding-block: 16px; }
  .chart-canvas.large { min-height: 380px; }
  .carbon-chart { height: 360px; }
}

@media (min-width: 3000px) {
  :root { --sidebar-width: 288px; --header-height: 84px; }
  .page { max-width: 2880px; padding: 40px; }
  .overview-main, .overview-bottom, .analysis-grid, .carbon-chart-grid { gap: 22px; }
  .kpi-strip { margin-bottom: 22px; }
  changfeng-twin-3d, changfeng-twin-2d { height: 560px; min-height: 560px; }
}

/* Overview: digital twin, fiber monitoring and numerical simulation share one switchable workspace. */
.overview-visual-workspace {
  --overview-visual-height: clamp(500px, 46vw, 580px);
  background: var(--surface);
}
#overviewPage .kpi-strip,
#overviewPage .overview-visual-workspace {
  border-color: rgba(34, 177, 135, .56);
  box-shadow: 0 0 8px rgba(26, 173, 130, .22), inset 0 0 0 1px rgba(82, 224, 181, .08);
}
#overviewPage .kpi-strip article + article,
#overviewPage .kpi-strip article:nth-child(n+3) { border-color: rgba(34, 177, 135, .32); }
#overviewPage .overview-visual-head { border-color: rgba(34, 177, 135, .42); }
#overviewPage .overview-visual-tabs {
  border: 1px solid rgba(39, 176, 137, .34);
  box-shadow: 0 0 7px rgba(31, 186, 139, .18), inset 0 0 0 1px rgba(255, 255, 255, .28);
}
#overviewPage .overview-visual-tabs button.is-active { box-shadow: 0 0 7px rgba(18, 137, 105, .48); }
.overview-visual-head {
  display: flex;
  min-height: 62px;
  padding: 10px 20px;
  justify-content: center;
  align-items: center;
  background: #f7faf9;
  border-bottom: 1px solid var(--line);
}
.overview-visual-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px;
  background: #e7efed;
  border-radius: 9px;
}
.overview-visual-tabs button {
  display: inline-flex;
  gap: 8px;
  min-height: 38px;
  padding: 0 15px;
  justify-content: center;
  align-items: center;
  color: #526c65;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: var(--text-secondary);
  font-weight: 800;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease;
}
.overview-visual-tab-icon {
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.overview-visual-tab-icon--opaque { mix-blend-mode: multiply; }
.overview-visual-tabs button:hover { color: var(--brand); background: rgba(255,255,255,.58); }
.overview-visual-tabs button.is-active { color: #fff; background: var(--brand); }
.overview-visual-tabs button:focus-visible { outline: 2px solid #328f7f; outline-offset: 2px; }
.overview-visual-panel {
  width: 100%;
  height: var(--overview-visual-height);
  min-width: 0;
  min-height: var(--overview-visual-height);
  overflow: auto;
  animation: overview-visual-panel-in 180ms cubic-bezier(.22,1,.36,1);
}
.overview-visual-panel[hidden] { display: none !important; }
.overview-visual-subhead { min-height: 70px; align-items: center; background: #fff; border-bottom: 1px solid var(--line); }
.overview-visual-subhead .twin-panel-title { font-size: var(--text-subheading); }
.overview-visual-workspace .overview-visual-module {
  height: 100%;
  min-height: 100%;
  background: #fff;
  border: 0;
  border-radius: 0;
}
.overview-visual-workspace .overview-only-twin {
  --twin-reset-top: auto;
  --twin-reset-right: calc(clamp(250px, 22vw, 310px) + 28px);
  --twin-reset-bottom: 14px;
  height: 100%;
  min-height: 100%;
}
.overview-visual-workspace .fiber-monitor-content { min-height: 0; }
.overview-visual-workspace .fiber-borehole-model,
.overview-visual-workspace .fiber-borehole-model img,
.overview-visual-workspace .fiber-temperature-readings { min-height: 0; }
.overview-visual-workspace .geothermal-simulation-field { flex: 1; min-height: 0; }
.overview-visual-workspace .geothermal-simulation-field svg { flex: 1; height: 100%; min-height: 0; }
.overview-visual-workspace .geothermal-plane-canvas { flex: 1; height: 100%; min-height: 0; }
.overview-visual-workspace .simulation-loading { flex: 1; min-height: 0; }
.overview-visual-workspace .ground-temp-detail { border-top: 1px solid #173f37; border-bottom: 0; }
#overviewVisualTwin { position: relative; overflow: hidden; }
.overview-floating-analytics {
  position: absolute;
  z-index: 4;
  inset: 14px;
  pointer-events: none;
}
.overview-analysis-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  width: clamp(250px, 22vw, 310px);
  padding: 14px;
  flex-direction: column;
  overflow: hidden;
  color: #e9f8f4;
  background: rgba(3, 32, 28, .70);
  border: 1px solid rgba(71, 203, 161, .72);
  border-radius: 12px;
  backdrop-filter: blur(4px) saturate(1.06);
  box-shadow: 0 0 8px rgba(52, 229, 175, .28), inset 0 0 0 1px rgba(132, 255, 218, .08);
  pointer-events: auto;
}
.overview-energy-overlay { left: 0; }
.overview-carbon-overlay { right: 0; }
.overview-analysis-overlay-head {
  display: flex;
  gap: 9px;
  min-height: 38px;
  align-items: center;
}
.overview-analysis-overlay-icon {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 5px;
  place-items: center;
  background: rgba(16, 100, 81, .46);
  border: 1px solid rgba(83, 213, 170, .32);
  border-radius: 8px;
}
.overview-analysis-overlay-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.overview-analysis-overlay-head h2 { margin: 0; color: #fff; font-size: 1.05rem; line-height: 1.2; }
.overview-analysis-status {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
  align-items: center;
  color: #b8d9d1;
  font-size: var(--text-caption);
  font-weight: 750;
}
.overview-analysis-status::before { width: 6px; height: 6px; background: #7d9690; border-radius: 50%; content: ""; }
.overview-analysis-status.is-live { color: #83edc1; }
.overview-analysis-status.is-live::before { background: #34d399; }
.overview-analysis-period {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 10px;
  padding: 3px;
  background: rgba(1, 21, 18, .42);
  border: 1px solid rgba(65, 197, 154, .42);
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(40, 207, 158, .18), inset 0 0 0 1px rgba(122, 246, 207, .06);
}
.overview-analysis-period button {
  min-width: 0;
  min-height: 30px;
  padding: 0 8px;
  color: #d3e9e3;
  background: transparent;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  font-size: var(--text-caption);
  font-weight: 800;
}
.overview-analysis-period button:hover { color: #fff; background: rgba(53, 196, 145, .16); }
.overview-analysis-period button.is-active { color: #fff; background: rgba(20, 148, 96, .78); }
.overview-analysis-period button:focus-visible { outline: 2px solid #8af2c5; outline-offset: 1px; }
.overview-analysis-section-label,
.overview-analysis-chart-head {
  display: flex;
  gap: 8px;
  min-height: 30px;
  justify-content: space-between;
  align-items: center;
  color: #dff1ed;
  font-size: var(--text-caption);
}
.overview-analysis-section-label { margin-top: 7px; }
.overview-analysis-section-label span,
.overview-analysis-chart-head span { color: #9fc8be; font-variant-numeric: tabular-nums; }
.overview-analysis-metrics { margin: 0; }
.overview-analysis-metrics > div {
  display: flex;
  gap: 10px;
  min-height: 42px;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(109, 224, 193, .30);
  box-shadow: 0 1px 4px -3px rgba(83, 242, 196, .72);
}
.overview-analysis-metrics dt { display: flex; gap: 8px; align-items: center; color: #d5e9e4; font-size: var(--text-secondary); font-weight: 700; }
.overview-analysis-metrics dd { display: flex; gap: 5px; margin: 0; align-items: baseline; }
.overview-analysis-metrics dd strong { color: #fff; font-size: 1.22rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.overview-analysis-metrics dd small { color: #a8cac1; font-size: .65rem; white-space: nowrap; }
.metric-dot { display: block; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 2px; }
.metric-dot.is-electricity, .overview-analysis-legend i.is-electricity { background: #2ed7ad; }
.metric-dot.is-cooling, .overview-analysis-legend i.is-cooling { background: #a78bfa; }
.metric-dot.is-efficiency, .overview-analysis-legend i.is-efficiency { background: #9df867; }
.metric-dot.is-emission { background: #52d6b0; }
.metric-dot.is-reduction { background: #6ef0b6; }
.metric-dot.is-intensity { background: #4cc9d8; }
.overview-analysis-chart-head { margin-top: 6px; }
.overview-analysis-chart { flex: 1; min-height: 90px; overflow: hidden; }
.overview-analysis-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.overview-analysis-chart .grid { stroke: rgba(152, 207, 193, .17); stroke-width: 1; }
.overview-analysis-chart .bar-electricity { fill: #2ed7ad; }
.overview-analysis-chart .bar-cooling { fill: #a78bfa; }
.overview-analysis-chart .efficiency-line { fill: none; stroke: #9df867; stroke-width: 2; }
.overview-analysis-chart .efficiency-point { fill: #082e27; stroke: #9df867; stroke-width: 2; }
.overview-analysis-chart .market-area { fill: rgba(46, 215, 173, .16); }
.overview-analysis-chart .market-line { fill: none; stroke: #52d6b0; stroke-width: 2; }
.overview-analysis-chart .market-point { fill: #8af2c5; }
.overview-analysis-chart text { fill: #a7cac1; font-size: 9px; font-family: "Segoe UI", system-ui, sans-serif; }
.overview-analysis-empty { display: grid; height: 100%; min-height: 80px; place-items: center; color: #9fc0b8; font-size: 1.25rem; }
.overview-analysis-legend { display: flex; gap: 13px; min-height: 24px; justify-content: center; align-items: center; color: #a8cbc2; font-size: .66rem; }
.overview-analysis-legend span { display: inline-flex; gap: 5px; align-items: center; }
.overview-analysis-legend i { display: block; width: 10px; height: 6px; border-radius: 2px; }
.overview-analysis-source { overflow: hidden; color: #8fb6ac; font-size: .62rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
@keyframes overview-visual-panel-in { from { opacity: .3; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) {
  .overview-visual-workspace { --overview-visual-height: 500px; }
  .overview-visual-workspace .overview-only-twin { --twin-reset-right: calc(min(245px, 28vw) + 20px); --twin-reset-bottom: 10px; }
  .overview-visual-tabs { width: max-content; max-width: 100%; align-self: center; }
  .overview-visual-tabs button { flex: 0 0 auto; }
  .overview-floating-analytics { inset: 10px; }
  .overview-analysis-overlay { width: min(245px, 28vw); padding: 11px; }
  .overview-analysis-period button { min-height: 44px; }
  .overview-analysis-metrics > div { min-height: 38px; }
  .overview-analysis-chart { min-height: 70px; }
}

@media (max-width: 640px) {
  .overview-visual-workspace { --overview-visual-height: 460px; }
  .overview-visual-workspace .overview-only-twin { --twin-reset-right: 10px; --twin-reset-bottom: 392px; }
  .overview-visual-head { min-height: 0; padding: 12px; }
  .overview-visual-tabs { width: 100%; overflow-x: auto; align-self: stretch; scroll-snap-type: x proximity; }
  .overview-visual-tabs button { flex: 0 0 auto; min-width: 148px; min-height: 44px; padding-inline: 12px; scroll-snap-align: start; }
  .overview-visual-tab-icon { flex-basis: 24px; width: 24px; height: 24px; }
  .overview-visual-subhead { display: block; padding: 14px; }
  .overview-visual-subhead .twin-toolbar { width: 100%; margin-top: 12px; justify-content: stretch; }
  .overview-visual-subhead .segmented-control { flex: 1; }
  .overview-visual-subhead .segmented-control button { flex: 1; min-height: 38px; }
  .overview-visual-workspace .overview-visual-module { min-height: 100%; }
  .overview-visual-workspace .fiber-monitor-content,
  .overview-visual-workspace .fiber-borehole-model,
  .overview-visual-workspace .fiber-borehole-model img,
  .overview-visual-workspace .fiber-temperature-readings { min-height: 0; }
  .overview-visual-workspace .geothermal-simulation-field svg,
  .overview-visual-workspace .geothermal-plane-canvas,
  .overview-visual-workspace .simulation-loading { min-height: 0; }
  .overview-floating-analytics {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    display: flex;
    gap: 8px;
    height: 374px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    pointer-events: auto;
  }
  .overview-analysis-overlay {
    position: relative;
    inset: auto;
    flex: 0 0 min(310px, calc(100vw - 66px));
    width: min(310px, calc(100vw - 66px));
    height: 356px;
    padding: 10px;
    scroll-snap-align: start;
  }
  .overview-analysis-overlay-head { min-height: 34px; }
  .overview-analysis-overlay-icon { flex-basis: 32px; width: 32px; height: 32px; }
  .overview-analysis-period { margin-top: 6px; }
  .overview-analysis-period button { min-height: 44px; }
  .overview-analysis-section-label { margin-top: 3px; }
  .overview-analysis-metrics > div { min-height: 34px; }
  .overview-analysis-metrics dd strong { font-size: 1rem; }
  .overview-analysis-chart-head { min-height: 24px; margin-top: 3px; }
  .overview-analysis-chart { min-height: 58px; }
  .overview-analysis-legend { min-height: 18px; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .overview-visual-workspace { --overview-visual-height: 360px; }
}

@media (min-width: 3000px) {
  .overview-visual-workspace { --overview-visual-height: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  .overview-visual-panel { animation: none; }
  .overview-visual-tabs button { transition: none; }
}

/* 1920×1080 control-room baseline: 248 rail + 1672 workspace, without vertical scrolling. */
@media (min-width: 1800px) and (min-height: 860px) {
  :root {
    --sidebar-width: 248px;
    --header-height: 62px;
    --overview-kpi-height: 108px;
    --overview-workspace-height: calc(100dvh - 196px);
  }

  .sidebar { width: 248px; }
  .workspace { margin-left: 248px; }
  .workspace-header {
    height: 62px;
    padding-inline: 22px;
  }

  #overviewPage {
    width: 100%;
    max-width: none;
    height: calc(100dvh - 62px);
    padding: 13px 18px 0;
    overflow: hidden;
  }

  #overviewPage .kpi-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    height: var(--overview-kpi-height);
    margin-bottom: 13px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  #overviewPage .kpi-strip article {
    height: var(--overview-kpi-height);
    min-height: var(--overview-kpi-height);
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid rgba(34, 177, 135, .56);
    border-radius: 12px;
    box-shadow: 0 0 8px rgba(26, 173, 130, .22), inset 0 0 0 1px rgba(82, 224, 181, .08);
  }

  #overviewPage .kpi-strip article + article,
  #overviewPage .kpi-strip article:nth-child(n+3) { border-color: rgba(34, 177, 135, .56); }
  #overviewPage .kpi-icon { flex-basis: 64px; width: 64px; height: 64px; }

  #overviewPage .overview-main {
    height: var(--overview-workspace-height);
    margin: 0;
    gap: 0;
  }

  #overviewPage .overview-visual-workspace {
    --overview-visual-height: calc(var(--overview-workspace-height) - 64px);
    height: var(--overview-workspace-height);
    min-height: var(--overview-workspace-height);
    border-radius: 12px;
  }

  #overviewPage .overview-visual-head {
    height: 62px;
    min-height: 62px;
    padding: 8px 20px;
  }

  #overviewPage .overview-visual-panel { overflow: hidden; }
  #overviewPage .overview-floating-analytics {
    top: 50%;
    right: 18px;
    bottom: auto;
    left: 18px;
    height: min(768px, calc(100% - 52px));
    transform: translateY(-50%);
  }

  #overviewPage .overview-analysis-overlay {
    top: 0;
    bottom: 0;
    width: 350px;
    height: 100%;
    padding: 16px;
    border-radius: 14px;
  }

  #overviewPage .overview-visual-workspace .overview-only-twin {
    --twin-reset-right: 384px;
    --twin-reset-bottom: 14px;
  }
}

/* Home cockpit theme: deep teal surfaces and restrained emerald instrumentation. */
body:has(#overviewPage.is-active) {
  --home-canvas: #001f1c;
  --home-canvas-deep: #001916;
  --home-surface: #03332e;
  --home-surface-raised: #073d36;
  --home-line: #238e73;
  --home-line-strong: #55ddb0;
  --home-accent: #18a978;
  --home-accent-strong: #65efb8;
  --home-text: #f1fff9;
  --home-text-soft: #b7d9d0;
  --home-text-muted: #8ebcb1;
  background: var(--home-canvas);
}

body:has(#overviewPage.is-active) .workspace { background: var(--home-canvas-deep); }
body:has(#overviewPage.is-active) .workspace-header {
  background: #002e2a;
  border-color: #155f52;
  box-shadow: 0 1px 8px rgba(31, 201, 149, .18);
}
body:has(#overviewPage.is-active) .header-info-card {
  color: var(--home-text);
  background: #043934;
  border-color: #196554;
}
body:has(#overviewPage.is-active) .header-info-card > span { color: var(--home-text-soft); }
body:has(#overviewPage.is-active) .header-latest i { background: #47e29d; box-shadow: 0 0 0 4px rgba(71, 226, 157, .12); }

body:has(#overviewPage.is-active) .sidebar {
  color: var(--home-text);
  background: #004b43;
  border-right: 1px solid #187565;
}
body:has(#overviewPage.is-active) .brand { border-color: rgba(149, 235, 211, .16); }
body:has(#overviewPage.is-active) .brand span,
body:has(#overviewPage.is-active) .session small { color: #9ccbc0; }
body:has(#overviewPage.is-active) .sidebar-collapse { color: #b5d9d0; background: #064f47; }
body:has(#overviewPage.is-active) .sidebar-collapse:hover { color: #fff; background: #0a6256; }
body:has(#overviewPage.is-active) .nav-item { color: #b8d9d1; }
body:has(#overviewPage.is-active) .nav-item:hover { color: #fff; background: #075c51; }
body:has(#overviewPage.is-active) .nav-item.is-active {
  color: #fff;
  background: #138a67;
  border: 1px solid #55dca5;
  box-shadow: 0 0 8px rgba(62, 231, 167, .28);
}
body:has(#overviewPage.is-active) .session { border-color: rgba(149, 235, 211, .16); }
body:has(#overviewPage.is-active) .session-avatar { color: #003f36; background: #69e2b5; }

#overviewPage {
  color: var(--home-text);
  background: var(--home-canvas-deep);
}
#overviewPage .kpi-strip {
  gap: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
}
#overviewPage .kpi-strip article,
#overviewPage .kpi-strip article + article,
#overviewPage .kpi-strip article:nth-child(n+3) {
  background: var(--home-surface);
  border: 1px solid var(--home-line-strong);
  border-radius: 12px;
  box-shadow: 0 0 8px rgba(68, 229, 172, .26), inset 0 0 0 1px rgba(151, 255, 220, .05);
}
#overviewPage .kpi-icon {
  object-fit: contain;
  background: transparent;
  border: 0;
  box-shadow: none;
  filter: drop-shadow(0 0 4px rgba(74, 220, 190, .24));
}
#overviewPage .kpi-strip span { color: var(--home-text-soft); }
#overviewPage .kpi-strip strong,
#overviewPage .kpi-strip article.is-unavailable strong { color: var(--home-text); }
#overviewPage .kpi-strip small { color: #9ecabe; }

#overviewPage .overview-visual-workspace {
  background: var(--home-canvas);
  border-color: var(--home-line-strong);
  box-shadow: 0 0 8px rgba(69, 230, 172, .30), inset 0 0 0 1px rgba(143, 255, 216, .05);
}
#overviewPage .overview-visual-head {
  background: #002c28;
  border-color: #25866f;
}
#overviewPage .overview-visual-tabs {
  background: #053d36;
  border-color: #247d69;
  box-shadow: 0 0 7px rgba(48, 215, 159, .20), inset 0 0 0 1px rgba(118, 242, 203, .06);
}
#overviewPage .overview-visual-tabs button { color: #acd2c8; }
#overviewPage .overview-visual-tabs button:hover { color: #fff; background: #0a574b; }
#overviewPage .overview-visual-tabs button.is-active {
  color: #fff;
  background: #118466;
  box-shadow: 0 0 7px rgba(75, 238, 178, .38);
}
#overviewPage .overview-visual-tabs button:focus-visible { outline-color: #86f5c7; }
#overviewPage .overview-visual-panel { background: var(--home-canvas); }
#overviewPage .overview-visual-workspace .overview-visual-module {
  color: var(--home-text);
  background: var(--home-canvas);
}

#overviewPage .overview-analysis-overlay {
  color: var(--home-text);
  background: rgba(0, 36, 32, .86);
  border-color: #58dfaF;
  box-shadow: 0 0 8px rgba(73, 234, 177, .34), inset 0 0 0 1px rgba(151, 255, 219, .06);
}
#overviewPage .overview-analysis-overlay-icon {
  padding: 1px;
  background: transparent;
  border-color: transparent;
}
#overviewPage .overview-analysis-overlay-icon img,
#overviewPage .overview-visual-tab-icon {
  filter: drop-shadow(0 0 3px rgba(83, 225, 194, .22));
}
#overviewPage .overview-analysis-status { color: var(--home-text-soft); }
#overviewPage .overview-analysis-period {
  background: #001d1a;
  border-color: #3ac392;
  box-shadow: 0 0 6px rgba(49, 221, 158, .22), inset 0 0 0 1px rgba(136, 255, 211, .05);
}
#overviewPage .overview-analysis-period button { color: #d4eee8; }
#overviewPage .overview-analysis-period button:hover { color: #fff; background: #0b5c4b; }
#overviewPage .overview-analysis-period button.is-active { color: #fff; background: #11845e; }
#overviewPage .overview-analysis-section-label,
#overviewPage .overview-analysis-chart-head { color: #e8faf5; }
#overviewPage .overview-analysis-section-label span,
#overviewPage .overview-analysis-chart-head span,
#overviewPage .overview-analysis-source { color: #a0c9be; }
#overviewPage .overview-analysis-metrics > div { border-color: #18584b; box-shadow: none; }
#overviewPage .overview-analysis-metrics dt { color: #d8eee8; }
#overviewPage .overview-analysis-metrics dd strong { color: #fff; }
#overviewPage .overview-analysis-metrics dd small,
#overviewPage .overview-analysis-legend { color: #acd0c7; }
#overviewPage .overview-analysis-chart .grid { stroke: #17463e; }
#overviewPage .overview-analysis-chart text { fill: #afd2c9; }

#overviewPage .geothermal-module-title h2,
#overviewPage .fiber-reading b,
#overviewPage .fiber-reading strong { color: var(--home-text); }
#overviewPage .geothermal-module-title p,
#overviewPage .fiber-reading small,
#overviewPage .fiber-reading em,
#overviewPage .fiber-reading-placeholder { color: var(--home-text-soft); }
#overviewPage .geothermal-module-icon { color: #68e4b8; background: #06483f; }
#overviewPage .geothermal-module-icon.simulation-icon { color: #7fd8f2; background: #073e43; }
#overviewPage .module-live-state { color: #9cf0ce; background: #06473d; }
#overviewPage .fiber-monitor-content { background: var(--home-canvas); }
#overviewPage .fiber-borehole-model { background: #042e2a; border-color: #267963; }
#overviewPage .fiber-reading { color: var(--home-text); }
#overviewPage .fiber-reading:hover,
#overviewPage .fiber-reading:focus-visible { background: #08443b; }
#overviewPage .fiber-reading::after { background: #0d5548; }
#overviewPage .fiber-reading::before { background: #66dcb6; }
#overviewPage .simulation-strategy { color: #c9e9e1; background: #063a33; }
#overviewPage .simulation-strategy.is-risk { color: #ffd6a4; background: #493018; }
#overviewPage .simulation-strategy-mark { color: #71e2ba; background: #0a584a; }
#overviewPage .simulation-strategy.is-risk .simulation-strategy-mark { color: #ffbd73; background: #633c19; }
#overviewPage .simulation-strategy-live { color: #78e6bd; }
#overviewPage .geothermal-module-footer { color: #a8cec4; background: #042d28; border-color: #185b4d; }

/* Reference-led control-room composition: separate command bar above an open scene. */
@media (min-width: 1800px) and (min-height: 860px) {
  #overviewPage .kpi-strip { gap: 20px; }
  #overviewPage .kpi-icon { flex-basis: 54px; width: 54px; height: 54px; }

  #overviewPage .overview-visual-workspace {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  #overviewPage .overview-visual-head {
    position: relative;
    z-index: 6;
    width: 100%;
    border: 1px solid var(--home-line-strong);
    border-radius: 12px;
    box-shadow: 0 0 8px rgba(69, 230, 172, .28), inset 0 0 0 1px rgba(143, 255, 216, .05);
  }

  #overviewPage .overview-visual-panel {
    height: calc(var(--overview-workspace-height) - 78px);
    min-height: calc(var(--overview-workspace-height) - 78px);
    margin-top: 16px;
    border-radius: 12px;
  }

  #overviewPage #overviewVisualTwin {
    border: 1px solid #174f45;
    box-shadow: inset 0 0 0 1px rgba(97, 216, 178, .04);
  }

  #overviewPage .overview-floating-analytics {
    height: min(768px, calc(100% - 36px));
  }

  #overviewPage .overview-analysis-overlay {
    padding: 18px;
  }
}

/* Control-room legibility pass: brighter white type with a clearer fixed scale. */
body:has(#overviewPage.is-active) {
  --home-text: #ffffff;
  --home-text-soft: #eefaf7;
  --home-text-muted: #d7eee8;
}

body:has(#overviewPage.is-active) .station-heading > strong {
  color: #ffffff;
  font-size: 1.375rem;
  font-weight: 800;
  text-shadow: 0 0 4px rgba(255, 255, 255, .14);
}

body:has(#overviewPage.is-active) .header-info-card,
body:has(#overviewPage.is-active) .header-info-card > span,
body:has(#overviewPage.is-active) .brand span,
body:has(#overviewPage.is-active) .session small,
body:has(#overviewPage.is-active) .sidebar-collapse,
body:has(#overviewPage.is-active) .nav-item {
  color: var(--home-text-soft);
}

body:has(#overviewPage.is-active) .header-info-card > span,
body:has(#overviewPage.is-active) .nav-item,
body:has(#overviewPage.is-active) .session small { font-weight: 650; }

body:has(#overviewPage.is-active) .header-info-card strong,
body:has(#overviewPage.is-active) .nav-item.is-active,
body:has(#overviewPage.is-active) .session strong { color: #ffffff; font-weight: 800; }

#overviewPage .kpi-strip span {
  color: var(--home-text-soft);
  font-size: .9375rem;
  font-weight: 650;
}

#overviewPage .kpi-strip strong {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 800;
  text-shadow: 0 0 4px rgba(255, 255, 255, .12);
}

#overviewPage .kpi-strip small {
  color: var(--home-text-soft);
  font-size: .75rem;
  font-weight: 650;
}

#overviewPage .overview-visual-tabs button {
  color: var(--home-text-soft);
  font-size: .9375rem;
  font-weight: 800;
}

#overviewPage .overview-visual-tabs {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

#overviewPage .overview-visual-tabs button {
  color: #d8eee8;
  background: #0a5147;
}

#overviewPage .overview-visual-tabs button:hover {
  color: #ffffff;
  background: #0c6154;
}

#overviewPage .overview-visual-tabs button.is-active {
  color: #ffffff;
  background: #118466;
}

#overviewPage .overview-analysis-overlay-head h2 {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  text-shadow: 0 0 4px rgba(255, 255, 255, .12);
}

#overviewPage .overview-analysis-status,
#overviewPage .overview-analysis-period button,
#overviewPage .overview-analysis-section-label,
#overviewPage .overview-analysis-chart-head,
#overviewPage .overview-analysis-section-label span,
#overviewPage .overview-analysis-chart-head span {
  color: var(--home-text-soft);
  font-weight: 700;
}

#overviewPage .overview-analysis-period button { font-size: .875rem; }
#overviewPage .overview-analysis-section-label,
#overviewPage .overview-analysis-chart-head { font-size: .8125rem; }

#overviewPage .overview-analysis-metrics dt {
  color: #f7fffd;
  font-size: .875rem;
  font-weight: 750;
}

#overviewPage .overview-analysis-metrics dd strong {
  color: #ffffff;
  font-size: 1.375rem;
  font-weight: 800;
  text-shadow: 0 0 4px rgba(255, 255, 255, .1);
}

#overviewPage .overview-analysis-metrics dd small,
#overviewPage .overview-analysis-legend,
#overviewPage .overview-analysis-source {
  color: var(--home-text-soft);
  font-size: .6875rem;
  font-weight: 650;
}

#overviewPage .overview-analysis-chart text {
  fill: #edf9f6;
  font-size: .625rem;
  font-weight: 650;
}

@media (max-width: 767px) {
  body:has(#overviewPage.is-active) .station-heading > strong { font-size: 1.125rem; }
  #overviewPage .kpi-strip span { font-size: .8125rem; }
  #overviewPage .kpi-strip strong { font-size: 1.5rem; }
  #overviewPage .overview-visual-tabs button { font-size: .875rem; }
}

/* Desktop twin composition: frameless scene with analytics anchored to its edges. */
@media (min-width: 641px) {
  #overviewPage #overviewVisualTwin {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  #overviewPage .overview-floating-analytics {
    inset: 0;
    width: 100%;
    height: 100%;
    transform: none;
  }

  #overviewPage .overview-analysis-overlay {
    top: 0;
    bottom: 0;
    height: 100%;
    background: rgba(0, 36, 32, .70);
  }

  #overviewPage .overview-energy-overlay { left: 0; }
  #overviewPage .overview-carbon-overlay { right: 0; }
}

/* Home cockpit border breathing: structural glow only, without restoring the frameless twin outline. */
@keyframes overview-tech-border-breathe {
  0%, 100% {
    border-color: rgba(67, 203, 164, .52);
    box-shadow: 0 0 3px rgba(56, 224, 174, .18), inset 0 0 0 1px rgba(151, 255, 220, .05);
  }
  50% {
    border-color: rgba(120, 255, 216, .96);
    box-shadow: 0 0 8px rgba(70, 242, 187, .52), inset 0 0 6px rgba(129, 255, 214, .14);
  }
}

@keyframes overview-tech-control-breathe {
  0%, 100% {
    box-shadow: inset 0 0 0 1px rgba(91, 221, 184, .24), 0 0 2px rgba(49, 214, 164, .12);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(126, 255, 216, .68), 0 0 7px rgba(62, 235, 179, .38);
  }
}

@keyframes overview-tech-divider-breathe {
  0%, 100% {
    border-color: rgba(109, 224, 193, .24);
    box-shadow: 0 1px 3px -3px rgba(83, 242, 196, .42);
  }
  50% {
    border-color: rgba(133, 255, 218, .58);
    box-shadow: 0 1px 5px -2px rgba(83, 242, 196, .68);
  }
}

#overviewPage .kpi-strip article,
#overviewPage .overview-visual-head,
#overviewPage .overview-analysis-overlay,
#overviewPage .overview-analysis-period,
#overviewPage .fiber-borehole-model,
#overviewPage .geothermal-simulation-field,
#overviewPage .simulation-strategy {
  animation: overview-tech-border-breathe 3.8s ease-in-out infinite;
}

#overviewPage .overview-visual-tabs button,
#overviewPage .overview-visual-tabs button:hover,
#overviewPage .overview-visual-tabs button.is-active {
  border: 0;
  box-shadow: none;
  animation: none;
}

#overviewPage .overview-analysis-metrics > div,
#overviewPage .simulation-field-caption,
#overviewPage .geothermal-module-footer,
#overviewPage .ground-temp-detail {
  animation: overview-tech-divider-breathe 3.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  #overviewPage .kpi-strip article,
  #overviewPage .overview-visual-head,
  #overviewPage .overview-analysis-overlay,
  #overviewPage .overview-analysis-period,
  #overviewPage .fiber-borehole-model,
  #overviewPage .geothermal-simulation-field,
  #overviewPage .simulation-strategy,
  #overviewPage .overview-analysis-metrics > div,
  #overviewPage .simulation-field-caption,
  #overviewPage .geothermal-module-footer,
  #overviewPage .ground-temp-detail {
    animation: none;
  }
}
