: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: 901px) {
  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(6, 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); }
.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; }
.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; }
.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; }
.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-launcher-width: 112px;
  --yizhen-assistant-launcher-height: 126px;
  position: fixed;
  z-index: var(--z-assistant);
  inset: 0;
  color: var(--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(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  width: min(420px, calc(100vw - 48px));
  max-height: min(760px, calc(100svh - 48px));
  overflow: hidden;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid #b9cbc6;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(7,38,32,.24), 0 4px 14px rgba(7,38,32,.12);
  pointer-events: auto;
  animation: yizhen-assistant-panel-in 180ms ease-out;
}
.yizhen-assistant-header { display: flex; min-height: 74px; padding: 12px 12px 12px 15px; align-items: center; justify-content: space-between; color: #f5fbf9; background: linear-gradient(135deg, #174f44, #0b3e35); }
.yizhen-assistant-identity { display: flex; gap: 10px; min-width: 0; align-items: center; }
.yizhen-assistant-avatar { display: grid; flex: 0 0 44px; width: 44px; height: 44px; padding: 2px; place-items: center; overflow: hidden; background: #0c2f2a; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; }
.yizhen-assistant-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 39%; border-radius: 9px; transform: scale(1.42); }
.yizhen-assistant-identity h2 { margin: 0 0 3px; overflow: hidden; font-size: var(--text-ui); text-overflow: ellipsis; white-space: nowrap; }
.yizhen-assistant-identity p { display: flex; gap: 7px; margin: 0; align-items: center; color: #bedbd4; font-size: var(--text-caption); }
.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: #5bdaa4; box-shadow: 0 0 0 3px rgba(91,218,164,.15); }
.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: 4px; flex: 0 0 auto; }
.yizhen-assistant-icon-button { display: grid; width: 40px; height: 40px; place-items: center; color: #d9ebe6; background: transparent; border-radius: 9px; }
.yizhen-assistant-icon-button:hover { color: #fff; background: rgba(255,255,255,.1); }
.yizhen-assistant-current-context { padding: 8px 15px; overflow: hidden; color: #3e665e; background: #edf5f2; border-bottom: 1px solid #d8e6e2; font-size: var(--text-caption); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.yizhen-assistant-message-list { min-height: 220px; padding: 16px 14px 18px; overflow-y: auto; overscroll-behavior: contain; flex: 1 1 auto; background: #f5f8f7; scrollbar-color: #b9cdc7 transparent; }
.yizhen-assistant-empty { max-width: 29ch; margin: 36px auto; color: var(--muted); text-align: center; }
.yizhen-assistant-empty::before { display: block; width: 34px; height: 2px; margin: 0 auto 16px; content: ""; background: var(--interactive); }
.yizhen-assistant-empty strong { display: block; margin-bottom: 7px; color: var(--ink); font-size: var(--text-body); }
.yizhen-assistant-empty p { margin: 0; font-size: var(--text-secondary); line-height: 1.7; }
.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 { display: grid; flex: 0 0 30px; width: 30px; height: 30px; margin-top: 2px; padding: 1px; place-items: center; overflow: hidden; background: #113b34; border: 1px solid #b9d3cc; border-radius: 9px; }
.yizhen-assistant-message-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 39%; border-radius: 7px; transform: scale(1.42); }
.yizhen-assistant-message-bubble { max-width: calc(100% - 38px); min-width: 50px; padding: 10px 11px; color: var(--ink-soft); background: #fff; border: 1px solid #dce6e3; border-radius: 5px 13px 13px; box-shadow: 0 3px 10px rgba(17,60,51,.05); }
.yizhen-assistant-message-row.is-user .yizhen-assistant-message-bubble { color: #183e36; background: #deeee9; border-color: #c9e1da; 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 #e0e9e6; }
.yizhen-assistant-evidence summary { color: #356c60; 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-left: 9px; border-left: 2px solid #b9d5ce; }
.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: 10px 12px 11px; background: #fff; border-top: 1px solid var(--line); }
.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: 6px; min-height: 64px; padding: 8px; align-items: end; background: #f8faf9; border: 1px solid #bccdc9; border-radius: 10px; transition: border-color 160ms ease, box-shadow 160ms ease; }
.yizhen-assistant-composer-box:focus-within { border-color: var(--interactive); box-shadow: 0 0 0 3px var(--focus); }
.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(104px, 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 140ms ease; }
.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: radial-gradient(ellipse at 50% 48%, rgba(25,91,75,.2), rgba(13,53,45,0) 72%); filter: drop-shadow(0 12px 14px rgba(9,43,36,.24)); transform-origin: 60% 90%; animation: yizhen-assistant-float 5.5s ease-in-out infinite; }
.yizhen-assistant-launcher:hover { filter: drop-shadow(0 15px 17px rgba(9,43,36,.28)); transform: translateY(-3px); }
.yizhen-assistant-launcher:focus-visible { border-radius: 22px; outline: 3px solid rgba(8,124,108,.42); outline-offset: 3px; }
.yizhen-assistant-launcher img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 47%; border-radius: 30px; -webkit-mask-image: radial-gradient(ellipse 72% 78% at 50% 48%, #000 56%, rgba(0,0,0,.92) 68%, rgba(0,0,0,.34) 84%, transparent 100%); mask-image: radial-gradient(ellipse 72% 78% at 50% 48%, #000 56%, rgba(0,0,0,.92) 68%, rgba(0,0,0,.34) 84%, transparent 100%); }
.yizhen-assistant-launcher-status { position: absolute; right: 8px; bottom: 12px; width: 13px; height: 13px; background: #d4a351; border: 3px 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-launcher-hint { position: absolute; right: calc(100% - 4px); bottom: 26px; padding: 7px 10px; color: #edf8f5; background: #17483e; border-radius: 7px 7px 2px 7px; box-shadow: 0 7px 18px rgba(11,46,39,.15); font-size: var(--text-caption); font-weight: 800; opacity: 0; transform: translateX(5px); transition: opacity 140ms ease, transform 140ms ease; white-space: nowrap; }
.yizhen-assistant-launcher-wrap:hover .yizhen-assistant-launcher-hint, .yizhen-assistant-launcher-wrap:focus-within .yizhen-assistant-launcher-hint { opacity: 1; transform: none; }
.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-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@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(3, minmax(0, 1fr)); }
  .kpi-strip article:nth-child(4) { border-left: 0; }
  .kpi-strip article:nth-child(n+4) { 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), .kpi-strip article:nth-child(5) { 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)); }
  .yizhen-assistant-launcher-hint { display: none; }
}

@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; }
}
