/* Reference-composition pass with CSS/SVG generated base frame (1672 x 840). */

:root {
  --font-ui: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
  --radius-page-panel: 28px;
  --radius-large-card: 22px;
  --radius-medium-card: 18px;
  --radius-small-control: 12px;
  --radius-pill: 999px;
  --shadow-panel:
    0 34px 82px rgba(34, 94, 164, 0.22),
    0 10px 28px rgba(32, 108, 188, 0.14);
  --shadow-panel-soft:
    0 38px 86px rgba(39, 102, 170, 0.17),
    0 10px 28px rgba(38, 112, 190, 0.09);
  --shadow-card:
    0 18px 42px rgba(47, 111, 184, 0.16),
    0 6px 16px rgba(38, 103, 180, 0.09);
  --shadow-control: 0 8px 18px rgba(0, 118, 216, 0.18);
  --highlight-inset: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --glass-panel-left:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(228, 240, 254, 0.42) 54%, rgba(207, 226, 250, 0.32));
  --glass-panel-right:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(228, 240, 254, 0.36) 54%, rgba(207, 226, 250, 0.26));
  --glass-card:
    linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(234, 244, 255, 0.42));
  --ink-title: #102f52;
  --ink-body: #4e6b82;
  --ink-muted: #7992a6;
  --brand-blue: #07539b;
  --type-caption: 12px;
  --type-label: 13px;
  --type-body: 14px;
  --type-emphasis: 16px;
  --type-card-title: 20px;
  --type-module-title: 25px;
}

.monitor-panel[data-module] {
  padding: 36px 42px 30px;
}

.module-content {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  height: 100%;
  min-height: 0;
}

.module-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-width: 0;
  min-height: 56px;
}

.module-panel-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.module-panel-heading > div {
  min-width: 0;
}

.module-panel-header h2 {
  margin: 0;
  color: var(--ink-title);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.module-panel-header p {
  margin: 6px 0 0;
  color: #54708b;
  font-size: 13px;
  font-weight: 650;
}

.module-panel-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 14px;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.96), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(209, 233, 255, 0.62));
  box-shadow:
    0 10px 22px rgba(29, 127, 205, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(58, 145, 211, 0.12);
}

.module-panel-icon::before {
  content: "";
  width: 23px;
  height: 23px;
  background: #168ee8;
  filter: drop-shadow(0 5px 8px rgba(24, 143, 232, 0.26));
  mask: radial-gradient(circle at 50% 20%, transparent 0 20%, #000 21%);
}

.module-panel-icon--report::before { mask: url("../assets/icons/report.svg") center / contain no-repeat; }
.module-panel-icon--database::before { mask: url("../assets/icons/database.svg") center / contain no-repeat; }
.module-panel-icon--rules::before { mask: url("../assets/icons/shield.svg") center / contain no-repeat; }
.module-panel-icon--api::before { mask: url("../assets/icons/api.svg") center / contain no-repeat; }

.module-panel-icon--users::before {
  mask: none;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow:
    -9px 8px 0 -5px currentColor,
    9px 8px 0 -5px currentColor,
    0 13px 0 -7px currentColor;
}

.report-header-kpis {
  display: grid;
  grid-template-columns: repeat(2, 144px);
  gap: 10px;
  flex: 0 0 auto;
}

.report-header-kpi {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(231, 245, 255, 0.5));
  box-shadow:
    0 12px 28px rgba(47, 111, 184, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.report-header-kpi::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -35px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: rgba(24, 143, 232, 0.1);
}

.report-header-kpi--progress::after {
  background: rgba(242, 175, 45, 0.14);
}

.report-header-kpi span,
.report-header-kpi strong {
  position: relative;
  z-index: 1;
}

.report-header-kpi span {
  color: #55708b;
  font-size: var(--type-body);
  font-weight: 700;
}

.report-header-kpi strong {
  color: #073f7e;
  font-size: 28px;
  line-height: 1;
}

.module-body {
  min-height: 0;
  overflow: hidden;
}

.monitor-panel[data-module="water-monitor"] .module-content {
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}

.loading-panel,
.empty-hint,
.info-strip {
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 14px;
  color: #4c6680;
  background: rgba(235, 247, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.loading-panel {
  display: grid;
  place-items: center;
  height: 100%;
  font-weight: 700;
}

.water-layout {
  display: grid;
  grid-template-rows: 76px minmax(0, 1fr);
  gap: 14px;
  height: 100%;
}

.water-layout--list {
  grid-template-rows: 76px minmax(0, 1fr);
}

.water-status-bar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(330px, auto) minmax(140px, 180px);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px 10px 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(228, 244, 255, 0.42));
  box-shadow:
    0 16px 38px rgba(44, 119, 185, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(64, 148, 213, 0.08);
}

.water-status-title {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.water-status-title h2 {
  margin: 0;
  color: #0b3b70;
  font-size: 23px;
  font-weight: 780;
  line-height: 1.15;
}

.water-status-title p {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 0;
  color: #52708b;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.water-status-title p span {
  position: relative;
  padding-left: 12px;
  color: #6b8399;
}

.water-status-title p span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(19, 128, 212, 0.7);
  transform: translateY(-50%);
}

.water-model-actions {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) auto;
  align-items: center;
  gap: 4px 9px;
  min-width: 0;
}

.water-model-current {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  white-space: nowrap;
}

.water-model-current span,
.water-model-error {
  color: #71899d;
  font-size: 11px;
  font-weight: 700;
}

.water-model-current strong {
  min-width: 0;
  overflow: hidden;
  color: #194f79;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.water-model-current small {
  color: #6d8497;
  font-size: 10px;
  font-weight: 650;
}

.water-model-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.water-model-buttons .knowledge-refresh-button {
  min-height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}

.water-model-buttons .water-model-unload {
  color: #526c82;
}

.water-model-error {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #c8384e;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric-strip--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-strip--single {
  grid-template-columns: minmax(0, 1fr);
}

.metric-tile {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  min-width: 0;
  min-height: 58px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  text-align: left;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(235, 247, 255, 0.5));
  box-shadow:
    0 18px 42px rgba(47, 111, 184, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.metric-tile::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -26px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(24, 143, 232, 0.12);
}

.metric-tile:hover,
.metric-tile:focus-visible {
  transform: translateY(-2px);
  outline: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(226, 244, 255, 0.58));
  box-shadow:
    0 22px 48px rgba(47, 111, 184, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.metric-tile--watch::after { background: rgba(242, 175, 45, 0.14); }
.metric-tile--risk::after { background: rgba(255, 79, 98, 0.14); }

.metric-tile span {
  position: relative;
  z-index: 1;
  display: block;
  color: #55708b;
  font-size: 13px;
  font-weight: 700;
}

.metric-tile strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 0;
  color: #073f7e;
  font-size: 30px;
  line-height: 1;
}

.water-status-bar .metric-strip {
  align-self: stretch;
  gap: 9px;
}

.water-status-bar .metric-tile {
  min-height: 50px;
  padding: 8px 14px;
  border-radius: 15px;
}

.water-status-bar .metric-tile span {
  font-size: 12px;
}

.water-status-bar .metric-tile strong {
  font-size: 27px;
}

.map-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 14px;
  min-height: 0;
}

.satellite-map {
  position: relative;
  overflow: hidden;
  min-height: 0;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 22px;
  background: #d9ebff;
  box-shadow:
    0 0 0 1px rgba(37, 120, 218, 0.16),
    0 24px 56px rgba(45, 129, 198, 0.16),
    inset 0 2px 0 rgba(255, 255, 255, 0.9);
  touch-action: none;
  user-select: none;
  cursor: grab;
}

.satellite-map.is-dragging {
  cursor: grabbing;
}

.gis-map-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: #d9ebf5;
}

.gis-map-canvas .ol-viewport {
  width: 100%;
  height: 100%;
}

.gis-map-canvas canvas {
  image-rendering: auto;
}

.map-hover-tooltip {
  display: none;
  max-width: 220px;
  padding: 6px 9px;
  border: 1px solid rgba(111, 151, 180, 0.32);
  border-radius: 6px;
  color: #173650;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(24, 72, 108, 0.18);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  white-space: nowrap;
  pointer-events: none;
}

.map-hover-tooltip:not(:empty) {
  display: block;
}

.map-engine-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #58748b;
  font-size: 14px;
  background: rgba(226, 240, 249, 0.9);
}

.geo-map-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform-origin: 0 0;
  will-change: transform;
}

.satellite-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  filter: saturate(0.9) contrast(0.98) brightness(1.08) hue-rotate(7deg);
}

.satellite-map::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(222, 241, 255, 0.18), transparent 32%, rgba(219, 239, 255, 0.12)),
    radial-gradient(ellipse at 78% 64%, rgba(255, 79, 98, 0.18), transparent 18%);
}

.region-boundary-layer,
.metro-line-layer,
.station-layer,
.entrance-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.region-boundary-layer {
  z-index: 2;
}

.region-boundary {
  fill: rgba(239, 244, 248, 0.42);
  stroke: rgba(86, 104, 122, 0.82);
  stroke-width: 1.45;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.58));
}

.geo-point-layer {
  z-index: 5;
}

.entrance-layer.geo-point-layer {
  z-index: 6;
}

