* { box-sizing: border-box; }

:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

html, body { margin: 0; min-width: 320px; min-height: 100%; }
body { color: var(--sgzx-ink); background: #e8f6ff; }
button, a { font: inherit; }
button { cursor: pointer; }

.page-shell {
  isolation: isolate;
  min-height: 100svh;
  padding: clamp(20px, 2.6vw, 72px) clamp(16px, 4.3vw, 166px) clamp(18px, 2.4vw, 52px);
}

.ambient-layer, .wave { position: absolute; pointer-events: none; }
.ambient-layer { z-index: -1; }
.ambient-layer--top {
  inset: 0 0 auto;
  height: 32%;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.98), rgba(255,255,255,0) 68%);
}
.ambient-layer--center {
  width: min(56vw, 2150px);
  aspect-ratio: 1;
  left: 41%; top: 35%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(83, 217, 237, .15), rgba(130, 213, 255, .08) 35%, transparent 70%);
  filter: blur(24px);
}
.ambient-layer--particles {
  inset: 15% 2% 12%;
  opacity: .5;
  background-image: radial-gradient(circle at 12% 32%, rgba(255,255,255,.85) 0 2px, transparent 3px), radial-gradient(circle at 84% 28%, rgba(102,201,255,.55) 0 2px, transparent 3px), radial-gradient(circle at 71% 74%, rgba(255,255,255,.85) 0 1px, transparent 3px), radial-gradient(circle at 46% 52%, rgba(103,213,239,.5) 0 1px, transparent 3px);
  background-size: 430px 360px, 520px 440px, 360px 300px, 610px 520px;
  mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
}
.wave { z-index: -1; width: 100%; height: auto; }
.wave--top { inset: 0 0 auto; }
.wave--bottom { left: 0; bottom: 0; }