.map-controls {
  position: absolute;
  z-index: 12;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 7px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow:
    0 14px 30px rgba(35, 114, 204, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.map-controls button {
  min-width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  color: #126bc0;
  background: rgba(239, 248, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  font-weight: 800;
  cursor: pointer;
}

.map-rainfall-panel {
  position: absolute;
  z-index: 11;
  top: 14px;
  left: 14px;
  width: 184px;
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  background: rgba(248, 252, 255, 0.9);
  box-shadow: 0 14px 30px rgba(29, 84, 126, 0.18);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  transition: width 180ms ease, box-shadow 180ms ease;
}

.map-rainfall-panel.is-expanded {
  width: min(410px, calc(100% - 190px));
  padding: 8px 10px 6px;
}

.map-rainfall-toggle {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 7px;
  color: #173f5f;
  background: transparent;
  cursor: pointer;
}

.map-rainfall-toggle__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 4px;
  background: linear-gradient(to top, #168ee8 0 55%, rgba(22, 142, 232, 0.18) 55% 100%);
  box-shadow: inset 5px 0 rgba(248, 252, 255, 0.46), inset -5px 0 rgba(248, 252, 255, 0.46);
}

.map-rainfall-toggle__text {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.map-rainfall-toggle__text strong {
  flex: 0 0 auto;
  font-size: 13px;
}

.map-rainfall-toggle__text small,
.map-rainfall-toggle__scope {
  overflow: hidden;
  color: #658096;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-rainfall-toggle__scope {
  min-width: 0;
  margin-left: auto;
}

.map-rainfall-panel.is-collapsed .map-rainfall-toggle__scope {
  display: none;
}

.map-rainfall-toggle__chevron {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 2px solid #4e7189;
  border-bottom: 2px solid #4e7189;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.map-rainfall-panel.is-expanded .map-rainfall-toggle__chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.map-rainfall-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.map-rainfall-panel header > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.map-rainfall-panel header strong {
  flex: 0 0 auto;
  color: #173f5f;
  font-size: 13px;
}

.map-rainfall-panel header span,
.map-rainfall-panel header small {
  overflow: hidden;
  color: #658096;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-rainfall-panel header small {
  flex: 0 0 auto;
  color: #126ca8;
}

.map-rainfall-panel svg {
  display: block;
  width: 100%;
  height: 122px;
}

.map-rain-reference {
  fill: rgba(84, 105, 123, 0.1);
}

.map-rain-grid line {
  stroke: rgba(97, 132, 158, 0.24);
  stroke-width: 1;
}

.map-rain-grid text,
.map-rain-axis text,
.map-rain-divider text {
  fill: #617b90;
  font-size: 9px;
  font-weight: 700;
}

.map-rain-bars rect {
  fill: #168ee8;
  opacity: 0.82;
}

.map-rain-divider line {
  stroke: #db3f54;
  stroke-width: 2;
  stroke-dasharray: 4 3;
}

.map-rain-divider text {
  fill: #c62f44;
  font-size: 9px;
  font-weight: 850;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 3px;
}

.metro-line {
  fill: none;
  stroke: #10ad73;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: 0.92;
  filter: none;
}

.metro-line--1 { stroke: #f3b132; }
.metro-line--2 { stroke: #21a6ff; }
.metro-line--3 { stroke: #e85c67; }
.metro-line--4 { stroke: #48d0b1; }
.metro-line--5 { stroke: #7d7af7; }

.station-marker {
  border: 0;
  padding: 0;
  pointer-events: auto;
  cursor: pointer;
}

.station-marker.is-compact .station-card,
.station-marker.is-compact .station-pin {
  display: none;
}

.station-marker.is-compact {
  opacity: 0.68;
}

.station-marker.is-compact::before {
  display: none;
}

.station-marker.is-compact::after {
  width: 8px;
  height: 8px;
  box-shadow:
    0 0 0 1.25px rgba(8, 18, 30, 0.82),
    0 0 0 2.25px rgba(255, 255, 255, 0.66);
}

.station-marker.is-labelled {
  z-index: 6;
}

.station-marker:hover,
.station-marker:focus-visible {
  z-index: 8;
  outline: 0;
}

.station-marker:hover .station-card,
.station-marker:focus-visible .station-card {
  transform: translateY(-3px);
}

.entrance-marker {
  --station-color: #18c99a;
  position: absolute;
  z-index: 9;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--station-color);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 0 0 5px color-mix(in srgb, currentColor 18%, transparent),
    0 0 24px color-mix(in srgb, currentColor 50%, transparent);
  transform: translate(-50%, -50%);
}

.entrance-marker[data-risk="watch"] { --station-color: #ff4f62; }
.entrance-marker[data-risk="risk"] { --station-color: #ff4f62; }

.entrance-marker i {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.map-legend {
  position: absolute;
  z-index: 10;
  right: 18px;
  bottom: 16px;
  display: flex;
  gap: 14px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  color: #395c7e;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 14px 30px rgba(35, 114, 204, 0.14);
  font-size: 12px;
  backdrop-filter: blur(12px);
}

.station-inspector,
.work-card {
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(229, 243, 255, 0.44));
  box-shadow:
    0 18px 44px rgba(47, 111, 184, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(58, 145, 211, 0.08);
}

.station-inspector {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  padding: 18px;
  overflow: hidden;
}

.station-directory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.station-directory-head span {
  color: #738ba0;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.station-directory {
  display: grid;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}

.station-directory-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(82px, 0.7fr);
  align-items: center;
  column-gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 9px 8px;
  border: 0;
  border-bottom: 1px solid rgba(116, 157, 188, 0.16);
  border-radius: 6px;
  color: #17395c;
  background: transparent;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.station-directory-row:hover,
.station-directory-row:focus-visible,
.station-directory-row.is-active {
  outline: 0;
  background: rgba(225, 241, 252, 0.7);
}

.station-directory-row strong,
.station-directory-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-directory-row strong {
  font-size: 14px;
  font-weight: 780;
  line-height: 1.25;
}

.station-directory-row span {
  color: #6c849a;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  text-align: right;
}

.station-detail-head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.station-detail-head > div {
  min-width: 0;
}

.station-detail-head h3,
.station-detail-head span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-detail-head span {
  margin-top: 3px;
  color: #6c849a;
  font-size: 12px;
  font-weight: 650;
}

.station-detail-back {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0 0 3px;
  border: 1px solid rgba(137, 174, 201, 0.42);
  border-radius: 6px;
  color: #27658f;
  background: #f7fbfe;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.station-detail-back:hover,
.station-detail-back:focus-visible {
  outline: 0;
  border-color: rgba(75, 135, 177, 0.68);
  background: #edf6fc;
}

.station-detail-body {
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.map-entrance-list {
  display: grid;
  gap: 7px;
}

.map-entrance-item {
  min-width: 0;
}

.map-entrance-item.is-active {
  border: 1px solid rgba(66, 131, 177, 0.46);
  border-radius: 6px;
  background: rgba(237, 247, 253, 0.72);
}

.map-entrance-item.is-active .map-entrance-row {
  border-color: transparent;
  border-bottom-color: rgba(112, 158, 190, 0.28);
  border-radius: 5px 5px 0 0;
}

.map-entrance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 8px;
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(142, 178, 204, 0.3);
  border-radius: 6px;
  color: #17395c;
  background: rgba(255, 255, 255, 0.78);
  text-align: left;
  cursor: pointer;
}

.map-entrance-row:hover,
.map-entrance-row:focus-visible,
.map-entrance-item.is-active .map-entrance-row {
  outline: 0;
  border-color: rgba(66, 131, 177, 0.56);
  background: #edf7fd;
}

.map-entrance-row strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-entrance-row small {
  grid-column: 1 / -1;
  color: #6c849a;
  font-size: 12px;
  font-weight: 650;
}

.map-entrance-status {
  color: #167457;
  font-size: 12px;
  font-weight: 750;
}

.map-entrance-status.is-risk {
  color: #cf3349;
}

.map-entrance-empty {
  padding: 18px 10px;
  color: #6c849a;
  text-align: center;
}

.map-entrance-chart {
  height: 220px;
}

.map-entrance-inline-detail {
  padding: 8px;
}

.map-entrance-chart .simulation-chart,
.map-entrance-chart .simulation-chart-empty {
  height: 100%;
  border-radius: 6px;
}

.station-inspector .map-entrance-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0 0;
}

.station-inspector .map-entrance-meta > div {
  display: block;
  min-width: 0;
  padding: 8px;
  border-radius: 6px;
  background: rgba(237, 247, 254, 0.88);
}

.station-inspector .map-entrance-meta dd {
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-list-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.risk-list-card.has-push-notice {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.risk-list-card.has-push-notice .risk-point-table {
  grid-row: 3;
}

.risk-push-notice {
  grid-row: 2;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(74, 157, 214, 0.18);
  border-radius: 10px;
  color: #2f6286;
  background: rgba(225, 242, 253, 0.58);
  font-size: 12px;
  line-height: 1.4;
}

.risk-list-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.risk-point-table {
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.risk-point-head,
.risk-point-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 150px 90px 92px;
  gap: 12px;
  align-items: center;
}

.risk-point-head {
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 14px;
  color: #55708b;
  background: rgba(229, 243, 255, 0.46);
  font-size: 12px;
  font-weight: 800;
}

.risk-point-body {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  margin-top: 10px;
  overflow: auto;
  padding-right: 4px;
}

.risk-point-row {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(236, 248, 255, 0.48));
  box-shadow:
    0 12px 28px rgba(49, 126, 190, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.risk-point-name {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 0;
  border: 0;
  color: #17395c;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.risk-point-name strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-point-name small {
  color: #6c849a;
  font-size: 12px;
}

.risk-station-heading > div:first-child {
  min-width: 0;
}

.risk-station-heading p {
  margin: 5px 0 0;
  color: #6c849a;
  font-size: 12px;
  font-weight: 650;
}

.risk-station-table {
  grid-template-rows: 44px minmax(0, 1fr);
}

.risk-station-head,
.risk-station-row {
  grid-template-columns: minmax(128px, 0.75fr) minmax(170px, 1fr) minmax(240px, 1.45fr) 145px 84px;
  gap: 14px;
}

.risk-station-row {
  min-height: 76px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.risk-station-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.risk-station-lines span {
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 7px;
  color: #386481;
  background: rgba(230, 244, 253, 0.62);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.risk-entrance-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.risk-entrance-square {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(114, 157, 191, 0.34);
  border-radius: 7px;
  color: #426681;
  background: rgba(255, 255, 255, 0.66);
  box-shadow:
    0 5px 12px rgba(47, 111, 184, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  font-size: 12px;
  font-weight: 800;
}

.risk-entrance-square.is-risk {
  border-color: rgba(225, 55, 79, 0.62);
  color: #fff;
  background: linear-gradient(155deg, #f46678, #d8324b);
  box-shadow:
    0 7px 16px rgba(216, 50, 75, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.risk-entrance-empty {
  color: #7a91a4;
  font-size: 12px;
}

.risk-station-row > span:not(.risk-entrance-square) {
  color: #526f87;
  font-size: 12px;
  font-weight: 650;
}

.risk-chip {
  justify-self: start;
  padding: 5px 10px;
  border-radius: 999px;
  color: #0f8b68;
  background: rgba(32, 201, 151, 0.12);
  font-size: 12px;
  font-weight: 800;
}

.risk-chip[data-risk="watch"] {
  color: #d9364f;
  background: rgba(255, 79, 98, 0.14);
}

.risk-chip[data-risk="risk"] {
  color: #d9364f;
  background: rgba(255, 79, 98, 0.14);
}

.station-inspector h3,
.work-card h3 {
  margin: 0;
  color: #123553;
  font-size: 18px;
  font-weight: 750;
}

.station-inspector p {
  color: #57738d;
  font-size: 13px;
  line-height: 1.7;
}

.inspector-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inspector-title span,
.entrance-list article span,
.status-chip {
  padding: 4px 9px;
  border-radius: 999px;
  color: #0f8b68;
  background: rgba(32, 201, 151, 0.12);
  font-size: 12px;
  font-weight: 750;
}

.inspector-title span[data-risk="watch"],
.entrance-list article span[data-risk="watch"] {
  color: #d9364f;
  background: rgba(255, 79, 98, 0.14);
}

.inspector-title span[data-risk="risk"],
.entrance-list article span[data-risk="risk"] {
  color: #d9364f;
  background: rgba(255, 79, 98, 0.14);
}

.station-inspector dl {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.station-inspector dl div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  font-size: 13px;
}

.station-inspector dt {
  color: #7890a8;
}

.station-inspector dd {
  margin: 0;
  color: #1c4266;
  font-weight: 700;
}

.entrance-list {
  display: grid;
  gap: 10px;
}

.entrance-list article,
.file-row {
  display: grid;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.entrance-list article strong,
.file-row strong {
  color: #17395c;
  font-size: 13px;
}

.entrance-list article small,
.file-row small {
  color: #6c849a;
  font-size: 12px;
}

.split-grid,
.report-grid {
  display: grid;
  gap: 16px;
  height: 100%;
  min-height: 0;
}

.split-grid {
  grid-template-columns: 41% minmax(0, 1fr);
}

.split-grid--rules {
  grid-template-columns: 32% minmax(0, 1fr);
}

.report-grid {
  grid-template-columns: 35% minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.work-card {
  min-height: 0;
  padding: 18px;
  overflow: auto;
}

.drop-zone {
  display: grid;
  place-items: center;
  gap: 12px;
  height: 218px;
  margin-top: 18px;
  border: 1.5px dashed rgba(80, 158, 231, 0.42);
  border-radius: 18px;
  color: #17395c;
  background: rgba(245, 251, 255, 0.48);
  cursor: pointer;
}

.drop-zone input {
  display: none;
}

.drop-zone strong {
  font-size: 18px;
}

.drop-zone small {
  color: #58728d;
  font-size: 13px;
}

.upload-cloud {
  width: 70px;
  height: 48px;
  background: #168ee8;
  filter: drop-shadow(0 10px 16px rgba(24, 143, 232, 0.24));
  mask:
    radial-gradient(circle at 35% 58%, #000 0 35%, transparent 36%),
    radial-gradient(circle at 58% 38%, #000 0 38%, transparent 39%),
    linear-gradient(#000 0 0) bottom / 74% 42% no-repeat;
}

.info-strip {
  margin: 18px 0 0;
  padding: 12px 14px;
  font-size: 13px;
}

.data-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.file-row {
  grid-template-columns: 42px minmax(0, 1fr) auto 90px auto;
}

.file-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.file-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #ffffff, #ddecff);
  box-shadow:
    0 8px 18px rgba(24, 143, 232, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.file-icon--pdf { box-shadow: inset 0 -4px 0 rgba(255, 79, 98, 0.65), 0 8px 18px rgba(24, 143, 232, 0.12); }
.file-icon--word { box-shadow: inset 0 -4px 0 rgba(22, 124, 238, 0.65), 0 8px 18px rgba(24, 143, 232, 0.12); }
.file-icon--excel { box-shadow: inset 0 -4px 0 rgba(32, 201, 151, 0.65), 0 8px 18px rgba(24, 143, 232, 0.12); }

/* Report review workspace */
.report-workspace {
  position: relative;
  height: 100%;
  min-height: 0;
}

.report-upload-card,
.report-record-card {
  position: relative;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-large-card);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(224, 241, 254, 0.46));
  box-shadow:
    0 20px 46px rgba(47, 111, 184, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(44, 126, 191, 0.08);
}

.report-upload-card {
  display: flex;
  flex-direction: column;
}

.report-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.report-card-heading h3 {
  margin: 0;
  color: #123b60;
  font-size: 20px;
  font-weight: 780;
}

.report-card-heading p {
  margin: 6px 0 0;
  color: #668198;
  font-size: 13px;
  line-height: 1.5;
}

.report-engine-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--radius-pill);
  color: #16755f;
  background: rgba(244, 253, 250, 0.58);
  font-size: 12px;
  font-weight: 750;
}

.report-engine-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #20c997;
  box-shadow: 0 0 9px rgba(32, 201, 151, 0.46);
}

.report-drop-zone {
  flex: 1 1 auto;
  min-height: 210px;
  height: auto;
  margin-top: 20px;
  border-color: rgba(55, 145, 221, 0.38);
  background:
    radial-gradient(circle at 50% 42%, rgba(92, 184, 246, 0.09), transparent 42%),
    rgba(247, 252, 255, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 0 30px rgba(79, 158, 220, 0.05);
  transition: border-color 220ms ease, background 220ms ease, transform 220ms ease;
}

.report-drop-zone:hover {
  border-color: rgba(23, 132, 217, 0.66);
  background:
    radial-gradient(circle at 50% 42%, rgba(60, 166, 238, 0.14), transparent 45%),
    rgba(252, 254, 255, 0.68);
  transform: translateY(-2px);
}

.report-drop-zone.is-disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.report-rule-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.report-rule-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-small-control);
  color: #58738c;
  background: rgba(255, 255, 255, 0.43);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 700;
}

.report-rule-summary strong {
  color: #0d5b9a;
  font-size: 20px;
}

.report-inline-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(226, 64, 87, 0.2);
  border-radius: 10px;
  color: #c7354b;
  background: rgba(255, 239, 242, 0.66);
  font-size: 13px;
  line-height: 1.5;
}

.report-refresh-button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 10px;
  color: #176fba;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
  font-weight: 750;
  cursor: pointer;
}

.report-history-list {
  display: grid;
  align-content: start;
  gap: 10px;
  margin-top: 18px;
}

.report-history-item {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(90px, 1fr) 76px max-content;
  align-items: center;
  gap: 8px;
  min-height: 72px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.64), rgba(234, 247, 255, 0.4));
  box-shadow:
    0 10px 24px rgba(53, 117, 173, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.report-file-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(155deg, #38a7f1, #166ac5);
  box-shadow:
    0 9px 18px rgba(22, 106, 197, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  font-size: 17px;
  font-weight: 850;
}

.report-file-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.report-file-main strong {
  overflow: hidden;
  color: #193f61;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-file-main small,
.report-task-state small {
  color: #748ca1;
  font-size: 11px;
}

.report-task-state {
  display: grid;
  gap: 5px;
}

.report-task-state > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #14765f;
  font-size: 13px;
  font-weight: 780;
}

.report-task-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #20c997;
}

.report-task-state--processing > span { color: #9a6700; }
.report-task-state--processing i { background: #e9a326; }
.report-task-state--failed > span { color: #ce394f; }
.report-task-state--failed i { background: #eb4b60; }

.report-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(58, 132, 191, 0.08);
}

.report-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #e6a72c, #38a7f1);
  transition: width 260ms ease;
}

.report-history-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.report-history-actions button,
.report-history-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 9px;
  color: #126bc0;
  background: rgba(244, 250, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.report-history-actions .danger {
  color: #d83d54;
  background: rgba(255, 239, 242, 0.62);
}

.report-list-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  height: calc(100% - 54px);
  min-height: 220px;
  color: #6c859a;
  font-size: 13px;
}

.report-list-empty strong {
  color: #315575;
  font-size: 16px;
}

.report-list-empty small { font-size: 12px; }

.report-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(22, 142, 232, 0.18);
  border-top-color: #168ee8;
  border-radius: 50%;
  animation: knowledgeSpin 900ms linear infinite;
}

.report-empty-icon {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  background:
    linear-gradient(#168ee8 0 0) 50% 16px / 22px 2px no-repeat,
    linear-gradient(#168ee8 0 0) 50% 24px / 22px 2px no-repeat,
    linear-gradient(#168ee8 0 0) 50% 32px / 14px 2px no-repeat,
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(213, 238, 255, 0.6));
  box-shadow: 0 12px 26px rgba(24, 137, 217, 0.13);
}

.report-review-overlay {
  position: absolute;
  z-index: 46;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(216, 235, 249, 0.6);
  backdrop-filter: blur(13px) saturate(112%);
}

.report-review-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 14px;
  width: min(980px, 96%);
  height: min(570px, 96%);
  min-height: 0;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-large-card);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(229, 244, 255, 0.93));
  box-shadow:
    0 34px 78px rgba(37, 95, 158, 0.27),
    inset 0 1px 0 rgba(255, 255, 255, 0.99),
    inset 0 -1px 0 rgba(61, 142, 203, 0.1);
}

.report-review-close {
  position: absolute;
  z-index: 2;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  color: #4f6f89;
  background: rgba(255, 255, 255, 0.64);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.report-review-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding-right: 42px;
}

.report-file-icon--large {
  width: 44px;
  height: 48px;
}

.report-review-head h3 {
  overflow: hidden;
  margin: 0;
  color: #123b60;
  font-size: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-review-head p {
  margin: 5px 0 0;
  color: #748ba0;
  font-size: 14px;
}

.report-download-button {
  min-height: 38px;
  font-size: 14px;
  text-decoration: none;
}

.report-review-summary {
  display: grid;
  grid-template-columns: minmax(210px, 260px);
  gap: 9px;
}

.report-review-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 11px;
  color: #647e94;
  background: rgba(255, 255, 255, 0.48);
  font-size: 14px;
  font-weight: 700;
}

.report-review-summary strong {
  color: #115e9e;
  font-size: 21px;
}

.report-finding-list {
  display: grid;
  align-content: start;
  gap: 11px;
  min-height: 0;
  overflow: auto;
  padding: 2px 7px 8px 2px;
}

.report-finding-card {
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-left: 3px solid #238ad3;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow:
    0 9px 22px rgba(47, 111, 184, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.report-finding-heading {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.report-finding-heading > span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  color: #176eaf;
  background: rgba(210, 236, 255, 0.74);
  font-size: 14px;
  font-weight: 800;
}

.report-finding-heading h4 {
  margin: 0;
  color: #173e60;
  font-size: 17px;
}

.report-finding-heading p {
  margin: 4px 0 0;
  color: #748ba0;
  font-size: 13px;
}

.report-finding-card dl {
  display: grid;
  gap: 8px;
  margin: 13px 0 0 38px;
}

.report-finding-card dl > div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
}

.report-finding-card dt {
  color: #6d8498;
  font-size: 14px;
  font-weight: 750;
}

.report-finding-card dd {
  margin: 0;
  color: #385b76;
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.report-finding-card .report-quote {
  padding: 7px 9px;
  border-left: 2px solid rgba(54, 135, 198, 0.28);
  color: #526f86;
  background: rgba(226, 241, 252, 0.44);
}

.report-review-foot {
  padding-top: 10px;
  border-top: 1px solid rgba(74, 137, 188, 0.12);
  color: #70889c;
  font-size: 13px;
}

.report-no-findings,
.report-review-failed {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 0;
  color: #6a8398;
}

.report-no-findings strong,
.report-review-failed strong {
  color: #315575;
  font-size: 16px;
}

.report-review-failed p {
  max-width: 660px;
  margin: 0;
  color: #c33a50;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.report-view-loading {
  grid-row: 1 / -1;
  height: 100%;
}

.report-delete-dialog {
  width: min(470px, 92%);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-medium-card);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(231, 245, 255, 0.92));
  box-shadow:
    0 30px 72px rgba(39, 102, 170, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.report-delete-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #f15b70, #c82d45);
  box-shadow: 0 9px 20px rgba(200, 45, 69, 0.2);
  font-weight: 850;
}

.report-delete-dialog h3 {
  margin: 14px 0 0;
  color: #123b60;
  font-size: 20px;
}

.report-delete-dialog p {
  margin: 12px 0 0;
  color: #58738c;
  font-size: 13px;
  line-height: 1.65;
}

.report-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}

.knowledge-layout {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

.knowledge-type-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(116px, 1fr));
  gap: 8px;
  min-width: 0;
}

.knowledge-type-bar--header {
  flex: 0 0 auto;
  width: min(720px, 69%);
  height: 50px;
  padding: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 15px;
  background: rgba(235, 247, 255, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 12px 28px rgba(48, 112, 166, 0.08);
}

.knowledge-type-tab {
  display: grid;
  grid-template-columns: 30px auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #55708b;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.knowledge-type-tab.is-active {
  border-color: rgba(255, 255, 255, 0.94);
  color: #0b4f8d;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(220, 240, 255, 0.62));
  box-shadow:
    0 9px 20px rgba(42, 117, 183, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.knowledge-type-tab.is-active .knowledge-type-icon {
  color: #0b6bb2;
  background: linear-gradient(145deg, #fff, #cfe9ff);
}

.knowledge-type-tab strong {
  font-size: 16px;
  white-space: nowrap;
}

.knowledge-type-tab small {
  overflow: hidden;
  color: #738ca2;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-type-icon {
  position: relative;
  width: 30px;
  height: 30px;
  color: #168ee8;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 9px;
  background: linear-gradient(145deg, #fff, #d8edff);
  box-shadow: 0 7px 14px rgba(24, 137, 217, 0.14);
}

.knowledge-type-icon::before,
.knowledge-type-icon::after {
  content: "";
  position: absolute;
}

.knowledge-type-icon--text::before {
  inset: 7px 8px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.knowledge-type-icon--text::after {
  left: 11px;
  top: 11px;
  width: 8px;
  height: 1.5px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor;
}

.knowledge-type-icon--event::before {
  left: 7px;
  top: 9px;
  width: 14px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.knowledge-type-icon--event::after {
  left: 11px;
  top: 6px;
  width: 6px;
  height: 5px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
}

.knowledge-type-icon--simulation::before {
  left: 7px;
  right: 7px;
  bottom: 8px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-top: 0;
  border-radius: 0 0 4px 4px;
}

.knowledge-type-icon--simulation::after {
  left: 8px;
  top: 9px;
  width: 14px;
  height: 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 3px 5px, currentColor 0 1.5px, transparent 2px),
    radial-gradient(circle at 8px 2px, currentColor 0 1.5px, transparent 2px),
    radial-gradient(circle at 12px 5px, currentColor 0 1.5px, transparent 2px);
}

.knowledge-type-icon--spatial::before {
  left: 8px;
  top: 6px;
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 50% 50% 50% 2px;
  transform: rotate(-45deg);
}

.knowledge-type-icon--spatial::after {
  left: 13px;
  top: 11px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.knowledge-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
  min-height: 0;
}

.knowledge-upload-card,
.knowledge-list-card {
  display: grid;
  min-height: 0;
  overflow: hidden;
}

.knowledge-upload-card {
  grid-template-rows: auto minmax(146px, 1fr) auto;
  gap: 12px;
}

.knowledge-list-card {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.knowledge-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.knowledge-card-heading p {
  margin: 5px 0 0;
  color: #6a8399;
  font-size: 13px;
  line-height: 1.45;
}

.knowledge-card-heading h3 {
  font-size: 19px;
}

.rag-status-dot,
.future-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid rgba(95, 213, 176, 0.36);
  border-radius: 999px;
  color: #087a5f;
  background: rgba(32, 201, 151, 0.1);
  font-size: 12px;
  font-weight: 800;
}

.knowledge-drop-zone {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1.5px dashed rgba(43, 145, 224, 0.42);
  border-radius: 15px;
  color: #174b78;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(224, 242, 255, 0.42));
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.knowledge-drop-zone:hover {
  border-color: rgba(21, 126, 218, 0.68);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(216, 239, 255, 0.58));
}

.knowledge-drop-zone.is-disabled {
  cursor: wait;
  opacity: 0.72;
}

.knowledge-drop-zone input {
  display: none;
}

.knowledge-drop-zone strong {
  font-size: 16px;
}

.knowledge-drop-zone small {
  color: #70899f;
  font-size: 13px;
}

.knowledge-upload-glyph {
  position: relative;
  width: 38px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 10px;
  background: linear-gradient(145deg, #fff, #d8edff);
  box-shadow: 0 8px 18px rgba(24, 137, 217, 0.16);
}

.knowledge-upload-glyph::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 9px;
  height: 9px;
  border-top: 2px solid #168ee8;
  border-left: 2px solid #168ee8;
  transform: translateX(-50%) rotate(45deg);
}

.knowledge-upload-glyph::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 2px;
  height: 15px;
  background: #168ee8;
  transform: translateX(-50%);
}

.knowledge-stat-line {
  display: grid;
  grid-template-columns: 0.7fr 0.7fr 1.3fr;
  gap: 7px;
}

.knowledge-stat-line div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.42);
}

.knowledge-stat-line span {
  color: #7690a6;
  font-size: 12px;
}

.knowledge-stat-line strong {
  overflow: hidden;
  color: #124b7f;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-refresh-button,
.knowledge-file-actions button {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  color: #176fb8;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  font-weight: 750;
  cursor: pointer;
}

.knowledge-file-list {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 0;
  margin-top: 13px;
  overflow-y: auto;
  padding: 1px 4px 1px 1px;
  scrollbar-width: thin;
}

.knowledge-file-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 58px 72px auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(232, 246, 255, 0.46));
  box-shadow:
    0 9px 20px rgba(48, 112, 166, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.knowledge-file-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 10px;
  color: #1679c8;
  background: linear-gradient(145deg, #fff, #dcefff);
  box-shadow: 0 8px 16px rgba(24, 137, 217, 0.14);
  font-size: 10px;
  font-weight: 850;
}

.knowledge-file-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.knowledge-file-main strong {
  overflow: hidden;
  color: #173b5e;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-file-main small,
.knowledge-file-index small {
  color: #7790a5;
  font-size: 12px;
}

.knowledge-file-index {
  display: grid;
  gap: 2px;
  text-align: center;
}

.knowledge-file-index span {
  color: #0f5b99;
  font-size: 17px;
  font-weight: 800;
}

.knowledge-file-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #087a5f;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.knowledge-file-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #20c997;
  box-shadow: 0 0 8px rgba(32, 201, 151, 0.38);
}

.knowledge-file-status--processing {
  color: #a36d00;
}

.knowledge-file-status--processing i {
  background: #e9a326;
}

.knowledge-file-status--failed {
  color: #d83d54;
}

.knowledge-file-status--failed i {
  background: #ef4b5f;
}

.knowledge-file-actions {
  display: flex;
  gap: 6px;
}

.knowledge-file-actions button.danger,
.danger-button {
  color: #d83d54;
  background: rgba(255, 239, 242, 0.7);
}

.knowledge-file-actions button.is-loaded {
  color: #087a5f;
  background: rgba(222, 246, 236, 0.82);
}

.simulation-auto-run-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(117, 190, 163, 0.42);
  border-radius: 8px;
  color: #087a5f;
  background: rgba(222, 246, 236, 0.58);
  font-weight: 750;
  white-space: nowrap;
}

.knowledge-file-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.knowledge-loading,
.knowledge-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  min-height: 0;
  height: 100%;
  color: #6c859a;
  font-size: 13px;
}

.knowledge-loading span {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(22, 142, 232, 0.18);
  border-top-color: #168ee8;
  border-radius: 50%;
  animation: knowledgeSpin 900ms linear infinite;
}

.knowledge-empty strong {
  color: #315575;
  font-size: 15px;
}

.knowledge-inline-error {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(239, 75, 95, 0.2);
  border-radius: 9px;
  color: #c8384e;
  background: rgba(255, 238, 241, 0.58);
  font-size: 12px;
}

.event-knowledge-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 16px;
  overflow: hidden;
}

.event-knowledge-card > .event-knowledge-table-wrap,
.event-knowledge-card > .knowledge-loading,
.event-knowledge-card > .knowledge-empty {
  flex: 1 1 auto;
}

.station-spatial-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 16px;
  overflow: hidden;
}

.station-spatial-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 38px;
}

.station-spatial-heading h3 {
  margin: 0;
}

.station-spatial-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.station-spatial-heading button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.station-spatial-add-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(180deg, #29a8ff, #0877d8);
  box-shadow:
    0 8px 18px rgba(0, 118, 216, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  font-size: 23px;
  font-weight: 650;
  line-height: 1;
}

.station-spatial-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.28);
  scrollbar-width: thin;
}

.station-spatial-table {
  min-width: 1040px;
  table-layout: fixed;
}

.module-table.station-spatial-table th,
.module-table.station-spatial-table td {
  padding-right: 8px;
  padding-left: 8px;
}

.module-table.station-spatial-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #e8f3fc;
  box-shadow: inset 0 -1px 0 rgba(95, 149, 198, 0.18);
  white-space: nowrap;
}

.station-spatial-table .station-spatial-col--line { width: 9%; }
.station-spatial-table .station-spatial-col--station-name { width: 14%; }
.station-spatial-table .station-spatial-col--entrance-name { width: 10%; }
.station-spatial-table .station-spatial-col--x { width: 10%; }
.station-spatial-table .station-spatial-col--y { width: 10%; }
.station-spatial-table .station-spatial-col--platform-elevation { width: 12%; }
.station-spatial-table .station-spatial-col--road-elevation { width: 14%; }
.station-spatial-table .station-spatial-col--warning-elevation { width: 16%; }

.station-spatial-table .station-spatial-select-col {
  width: 28px;
  padding-right: 2px;
  padding-left: 2px;
  text-align: center;
}

.station-spatial-table .station-spatial-select-col input {
  width: 16px;
  min-height: 16px;
  height: 16px;
  padding: 0;
  accent-color: #168ee8;
}

.station-spatial-table td {
  color: #244967;
}

.station-spatial-value {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-spatial-card:not(.is-editing) .station-spatial-table tbody tr:hover {
  background: rgba(235, 247, 255, 0.38);
}

.station-spatial-card.is-editing .station-spatial-table input {
  min-height: 32px;
  padding: 0 6px;
  border-radius: 8px;
}

.simulation-knowledge-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  padding: 16px;
  overflow: hidden;
}

.simulation-library-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  min-height: 34px;
}

.simulation-create-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 13px;
}

.simulation-create-button span {
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}

.simulation-knowledge-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(232, 246, 255, 0.46));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.simulation-knowledge-heading h3,
.simulation-knowledge-heading p {
  margin: 0;
}

.simulation-knowledge-heading h3 {
  color: #17486d;
  font-size: 17px;
}

.simulation-knowledge-heading p {
  margin-top: 6px;
  color: #6e879d;
  font-size: 12px;
  line-height: 1.55;
}

.simulation-knowledge-heading > span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: #9a6700;
  background: rgba(255, 245, 220, 0.82);
  font-size: 12px;
  font-weight: 750;
}

.simulation-knowledge-blueprint {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.simulation-knowledge-blueprint article {
  min-width: 0;
  min-height: 134px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 13px;
  background: rgba(244, 250, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.simulation-knowledge-blueprint span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: #0b6eb0;
  background: rgba(216, 239, 255, 0.72);
  font-size: 11px;
  font-weight: 850;
}

.simulation-knowledge-blueprint strong {
  display: block;
  margin-top: 10px;
  color: #17486d;
  font-size: 14px;
}

.simulation-knowledge-blueprint p {
  margin: 7px 0 0;
  color: #70899e;
  font-size: 11px;
  line-height: 1.5;
}

.simulation-empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  min-height: 220px;
  border: 1px dashed rgba(72, 147, 205, 0.25);
  border-radius: 14px;
  background: rgba(240, 249, 255, 0.46);
  text-align: center;
}

.simulation-empty-state strong {
  color: #315575;
  font-size: 16px;
}

.simulation-empty-state span {
  color: #748ca1;
  font-size: 12px;
}

.simulation-empty-state div {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.simulation-empty-state button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.simulation-run-file-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.simulation-run-file-item {
  grid-template-columns: 50px minmax(160px, 1fr) 76px 112px 92px 218px;
}

.simulation-run-file-item .knowledge-file-actions {
  display: grid;
  grid-template-columns: 96px 54px 54px;
  gap: 6px;
  justify-content: end;
  min-width: 0;
}

.simulation-run-file-item .knowledge-file-actions > * {
  width: 100%;
  min-width: 0;
  padding-right: 5px;
  padding-left: 5px;
  justify-content: center;
  text-align: center;
}

.simulation-run-file-item .knowledge-file-actions > .danger:last-child {
  grid-column: 3;
}

.simulation-run-file-item.is-running {
  background: rgba(245, 251, 255, 0.94);
}

.simulation-run-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.simulation-run-title strong {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.simulation-run-type {
  flex: 0 0 auto;
  padding: 2px 7px;
  border: 1px solid #9fc0d9;
  border-radius: 4px;
  color: #315e7e;
  background: #eef6fb;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  white-space: nowrap;
}

.simulation-run-type--manual {
  border-color: #c8b58b;
  color: #765a1f;
  background: #fbf7ed;
}

.simulation-task-progress {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(121, 165, 198, 0.2);
}

.simulation-task-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #168ee8;
  transition: width 240ms ease;
}

.simulation-task-error {
  color: #c8384e !important;
}

.simulation-run-progress-meta {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
}

.simulation-run-progress-meta strong {
  color: #215b86;
  font-size: 13px;
}

.simulation-run-progress-meta small {
  overflow: hidden;
  color: #71899d;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.simulation-run-risk {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  align-items: center;
}

.simulation-run-risk span {
  display: grid;
  place-items: center;
  height: 24px;
  border-radius: 7px;
  background: rgba(237, 247, 254, 0.76);
  color: #315575;
  font-size: 12px;
  font-weight: 850;
}

.knowledge-overlay--simulation-create {
  position: fixed;
  z-index: 1001;
  border-radius: 0;
}

.simulation-create-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 16px;
  width: min(1100px, 100%);
  max-width: 100%;
  max-height: min(720px, calc(100vh - 48px));
  padding: 24px 24px 32px;
  overflow: hidden;
  border: 1px solid #d2e4f2;
  border-radius: 10px;
  background: #f7fbff;
  box-shadow: 0 28px 72px rgba(29, 88, 137, 0.24);
}

.simulation-create-dialog header h3 {
  margin: 0;
  color: #153f60;
  font-size: 20px;
}

.simulation-rain-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid #cfdfeb;
  border-radius: 8px;
  background: #e9f2f8;
}

.simulation-rain-mode button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: #58758c;
  background: transparent;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.simulation-rain-mode button.is-active {
  color: #0c6ba9;
  background: #fff;
  box-shadow: 0 2px 8px rgba(40, 94, 135, 0.12);
}

.simulation-rain-form {
  min-height: 0;
  max-height: 440px;
  overflow: auto;
  padding: 2px;
  scrollbar-width: thin;
}

.simulation-start-time {
  display: grid;
  grid-template-columns: auto minmax(220px, 340px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #d1e1ec;
  border-radius: 8px;
  background: #fff;
}

.simulation-start-time > span {
  color: #365a75;
  font-size: 13px;
  font-weight: 750;
}

.simulation-start-time input {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid #bfd5e6;
  border-radius: 6px;
  outline: 0;
  color: #173f5e;
  background: #fff;
  font: inherit;
}

.simulation-start-time input:focus {
  border-color: #168ee8;
  box-shadow: 0 0 0 2px rgba(22, 142, 232, 0.12);
}

.simulation-start-time small {
  color: #71899c;
  font-size: 12px;
}

.simulation-total-rain {
  display: grid;
  gap: 10px;
  width: min(380px, 100%);
  margin: 26px auto 34px;
}

.simulation-total-rain > span,
.simulation-rain-preview-head > strong {
  color: #365a75;
  font-size: 14px;
  font-weight: 750;
}

.simulation-total-rain div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  align-items: center;
  border: 1px solid #bfd5e6;
  border-radius: 8px;
  background: #fff;
}

.simulation-total-rain input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 0;
  outline: 0;
  color: #173f5e;
  background: transparent;
  font-size: 16px;
}

.simulation-total-rain b {
  color: #638096;
  font-size: 13px;
  text-align: center;
}

.simulation-rain-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.simulation-rain-preview-head > div {
  display: flex;
  gap: 18px;
}

.simulation-rain-preview-head span {
  color: #738b9e;
  font-size: 12px;
}

.simulation-rain-preview-head b {
  margin-left: 4px;
  color: #215b86;
  font-size: 13px;
}

.simulation-rain-preview {
  padding: 12px 14px 8px;
  border: 1px solid #d1e1ec;
  border-radius: 8px;
  background: #fff;
}

.simulation-rain-preview-chart {
  display: block;
  width: 100%;
  height: 220px;
}

.simulation-rain-preview-grid line {
  stroke: #dce8f0;
  stroke-width: 1;
}

.simulation-rain-preview-grid text,
.simulation-rain-axis-name {
  fill: #71899c;
  font-size: 11px;
}

.simulation-rain-preview-area {
  fill: rgba(22, 142, 232, 0.1);
  stroke: none;
}

.simulation-rain-preview-line {
  fill: none;
  stroke: #168ee8;
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.simulation-rain-preview-points circle {
  fill: #fff;
  stroke: #168ee8;
  stroke-width: 2;
}

.simulation-hourly-input-scroll {
  margin-top: 10px;
  padding: 0 18px 5px 48px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.simulation-hourly-grid {
  display: grid;
  grid-template-columns: repeat(24, 58px);
  gap: 5px;
  width: max-content;
}

.simulation-hourly-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.simulation-hourly-grid label span {
  color: #6e879a;
  font-size: 11px;
  white-space: nowrap;
}

.simulation-hourly-grid input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 3px;
  border: 1px solid #c9dce9;
  border-radius: 6px;
  outline: 0;
  color: #173f5e;
  background: #fff;
  font-size: 12px;
  appearance: textfield;
}

.simulation-hourly-grid input::-webkit-inner-spin-button,
.simulation-hourly-grid input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.simulation-total-rain input:focus,
.simulation-hourly-grid input:focus {
  border-color: #168ee8;
  box-shadow: 0 0 0 2px rgba(22, 142, 232, 0.12);
}

.simulation-create-error {
  min-height: 18px;
  margin: 0;
  color: #c8384e;
  font-size: 12px;
}

.simulation-create-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.simulation-create-dialog footer > div {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.simulation-viewer {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 142px minmax(0, 1fr);
  gap: 12px;
  width: min(1080px, calc(100vw - 96px));
  height: min(720px, calc(100vh - 82px));
  min-height: 0;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(239, 249, 255, 0.94));
  box-shadow: 0 34px 86px rgba(28, 91, 147, 0.24);
}

.simulation-viewer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-right: 34px;
}

.simulation-viewer-head h3,
.simulation-viewer-head p {
  margin: 0;
}

.simulation-viewer-head h3 {
  color: #123f63;
  font-size: 21px;
}

.simulation-viewer-head p {
  margin-top: 5px;
  color: #6f8495;
  font-size: 13px;
  font-weight: 700;
}

.simulation-viewer-head > span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(221, 241, 255, 0.88);
  color: #126ca8;
  font-size: 11px;
  font-weight: 850;
}

.simulation-model-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  height: 100%;
}

.simulation-run-list {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 10px;
  border: 1px solid rgba(190, 220, 242, 0.88);
  border-radius: 8px;
  background: rgba(248, 252, 255, 0.82);
}

.simulation-run-list h4 {
  margin: 0;
  color: #254d6d;
  font-size: 13px;
}

.simulation-run-list > div,
.simulation-station-scroll {
  min-height: 0;
  overflow: auto;
}

.simulation-run-item,
.simulation-station-item {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(199, 224, 243, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #385e7c;
  text-align: left;
  cursor: pointer;
}

.simulation-run-item {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  margin-bottom: 7px;
}

.simulation-run-item.is-active,
.simulation-station-item.is-active {
  border-color: rgba(176, 205, 228, 0.95);
  background: rgba(239, 247, 253, 0.95);
}

.simulation-run-item strong,
.simulation-station-item strong {
  min-width: 0;
  overflow: hidden;
  color: #153f60;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.simulation-run-item span,
.simulation-run-item small,
.simulation-station-item small {
  color: #6d8395;
  font-size: 12px;
  font-weight: 700;
}

.risk-severe { color: #c93232; }
.risk-moderate { color: #b97900; }

.simulation-run-detail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

.simulation-run-summary {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.7fr 1.1fr 0.7fr 0.9fr;
  gap: 7px;
  min-width: 0;
}

.simulation-run-summary > div {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(200, 226, 244, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.simulation-run-summary span,
.simulation-run-summary strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.simulation-run-rainfall {
  min-width: 0;
  min-height: 0;
  padding: 8px 10px 4px;
  overflow: hidden;
  border: 1px solid rgba(200, 226, 244, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.simulation-run-rainfall header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.simulation-run-rainfall header > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.simulation-run-rainfall header strong {
  color: #173f5f;
  font-size: 13px;
}

.simulation-run-rainfall header span,
.simulation-run-rainfall header small {
  color: #688196;
  font-size: 11px;
  font-weight: 750;
}

.simulation-run-rainfall header small {
  color: #126ca8;
}

.simulation-run-rainfall svg {
  display: block;
  width: 100%;
  height: 108px;
}

.simulation-run-rainfall.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #72899a;
  font-size: 12px;
}

.rainfall-empty {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #72899a;
  font-size: 12px;
}

.simulation-run-summary span {
  color: #72899a;
  font-size: 11px;
  font-weight: 750;
}

.simulation-run-summary strong {
  margin-top: 3px;
  color: #173f5f;
  font-size: 13px;
}

.simulation-detail-main {
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(300px, 1.1fr);
  gap: 10px;
  min-height: 0;
}

.simulation-chart-slot {
  min-width: 0;
  min-height: 230px;
}

.simulation-chart-slot > .simulation-chart,
.simulation-chart-slot > .simulation-chart-empty {
  height: 100%;
}

.simulation-station-list,
.simulation-station-detail,
.simulation-chart,
.simulation-chart-empty {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(195, 222, 242, 0.84);
  border-radius: 8px;
  background: rgba(249, 253, 255, 0.82);
}

.simulation-station-detail {
  overflow: auto;
}

.simulation-station-panel {
  display: grid;
  grid-template-rows: 252px auto;
  gap: 10px;
  min-width: 0;
  min-height: 100%;
  padding-right: 2px;
}

.simulation-station-list {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: 9px;
}

.simulation-station-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.simulation-station-tools strong {
  color: #254d6d;
  font-size: 14px;
}

.simulation-station-tools select {
  height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(184, 215, 239, 0.94);
  border-radius: 6px;
  background: #fff;
  color: #345c78;
  font-size: 15px;
  font-weight: 700;
}

.simulation-station-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  row-gap: 3px;
  padding: 8px 9px;
  margin-bottom: 6px;
  font-family: var(--font-ui);
  outline: none;
  user-select: none;
}

.simulation-station-item:focus-visible {
  border-color: rgba(150, 185, 211, 0.95);
}

.simulation-station-item small {
  grid-column: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-badge {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.risk-badge--severe {
  color: #b92020;
  background: rgba(255, 225, 225, 0.92);
}

.risk-badge--moderate {
  color: #9a6400;
  background: rgba(255, 239, 199, 0.94);
}

.risk-badge--safe {
  color: #15734e;
  background: rgba(219, 245, 235, 0.94);
}

.simulation-station-card {
  display: grid;
  grid-template-rows: auto auto;
  gap: 9px;
  min-height: 0;
  padding: 10px;
}

.simulation-station-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.simulation-station-title h4 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #153f60;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.simulation-station-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  min-height: 0;
  margin: 0;
}

.simulation-station-card dl > div {
  min-width: 0;
  padding: 7px 8px;
  border-radius: 7px;
  background: rgba(237, 247, 254, 0.78);
}

.simulation-station-card dt,
.simulation-station-card dd {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.simulation-station-card dt {
  color: #73899a;
  font-size: 11px;
  font-weight: 750;
}

.simulation-station-card dd {
  margin: 3px 0 0;
  color: #173f5f;
  font-size: 13px;
  font-weight: 780;
}

.simulation-detail-empty,
.simulation-chart-empty {
  display: grid;
  place-items: center;
  color: #70899e;
  font-size: 12px;
  font-weight: 750;
}

.simulation-chart {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 9px 10px 7px;
  overflow: hidden;
}

.simulation-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #254d6d;
}

.simulation-chart-head strong {
  font-size: 16px;
}

.simulation-chart-head span {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  color: #70899e;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-legend-dot {
  display: inline-block;
  width: 22px;
  height: 4px;
  border-radius: 999px;
}

.chart-legend-dot--depth {
  background: #17a085;
}

.chart-legend-dot--wse {
  background: #0e82d4;
}

.simulation-chart svg {
  width: 100%;
  height: 100%;
  min-height: 185px;
}

.chart-grid line {
  stroke: rgba(70, 106, 133, 0.42);
  stroke-width: 1.4;
}

.chart-plot-background {
  fill: rgba(232, 245, 250, 0.34);
}

.chart-depth-bars rect {
  fill: rgba(65, 157, 219, 0.28);
}

.chart-wse-line {
  fill: none;
  stroke: #0e82d4;
  stroke-width: 2.4;
}

.chart-depth-line {
  fill: none;
  stroke: #17a085;
  stroke-width: 3.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-depth-line.is-flat {
  stroke-width: 4.2;
  stroke-dasharray: 9 5;
}

.chart-depth-area {
  fill: rgba(23, 160, 133, 0.14);
  stroke: none;
}

.chart-peak-point {
  fill: #ffffff;
  stroke: #11866f;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.chart-threshold line {
  stroke-width: 2.2;
  stroke-dasharray: 9 5;
}

.chart-threshold--warning line {
  stroke: #d29610;
}

.chart-threshold--platform line {
  stroke: #cb3b3b;
}

.chart-threshold text,
.simulation-chart text {
  fill: #365a75;
  font-size: 20px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(250, 253, 255, 0.96);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.simulation-chart .chart-axis-label {
  fill: #284e6b;
  font-size: 18px;
  font-weight: 850;
}

.simulation-chart .chart-axis-name {
  fill: #496b84;
  font-size: 18px;
  font-weight: 800;
}

.simulation-chart .chart-axis-label--right {
  fill: #496f8b;
}

.simulation-chart .chart-time-label {
  fill: #668096;
  font-size: 15px;
  font-weight: 750;
}

.simulation-chart .chart-flat-note {
  fill: #487087;
  font-size: 16px;
  font-weight: 800;
}

.simulation-chart--compact .chart-threshold text,
.simulation-chart--compact text {
  font-size: 20px;
}

.simulation-chart--compact .chart-axis-label,
.simulation-chart--compact .chart-axis-name {
  font-size: 18px;
}

.simulation-chart .chart-peak-label {
  fill: #244d6b;
  font-weight: 850;
}

.event-knowledge-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.event-knowledge-summary > div {
  position: relative;
  min-width: 0;
  min-height: 70px;
  padding: 11px 14px 10px 62px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(228, 244, 255, 0.44));
  box-shadow:
    0 10px 24px rgba(48, 112, 166, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.event-knowledge-summary > div::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 10px;
  background:
    radial-gradient(circle, #168ee8 0 3px, transparent 4px),
    linear-gradient(145deg, #fff, #dcefff);
  box-shadow: 0 7px 15px rgba(24, 137, 217, 0.14);
}

.event-knowledge-summary span,
.event-knowledge-summary small {
  display: block;
  color: #7890a4;
  font-size: 11px;
}

.event-knowledge-summary strong {
  display: block;
  margin: 2px 0;
  color: #0d548d;
  font-size: 21px;
}

.event-knowledge-filter {
  display: grid;
  grid-template-columns: minmax(260px, 1.3fr) minmax(150px, 0.55fr) auto auto;
  align-items: end;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 12px;
  background: rgba(235, 247, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.event-knowledge-filter label {
  display: grid;
  gap: 5px;
}

.event-knowledge-filter label > span {
  color: #698299;
  font-size: 11px;
  font-weight: 750;
}

.event-knowledge-filter input,
.event-knowledge-filter select {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(92, 157, 215, 0.25);
  border-radius: 8px;
  color: #173b5e;
  background: rgba(255, 255, 255, 0.68);
  outline: none;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
}

.event-knowledge-filter > p {
  margin: 0 4px 9px;
  color: #70899e;
  font-size: 12px;
  white-space: nowrap;
}

.event-knowledge-filter > p strong {
  color: #0d69ae;
  font-size: 15px;
}

.event-knowledge-filter .knowledge-refresh-button {
  margin-bottom: 2px;
}

.event-knowledge-table-wrap {
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.28);
  scrollbar-width: thin;
}

.event-knowledge-table {
  table-layout: fixed;
}

.event-knowledge-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  height: 40px;
  background: rgba(225, 241, 253, 0.94);
  backdrop-filter: blur(10px);
}

.event-knowledge-table th:nth-child(1) { width: 20%; }
.event-knowledge-table th:nth-child(2) { width: 15%; }
.event-knowledge-table th:nth-child(3) { width: 17%; }
.event-knowledge-table th:nth-child(4) { width: 10%; }
.event-knowledge-table th:nth-child(5) { width: 12%; }
.event-knowledge-table th:nth-child(6) { width: 16%; }
.event-knowledge-table th:nth-child(7) { width: 10%; }

.event-knowledge-table td {
  height: 62px;
  padding: 8px 10px;
}

.event-knowledge-table tbody tr:not(.event-knowledge-empty-row):hover {
  background: rgba(255, 255, 255, 0.46);
}

.event-station-cell,
.event-station-cell strong,
.event-station-cell span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-station-cell strong {
  color: #173f64;
  font-size: 14px;
}

.event-station-cell span,
.event-time-cell {
  margin-top: 4px;
  color: #738da3;
  font-size: 11px;
}

.event-entrance-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.event-entrance-chips span,
.event-entrance-chips small {
  padding: 4px 6px;
  border: 1px solid rgba(225, 75, 89, 0.24);
  border-radius: 6px;
  color: #c43b4b;
  background: rgba(255, 235, 238, 0.7);
  font-size: 10px;
  font-weight: 750;
}

.event-entrance-chips small {
  border-color: rgba(230, 164, 46, 0.24);
  color: #a86a00;
  background: rgba(255, 246, 220, 0.7);
}

.event-depth-cell {
  color: #d34052;
  font-size: 18px;
}

.event-depth-cell small {
  margin-left: 3px;
  color: #8196a8;
  font-size: 9px;
}

.event-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a76b00;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.event-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e2a12c;
  box-shadow: 0 0 7px rgba(226, 161, 44, 0.28);
}

.event-status--processing {
  color: #1476b8;
}

.event-status--processing i {
  background: #28a6ed;
  box-shadow: 0 0 7px rgba(40, 166, 237, 0.3);
}

.event-status--completed {
  color: #087a5f;
}

.event-status--completed i {
  background: #20bd91;
  box-shadow: 0 0 7px rgba(32, 189, 145, 0.32);
}

.event-record-state {
  color: #9a6e1f;
  font-size: 11px;
}

.event-record-state.is-recorded {
  color: #38708f;
}

.event-view-button {
  min-height: 29px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
}

.event-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.event-row-actions button {
  min-height: 29px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  white-space: nowrap;
}

.event-knowledge-empty-row td {
  height: 150px;
  text-align: center;
}

.event-knowledge-empty-row strong,
.event-knowledge-empty-row span {
  display: block;
}

.event-knowledge-empty-row span {
  margin-top: 6px;
  color: #7b92a5;
  font-size: 11px;
}

.knowledge-overlay {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(219, 237, 250, 0.56);
  backdrop-filter: blur(12px) saturate(112%);
}

.knowledge-overlay--simulation {
  position: fixed;
  z-index: 1000;
  border-radius: 0;
}

.knowledge-overlay--simulation .simulation-viewer {
  height: calc(100% - 24px);
  max-height: calc(100% - 24px);
}

.knowledge-dialog {
  width: min(440px, 90%);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(231, 245, 255, 0.9));
  box-shadow:
    0 28px 64px rgba(39, 102, 170, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.knowledge-dialog-mark {
  display: block;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: linear-gradient(145deg, #2aa7f5, #0c72c8);
  box-shadow: 0 9px 20px rgba(12, 114, 200, 0.22);
}

.knowledge-dialog h3 {
  margin: 0;
  color: #123b60;
  font-size: 19px;
}

.knowledge-dialog > p {
  margin: 14px 0 0;
  color: #58738c;
  font-size: 13px;
  line-height: 1.65;
}

.knowledge-password-field {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  color: #234968;
  font-size: 13px;
  font-weight: 750;
}

.knowledge-password-field input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(92, 157, 215, 0.28);
  border-radius: 10px;
  color: #173b5e;
  background: rgba(255, 255, 255, 0.72);
  outline: 0;
  font: inherit;
  font-size: 14px;
}

.knowledge-password-field input:focus {
  border-color: rgba(22, 142, 232, 0.62);
  box-shadow: 0 0 0 3px rgba(22, 142, 232, 0.1);
}

.knowledge-confirm-file {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 16px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.52);
}

.knowledge-confirm-file div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.knowledge-confirm-file strong {
  overflow: hidden;
  color: #234968;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-confirm-file small {
  color: #7890a5;
  font-size: 11px;
}

.knowledge-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}

.knowledge-viewer {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  width: min(920px, 96%);
  height: min(440px, 96%);
  min-height: 0;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(232, 246, 255, 0.92));
  box-shadow:
    0 30px 70px rgba(39, 102, 170, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.knowledge-viewer-close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  color: #456a89;
  background: rgba(255, 255, 255, 0.58);
  font-size: 20px;
  cursor: pointer;
}

.knowledge-viewer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 42px;
}

.knowledge-viewer-head h3 {
  margin: 0;
  color: #163c5f;
  font-size: 20px;
}

.knowledge-viewer-head p {
  margin: 5px 0 0;
  color: #6d859b;
  font-size: 13px;
}

.knowledge-viewer-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.knowledge-viewer-summary span {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 9px;
  color: #7890a5;
  background: rgba(255, 255, 255, 0.46);
  font-size: 12px;
}

.knowledge-viewer-summary strong {
  color: #285271;
  font-size: 14px;
}

.knowledge-viewer-body {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

.event-knowledge-viewer {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  width: min(1020px, 97%);
  height: min(570px, 97%);
  min-height: 0;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(231, 245, 255, 0.93));
  box-shadow:
    0 30px 72px rgba(39, 102, 170, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.99);
}

.event-detail-heading {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-right: 42px;
}

.event-detail-symbol {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #d8edff);
  box-shadow: 0 9px 19px rgba(24, 137, 217, 0.15);
}

.event-detail-symbol::before {
  content: "";
  position: absolute;
  inset: 10px 11px;
  border: 2px solid #168ee8;
  border-radius: 4px;
}

.event-detail-symbol::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 15px;
  width: 9px;
  height: 5px;
  border-left: 2px solid #168ee8;
  border-bottom: 2px solid #168ee8;
  transform: rotate(-45deg);
}

.event-detail-heading p,
.event-detail-heading h3,
.event-detail-heading div > span {
  margin: 0;
}

.event-detail-heading p,
.event-detail-heading div > span {
  display: block;
  color: #71899e;
  font-size: 10px;
}

.event-detail-heading h3 {
  margin: 3px 0;
  color: #153f64;
  font-size: 18px;
}

.event-detail-heading > .event-status {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.event-detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.event-detail-metrics > div {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.45);
}

.event-detail-metrics span,
.event-detail-metrics strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-detail-metrics span {
  color: #7b91a4;
  font-size: 9px;
}

.event-detail-metrics strong {
  margin-top: 4px;
  color: #295575;
  font-size: 11px;
}

.event-detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.72fr);
  min-height: 0;
  overflow: hidden;
  border-top: 1px solid rgba(77, 143, 199, 0.13);
}

.event-detail-footer-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid rgba(77, 143, 199, 0.13);
}

.event-detail-footer-actions button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
}

.event-detail-main,
.event-detail-side {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.event-detail-main {
  padding: 4px 18px 0 0;
}

.event-detail-main > section {
  padding: 12px 0;
  border-bottom: 1px solid rgba(77, 143, 199, 0.11);
}

.event-detail-main > section:last-child {
  border-bottom: 0;
}

.event-detail-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.event-detail-section-title > span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  color: #147cc8;
  background: rgba(211, 237, 255, 0.66);
  font-size: 9px;
  font-weight: 850;
}

.event-detail-section-title strong,
.event-detail-section-title small {
  display: block;
}

.event-detail-section-title strong {
  color: #214c6d;
  font-size: 12px;
}

.event-detail-section-title small {
  margin-top: 2px;
  color: #8095a6;
  font-size: 9px;
}

.event-detail-main section > p {
  margin: 9px 0 0 36px;
  color: #4f6d84;
  font-size: 11px;
  line-height: 1.65;
}

.event-detail-entrances {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 9px 0 0 36px;
}

.event-detail-entrances > span {
  min-width: 82px;
  padding: 6px 8px;
  border: 1px solid rgba(111, 162, 198, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.event-detail-entrances b,
.event-detail-entrances small {
  display: block;
}

.event-detail-entrances b {
  color: #3f6380;
  font-size: 10px;
}

.event-detail-entrances small {
  margin-top: 3px;
  color: #8598a8;
  font-size: 8px;
}

.event-detail-entrances > span.is-risk {
  border-color: rgba(224, 71, 93, 0.25);
  background: rgba(255, 237, 240, 0.58);
}

.event-detail-entrances > span.is-risk b,
.event-detail-entrances > span.is-risk small {
  color: #c53b4e;
}

.event-detail-entrances em {
  color: #8499aa;
  font-size: 10px;
  font-style: normal;
}

.event-detail-side {
  padding: 13px 0 0 17px;
  border-left: 1px solid rgba(77, 143, 199, 0.13);
}

.event-detail-side > section + section {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid rgba(77, 143, 199, 0.11);
}

.event-detail-side h4 {
  margin: 0 0 10px;
  color: #244f70;
  font-size: 11px;
}

.event-detail-side h4 span {
  color: #1684d2;
}

.event-timeline {
  display: grid;
  gap: 0;
}

.event-timeline > span {
  position: relative;
  min-height: 43px;
  padding-left: 24px;
}

.event-timeline > span::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 13px;
  bottom: -5px;
  width: 1px;
  background: rgba(126, 161, 188, 0.28);
}

.event-timeline > span:last-child::before {
  display: none;
}

.event-timeline i {
  position: absolute;
  left: 1px;
  top: 4px;
  width: 9px;
  height: 9px;
  border: 2px solid #aabac7;
  border-radius: 50%;
  background: #edf5fa;
}

.event-timeline .is-done i {
  border-color: #1a9edc;
  background: #1a9edc;
  box-shadow: 0 0 7px rgba(26, 158, 220, 0.28);
}

.event-timeline b,
.event-timeline small {
  display: block;
}

.event-timeline b {
  color: #46677f;
  font-size: 10px;
}

.event-timeline small {
  margin-top: 3px;
  color: #8296a7;
  font-size: 8px;
}

.event-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.event-photo-grid a {
  min-width: 0;
  color: #557188;
  text-decoration: none;
}

.event-photo-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 7px;
  background: #e8f1f6;
}

.event-photo-grid span {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-photo-empty {
  padding: 16px 8px;
  border: 1px dashed rgba(104, 157, 195, 0.24);
  border-radius: 8px;
  color: #8297a8;
  background: rgba(255, 255, 255, 0.3);
  font-size: 9px;
  text-align: center;
}

.knowledge-chunk-outline,
.knowledge-source-preview {
  min-height: 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.46);
}

.knowledge-chunk-outline {
  display: grid;
  align-content: start;
  gap: 7px;
}

.knowledge-chunk-outline > strong,
.knowledge-source-preview > strong {
  display: block;
  margin-bottom: 7px;
  color: #234968;
  font-size: 14px;
}

.knowledge-chunk-outline span {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 7px;
  color: #4f6d85;
  background: rgba(231, 244, 253, 0.56);
}

.knowledge-chunk-outline i {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  color: #1478c7;
  background: rgba(197, 229, 251, 0.7);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.knowledge-chunk-outline b {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-chunk-outline small {
  color: #8499aa;
  font-size: 11px;
}

.knowledge-source-preview pre {
  margin: 0;
  color: #3f6079;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.knowledge-loading--viewer {
  grid-row: 1 / -1;
}

@keyframes knowledgeSpin {
  to { transform: rotate(360deg); }
}

.file-row progress {
  width: 90px;
  height: 7px;
  accent-color: #167cf0;
}

.icon-action,
.module-table button,
.ghost-button,
.primary-button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 10px;
  color: #126bc0;
  background: rgba(239, 248, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  font-weight: 750;
  cursor: pointer;
}

.primary-button {
  color: #fff;
  background: linear-gradient(180deg, #28a6ff, #0877d8);
  box-shadow:
    0 8px 18px rgba(0, 118, 216, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.ghost-button {
  color: #486780;
  background: rgba(255, 255, 255, 0.56);
}

.module-table button.danger {
  color: #e0344c;
  background: rgba(255, 238, 241, 0.74);
}

.table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.module-table {
  width: 100%;
  border-collapse: collapse;
  color: #193a5d;
  font-size: 13px;
}

.module-table th,
.module-table td {
  padding: 13px 12px;
  border-bottom: 1px solid rgba(98, 152, 205, 0.12);
  text-align: left;
  vertical-align: middle;
}

.module-table th {
  color: #17395c;
  background: rgba(229, 243, 255, 0.46);
  font-weight: 800;
}

.module-table input,
.form-card input,
.form-card select,
.form-card textarea,
.users-card input,
.users-card select {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(111, 165, 220, 0.28);
  border-radius: 10px;
  color: #17395c;
  background: rgba(255, 255, 255, 0.62);
  outline: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
}

.form-card {
  display: grid;
  gap: 16px;
}

.form-card label,
.users-card label {
  display: grid;
  gap: 8px;
  color: #17395c;
  font-size: 13px;
  font-weight: 750;
}

.form-card textarea {
  min-height: 134px;
  padding: 12px;
  resize: none;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.rule-management {
  position: relative;
  height: 100%;
  min-height: 0;
}

.rule-list-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  padding: 20px;
  overflow: hidden;
}

.rule-create-button::before {
  content: "+";
  margin-right: 7px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}

.rule-create-button--header {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.rule-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(190px, 0.9fr) minmax(150px, 0.65fr) auto;
  align-items: end;
  gap: 11px;
  margin-bottom: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 13px;
  background: rgba(235, 247, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 10px 24px rgba(48, 112, 166, 0.07);
}

.rule-filter-bar label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.rule-filter-bar label > span {
  color: #698299;
  font-size: 11px;
  font-weight: 750;
}

.rule-filter-bar input,
.rule-filter-bar select,
.rule-editor-form input,
.rule-editor-form select,
.rule-editor-form textarea,
.user-editor-form input,
.user-editor-form select {
  width: 100%;
  border: 1px solid rgba(92, 157, 215, 0.25);
  border-radius: 9px;
  color: #173b5e;
  background: rgba(255, 255, 255, 0.64);
  outline: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.rule-filter-bar input,
.rule-filter-bar select {
  min-height: 35px;
  padding: 0 11px;
}

.rule-filter-bar input:focus,
.rule-filter-bar select:focus,
.rule-editor-form input:focus,
.rule-editor-form select:focus,
.rule-editor-form textarea:focus,
.user-editor-form input:focus,
.user-editor-form select:focus {
  border-color: rgba(22, 142, 232, 0.58);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 0 0 3px rgba(22, 142, 232, 0.1);
}

.rule-filter-count {
  min-width: 92px;
  margin: 0 2px 9px 4px;
  color: #6e879d;
  font-size: 12px;
  white-space: nowrap;
}

.rule-filter-count strong {
  color: #0c68ae;
  font-size: 15px;
}

.rule-table-wrap {
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.28);
  scrollbar-width: thin;
}

.rule-table {
  table-layout: fixed;
}

.rule-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  height: 42px;
  background: rgba(225, 241, 253, 0.92);
  backdrop-filter: blur(10px);
}

.rule-table th:nth-child(1) { width: 16%; }
.rule-table th:nth-child(2) { width: 24%; }
.rule-table th:nth-child(3) { width: 18%; }
.rule-table th:nth-child(4) { width: 11%; }
.rule-table th:nth-child(5) { width: 15%; }
.rule-table th:nth-child(6) { width: 16%; }

.rule-table td {
  height: 57px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.rule-table tbody tr:not(.rule-empty-row) {
  transition: background 180ms ease;
}

.rule-table tbody tr:not(.rule-empty-row):hover {
  background: rgba(255, 255, 255, 0.42);
}

.rule-name,
.rule-description,
.rule-updated-time {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-name {
  color: #143c62;
  font-size: 14px;
}

.rule-description {
  color: #58738b;
  font-size: 13px;
}

.rule-kb-chip {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  padding: 5px 8px;
  border: 1px solid rgba(93, 161, 219, 0.18);
  border-radius: 8px;
  color: #27648f;
  background: rgba(226, 243, 255, 0.62);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-kb-chip.is-empty {
  border-color: rgba(122, 145, 164, 0.16);
  color: #7890a5;
  background: rgba(239, 246, 251, 0.56);
}

.rule-updated-time {
  color: #7890a5;
  font-size: 12px;
}

.rule-table .rule-status-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0;
  border: 0;
  color: #8295a6;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
}

.rule-status-toggle i {
  position: relative;
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: #b7c7d4;
  transition: background 180ms ease;
}

.rule-status-toggle i::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(31, 67, 98, 0.22);
  transition: transform 180ms ease;
}

.rule-status-toggle.is-enabled {
  color: #087a5f;
}

.rule-status-toggle.is-enabled i {
  background: #20b98d;
}

.rule-status-toggle.is-enabled i::after {
  transform: translateX(15px);
}

.rule-row-actions {
  display: flex;
  gap: 6px;
}

.rule-table .rule-row-actions button {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 12px;
}

.rule-empty-row td {
  height: 160px;
  text-align: center;
}

.rule-empty-row strong,
.rule-empty-row span {
  display: block;
}

.rule-empty-row strong {
  color: #365a79;
  font-size: 15px;
}

.rule-empty-row span {
  margin-top: 7px;
  color: #7890a5;
  font-size: 12px;
}

.rule-overlay,
.user-overlay {
  position: absolute;
  z-index: 45;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(216, 235, 249, 0.58);
  backdrop-filter: blur(13px) saturate(112%);
}

.rule-editor-dialog,
.rule-confirm-dialog,
.user-editor-dialog {
  width: min(680px, 94%);
  max-height: 96%;
  overflow: auto;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(231, 245, 255, 0.92));
  box-shadow:
    0 30px 72px rgba(39, 102, 170, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.rule-dialog-heading,
.rule-dialog-heading > div {
  display: flex;
  align-items: center;
}

.rule-dialog-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.rule-dialog-heading > div {
  gap: 12px;
  min-width: 0;
}

.rule-dialog-heading h3,
.rule-confirm-dialog h3 {
  margin: 0;
  color: #123b60;
  font-size: 20px;
}

.rule-dialog-heading p {
  margin: 4px 0 0;
  color: #6c8499;
  font-size: 12px;
}

.rule-dialog-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 11px;
  color: #1187dc;
  background: linear-gradient(145deg, #fff, #d9efff);
  box-shadow: 0 9px 18px rgba(24, 137, 217, 0.16);
  font-size: 23px;
}

.rule-dialog-mark--danger {
  color: #d83d54;
  background: linear-gradient(145deg, #fff, #ffe5ea);
}

.rule-dialog-close {
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  color: #53718a;
  background: rgba(255, 255, 255, 0.58);
  font-size: 20px;
  cursor: pointer;
}

.rule-editor-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 14px;
}

.rule-editor-form > label:not(.rule-enabled-field) {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #234968;
  font-size: 13px;
  font-weight: 750;
}

.rule-editor-form label > span > b {
  margin-left: 4px;
  color: #e0475d;
}

.rule-editor-form input,
.rule-editor-form select {
  min-height: 39px;
  padding: 0 11px;
}

.rule-description-field,
.rule-enabled-field,
.rule-form-error {
  grid-column: 1 / -1;
}

.rule-editor-form textarea {
  min-height: 76px;
  padding: 10px 11px;
  line-height: 1.55;
  resize: none;
}

.rule-editor-form input.is-invalid {
  border-color: rgba(224, 71, 93, 0.68);
  box-shadow: 0 0 0 3px rgba(224, 71, 93, 0.08);
}

.rule-enabled-field {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.rule-enabled-field > span {
  display: grid;
  gap: 3px;
}

.rule-enabled-field strong {
  color: #234968;
  font-size: 13px;
}

.rule-enabled-field small {
  color: #7890a5;
  font-size: 11px;
}

.rule-enabled-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rule-enabled-field > i {
  position: relative;
  width: 42px;
  height: 23px;
  border-radius: 999px;
  background: #b8c8d5;
  transition: background 180ms ease;
}

.rule-enabled-field > i::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(31, 67, 98, 0.24);
  transition: transform 180ms ease;
}

.rule-enabled-field input:checked + i {
  background: #168ee8;
}

.rule-enabled-field input:checked + i::after {
  transform: translateX(19px);
}

.rule-form-error {
  min-height: 14px;
  margin: -5px 0 0;
  color: #d83d54;
  font-size: 12px;
}

.rule-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 10px;
}

.rule-confirm-dialog {
  width: min(430px, 90%);
  text-align: center;
}

.rule-confirm-dialog .rule-dialog-mark {
  margin: 0 auto 12px;
}

.rule-confirm-dialog p {
  margin: 12px 0 0;
  color: #58738c;
  font-size: 13px;
  line-height: 1.65;
}

.full-card {
  height: 100%;
}

.api-save-button--header {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 19px;
  font-size: 14px;
}

.api-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.api-header-actions .ghost-button {
  min-height: 40px;
}

.api-management {
  position: relative;
  height: 100%;
  min-height: 0;
}

.api-config-card {
  padding: 18px;
  overflow: hidden;
}

.api-config-card.is-locked .api-table input {
  color: #607b92;
  background: rgba(236, 245, 251, 0.5);
}

.api-config-card.is-locked .api-table input,
.api-config-card.is-locked .api-table button {
  cursor: not-allowed;
}

.api-config-card.is-locked .api-table button {
  opacity: 0.48;
}

.api-table-wrap {
  height: 100%;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.28);
  scrollbar-width: thin;
}

.api-table {
  table-layout: fixed;
  font-size: 14px;
}

.api-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  height: 44px;
  color: #173f65;
  background: rgba(225, 241, 253, 0.92);
  backdrop-filter: blur(10px);
  font-size: 13px;
}

.api-table th:nth-child(1) { width: 15%; }
.api-table th:nth-child(2) { width: 21%; }
.api-table th:nth-child(3) { width: 32%; }
.api-table th:nth-child(4) { width: 24%; }
.api-table th:nth-child(5) { width: 8%; }

.api-table td {
  height: 62px;
  padding: 10px;
}

.api-table tbody tr {
  transition: background 180ms ease;
}

.api-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.4);
}

.api-type-name {
  color: #153f64;
  font-size: 14px;
  line-height: 1.45;
}

.api-table input {
  min-height: 37px;
  padding: 0 11px;
  border-color: rgba(92, 157, 215, 0.24);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.api-table input:focus {
  border-color: rgba(22, 142, 232, 0.58);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 0 0 3px rgba(22, 142, 232, 0.1);
}

.api-key-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 6px;
  min-width: 0;
}

.api-table .api-key-field button,
.api-table .api-test-button {
  min-height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
}

.api-table .api-key-field button {
  color: #52718a;
  background: rgba(255, 255, 255, 0.56);
}

.api-table .api-test-button {
  width: 100%;
}

.api-password-overlay {
  position: absolute;
  z-index: 45;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(216, 235, 249, 0.6);
  backdrop-filter: blur(13px) saturate(112%);
}

.api-password-dialog {
  position: relative;
  width: min(430px, 90%);
  padding: 23px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(231, 245, 255, 0.93));
  box-shadow:
    0 30px 72px rgba(39, 102, 170, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
  text-align: center;
}

.api-password-dialog .rule-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.api-password-mark {
  position: relative;
  display: block;
  width: 42px;
  height: 34px;
  margin: 2px auto 13px;
  border: 2px solid #168ee8;
  border-radius: 10px;
  background: rgba(222, 241, 255, 0.72);
  box-shadow: 0 9px 20px rgba(24, 137, 217, 0.16);
}

.api-password-mark::before {
  content: "";
  position: absolute;
  left: 10px;
  top: -14px;
  width: 18px;
  height: 18px;
  border: 2px solid #168ee8;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}

.api-password-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  width: 5px;
  height: 9px;
  border-radius: 999px;
  background: #168ee8;
  transform: translateX(-50%);
}

.api-password-dialog h3 {
  margin: 0;
  color: #123b60;
  font-size: 20px;
}

.api-password-dialog > p:not(.api-password-error) {
  margin: 7px 0 16px;
  color: #6c8499;
  font-size: 13px;
}

.api-password-dialog label {
  display: grid;
  gap: 7px;
  color: #234968;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
}

.api-password-dialog label input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(92, 157, 215, 0.28);
  border-radius: 10px;
  color: #173b5e;
  background: rgba(255, 255, 255, 0.72);
  outline: 0;
  font: inherit;
  font-size: 14px;
}

.api-password-dialog label input:focus {
  border-color: rgba(22, 142, 232, 0.62);
  box-shadow: 0 0 0 3px rgba(22, 142, 232, 0.1);
}

.api-password-error {
  min-height: 18px;
  margin: 7px 0 0;
  color: #d83d54;
  font-size: 12px;
  text-align: left;
}

.api-password-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 9px;
}

.api-password-actions button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.user-create-button--header {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 19px;
  font-size: 14px;
}

.user-management {
  position: relative;
  height: 100%;
  min-height: 0;
}

.users-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  padding: 16px 18px 18px;
  overflow: hidden;
}

.user-list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 0 3px;
}

.user-list-meta p,
.user-list-meta span {
  margin: 0;
}

.user-list-meta p {
  color: #173f65;
  font-size: 15px;
  font-weight: 800;
}

.user-list-meta span {
  color: #6f879c;
  font-size: 12px;
}

.user-list-meta strong {
  color: #1087dd;
  font-size: 14px;
}

.user-table-wrap {
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.28);
  scrollbar-width: thin;
}

.user-table {
  table-layout: fixed;
  font-size: 14px;
}

.user-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  height: 44px;
  color: #173f65;
  background: rgba(225, 241, 253, 0.92);
  backdrop-filter: blur(10px);
  font-size: 13px;
}

.user-table th:nth-child(1) { width: 18%; }
.user-table th:nth-child(2) { width: 15%; }
.user-table th:nth-child(3) { width: 18%; }
.user-table th:nth-child(4) { width: 35%; }
.user-table th:nth-child(5) { width: 14%; }

.user-table td {
  height: 62px;
  padding: 10px 12px;
}

.user-table tbody tr {
  transition: background 180ms ease;
}

.user-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.4);
}

.user-name {
  color: #173f65;
  font-size: 14px;
}

.user-password-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #52728d;
  font-size: 12px;
}

.user-password-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #23c69a;
  box-shadow: 0 0 8px rgba(35, 198, 154, 0.38);
}

.user-line-chip {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  padding: 5px 9px;
  border: 1px solid rgba(93, 164, 218, 0.2);
  border-radius: 8px;
  color: #176da9;
  background: rgba(222, 242, 255, 0.56);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-stations {
  display: block;
  overflow: hidden;
  color: #496982;
  font-size: 13px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.user-row-actions button {
  min-height: 31px;
  padding: 0 10px;
  border-radius: 8px;
}

.user-empty-row td {
  height: 190px;
  text-align: center;
}

.user-empty-row strong,
.user-empty-row span {
  display: block;
}

.user-empty-row strong {
  color: #365a79;
  font-size: 15px;
}

.user-empty-row span {
  margin-top: 7px;
  color: #7890a5;
  font-size: 12px;
}

.user-editor-dialog {
  width: min(760px, 94%);
}

.user-dialog-mark {
  position: relative;
}

.user-dialog-mark::before,
.user-dialog-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  border: 2px solid #168ee8;
  transform: translateX(-50%);
}

.user-dialog-mark::before {
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.user-dialog-mark::after {
  bottom: 6px;
  width: 20px;
  height: 10px;
  border-radius: 12px 12px 5px 5px;
}

.user-editor-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.user-editor-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #234968;
  font-size: 13px;
  font-weight: 750;
}

.user-editor-form label > span > b {
  margin-left: 4px;
  color: #e0475d;
}

.user-editor-form input,
.user-editor-form select {
  min-height: 41px;
  padding: 0 11px;
}

.user-stations-field,
.user-form-hint,
.user-form-error {
  grid-column: 1 / -1;
}

.user-stations-field {
  min-width: 0;
  margin: 1px 0 0;
  padding: 0;
  border: 0;
}

.user-stations-field:focus {
  outline: none;
}

.user-stations-field.is-invalid .user-station-grid {
  border-color: rgba(224, 71, 93, 0.68);
  box-shadow: 0 0 0 3px rgba(224, 71, 93, 0.08);
}

.user-stations-field legend {
  width: 100%;
  margin-bottom: 7px;
  color: #234968;
  font-size: 13px;
  font-weight: 750;
}

.user-stations-field legend b {
  margin-left: 4px;
  color: #e0475d;
}

.user-stations-field legend small {
  float: right;
  color: #70899e;
  font-size: 11px;
  font-weight: 500;
}

.user-stations-field legend small strong {
  color: #127bc0;
  font-size: inherit;
}

.user-station-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  max-height: 214px;
  overflow-y: auto;
  padding: 9px;
  border: 1px solid rgba(110, 161, 198, 0.24);
  border-radius: 12px;
  background: rgba(244, 250, 254, 0.54);
  box-shadow: inset 0 2px 8px rgba(61, 111, 149, 0.05);
}

.user-editor-form .user-station-option {
  min-width: 0;
  min-height: 52px;
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(118, 170, 208, 0.17);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font-weight: 500;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.user-editor-form .user-station-option[hidden] {
  display: none;
}

.user-editor-form .user-station-option:has(input:checked) {
  border-color: rgba(20, 135, 215, 0.4);
  background: rgba(221, 242, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.user-editor-form .user-station-option input {
  width: 16px;
  height: 16px;
  min-height: 0;
  flex: 0 0 16px;
  margin: 0;
  padding: 0;
  accent-color: #1488d5;
}

.user-station-option > span {
  min-width: 0;
}

.user-station-option strong,
.user-station-option small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-station-option strong {
  color: #244d6d;
  font-size: 12px;
}

.user-station-option small {
  margin-top: 3px;
  color: #7890a4;
  font-size: 10px;
  font-weight: 500;
}

.user-station-options-empty {
  grid-column: 1 / -1;
  padding: 24px;
  color: #7890a4;
  text-align: center;
}

.user-form-hint {
  margin: -1px 1px 0;
  color: #728ba0;
  font-size: 11px;
  line-height: 1.55;
}

.user-form-error {
  min-height: 16px;
  margin: -4px 1px 0;
  color: #d83d54;
  font-size: 12px;
}

.user-editor-form input.is-invalid,
.user-editor-form select.is-invalid {
  border-color: rgba(224, 71, 93, 0.68);
  box-shadow: 0 0 0 3px rgba(224, 71, 93, 0.08);
}

.user-editor-dialog [data-action="save-user"]:disabled {
  cursor: wait;
  opacity: 0.62;
}

.conversation-detail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.conversation-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.conversation-list {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 0;
  overflow: auto;
  padding: 8px 10px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 143, 232, 0.36) rgba(255, 255, 255, 0.34);
}

.conversation-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

.conversation-row--user {
  flex-direction: row-reverse;
}

.conversation-avatar {
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 14px;
  color: #fff;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.46), transparent 34%),
    linear-gradient(145deg, #17c8ef, #0877d6);
  box-shadow:
    0 10px 20px rgba(24, 137, 217, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 800;
}

.conversation-avatar--assistant {
  background:
    radial-gradient(circle at 50% 42%, rgba(74, 188, 255, 0.26), transparent 62%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(210, 237, 255, 0.78));
}

.conversation-avatar--assistant img {
  display: block;
  width: 132%;
  height: 132%;
  object-fit: contain;
  object-position: center 42%;
  filter:
    contrast(1.08)
    saturate(1.08)
    drop-shadow(0 5px 8px rgba(24, 137, 217, 0.16));
  transform: translateY(4px);
}

.conversation-avatar--user {
  color: #07539b;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.9), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(207, 236, 255, 0.76));
}

.conversation-avatar--user i,
.conversation-avatar--user i::before,
.conversation-avatar--user i::after {
  content: "";
  position: absolute;
  border: 2px solid #168fe8;
}

.conversation-avatar--user i {
  top: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.52);
}

.conversation-avatar--user i::before {
  left: 50%;
  top: 16px;
  width: 22px;
  height: 13px;
  border-radius: 18px 18px 7px 7px;
  background: rgba(239, 250, 255, 0.58);
  transform: translateX(-50%);
}

.conversation-avatar--user i::after {
  display: none;
}

.conversation-bubble {
  position: relative;
  display: grid;
  gap: 7px;
  max-width: 68%;
  min-width: 160px;
  padding: 12px 15px 13px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(236, 248, 255, 0.52));
  box-shadow:
    0 14px 30px rgba(49, 126, 190, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.conversation-bubble::before {
  content: "";
  position: absolute;
  top: 14px;
  left: -6px;
  width: 10px;
  height: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(246, 252, 255, 0.72);
  transform: rotate(45deg);
}

.conversation-bubble span {
  color: #7890a8;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.conversation-bubble p {
  margin: 0;
  color: #17395c;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.conversation-bubble p strong {
  color: inherit;
  font-weight: 800;
}

.conversation-bubble--user {
  border-color: rgba(128, 205, 255, 0.58);
  border-bottom-right-radius: 6px;
  background:
    linear-gradient(180deg, rgba(40, 166, 255, 0.94), rgba(8, 119, 216, 0.9));
  box-shadow:
    0 16px 34px rgba(0, 118, 216, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.conversation-bubble--user::before {
  right: -6px;
  left: auto;
  border: 0;
  border-top: 1px solid rgba(128, 205, 255, 0.58);
  border-right: 1px solid rgba(128, 205, 255, 0.58);
  background: rgba(8, 119, 216, 0.9);
}

.conversation-bubble--user span,
.conversation-bubble--user p {
  color: #fff;
}

.conversation-bubble--assistant {
  border-bottom-left-radius: 6px;
}

.module-link.is-active {
  transform: translateY(-8px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(226, 242, 255, 0.62));
  box-shadow:
    0 26px 58px rgba(39, 123, 187, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(53, 135, 196, 0.1);
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

body {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--ink-body);
  font-family: var(--font-ui);
  font-feature-settings: "kern";
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  background:
    radial-gradient(ellipse at 18% -16%, rgba(54, 139, 238, 0.25), rgba(54, 139, 238, 0.08) 42%, transparent 68%),
    linear-gradient(180deg, #edf5ff 0%, #d7e8ff 44%, #ecf5ff 72%, #f9fcff 100%);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@property --eye-open {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  left: 14%;
  top: -280px;
  width: 72%;
  height: 560px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(62, 151, 246, 0.22) 0%, rgba(62, 151, 246, 0.08) 44%, transparent 74%);
  filter: blur(28px);
  opacity: 1;
}

.page-shell {
  position: fixed;
  top: 50%;
  left: 50%;
  display: block;
  width: max(1672px, 100vw);
  height: 840px;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 22% -18%, rgba(62, 151, 246, 0.2), rgba(62, 151, 246, 0.07) 40%, transparent 67%),
    radial-gradient(ellipse at 50% 76%, rgba(255, 255, 255, 0.48), transparent 34%),
    linear-gradient(180deg, rgba(237, 245, 255, 0.98) 0%, rgba(215, 232, 255, 0.91) 42%, rgba(236, 245, 255, 0.94) 72%, rgba(249, 252, 255, 0.98) 100%);
  transform: translate(-50%, -50%) scale(var(--stage-scale, 1));
  transform-origin: center;
}

.page-shell::before,
.page-shell::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.page-shell::before {
  left: 10%;
  right: auto;
  top: -27%;
  width: 78%;
  height: 66%;
  background:
    radial-gradient(ellipse at center, rgba(62, 151, 246, 0.17) 0%, rgba(62, 151, 246, 0.065) 44%, transparent 74%);
  filter: blur(28px);
}

.page-shell::after {
  left: -2%;
  right: -2%;
  bottom: -7%;
  height: 22%;
  background:
    radial-gradient(ellipse at 50% 62%, rgba(235, 248, 255, 0.36), transparent 36%),
    radial-gradient(ellipse at 50% 84%, rgba(42, 137, 212, 0.12), transparent 60%);
  filter: blur(6px);
}

.ambient-layer,
.ambient-layer--top,
.ambient-layer--center {
  display: none;
}

.ambient-layer--particles {
  display: block;
  position: absolute;
  z-index: 1;
  inset: 8% 2% 16%;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    radial-gradient(circle at 18% 23%, rgba(255, 255, 255, 0.96) 0 1px, transparent 2px),
    radial-gradient(circle at 31% 68%, rgba(60, 151, 246, 0.52) 0 1px, transparent 3px),
    radial-gradient(circle at 59% 25%, rgba(255, 255, 255, 0.88) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 46%, rgba(42, 132, 226, 0.48) 0 2px, transparent 4px),
    linear-gradient(115deg, transparent 0 44%, rgba(255, 255, 255, 0.34) 49%, transparent 54%),
    linear-gradient(68deg, transparent 0 48%, rgba(62, 151, 246, 0.15) 50%, transparent 54%);
  background-size: 310px 220px, 420px 300px, 520px 240px, 360px 280px, 760px 100%, 920px 100%;
  mask-image: linear-gradient(180deg, transparent, #000 16%, #000 78%, transparent);
  animation: none;
}

.page-header {
  position: absolute;
  z-index: 4;
  top: 1.35%;
  left: 0;
  right: 0;
  height: 9.6%;
  min-height: 0;
  overflow: visible;
}

.page-header::before,
.page-header::after {
  content: "";
  position: absolute;
  left: 50%;
  pointer-events: none;
  transform: translateX(-50%);
}

.page-header::before {
  z-index: -1;
  top: -66px;
  width: 1260px;
  height: 178px;
  border-top: 2px solid rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(20, 112, 212, 0.24);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 70%, rgba(255, 255, 255, 0.92), rgba(190, 220, 252, 0.28) 44%, transparent 70%);
  box-shadow:
    inset 0 7px 12px rgba(255, 255, 255, 0.72),
    inset 0 -3px 8px rgba(30, 119, 216, 0.14),
    0 0 18px rgba(255, 255, 255, 0.52),
    0 10px 26px rgba(45, 127, 218, 0.2);
}

.page-header::after {
  z-index: -1;
  top: -14px;
  width: 610px;
  height: 76px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.86), rgba(116, 197, 249, 0.23) 52%, transparent 76%);
  filter: blur(2px);
}

.brand-lockup {
  position: relative;
  gap: 0;
  padding: 4px 72px 13px;
  transform: translateY(-4px);
}

.brand-lockup::before,
.brand-lockup::after {
  content: "";
  position: absolute;
  left: 50%;
  pointer-events: none;
  transform: translateX(-50%);
}

.brand-lockup::before {
  z-index: -1;
  top: -2px;
  width: 590px;
  height: 82px;
  border-top: 1px solid rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(49, 142, 219, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, 0.94), rgba(93, 183, 246, 0.26) 46%, transparent 74%);
  filter: blur(0.2px);
}

.brand-lockup::after {
  z-index: 0;
  bottom: 2px;
  width: 390px;
  height: 12px;
  border-radius: 999px;
  background:
    radial-gradient(ellipse, rgba(255, 255, 255, 0.9), rgba(24, 143, 232, 0.32) 44%, transparent 76%);
  filter: blur(2px);
}

.brand-lockup h1 {
  position: relative;
  z-index: 1;
  color: #07539b;
  background: none;
  -webkit-text-fill-color: #07539b;
  -webkit-text-stroke: 0.28px rgba(230, 248, 255, 0.58);
  font-size: clamp(42px, 2.95vw, 52px);
  font-weight: 760;
  letter-spacing: 0.16em;
  text-shadow:
    0 -1px 0 rgba(116, 176, 248, 0.24),
    0 1px 0 rgba(255, 255, 255, 0.74),
    0 3px 0 rgba(4, 62, 128, 0.14),
    0 10px 22px rgba(0, 86, 168, 0.26);
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.62))
    drop-shadow(0 8px 14px rgba(8, 84, 164, 0.18));
}

.brand-lockup h1::before,
.brand-lockup h1::after {
  content: "";
  position: absolute;
  left: 50%;
  pointer-events: none;
  transform: translateX(-50%);
}

.brand-lockup h1::before {
  z-index: -1;
  top: 46%;
  width: 146%;
  height: 52px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse, rgba(255, 255, 255, 0.78), rgba(71, 177, 246, 0.23) 46%, transparent 74%);
  filter: blur(8px);
}

.brand-lockup h1::after {
  bottom: -12px;
  width: 112%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(13, 114, 204, 0.68), rgba(255, 255, 255, 0.92), rgba(20, 158, 238, 0.62), transparent);
  box-shadow: 0 0 16px rgba(42, 162, 230, 0.34);
}

.brand-mark {
  display: none;
}

.brand-mark i {
  position: absolute;
  display: block;
  width: 8px;
  height: 17px;
  border-radius: 9px 1px 9px 1px;
  background:
    linear-gradient(145deg, rgba(139, 223, 255, 0.95), #1189df 56%, #075ca9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 5px 9px rgba(14, 115, 202, 0.2),
    0 0 9px rgba(41, 169, 239, 0.18);
  transform-origin: 50% 100%;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.brand-mark::before {
  left: 23px;
  top: 4px;
  width: 18px;
  height: 34px;
  border-left: 2px solid rgba(15, 130, 219, 0.52);
  border-radius: 100% 0 0 100% / 50% 0 0 50%;
  transform: rotate(-10deg);
  filter: drop-shadow(0 3px 5px rgba(18, 126, 213, 0.16));
}

.brand-mark::after {
  display: none;
}

.brand-mark i:nth-child(1) {
  left: 7px;
  top: 19px;
  transform: rotate(-36deg);
}

.brand-mark i:nth-child(2) {
  left: 16px;
  top: 12px;
  height: 19px;
  transform: rotate(-20deg);
}

.brand-mark i:nth-child(3) {
  left: 27px;
  top: 6px;
  height: 21px;
  transform: rotate(-8deg);
}

.brand-mark--right {
  transform: translateY(-2px) scaleX(-1);
}

.scene-panel-shapes {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.scene-top-arc {
  fill: none;
  stroke-linecap: round;
  filter: url(#softLineGlow);
  opacity: 0.48;
}

.scene-top-arc--wide {
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 8.5;
  opacity: 0.48;
}

.scene-top-arc--blue {
  stroke: url(#topArcBlue);
  stroke-width: 2.6;
  opacity: 0.58;
}

.scene-top-arc--thin {
  stroke: rgba(36, 142, 231, 0.34);
  stroke-width: 1.2;
  opacity: 0.56;
}

.scene-top-arc--silver-a {
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 5.5;
  opacity: 0.46;
}

.scene-top-arc--blue-strong {
  stroke: rgba(23, 137, 222, 0.48);
  stroke-width: 2.2;
  opacity: 0.72;
}

.scene-top-arc--silver-b {
  stroke: rgba(247, 252, 255, 0.56);
  stroke-width: 3.2;
  opacity: 0.44;
}

.scene-top-arc--silver-c {
  stroke: rgba(58, 158, 231, 0.16);
  stroke-width: 1.1;
  opacity: 0.5;
}

.scene-panel-shape {
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
  filter: url(#panelGlow);
}

.scene-panel-shape--left { fill: url(#leftPanelGlass); }
.scene-panel-shape--right { fill: url(#rightPanelGlass); }

.scene-panel-shape,
.scene-panel-halo,
.scene-panel-inner,
.scene-divider-beam {
  display: none;
}

.scene-panel-halo {
  fill: none;
  stroke: rgba(72, 153, 238, 0.3);
  stroke-width: 13;
  filter: url(#panelHalo);
  vector-effect: non-scaling-stroke;
}

.scene-panel-inner {
  fill: none;
  stroke: rgba(255, 255, 255, 0.6);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.scene-divider-beam {
  fill: none;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 2;
  stroke-linecap: round;
  filter: url(#softLineGlow);
}

.scene-floor-fill {
  fill: url(#stageFloor);
  opacity: 0.58;
}

.scene-floor-glow {
  fill: url(#floorGlow);
  opacity: 0.42;
}

.scene-floor-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.44);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  filter: url(#softLineGlow);
  opacity: 0.54;
}

.scene-floor-line--outer {
  stroke: rgba(70, 143, 214, 0.12);
  opacity: 0.44;
}

.scene-floor-line--middle {
  stroke: rgba(255, 255, 255, 0.42);
}

.scene-floor-line--inner {
  stroke: rgba(255, 255, 255, 0.34);
  opacity: 0.36;
}

.dashboard-grid {
  position: absolute;
  z-index: 2;
  top: 10.85%;
  right: 3.25%;
  bottom: 18.8%;
  left: 2.75%;
  display: grid;
  grid-template-columns: 27% minmax(0, 1fr);
  gap: 0.82%;
  width: auto;
  max-width: none;
  min-height: 0;
  margin: 0;
}

.dashboard-grid::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 18px;
  bottom: 18px;
  left: calc(27% - 1px);
  width: calc(0.82% + 2px);
  border: 0;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(24, 158, 232, 0.08), transparent 64%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.16));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.68),
    inset 0 -24px 44px rgba(66, 145, 204, 0.08),
    0 18px 42px rgba(42, 130, 202, 0.08);
  pointer-events: none;
}

.assistant-panel,
.monitor-panel {
  position: relative;
  z-index: 1;
  min-height: 0;
  height: 100%;
  padding: 42px 32px 30px;
  border-radius: var(--radius-page-panel);
  overflow: hidden;
}

.assistant-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  row-gap: 16px;
  padding: 38px 32px 28px;
  transform: none;
  transform-origin: center;
  clip-path: none;
  transition: grid-template-rows 260ms ease, row-gap 260ms ease;
}

.assistant-panel.is-chatting {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  row-gap: 16px;
}

.assistant-panel.is-message-expanded {
  grid-template-rows: auto minmax(315px, 1fr) minmax(30px, 0.08fr) auto;
  row-gap: 8px;
}

.assistant-panel > * {
  min-width: 0;
}

.monitor-panel {
  height: 100%;
  margin-top: 0;
  padding-top: 36px;
  padding-left: 51px;
  padding-right: 46px;
}

.assistant-panel.sgzx-glass,
.monitor-panel.sgzx-glass {
  border: 2px solid rgba(255, 255, 255, 0.94);
  box-shadow:
    0 0 0 1px rgba(37, 120, 218, 0.2),
    var(--shadow-panel),
    18px 28px 62px rgba(43, 104, 178, 0.14),
    -8px -8px 28px rgba(255, 255, 255, 0.42),
    var(--highlight-inset),
    inset 2px 0 0 rgba(255, 255, 255, 0.5),
    inset -1px 0 0 rgba(57, 127, 210, 0.12),
    inset 0 -2px 0 rgba(65, 137, 218, 0.18);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
}

.assistant-panel.sgzx-glass {
  background: var(--glass-panel-left);
}

.monitor-panel.sgzx-glass {
  border-color: rgba(255, 255, 255, 0.9);
  background: var(--glass-panel-right);
  box-shadow:
    0 0 0 1px rgba(37, 120, 218, 0.17),
    var(--shadow-panel-soft),
    18px 28px 62px rgba(43, 104, 178, 0.12),
    -8px -8px 28px rgba(255, 255, 255, 0.34),
    var(--highlight-inset),
    inset 2px 0 0 rgba(255, 255, 255, 0.44),
    inset -1px 0 0 rgba(57, 127, 210, 0.1),
    inset 0 -2px 0 rgba(65, 137, 218, 0.16);
}

.assistant-panel.sgzx-glass::before,
.monitor-panel.sgzx-glass::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.3) 18%, transparent 34%, transparent 62%, rgba(52, 139, 207, 0.24) 100%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.assistant-panel.sgzx-glass::after,
.monitor-panel.sgzx-glass::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 18px;
  right: 18px;
  top: 0;
  height: 3px;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 1), rgba(128, 205, 255, 0.54), rgba(255, 255, 255, 0.74), transparent);
}

.sgzx-glass {
  border-color: rgba(255, 255, 255, 0.66);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(218, 240, 255, 0.06));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 -20px 50px rgba(101, 178, 234, 0.08),
    0 18px 45px rgba(58, 131, 198, 0.08);
  backdrop-filter: blur(2px) saturate(108%);
}

.sgzx-glass::before {
  inset: 8px;
  border-color: rgba(255, 255, 255, 0.4);
  border-radius: 21px;
}

.sgzx-glass::after {
  opacity: 0.34;
}

.panel-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.panel-heading > div {
  min-width: 0;
}

.panel-heading h2 {
  color: var(--ink-title);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.18;
  white-space: nowrap;
}

.online-pill {
  margin: 0;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-pill);
  color: #486780;
  background: rgba(255, 255, 255, 0.48);
  font-size: 12px;
}

.online-pill .sgzx-status-dot {
  width: 8px;
  height: 8px;
  box-shadow: 0 0 10px rgba(22, 216, 165, 0.56);
  animation: statusBreath 3.8s ease-in-out infinite;
}

.history-pill {
  min-height: 28px;
  margin: 0;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-pill);
  color: #126bc0;
  background: rgba(255, 255, 255, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 8px 16px rgba(49, 126, 190, 0.08);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.history-pill:hover,
.history-pill:focus-visible {
  color: #07539b;
  background: rgba(255, 255, 255, 0.7);
  outline: 0;
}

.assistant-message {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-rows: 16px 28px minmax(0, 1fr);
  gap: 6px;
  height: 132px;
  min-height: 132px;
  max-height: 132px;
  margin-top: 6px;
  margin-right: 12px;
  padding: 15px 20px 17px 54px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-medium-card) var(--radius-medium-card) var(--radius-medium-card) 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(239, 248, 255, 0.62));
  box-shadow:
    0 0 0 1px rgba(57, 143, 214, 0.12),
    0 18px 42px rgba(70, 132, 179, 0.16),
    -4px -4px 14px rgba(255, 255, 255, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -2px 0 rgba(82, 155, 211, 0.11);
  transform: none;
  transition:
    height 260ms ease,
    min-height 260ms ease,
    max-height 260ms ease,
    margin 260ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

.assistant-message.is-expanded {
  height: 100%;
  min-height: 315px;
  max-height: none;
  margin-right: 0;
  padding: 14px 12px 14px 14px;
  display: block;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(238, 248, 255, 0.68));
  box-shadow:
    0 0 0 1px rgba(57, 143, 214, 0.14),
    0 22px 54px rgba(58, 124, 184, 0.18),
    -4px -4px 14px rgba(255, 255, 255, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -2px 0 rgba(82, 155, 211, 0.12);
}

.assistant-message.is-expanded::after {
  display: none;
}

.assistant-message-toggle {
  position: absolute;
  z-index: 4;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 10px;
  color: #176fb8;
  background: rgba(255, 255, 255, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 16px rgba(49, 126, 190, 0.08);
  cursor: pointer;
}

.assistant-message-toggle span {
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: translateY(2px) rotate(45deg);
}

.assistant-message.is-expanded .assistant-message-toggle span {
  transform: translateY(-2px) rotate(225deg);
}

.assistant-message-toggle:hover,
.assistant-message-toggle:focus-visible {
  color: #07539b;
  background: rgba(255, 255, 255, 0.76);
  outline: 0;
}

.assistant-mini-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 38px 5px 8px 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 143, 232, 0.34) rgba(255, 255, 255, 0.3);
}

.assistant-mini-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
}

.assistant-mini-row--user {
  flex-direction: row-reverse;
}

.assistant-mini-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(217, 241, 255, 0.62));
  box-shadow:
    0 7px 15px rgba(39, 127, 198, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.assistant-mini-avatar img {
  width: 115%;
  height: 115%;
  object-fit: contain;
  transform: translateY(3px);
}

.assistant-mini-avatar--user {
  background: linear-gradient(145deg, rgba(50, 163, 238, 0.96), rgba(10, 109, 202, 0.92));
}

.assistant-mini-avatar--user i {
  position: relative;
  width: 15px;
  height: 15px;
}

.assistant-mini-avatar--user i::before,
.assistant-mini-avatar--user i::after {
  content: "";
  position: absolute;
  left: 50%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  transform: translateX(-50%);
}

.assistant-mini-avatar--user i::before {
  top: 0;
  width: 6px;
  height: 6px;
}

.assistant-mini-avatar--user i::after {
  bottom: 0;
  width: 14px;
  height: 7px;
  border-radius: 8px 8px 4px 4px;
}

.assistant-mini-bubble {
  position: relative;
  width: fit-content;
  max-width: calc(100% - 54px);
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 5px 15px 15px 15px;
  color: #24455f;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(238, 248, 255, 0.7));
  box-shadow:
    0 9px 22px rgba(55, 124, 184, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.assistant-mini-row--user .assistant-mini-bubble {
  border-color: rgba(128, 205, 255, 0.64);
  border-radius: 15px 5px 15px 15px;
  color: #0d477c;
  background: linear-gradient(145deg, rgba(214, 240, 255, 0.92), rgba(191, 226, 250, 0.78));
}

.assistant-mini-bubble--workflow {
  width: calc(100% - 54px);
}

.assistant-mini-bubble::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 11px;
  width: 11px;
  height: 11px;
  border-left: 1px solid rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.92);
  background: rgba(250, 253, 255, 0.9);
  transform: rotate(45deg);
}

.assistant-mini-row--user .assistant-mini-bubble::before {
  right: -7px;
  left: auto;
  border: 0;
  border-top: 1px solid rgba(128, 205, 255, 0.64);
  border-right: 1px solid rgba(128, 205, 255, 0.64);
  background: rgba(204, 234, 253, 0.9);
}

.assistant-mini-bubble p {
  margin: 0;
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.58;
  white-space: normal;
  overflow-wrap: anywhere;
}

.assistant-workflow-card {
  width: min(360px, 100%);
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(70, 155, 216, 0.28);
  border-radius: 12px;
  background: rgba(245, 251, 255, 0.9);
}

.assistant-workflow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  color: #28526f;
  background: rgba(225, 243, 254, 0.78);
  cursor: pointer;
}

.assistant-workflow-head > span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.assistant-workflow-head span > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1b8cdb;
  box-shadow: 0 0 0 4px rgba(27, 140, 219, 0.12);
}

.assistant-workflow-card.is-completed .assistant-workflow-head span > i {
  background: #179a7b;
}

.assistant-workflow-card.is-failed .assistant-workflow-head span > i {
  background: #d9534f;
}

.assistant-workflow-head strong {
  font-size: 12px;
}

.assistant-workflow-head small,
.assistant-workflow-head b {
  color: #668095;
  font-size: 10px;
  font-weight: 650;
}

.assistant-workflow-head b {
  margin-left: 10px;
}

.assistant-workflow-body {
  display: grid;
  gap: 7px;
  padding: 10px;
}

.assistant-workflow-step {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.assistant-workflow-step > i {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid #bdd3e2;
  border-radius: 50%;
  color: #7890a1;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.assistant-workflow-step > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.assistant-workflow-step strong {
  color: #385b72;
  font-size: 11px;
}

.assistant-workflow-step small {
  overflow: hidden;
  color: #7890a1;
  font-size: 10px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-workflow-step.is-done > i {
  border-color: #55b49c;
  color: #fff;
  background: #1a9a7b;
}

.assistant-workflow-step.is-active > i {
  border-color: #178dde;
  color: #fff;
  background: #178dde;
  box-shadow: 0 0 0 4px rgba(23, 141, 222, 0.12);
}

.assistant-workflow-step.is-failed > i {
  border-color: #d9534f;
  color: #fff;
  background: #d9534f;
}

.assistant-workflow-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #dcebf4;
}

.assistant-workflow-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #159e86, #178dde);
  transition: width 0.35s ease;
}

.assistant-workflow-confirm {
  justify-self: end;
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #157fc8;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.assistant-workflow-error {
  color: #b54542 !important;
  font-size: 10px !important;
}

.assistant-mini-bubble--thinking p::after {
  content: "...";
  display: inline-block;
  width: 18px;
  overflow: hidden;
  vertical-align: bottom;
  animation: thinkingDots 1.2s steps(4, end) infinite;
}

.assistant-mini-chat::-webkit-scrollbar {
  width: 7px;
}

.assistant-mini-chat::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

.assistant-mini-chat::-webkit-scrollbar-thumb {
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(24, 143, 232, 0.42);
}

.assistant-speaker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
}

.assistant-message .assistant-speaker {
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1;
}

.assistant-speaker i {
  position: absolute;
  left: 18px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 9px;
  background:
    radial-gradient(circle at 38% 25%, rgba(255, 255, 255, 0.95), transparent 35%),
    linear-gradient(145deg, #17c8ef, #0877d6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    0 8px 18px rgba(18, 143, 218, 0.22);
}

.assistant-speaker i::before,
.assistant-speaker i::after {
  content: "";
  position: absolute;
  top: 10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
}

.assistant-speaker i::before {
  left: 8px;
}

.assistant-speaker i::after {
  right: 8px;
}

.assistant-message strong {
  color: #123553;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.assistant-message::after {
  content: "";
  position: absolute;
  display: block;
  left: 64px;
  bottom: -9px;
  width: 18px;
  height: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 0 0 5px;
  background: rgba(247, 252, 255, 0.72);
  box-shadow: 8px 10px 18px rgba(55, 132, 198, 0.07);
  transform: rotate(45deg);
}

.assistant-message.is-ready {
  border-color: rgba(128, 205, 255, 0.6);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(228, 246, 255, 0.66));
  box-shadow:
    0 0 0 1px rgba(24, 143, 232, 0.14),
    0 18px 42px rgba(70, 132, 179, 0.16),
    0 0 28px rgba(130, 213, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -2px 0 rgba(82, 155, 211, 0.11);
}

.assistant-message.is-ready strong {
  color: #07539b;
}

.assistant-message.is-chat {
  display: grid;
  grid-template-rows: 16px 28px minmax(0, 1fr);
  height: 132px;
  max-height: none;
  min-height: 132px;
  padding: 15px 18px 17px 54px;
  overflow: hidden;
  border-radius: var(--radius-medium-card) var(--radius-medium-card) var(--radius-medium-card) 8px;
  overscroll-behavior: contain;
}

.assistant-message.is-chat.is-expanded,
.assistant-message.is-ready.is-expanded {
  display: block;
  height: 100%;
  min-height: 315px;
  max-height: none;
  padding: 14px 12px 14px 14px;
  overflow: hidden;
}

.assistant-message.is-chat::after {
  display: block;
}

.assistant-answer-text {
  max-height: none;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  color: var(--ink-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.62;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 143, 232, 0.36) rgba(255, 255, 255, 0.34);
}

.assistant-answer-text::-webkit-scrollbar,
.conversation-list::-webkit-scrollbar {
  width: 7px;
}

.assistant-answer-text::-webkit-scrollbar-track,
.conversation-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.assistant-answer-text::-webkit-scrollbar-thumb,
.conversation-list::-webkit-scrollbar-thumb {
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(24, 143, 232, 0.42);
}

.assistant-answer-text.is-thinking::after {
  content: "...";
  display: inline-block;
  width: 18px;
  overflow: hidden;
  vertical-align: bottom;
  animation: thinkingDots 1.2s steps(4, end) infinite;
}

.current-chat-card {
  display: grid;
  grid-template-rows: 28px auto minmax(0, 1fr);
  gap: 8px;
  height: 100%;
  min-height: 0;
}

.current-chat-head,
.assistant-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.current-chat-head span {
  color: #123553;
  font-size: 13px;
  font-weight: 800;
}

.current-chat-head button,
.assistant-history-head button {
  height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  color: #126bc0;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.current-question,
.current-answer {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(236, 248, 255, 0.48));
  box-shadow:
    0 9px 20px rgba(49, 126, 190, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.current-question {
  display: grid;
  gap: 4px;
  max-height: 58px;
  padding: 8px 11px;
  overflow: hidden;
}

.current-answer {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 5px;
  min-height: 0;
  padding: 10px 12px;
  border-bottom-left-radius: 6px;
}

.current-question span,
.current-answer span {
  color: #7890a8;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
}

.current-question p,
.current-answer div {
  margin: 0;
  color: #17395c;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.62;
  overflow-wrap: anywhere;
  white-space: normal;
}

.current-question p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.current-answer div {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 143, 232, 0.36) rgba(255, 255, 255, 0.34);
}

.current-answer div::-webkit-scrollbar,
.assistant-history-list::-webkit-scrollbar {
  width: 7px;
}

.current-answer div::-webkit-scrollbar-track,
.assistant-history-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.current-answer div::-webkit-scrollbar-thumb,
.assistant-history-list::-webkit-scrollbar-thumb {
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(24, 143, 232, 0.42);
}

.current-question strong,
.current-answer strong,
.assistant-history-panel strong {
  color: inherit;
  font-weight: 800;
}

.current-answer.is-thinking div::after {
  content: "...";
  display: inline-block;
  width: 18px;
  overflow: hidden;
  vertical-align: bottom;
  animation: thinkingDots 1.2s steps(4, end) infinite;
}

.assistant-history-panel {
  position: absolute;
  z-index: 8;
  inset: 12px;
  display: grid;
  grid-template-rows: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(232, 246, 255, 0.86));
  box-shadow:
    0 18px 42px rgba(49, 126, 190, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px) saturate(120%);
}

.assistant-history-head strong {
  color: #123553;
  font-size: 14px;
}

.assistant-history-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.assistant-history-list article {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.56);
}

.assistant-history-list b,
.assistant-history-list p {
  margin: 0;
  color: #17395c;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.assistant-history-list p {
  color: #4e6b82;
}

.assistant-panel.is-chatting .assistant-stage {
  transform: translate(0, -6px);
}

.assistant-panel.is-chatting .robot-figure {
  width: min(86%, 430px);
}

.assistant-panel.is-message-expanded .assistant-stage {
  min-height: 28px;
  overflow: hidden;
  opacity: 0.24;
  transform: translate(0, -10px);
}

.assistant-panel.is-message-expanded .assistant-stage::before,
.assistant-panel.is-message-expanded .assistant-stage::after,
.assistant-panel.is-message-expanded .assistant-halo {
  opacity: 0.52;
}

.assistant-panel.is-message-expanded .robot-figure {
  width: min(42%, 170px);
  filter:
    contrast(1.08)
    saturate(1.04)
    drop-shadow(0 12px 16px rgba(28, 116, 196, 0.14));
}

.assistant-stage {
  --agent-glow-x: calc(50% - 18px);
  --agent-glow-lift: -18px;
  position: relative;
  z-index: 1;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  align-self: stretch;
  justify-self: start;
  display: grid;
  place-items: center center;
  transform: translate(0, -6px);
  transition: opacity 240ms ease, transform 260ms ease;
}

.assistant-stage::before,
.assistant-stage::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: var(--agent-glow-x);
  pointer-events: none;
  transform: translateX(-50%);
}

.assistant-stage::before {
  bottom: calc(2px + var(--agent-glow-lift));
  width: min(70%, 292px);
  height: 74px;
  border: 1px solid rgba(132, 195, 255, 0.56);
  border-radius: 50%;
  background:
    radial-gradient(ellipse, rgba(255, 255, 255, 0.78), transparent 28%),
    radial-gradient(ellipse, rgba(42, 137, 236, 0.34), rgba(82, 164, 252, 0.14) 48%, transparent 76%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 -1px 0 rgba(43, 129, 224, 0.24),
    0 0 18px rgba(255, 255, 255, 0.5),
    0 0 22px rgba(46, 139, 235, 0.22),
    0 0 44px rgba(226, 246, 255, 0.34),
    0 14px 30px rgba(30, 94, 176, 0.13);
  filter: blur(0.25px);
}

.assistant-stage::after {
  width: 310px;
  height: 250px;
  bottom: calc(38px + var(--agent-glow-lift));
  border: 0;
  opacity: 0.72;
  background:
    radial-gradient(ellipse at 50% 62%, rgba(255, 255, 255, 0.5) 0 8%, transparent 28%),
    radial-gradient(ellipse at 50% 62%, rgba(62, 151, 246, 0.2) 0%, rgba(62, 151, 246, 0.08) 44%, transparent 76%);
  filter: blur(12px);
}

.assistant-halo {
  z-index: 0;
  left: var(--agent-glow-x);
  width: min(70%, 310px);
  bottom: calc(-58px + var(--agent-glow-lift));
  aspect-ratio: 1;
  opacity: 0.72;
  filter:
    saturate(112%)
    drop-shadow(0 0 12px rgba(255, 255, 255, 0.34))
    drop-shadow(0 0 14px rgba(58, 145, 235, 0.18));
  transform: translateX(-50%);
}

.assistant-halo::before,
.assistant-halo::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.assistant-halo::before {
  inset: 16%;
  border: 1px solid rgba(128, 190, 255, 0.28);
  background:
    radial-gradient(circle at 50% 62%, transparent 0 42%, rgba(255, 255, 255, 0.26) 43%, transparent 46%),
    radial-gradient(circle at 50% 62%, transparent 0 62%, rgba(70, 146, 238, 0.14) 63%, transparent 66%);
  box-shadow:
    inset 0 0 20px rgba(255, 255, 255, 0.18),
    0 0 18px rgba(255, 255, 255, 0.24),
    0 0 22px rgba(47, 137, 228, 0.13);
  transform: perspective(520px) rotateX(58deg);
}

.assistant-halo::after {
  left: 50%;
  bottom: 21%;
  width: 78%;
  height: 16%;
  border: 1px solid rgba(132, 195, 255, 0.46);
  background:
    radial-gradient(ellipse, rgba(255, 255, 255, 0.68), rgba(72, 155, 248, 0.24) 40%, transparent 72%);
  box-shadow:
    0 0 16px rgba(255, 255, 255, 0.42),
    0 0 18px rgba(47, 137, 228, 0.2),
    0 0 38px rgba(226, 246, 255, 0.28),
    inset 0 0 14px rgba(255, 255, 255, 0.42);
  filter: blur(0.2px);
  transform: translateX(-50%) perspective(320px) rotateX(65deg);
}

.assistant-halo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.18;
  animation: none;
  filter: brightness(1.25) saturate(1.15);
}