.page-header { display: flex; align-items: center; justify-content: center; min-height: clamp(64px, 6vw, 118px); position: relative; }
.brand-lockup { display: flex; align-items: center; gap: clamp(14px, 1.2vw, 32px); }
.brand-lockup h1 { margin: 0; color: var(--sgzx-blue-900); font-size: clamp(27px, 2.4vw, 64px); font-weight: 800; letter-spacing: .1em; }
.brand-mark { display: flex; gap: 4px; width: clamp(30px, 2.2vw, 70px); align-items: flex-end; transform: skew(-16deg); }
.brand-mark i { display: block; width: 4px; height: 26px; border-radius: 4px; background: #169ce7; }
.brand-mark i:nth-child(2) { height: 37px; }
.brand-mark i:nth-child(3) { height: 21px; }
.brand-mark--right { transform: scaleX(-1) skew(-16deg); }
.header-status { position: absolute; right: 0; display: flex; align-items: center; gap: 8px; padding: 9px 14px; color: var(--sgzx-muted); border: 1px solid rgba(255,255,255,.7); border-radius: 999px; background: rgba(255,255,255,.38); font-size: 13px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(320px, .75fr) minmax(0, 2fr); gap: clamp(14px, 1.2vw, 30px); max-width: 3508px; margin: 0 auto; }
.assistant-panel, .monitor-panel { min-height: clamp(670px, 68vh, 1430px); padding: clamp(24px, 2.2vw, 64px); overflow: hidden; }
.panel-heading { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.eyebrow { margin: 0 0 8px; color: #4c8fbd; font-size: clamp(9px, .55vw, 15px); font-weight: 700; letter-spacing: .16em; }
.panel-heading h2 { margin: 0; color: var(--sgzx-ink); font-size: clamp(19px, 1.35vw, 38px); line-height: 1.2; }
.online-pill { display: flex; align-items: center; gap: 7px; flex: none; padding: 9px 14px; border: 1px solid rgba(255,255,255,.8); border-radius: 999px; color: var(--sgzx-blue-700); background: rgba(255,255,255,.46); font-size: clamp(11px, .65vw, 17px); }
.sgzx-status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--sgzx-green); box-shadow: 0 0 14px rgba(24,201,154,.85); }

.assistant-message { position: relative; z-index: 1; display: grid; gap: 10px; margin-top: clamp(28px, 3vw, 74px); padding: clamp(18px, 1.4vw, 38px); border: 1px solid rgba(255,255,255,.62); border-radius: 17px; background: rgba(255,255,255,.38); box-shadow: inset 0 1px 0 rgba(255,255,255,.78); }
.assistant-message::after { content: ""; position: absolute; left: 16%; bottom: -15px; width: 25px; height: 25px; border-right: 1px solid rgba(255,255,255,.62); border-bottom: 1px solid rgba(255,255,255,.62); background: rgba(224,242,255,.42); transform: rotate(45deg); }
.assistant-message strong { font-size: clamp(16px, 1.1vw, 30px); }
.assistant-message span { color: #34567c; font-size: clamp(12px, .72vw, 19px); line-height: 1.7; }
.assistant-stage { position: absolute; z-index: 0; left: 5%; right: 30%; bottom: 20%; height: 42%; min-height: 280px; display: grid; place-items: center; }
.assistant-halo { position: absolute; width: min(100%, 540px); aspect-ratio: 1; opacity: .9; }
.assistant-halo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.assistant-halo img:nth-child(2) { transform: scale(.7); opacity: .7; animation: float-ring 6s ease-in-out infinite; }
.robot-image { position: relative; z-index: 1; width: min(100%, 520px); height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 28px 28px rgba(52,146,219,.24)); }
.assistant-tasks { position: absolute; z-index: 1; right: 5%; bottom: 22%; width: 37%; max-width: 290px; padding: 22px 18px; border: 1px solid rgba(255,255,255,.56); border-radius: 17px; background: rgba(255,255,255,.31); }
.task-heading { display: flex; justify-content: space-between; margin-bottom: 15px; color: var(--sgzx-ink); font-size: clamp(13px, .8vw, 21px); font-weight: 700; }
.task-count { color: var(--sgzx-blue-500); font-size: .7em; }
.assistant-tasks ol { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.assistant-tasks li { display: flex; align-items: center; gap: 10px; color: #4a6789; font-size: clamp(11px, .66vw, 18px); }
.assistant-tasks li.is-active { color: var(--sgzx-blue-900); font-weight: 700; }
.task-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: #b8cde0; box-shadow: 0 0 0 3px rgba(255,255,255,.28); }
.is-active .task-dot { background: #27a6e8; box-shadow: 0 0 12px rgba(39,166,232,.9); }
.assistant-input { position: absolute; z-index: 1; left: clamp(24px, 2.2vw, 64px); right: clamp(24px, 2.2vw, 64px); bottom: clamp(24px, 2.2vw, 64px); min-height: 116px; padding: 20px; border: 1px solid rgba(255,255,255,.65); border-radius: 18px; background: rgba(255,255,255,.35); }
.input-placeholder { color: #6982a2; font-size: clamp(12px, .75vw, 20px); }
.send-button, .expand-button { display: grid; place-items: center; border: 0; color: var(--sgzx-blue-700); background: transparent; }
.send-button { position: absolute; top: 19px; right: 20px; width: 36px; height: 36px; font-size: 26px; }
.input-tools { position: absolute; left: 18px; bottom: 15px; display: flex; gap: 8px; }
.tool-button { min-height: 30px; padding: 4px 12px; border: 1px solid rgba(255,255,255,.65); border-radius: 999px; color: #5a7595; background: rgba(255,255,255,.28); font-size: 12px; }
.tool-button.is-selected { color: var(--sgzx-blue-900); background: rgba(255,255,255,.7); }
.mic-icon { display: inline-block; width: 8px; height: 12px; margin-right: 5px; border: 1.5px solid currentColor; border-radius: 6px; vertical-align: -2px; }

.monitor-title-wrap { display: flex; align-items: center; gap: 14px; }
.monitor-icon { display: grid; place-items: center; width: clamp(34px, 2.2vw, 62px); height: clamp(34px, 2.2vw, 62px); border: 1px solid rgba(255,255,255,.74); border-radius: 14px; background: rgba(255,255,255,.52); box-shadow: 0 8px 24px rgba(40,145,220,.12); }
.monitor-icon img { width: 70%; height: 70%; }
.expand-button { width: 50px; height: 50px; border: 1px solid rgba(255,255,255,.75); border-radius: 14px; background: rgba(255,255,255,.4); font-size: 26px; }
.stats-row { position: relative; z-index: 1; display: flex; gap: 18px; margin-top: clamp(25px, 2.2vw, 54px); }
.stat-card { display: flex; align-items: center; justify-content: space-between; width: min(310px, 44%); min-height: 118px; padding: 20px 25px; }
.stat-card strong { display: block; margin-top: 10px; color: var(--sgzx-blue-900); font-size: clamp(35px, 2.35vw, 64px); line-height: .9; }
.stat-label { color: var(--sgzx-ink); font-size: clamp(13px, .8vw, 21px); font-weight: 700; }
.stat-card img { width: clamp(38px, 3vw, 76px); height: clamp(38px, 3vw, 76px); }
.stat-card--risk strong { color: #c65a65; }
.monitor-label { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; margin: 22px 0 12px; color: var(--sgzx-ink); font-size: clamp(14px, .9vw, 23px); font-weight: 700; }
.live-line { color: #2aaed3; font-size: .68em; letter-spacing: .1em; }
.live-line i { display: inline-block; width: 6px; height: 6px; margin: 0 4px 1px; border-radius: 50%; background: #22cba6; box-shadow: 0 0 9px #22cba6; }
.monitor-surface { min-height: 420px; height: calc(100% - 312px); border: 1px solid rgba(255,255,255,.6); }
.surface-depth, .surface-scanline { position: absolute; inset: 0; pointer-events: none; }
.surface-depth--one { background: radial-gradient(ellipse at 50% 56%, rgba(82,224,225,.24), transparent 15%), radial-gradient(ellipse at 80% 75%, rgba(255,80,104,.18), transparent 13%); }
.surface-depth--two { opacity: .75; background-image: linear-gradient(30deg, transparent 49.5%, rgba(99,192,238,.15) 50%, transparent 50.5%), linear-gradient(150deg, transparent 49.5%, rgba(99,192,238,.12) 50%, transparent 50.5%); background-size: 150px 88px; mask-image: radial-gradient(ellipse at center, #000 0 40%, transparent 78%); }
.surface-scanline { inset: auto 0 35%; height: 1px; background: linear-gradient(90deg, transparent, rgba(105,225,255,.55), transparent); box-shadow: 0 0 24px rgba(105,225,255,.8); animation: scan 7s linear infinite; }
.monitor-core { position: absolute; left: 50%; top: 52%; width: 160px; aspect-ratio: 1; transform: translate(-50%, -50%); opacity: .72; }
.monitor-core img { width: 100%; height: 100%; animation: rotate-ring 14s linear infinite; }
.monitor-core span { position: absolute; inset: 45%; border-radius: 50%; background: #64e7ea; box-shadow: 0 0 28px 12px rgba(100,231,234,.38); }
.monitor-node { position: absolute; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.node-card { display: grid; gap: 7px; min-width: 135px; padding: 12px 18px; border: 1px solid rgba(255,255,255,.8); border-radius: 13px; background: rgba(255,255,255,.72); box-shadow: 0 12px 28px rgba(46,128,192,.12); text-align: center; }
.node-card b { font-size: clamp(12px, .7vw, 18px); white-space: nowrap; }
.node-card small { color: #58718e; font-size: 11px; }
.node-card small i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--sgzx-green); }
.node-pin { width: 13px; height: 13px; margin-top: 8px; border: 2px solid white; border-radius: 50%; background: var(--sgzx-green); box-shadow: 0 0 0 7px rgba(24,201,154,.16), 0 0 22px rgba(24,201,154,.85); }
.node--red .node-card small i, .node--red .node-pin { background: var(--sgzx-red); }
.node--red .node-pin { box-shadow: 0 0 0 7px rgba(255,63,85,.16), 0 0 22px rgba(255,63,85,.85); }
.node--north { left: 48%; top: 18%; transform: translateX(-50%); }
.node--west { left: 20%; top: 55%; }
.node--east { right: 11%; top: 27%; }
.node--south { right: 15%; bottom: 11%; }
.legend-bar { position: relative; z-index: 1; display: flex; justify-content: center; gap: clamp(40px, 6vw, 140px); width: min(410px, 70%); margin: -22px auto 0; padding: 14px 22px; border: 1px solid rgba(255,255,255,.78); border-radius: 999px; background: rgba(255,255,255,.56); box-shadow: 0 12px 30px rgba(35,114,204,.11); color: #395c7e; font-size: 13px; }
.legend-dot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: var(--sgzx-green); box-shadow: 0 0 8px currentColor; }
.legend-dot--red { background: var(--sgzx-red); }

.module-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 1.1vw, 28px); max-width: 3508px; margin: clamp(14px, 1.3vw, 32px) auto 0; }
.module-link { display: flex; align-items: center; gap: clamp(10px, 1vw, 26px); min-height: clamp(82px, 7vw, 150px); padding: clamp(12px, 1vw, 24px); border: 1px solid rgba(255,255,255,.78); border-radius: 20px; background: rgba(255,255,255,.38); box-shadow: var(--sgzx-shadow), inset 0 1px 1px rgba(255,255,255,.9); backdrop-filter: blur(18px); color: var(--sgzx-ink); text-decoration: none; transition: transform .2s ease, background .2s ease; }
.module-link:hover { transform: translateY(-3px); background: rgba(255,255,255,.62); }
.module-link > span:not(.module-icon) { flex: 1; font-size: clamp(12px, .85vw, 23px); font-weight: 700; white-space: nowrap; }
.module-link b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--sgzx-blue-700); background: rgba(255,255,255,.64); font-size: 20px; font-weight: 400; }
.module-icon { display: grid; place-items: center; width: clamp(38px, 3.2vw, 80px); height: clamp(38px, 3.2vw, 80px); flex: none; }
.module-icon img { width: 100%; height: 100%; filter: drop-shadow(0 8px 10px rgba(19,137,218,.18)); }
.module-icon--users { position: relative; }
.module-icon--users::before, .module-icon--users::after, .module-icon--users i { content: ""; position: absolute; border: 4px solid #168fe8; border-radius: 50%; background: #eaf8ff; }
.module-icon--users::before { width: 23px; height: 23px; top: 10px; left: 24px; }
.module-icon--users::after { width: 19px; height: 19px; top: 17px; left: 4px; }
.module-icon--users i:first-child { width: 46px; height: 24px; bottom: 8px; left: 16px; border-radius: 25px 25px 12px 12px; }
.module-icon--users i:last-child { width: 27px; height: 17px; bottom: 9px; left: 0; border-radius: 20px 20px 8px 8px; }

@keyframes rotate-ring { to { transform: rotate(360deg); } }
@keyframes float-ring { 50% { transform: scale(.76) rotate(12deg); opacity: .9; } }
@keyframes scan { from { transform: translateY(-180px); opacity: 0; } 20%, 80% { opacity: 1; } to { transform: translateY(190px); opacity: 0; } }

@media (max-width: 1100px) {
  .page-shell { padding-inline: 20px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .assistant-panel { min-height: 680px; }
  .monitor-panel { min-height: 680px; }
  .assistant-stage { left: 12%; right: 42%; }
  .assistant-tasks { right: 8%; width: 33%; }
}
@media (max-width: 680px) {
  .page-shell { padding: 14px 12px 20px; }
  .page-header { justify-content: flex-start; padding-left: 8px; }
  .brand-lockup { gap: 8px; }
  .brand-lockup h1 { font-size: 25px; }
  .brand-mark { width: 22px; transform: skew(-16deg) scale(.7); }
  .header-status { right: 4px; padding: 7px 9px; font-size: 10px; }
  .assistant-panel, .monitor-panel { min-height: 660px; padding: 22px 18px; }
  .assistant-stage { left: 0; right: 0; bottom: 23%; height: 34%; }
  .assistant-tasks { right: 18px; bottom: 22%; width: 44%; padding: 14px 12px; }
  .assistant-tasks ol { gap: 9px; }
  .assistant-tasks li { font-size: 10px; }
  .assistant-input { left: 18px; right: 18px; bottom: 18px; }
  .stats-row { gap: 10px; }
  .stat-card { width: 50%; min-height: 92px; padding: 14px; }
  .stat-card img { width: 34px; height: 34px; }
  .monitor-surface { min-height: 340px; }
  .node-card { min-width: 100px; padding: 9px 8px; }
  .node--west { left: 4%; }
  .node--east { right: 2%; }
  .node--south { right: 5%; }
  .module-nav { grid-template-columns: repeat(2, 1fr); }
  .module-link { min-height: 72px; border-radius: 15px; gap: 6px; }
  .module-link:last-child { grid-column: 1 / -1; }
  .module-link > span:not(.module-icon) { font-size: 11px; }
  .module-link b { width: 24px; height: 24px; font-size: 16px; }
}