.assistant-halo img:nth-child(2) {
  inset: 16%;
  width: 68%;
  height: 68%;
  opacity: 0.22;
}

.robot-figure {
  --eye-x: 0;
  --eye-y: 0;
  --robot-shift-x: -18px;
  --robot-shift-y: -32px;
  position: relative;
  z-index: 2;
  width: min(86%, 430px);
  max-width: none;
  height: auto;
  transform: translate(var(--robot-shift-x), calc(var(--robot-shift-y) + 3%));
  animation: robotFloat 6.4s ease-in-out infinite;
  filter:
    contrast(1.1)
    saturate(1.12)
    drop-shadow(0 26px 28px rgba(28, 116, 196, 0.3))
    drop-shadow(-8px -8px 18px rgba(255, 255, 255, 0.34));
  transition: width 260ms ease, filter 260ms ease;
}

.robot-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.robot-figure::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: 2%;
  width: 62%;
  height: 20%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse, rgba(255, 255, 255, 0.84) 0%, rgba(84, 170, 255, 0.34) 34%, rgba(38, 132, 236, 0.15) 56%, transparent 74%);
  box-shadow:
    0 0 18px rgba(72, 155, 248, 0.24),
    0 0 38px rgba(72, 155, 248, 0.14);
  filter: blur(6px);
  transform: translateX(-50%) perspective(260px) rotateX(62deg);
  pointer-events: none;
}

.robot-eyes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.robot-eyes::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 36%;
  top: 39.1%;
  width: 34%;
  height: 24.6%;
  border-radius: 39% 35% 37% 43% / 44% 43% 49% 50%;
  background:
    radial-gradient(ellipse at 63% 18%, rgba(73, 116, 166, 0.2), transparent 36%),
    radial-gradient(ellipse at 48% 86%, rgba(2, 19, 42, 0.9), transparent 58%),
    linear-gradient(92deg, rgba(0, 5, 15, 0.98), rgba(1, 11, 26, 0.96) 52%, rgba(0, 7, 18, 0.98));
  box-shadow:
    inset 0 1px 10px rgba(83, 188, 255, 0.18),
    inset 0 -10px 18px rgba(0, 2, 8, 0.34);
  transform: perspective(360px) rotateY(-3deg) skewX(0.8deg);
  transform-origin: center;
}

.robot-eye {
  position: absolute;
  z-index: 1;
  --eye-range-x: 7px;
  --eye-range-y: 4px;
  width: 3.9%;
  height: 7.7%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 42% 24%, rgba(255, 255, 255, 1), rgba(216, 255, 255, 0.98) 30%, rgba(75, 225, 255, 0.92) 62%, rgba(32, 131, 255, 0.36) 100%);
  box-shadow:
    0 0 8px rgba(154, 244, 255, 0.9),
    0 0 18px rgba(34, 151, 255, 0.72),
    0 0 30px rgba(29, 139, 255, 0.32),
    inset 0 -4px 7px rgba(11, 87, 187, 0.18);
  transform: translate(
      calc(-50% + var(--eye-x) * var(--eye-range-x)),
      calc(-50% + var(--eye-y) * var(--eye-range-y))
    )
    scaleY(var(--eye-open, 1));
  transform-origin: center;
  animation: robotBlink 4s infinite;
}

.robot-eye--left {
  --eye-range-x: 7px;
  --eye-range-y: 4px;
  width: 4%;
  height: 8%;
  left: 47.9%;
  top: 50.85%;
}

.robot-eye--right {
  --eye-range-x: 5px;
  --eye-range-y: 3.5px;
  width: 3.6%;
  height: 7.7%;
  left: 62.7%;
  top: 50.75%;
  animation-delay: 0.05s;
}

.assistant-tasks {
  display: none;
}

.task-heading {
  justify-content: center;
  margin-bottom: 15px;
  font-size: clamp(13px, 0.9vw, 16px);
}

.task-count { display: none; }

.assistant-tasks ol {
  gap: 8px;
}

.assistant-tasks li {
  gap: 9px;
  font-size: clamp(10px, 0.7vw, 13px);
  white-space: normal;
  line-height: 1.2;
}

.task-dot {
  width: 9px;
  height: 9px;
}

.assistant-input {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  grid-template-rows: 40px auto;
  column-gap: 10px;
  row-gap: 10px;
  align-items: center;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  min-height: 96px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: var(--radius-medium-card);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.52), rgba(236, 248, 255, 0.34));
  box-shadow:
    0 0 0 1px rgba(57, 143, 214, 0.12),
    inset 0 2px 10px rgba(97, 149, 191, 0.07),
    inset 0 2px 0 rgba(255, 255, 255, 0.96),
    inset 0 -2px 0 rgba(73, 149, 208, 0.1),
    0 14px 34px rgba(54, 119, 168, 0.14),
    -3px -3px 12px rgba(255, 255, 255, 0.28);
  transform: none;
}

.assistant-text-input {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 40px;
  padding: 0 2px 0 8px;
  border: 0;
  outline: 0;
  color: #122843;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}

.assistant-text-input::placeholder {
  color: #6f879c;
  font-weight: 600;
}

.input-tools {
  position: static;
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--radius-small-control);
  color: #496886;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.36));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 16px rgba(49, 126, 190, 0.08);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transition:
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.tool-button.is-selected {
  color: #07509c;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(232, 248, 255, 0.58));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 0 0 1px rgba(24, 143, 232, 0.12),
    0 10px 18px rgba(26, 132, 210, 0.12);
}

.tool-button:hover,
.tool-button:focus-visible {
  color: #07509c;
  transform: translateY(-1px);
  outline: 0;
}

.keycap {
  display: inline-grid;
  place-items: center;
  min-width: 43px;
  height: 19px;
  padding: 0 6px;
  border: 1px solid rgba(18, 113, 190, 0.18);
  border-radius: 6px;
  color: #075da9;
  background: rgba(255, 255, 255, 0.76);
  box-shadow:
    inset 0 -2px 0 rgba(31, 137, 213, 0.08),
    0 4px 8px rgba(35, 116, 188, 0.08);
  font-size: 10px;
  font-weight: 800;
}

.mic-icon {
  position: relative;
  display: inline-block;
  width: 10px;
  height: 14px;
  margin: 0;
  border: 1.5px solid currentColor;
  border-radius: 8px;
  vertical-align: 0;
}

.mic-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 6px;
  border: 1.5px solid currentColor;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  transform: translateX(-50%);
}

.mic-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 8px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  transform: translateX(-50%);
}

.send-button {
  position: static;
  grid-column: 2;
  grid-row: 1;
  color: #fff;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: linear-gradient(180deg, #28a6ff, #0877d8);
  box-shadow:
    0 8px 18px rgba(0, 118, 216, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  font-size: 24px;
  line-height: 1;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.send-button span {
  position: relative;
  display: block;
  width: 19px;
  height: 19px;
  transform: translate(1px, 1px) rotate(-10deg);
}

.send-button span::before {
  content: "";
  position: absolute;
  inset: 1px 0 0 1px;
  background: linear-gradient(145deg, #fff, rgba(214, 249, 255, 0.86));
  clip-path: polygon(0 44%, 100% 0, 62% 100%, 45% 61%, 17% 74%);
  filter: drop-shadow(0 2px 3px rgba(0, 53, 119, 0.22));
}

.send-button span::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 9px;
  height: 1.5px;
  border-radius: 999px;
  background: rgba(12, 111, 189, 0.48);
  transform: rotate(-30deg);
}

.send-button:hover,
.send-button:focus-visible {
  transform: translateY(-1px);
  filter: saturate(112%);
  outline: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -8px 16px rgba(0, 45, 110, 0.18),
    0 12px 24px rgba(20, 124, 214, 0.26);
}

.send-button:disabled {
  cursor: wait;
  opacity: 0.68;
  filter: saturate(72%);
  transform: none;
}

.monitor-title-wrap {
  min-height: 64px;
  gap: 14px;
}

.monitor-icon {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(220, 241, 255, 0.72));
  box-shadow:
    0 0 0 1px rgba(57, 143, 214, 0.08),
    0 8px 20px rgba(29, 127, 205, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.water-drop {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  border: 2.2px solid #168fe8;
  border-radius: 50% 50% 50% 15%;
  transform: rotate(-45deg);
  box-shadow: 0 0 8px rgba(22, 143, 232, 0.24);
}

.water-drop::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 6px;
  height: 6px;
  border: 2px solid #65c8ff;
  border-top-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
}

.monitor-heading {
  position: relative;
  z-index: 4;
}

.monitor-heading h2 {
  color: #123553;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.expand-button {
  width: 53px;
  height: 53px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.38);
  font-size: 24px;
}

.stats-row {
  position: relative;
  z-index: 4;
  gap: 16px;
  margin-top: 18px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  width: 202px;
  min-height: 94px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: var(--radius-medium-card);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(235, 247, 255, 0.36));
  box-shadow:
    0 0 0 1px rgba(57, 143, 214, 0.15),
    var(--shadow-card),
    -4px -4px 14px rgba(255, 255, 255, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.98),
    inset 1px 0 0 rgba(255, 255, 255, 0.5),
    inset 0 -2px 0 rgba(73, 149, 208, 0.14);
}

.stat-card::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 2px;
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.96), rgba(117, 197, 249, 0.34), transparent);
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 86% 78%, rgba(24, 143, 232, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(315deg, rgba(74, 151, 208, 0.1), transparent 42%);
}

.stat-card--risk::before {
  background:
    radial-gradient(circle at 84% 76%, rgba(255, 79, 98, 0.13), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), transparent 32%);
}

.stat-card strong {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  color: #073f7e;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-card--risk strong {
  color: #0e3f75;
}

.stat-card img {
  position: relative;
  z-index: 1;
  align-self: end;
  width: 34px;
  height: 34px;
  opacity: 0.86;
  filter: drop-shadow(0 8px 12px rgba(24, 143, 232, 0.13));
}

.stat-card--risk img {
  filter: drop-shadow(0 8px 12px rgba(255, 79, 98, 0.16));
}

.stat-label {
  position: relative;
  z-index: 1;
  color: #4c6680;
  font-size: 13px;
  font-weight: 700;
}

.monitor-label {
  position: relative;
  z-index: 4;
  margin: 14px 0 9px;
  color: #123553;
  font-size: 14px;
  font-weight: 650;
}

.live-line { display: none; }

.monitor-surface {
  position: absolute;
  z-index: 1;
  top: 31.4%;
  right: 3.6%;
  bottom: 5.2%;
  left: 3.6%;
  width: auto;
  height: auto;
  min-height: 250px;
  margin: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-large-card);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.38), rgba(217, 239, 253, 0.18));
  box-shadow:
    0 0 0 1px rgba(57, 143, 214, 0.12),
    0 24px 56px rgba(45, 129, 198, 0.13),
    -5px -5px 18px rgba(255, 255, 255, 0.28),
    inset 0 2px 0 rgba(255, 255, 255, 0.86),
    inset 1px 0 0 rgba(255, 255, 255, 0.36),
    inset 0 -28px 48px rgba(224, 246, 255, 0.38),
    inset 0 -2px 0 rgba(58, 145, 211, 0.12);
  clip-path: none;
  opacity: 1;
  -webkit-mask-image: none;
  mask-image: none;
}

.map-provider-layer,
.station-layer,
.surface-depth,
.surface-scanline,
.monitor-core {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map-provider-layer {
  z-index: 0;
  overflow: hidden;
  pointer-events: auto;
  background:
    linear-gradient(180deg, rgba(219, 240, 252, 0.24) 0%, rgba(174, 215, 242, 0.16) 58%, rgba(199, 229, 247, 0.66) 100%),
    radial-gradient(ellipse at 34% 58%, rgba(233, 248, 255, 0.64), transparent 20%),
    radial-gradient(ellipse at 78% 66%, rgba(255, 75, 97, 0.22), transparent 14%),
    radial-gradient(ellipse at 66% 38%, rgba(74, 149, 222, 0.28), transparent 18%),
    linear-gradient(24deg, transparent 0 41%, rgba(96, 153, 205, 0.44) 42%, rgba(96, 153, 205, 0.44) 44%, transparent 45%),
    linear-gradient(151deg, transparent 0 50%, rgba(116, 171, 218, 0.4) 51%, rgba(116, 171, 218, 0.4) 53%, transparent 54%),
    linear-gradient(180deg, rgba(206, 235, 250, 0.76), rgba(176, 218, 244, 0.56));
  opacity: 1;
}

.map-provider-layer::before,
.map-provider-layer::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.map-provider-layer::before {
  right: 8%;
  top: 2%;
  width: 43%;
  height: 106%;
  border-radius: 54% 46% 58% 42%;
  background:
    radial-gradient(ellipse at 48% 42%, rgba(234, 248, 255, 0.48), transparent 43%),
    linear-gradient(110deg, rgba(74, 145, 213, 0.46), rgba(166, 212, 246, 0.24));
  filter: blur(0.4px);
  transform: rotate(9deg);
}

.map-provider-layer::after {
  inset: 8% 3% 9% 3%;
  opacity: 0.78;
  background-image:
    linear-gradient(0deg, transparent 48%, rgba(78, 145, 190, 0.34) 49%, transparent 51%),
    linear-gradient(90deg, transparent 48%, rgba(78, 145, 190, 0.28) 49%, transparent 51%);
  background-size: 78px 54px;
  mask-image: radial-gradient(ellipse at center, #000 0 48%, transparent 82%);
}

.surface-depth {
  z-index: 1;
}

.surface-depth--one {
  background:
    radial-gradient(ellipse at 52% 52%, rgba(64, 142, 226, 0.3), transparent 18%),
    radial-gradient(ellipse at 82% 75%, rgba(255, 80, 104, 0.24), transparent 14%),
    radial-gradient(ellipse at 31% 74%, rgba(67, 139, 216, 0.18), transparent 13%);
}

.surface-depth--two {
  opacity: 0.82;
  background-image:
    linear-gradient(30deg, transparent 49.5%, rgba(69, 158, 211, 0.24) 50%, transparent 50.5%),
    linear-gradient(150deg, transparent 49.5%, rgba(69, 158, 211, 0.2) 50%, transparent 50.5%);
  background-size: 150px 88px;
  mask-image: radial-gradient(ellipse at center, #000 0 42%, transparent 80%);
}

.surface-scanline {
  display: none;
}

.station-layer {
  z-index: 4;
}

.station-marker {
  --station-color: #10c58f;
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: 1px;
  height: 1px;
  color: var(--station-color);
  transform: translate(-50%, -50%);
}

.station-marker[data-risk="watch"] { --station-color: #ff4f62; }
.station-marker[data-risk="risk"] { --station-color: #ff4f62; }

.station-marker::before,
.station-marker::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.station-marker::before {
  width: 15px;
  height: 5px;
  border: 1px solid rgba(8, 18, 30, 0.32);
  opacity: 0.26;
  background: rgba(7, 18, 30, 0.18);
  transform: translateY(11px) perspective(100px) rotateX(64deg);
  box-shadow: none;
}

.station-marker::after {
  width: 10px;
  height: 10px;
  border: 1.4px solid rgba(8, 18, 30, 0.82);
  background: currentColor;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.72),
    0 3px 6px rgba(8, 26, 48, 0.2);
}

.station-pin {
  position: absolute;
  bottom: -18px;
  width: 2px;
  height: 18px;
  background: linear-gradient(rgba(8, 18, 30, 0.72), transparent);
}

.station-card {
  position: absolute;
  bottom: 16px;
  min-width: 132px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 12px;
  color: #28364a;
  background: rgba(255, 255, 255, 0.76);
  box-shadow:
    0 0 0 1px rgba(57, 143, 214, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(73, 149, 208, 0.09),
    0 14px 30px rgba(43, 120, 190, 0.16);
  text-align: center;
  backdrop-filter: blur(12px) saturate(120%);
}

.station-card b {
  display: block;
  font-size: 14px;
  white-space: nowrap;
}

.station-card small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: #4b627b;
  font-size: 12px;
}

.station-card small::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.monitor-core {
  z-index: 2;
  left: 50%;
  top: 52%;
  right: auto;
  bottom: auto;
  width: 150px;
  height: auto;
  aspect-ratio: 1;
  opacity: 0.6;
  transform: translate(-50%, -50%);
}

.monitor-core img {
  width: 100%;
  height: 100%;
  animation: none;
}

.monitor-core span {
  position: absolute;
  inset: 45%;
  border-radius: 50%;
  background: #5aa8ff;
  box-shadow: 0 0 28px 12px rgba(90, 168, 255, 0.28);
}

.legend-bar {
  position: absolute;
  z-index: 5;
  right: 52px;
  bottom: 27px;
  display: flex;
  gap: 16px;
  width: auto;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow:
    0 0 0 1px rgba(57, 143, 214, 0.1),
    0 14px 32px rgba(35, 114, 204, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  color: #395c7e;
  font-size: 12px;
  backdrop-filter: blur(12px);
}

.legend-dot--yellow {
  background: #f2af2d;
}

.module-nav {
  position: absolute;
  z-index: 2;
  right: 5.25%;
  bottom: 4.9%;
  left: 5.25%;
  align-items: end;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.35%;
  width: auto;
  max-width: none;
  min-height: 0;
  margin: 0;
}

.module-link {
  --module-base-transform: translateY(0);
  --module-hover-transform: translateY(0) scale(1);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 0;
  height: clamp(88px, 11.4vh, 104px);
  justify-content: flex-start;
  gap: 14px;
  padding: 16px 18px 15px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 22px 20px 21px 20px;
  color: #17324d;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(231, 245, 255, 0.42) 49%, rgba(207, 233, 249, 0.34));
  box-shadow:
    0 0 0 1px rgba(57, 143, 214, 0.16),
    0 24px 52px rgba(51, 118, 169, 0.19),
    0 9px 0 rgba(255, 255, 255, 0.24),
    -6px -6px 18px rgba(255, 255, 255, 0.38),
    inset 0 2px 0 rgba(255, 255, 255, 0.98),
    inset 2px 0 0 rgba(255, 255, 255, 0.5),
    inset -1px 0 0 rgba(53, 135, 196, 0.08),
    inset 0 -2px 0 rgba(53, 135, 196, 0.16);
  backdrop-filter: blur(22px) saturate(126%);
  clip-path: none;
  transform: var(--module-base-transform) var(--module-hover-transform);
  transform-origin: center bottom;
  transition:
    transform 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease,
    filter 220ms ease;
}

.module-link::before,
.module-link::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.module-link::before {
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.36) 18%, transparent 31%, transparent 64%, rgba(69, 149, 208, 0.2)),
    radial-gradient(ellipse at 25% 0%, rgba(255, 255, 255, 0.58), transparent 34%);
}

.module-link::after {
  z-index: 0;
  right: 20px;
  bottom: 9px;
  left: 20px;
  height: 18px;
  border-radius: 999px;
  background: rgba(35, 117, 187, 0.22);
  filter: blur(13px);
  opacity: 0.8;
}

.module-link:nth-child(1) {
  --module-base-transform: translateY(0);
}

.module-link:nth-child(2) {
  --module-base-transform: translateY(0);
}

.module-link:nth-child(3) {
  --module-base-transform: translateY(0);
}

.module-link:nth-child(4) {
  --module-base-transform: translateY(0);
}

.module-link:nth-child(5) {
  --module-base-transform: translateY(0);
}

.module-link:nth-child(6) {
  --module-base-transform: translateY(0);
  padding-left: 22px;
}

.module-link:hover,
.module-link:focus-visible {
  --module-hover-transform: translateY(-4px) scale(1);
  border-color: rgba(255, 255, 255, 0.98);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(226, 245, 255, 0.54));
  box-shadow:
    0 0 0 1px rgba(26, 139, 221, 0.2),
    0 30px 62px rgba(39, 123, 187, 0.25),
    0 10px 0 rgba(255, 255, 255, 0.22),
    -6px -6px 18px rgba(255, 255, 255, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -2px 0 rgba(53, 135, 196, 0.16);
  filter: saturate(108%);
  outline: 0;
}

.module-link > span:not(.module-icon) {
  position: relative;
  z-index: 1;
  flex: initial;
  min-width: 0;
  color: #142f4d;
  font-size: clamp(14px, 0.9vw, 16px);
  line-height: 1.22;
  font-weight: 760;
  letter-spacing: 0.01em;
  white-space: normal;
}

.module-icon {
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 17px;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.9), transparent 31%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(197, 233, 255, 0.76));
  box-shadow:
    0 0 0 1px rgba(57, 143, 214, 0.13),
    0 12px 27px rgba(24, 137, 217, 0.2),
    -3px -3px 9px rgba(255, 255, 255, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -2px 0 rgba(53, 135, 196, 0.13);
  transition: transform 220ms ease, filter 220ms ease;
}

.module-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(19, 137, 218, 0.13));
}

.module-link:hover .module-icon,
.module-link:focus-visible .module-icon {
  transform: translateY(-2px);
  filter: drop-shadow(0 8px 14px rgba(34, 167, 238, 0.16));
}

.module-link:nth-child(6) .module-icon {
  width: 52px;
  height: 52px;
  margin-right: 0;
  transform: none;
  transform-origin: center;
}

.module-icon--users::before,
.module-icon--users::after,
.module-icon--users i {
  border-width: 2px;
  border-color: #168fe8;
  background: rgba(239, 250, 255, 0.64);
}

.module-icon--users::before {
  width: 16px;
  height: 16px;
  top: 34%;
  left: 55%;
  transform: translate(-50%, -50%);
}

.module-icon--users::after {
  width: 13px;
  height: 13px;
  top: 42%;
  left: 34%;
  transform: translate(-50%, -50%);
}

.module-icon--users i:first-child {
  width: 30px;
  height: 16px;
  top: 66%;
  left: 55%;
  right: auto;
  bottom: auto;
  border-radius: 18px 18px 8px 8px;
  transform: translate(-50%, -50%);
}

.module-icon--users i:last-child {
  width: 21px;
  height: 12px;
  top: 68%;
  left: 35%;
  bottom: auto;
  border-radius: 16px 16px 7px 7px;
  transform: translate(-50%, -50%);
}

@keyframes sceneSparkle {
  0%, 100% {
    opacity: 0.54;
    background-position: 0 0, 0 0, 0 0, 0 0, -160px 0, 180px 0;
  }

  50% {
    opacity: 0.86;
    background-position: 34px -18px, -26px 22px, 18px 12px, -16px -18px, 180px 0, -160px 0;
  }
}

@keyframes robotBlink {
  0%, 88%, 92%, 100% {
    --eye-open: 1;
  }

  90% {
    --eye-open: 0.08;
  }
}

@keyframes robotFloat {
  0%, 100% {
    transform: translate(var(--robot-shift-x), calc(var(--robot-shift-y) + 3%));
  }

  50% {
    transform: translate(var(--robot-shift-x), calc(var(--robot-shift-y) + 3% - 6px));
  }
}

@keyframes statusBreath {
  0%, 100% {
    opacity: 0.82;
    transform: scale(1);
    box-shadow: 0 0 10px rgba(22, 216, 165, 0.56);
  }

  50% {
    opacity: 1;
    transform: scale(1.12);
    box-shadow: 0 0 14px rgba(22, 216, 165, 0.72);
  }
}

@keyframes thinkingDots {
  0% {
    clip-path: inset(0 18px 0 0);
  }

  100% {
    clip-path: inset(0 0 0 0);
  }
}

/* Unified desktop type scale for the assistant and all business modules. */
.module-panel-header h2 {
  font-size: var(--type-module-title);
}

.module-panel-header p,
.station-inspector p,
.info-strip,
.knowledge-card-heading p,
.event-knowledge-placeholder p,
.rule-confirm-dialog p,
.api-password-dialog > p:not(.api-password-error) {
  font-size: var(--type-body);
}

.station-inspector h3,
.work-card h3,
.knowledge-card-heading h3,
.event-knowledge-placeholder h3,
.rule-dialog-heading h3,
.rule-confirm-dialog h3,
.api-password-dialog h3 {
  font-size: var(--type-card-title);
}

.module-body button,
.module-body input,
.module-body select,
.module-body textarea,
.module-table,
.risk-point-row,
.station-inspector dl div {
  font-size: var(--type-body);
}

.module-table th,
.api-table th,
.user-table th,
.risk-point-head {
  font-size: var(--type-body);
}

.metric-tile span,
.risk-point-name strong,
.entrance-list article strong,
.file-row strong,
.knowledge-drop-zone small,
.knowledge-type-tab small,
.knowledge-file-status,
.rule-description,
.api-type-name,
.user-stations {
  font-size: var(--type-body);
}

.water-status-bar .metric-tile span,
.water-status-title p,
.map-legend,
.risk-point-name small,
.risk-chip,
.inspector-title span,
.entrance-list article span,
.status-chip,
.entrance-list article small,
.file-row small,
.rag-status-dot,
.future-badge,
.knowledge-stat-line span,
.knowledge-file-main small,
.knowledge-file-index small,
.rule-filter-count,
.rule-kb-chip,
.rule-updated-time,
.rule-table .rule-status-toggle,
.rule-table .rule-row-actions button,
.api-table .api-key-field button,
.api-table .api-test-button,
.api-password-error,
.user-list-meta span,
.user-password-status,
.user-line-chip,
.user-form-error {
  font-size: var(--type-label);
}

.knowledge-file-icon,
.user-form-hint,
.rule-enabled-field small {
  font-size: var(--type-caption);
}

.knowledge-type-tab strong,
.knowledge-drop-zone strong,
.knowledge-stat-line strong,
.knowledge-file-main strong,
.rule-filter-count strong,
.user-list-meta p {
  font-size: var(--type-emphasis);
}

.knowledge-file-index span {
  font-size: 18px;
}

.knowledge-refresh-button,
.knowledge-file-actions button,
.rule-filter-bar input,
.rule-filter-bar select,
.rule-editor-form input,
.rule-editor-form select,
.rule-editor-form textarea,
.user-editor-form input,
.user-editor-form select,
.api-table input,
.api-password-dialog label input {
  font-size: var(--type-body);
}

.rule-filter-bar label > span,
.rule-editor-form > label:not(.rule-enabled-field),
.rule-enabled-field strong,
.api-password-dialog label,
.user-editor-form label {
  font-size: var(--type-body);
}

.rule-name,
.user-name {
  font-size: 15px;
}

.rule-empty-row strong,
.user-empty-row strong {
  font-size: var(--type-emphasis);
}

.rule-empty-row span,
.user-empty-row span {
  font-size: var(--type-label);
}

.panel-heading h2 {
  font-size: 24px;
}

.online-pill,
.history-pill,
.assistant-speaker,
.assistant-message .assistant-speaker,
.tool-button,
.current-chat-head button,
.assistant-history-head button,
.conversation-bubble span {
  font-size: var(--type-label);
}

.assistant-answer-text,
.assistant-mini-bubble p,
.current-chat-head span,
.current-question p,
.current-answer div,
.assistant-text-input,
.conversation-bubble p {
  font-size: 16px;
}

.current-question span,
.current-answer span {
  font-size: 14px;
}

.module-link > span:not(.module-icon) {
  font-size: var(--type-emphasis);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 900px) {
  .water-layout,
  .water-layout--list {
    grid-template-rows: auto minmax(520px, 1fr);
    height: auto;
  }

  .water-status-bar {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
    min-width: 0;
    padding: 12px;
  }

  .water-status-title p {
    flex-wrap: wrap;
    white-space: normal;
  }

  .water-model-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .water-status-bar > .metric-strip {
    width: 100%;
  }

  .map-workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(420px, 1fr) auto;
  }

  .page-shell {
    position: relative;
    inset: auto;
    display: grid;
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 100svh;
    grid-template-rows: 88px auto auto;
    padding: 0 18px 24px;
    overflow: visible;
    background:
      radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.98) 0 9%, rgba(220, 238, 255, 0.64) 30%, transparent 58%),
      linear-gradient(180deg, rgba(243, 250, 255, 0.78), rgba(232, 244, 255, 0.72));
    transform: none;
  }

  .page-header {
    position: relative;
    inset: auto;
    height: auto;
  }

  .dashboard-grid {
    position: relative;
    inset: auto;
    grid-template-columns: 1fr;
    gap: 18px;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  .dashboard-grid::before {
    display: none;
  }

  .assistant-panel,
  .monitor-panel {
    height: auto;
    min-height: 680px;
    width: 100%;
    max-width: 100%;
  }

  .assistant-panel {
    grid-template-rows: auto auto 320px auto;
  }

  .assistant-stage {
    width: 100%;
  }

  .assistant-tasks {
    width: 38%;
  }

  .monitor-panel {
    margin-top: 0;
  }

  .module-nav {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: 100%;
    margin: 20px 0 0;
    grid-template-columns: repeat(2, 1fr);
  }

  .module-link:last-child {
    grid-column: auto;
  }

}

@media (max-width: 760px) {
  .map-rainfall-panel {
    top: 58px;
    min-width: 0;
  }

  .map-rainfall-panel.is-collapsed {
    width: 184px;
  }

  .map-rainfall-panel.is-expanded {
    width: calc(100% - 28px);
  }

  .map-rainfall-panel header > div {
    display: grid;
    gap: 2px;
  }

  .simulation-start-time {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-shell {
    padding: 0 12px 18px;
  }

  .page-header {
    display: flex;
    justify-content: center;
    min-height: 88px;
    overflow: hidden;
  }

  .brand-lockup {
    width: 100%;
    justify-content: center;
    gap: 10px;
    padding: 4px 8px 10px;
    transform: translateY(0);
  }

  .brand-lockup::before {
    width: 310px;
    height: 54px;
  }

  .brand-lockup::after {
    width: 220px;
    bottom: 6px;
  }

  .brand-lockup h1 {
    white-space: nowrap;
    font-size: 36px;
    letter-spacing: 0.08em;
    line-height: 1;
  }

  .brand-mark {
    width: 22px;
    gap: 2px;
    transform: translateY(-2px) skew(-16deg);
  }

  .brand-mark--right {
    transform: translateY(-2px) scaleX(-1) skew(-16deg);
  }

  .assistant-panel,
  .monitor-panel {
    padding: 24px 18px;
  }

  .assistant-panel {
    grid-template-rows: auto auto 300px auto;
    row-gap: 12px;
  }

  .assistant-message {
    margin-right: 0;
  }

  .assistant-stage {
    width: 100%;
    place-items: end start;
    opacity: 0.94;
  }

  .robot-figure {
    width: min(74%, 310px);
    transform: translate(-2%, 5%);
  }

  .assistant-tasks {
    width: 46%;
    margin-top: 18px;
  }

  .assistant-input {
    left: auto;
    right: auto;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }

  .monitor-surface {
    height: 380px;
  }

  .module-link {
    min-height: 86px;
    gap: 6px;
    padding: 12px 10px;
  }

  .module-link:nth-child(6) {
    padding-left: 10px;
  }

  .module-icon {
    width: 38px;
    height: 38px;
  }

  .module-link:nth-child(6) .module-icon {
    width: 44px;
    height: 38px;
    margin-right: -1px;
  }

  .module-link > span:not(.module-icon) {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 1.24;
  }

  .module-link b {
    flex: none;
    width: 24px;
    height: 24px;
    margin-left: auto;
    font-size: 17px;
  }

  .station-marker::before {
    width: 36px;
    height: 13px;
    transform: translateY(27px) perspective(110px) rotateX(66deg);
  }

  .station-marker::after {
    width: 10px;
    height: 10px;
    box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 20%, transparent), 0 0 18px currentColor;
  }

  .station-pin {
    bottom: -25px;
    height: 28px;
  }

  .station-card {
    bottom: 12px;
    min-width: 108px;
    padding: 8px 10px;
    border-radius: 10px;
  }

  .station-card b {
    font-size: 12px;
  }

  .station-card small {
    gap: 4px;
    margin-top: 3px;
    font-size: 10px;
  }

  .station-card small::before {
    width: 6px;
    height: 6px;
  }

  .station-marker[data-station-id="people-square"] {
    left: 46%;
    top: 28%;
  }

  .station-marker[data-station-id="jingan-temple"] {
    left: 27%;
    top: 63%;
  }

  .station-marker[data-station-id="lujiazui"] {
    left: 63%;
    top: 50%;
  }

  .station-marker[data-station-id="century-avenue"] {
    left: 82%;
    top: 63%;
  }

  .station-marker[data-station-id="xujiahui"] {
    left: 49%;
    top: 78%;
  }

  .station-marker[data-station-id="hongqiao"] {
    left: 79%;
    top: 20%;
  }
}

/* Desktop readability pass. Keep geometry unchanged and raise only the type hierarchy. */
@media (min-width: 901px) {
  :root {
    --type-caption: 14px;
    --type-label: 15px;
    --type-body: 16px;
    --type-emphasis: 18px;
    --type-card-title: 21px;
    --type-module-title: 24px;
  }

  .panel-heading h2 {
    font-size: 22px;
  }

  .water-status-title h2 {
    font-size: 23px;
  }

  .water-status-title p,
  .water-status-bar .metric-tile span,
  .map-legend,
  .risk-push-notice,
  .risk-station-heading p,
  .risk-station-lines span,
  .risk-entrance-square,
  .risk-entrance-empty,
  .risk-station-row > span:not(.risk-entrance-square),
  .risk-chip,
  .station-inspector dt,
  .station-inspector dd {
    font-size: 14px;
  }

  .assistant-message strong {
    font-size: 21px;
  }

  .assistant-text-input,
  .assistant-answer-text,
  .assistant-mini-bubble p,
  .current-question p,
  .current-answer div,
  .conversation-bubble p {
    font-size: 16px;
  }

  .tool-button,
  .assistant-speaker,
  .assistant-message .assistant-speaker,
  .current-chat-head button,
  .assistant-history-head button {
    font-size: 13px;
  }

  .keycap {
    font-size: 13px;
  }

  .module-link > span:not(.module-icon) {
    font-size: 17px;
  }

  .module-table,
  .module-table th,
  .module-table td,
  .api-table,
  .api-table th,
  .api-table input,
  .user-table,
  .user-table th,
  .rule-table,
  .rule-table th {
    font-size: 15px;
  }

  .knowledge-type-tab small,
  .knowledge-drop-zone small,
  .knowledge-file-main small,
  .knowledge-file-index small,
  .knowledge-file-status,
  .knowledge-inline-error,
  .event-knowledge-summary span,
  .event-knowledge-summary small,
  .event-knowledge-filter label > span,
  .event-knowledge-filter input,
  .event-knowledge-filter select,
  .event-knowledge-filter > p,
  .event-station-cell span,
  .event-time-cell,
  .event-status,
  .event-record-state {
    font-size: 14px;
  }

  .knowledge-file-main strong,
  .event-station-cell strong,
  .rule-name,
  .user-name,
  .api-type-name {
    font-size: 16px;
  }

  .event-entrance-chips span,
  .event-entrance-chips small,
  .event-depth-cell small {
    font-size: 13px;
  }

  .event-detail-heading p,
  .event-detail-heading div > span,
  .event-detail-metrics span {
    font-size: 14px;
  }

  .event-detail-heading h3 {
    font-size: 21px;
  }

  .event-detail-heading > .event-status,
  .event-detail-metrics strong,
  .event-detail-section-title > span,
  .event-detail-section-title small,
  .event-detail-entrances small,
  .event-timeline small {
    font-size: 13px;
  }

  .event-detail-section-title strong,
  .event-detail-main section > p,
  .event-detail-entrances b,
  .event-detail-side h4,
  .event-timeline b,
  .event-photo-empty {
    font-size: 15px;
  }

  .event-detail-main section > p {
    line-height: 1.75;
  }

  .event-detail-metrics strong,
  .event-detail-entrances b,
  .event-timeline b {
    font-size: 14px;
  }

  .module-body small,
  .simulation-run-type,
  .simulation-run-progress-meta small,
  .simulation-rain-preview-head span,
  .simulation-hourly-grid label span,
  .simulation-create-error,
  .simulation-viewer-head > span,
  .simulation-run-item span,
  .simulation-run-item small,
  .simulation-station-item small,
  .risk-badge,
  .report-engine-state,
  .report-task-state,
  .rule-updated-time,
  .rule-kb-chip,
  .api-password-error,
  .user-password-status,
  .user-line-chip,
  .user-stations,
  .map-entrance-row small,
  .map-entrance-status,
  .station-detail-head span {
    font-size: 14px;
  }
}

.delete-password-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 49, 75, 0.38);
  backdrop-filter: blur(8px);
}

.delete-password-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid #d5e4ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 72px rgba(20, 61, 93, 0.28);
}

.delete-password-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #c93249;
  background: #fff0f2;
  font-size: 22px;
  font-weight: 850;
}

.delete-password-dialog h3 {
  margin: 12px 0 7px;
  color: #173f60;
  font-size: 20px;
}

.delete-password-dialog > p:not(.delete-password-error) {
  margin: 0 0 17px;
  color: #607a8f;
  font-size: 14px;
  line-height: 1.65;
}

.delete-password-dialog label,
.delete-password-dialog label span {
  display: block;
}

.delete-password-dialog label span {
  margin-bottom: 7px;
  color: #365a75;
  font-size: 14px;
  font-weight: 750;
}

.delete-password-dialog input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #bfd4e3;
  border-radius: 6px;
  outline: 0;
  color: #173f60;
  background: #f9fcfe;
  font-size: 15px;
}

.delete-password-dialog input:focus {
  border-color: #168ee8;
  box-shadow: 0 0 0 3px rgba(22, 142, 232, 0.12);
}

.delete-password-error {
  min-height: 20px;
  margin: 7px 0 4px;
  color: #cf3349;
  font-size: 13px;
}

.delete-password-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.delete-password-actions button {
  min-width: 96px;
}

.delete-password-actions .danger-button {
  border-color: #d83d54;
  color: #ffffff;
  background: #d83d54;
  box-shadow: 0 8px 18px rgba(216, 61, 84, 0.22);
}
