* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

.screen-bg {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #070a3c 0%, #1a1f6e 50%, #070a3c 100%);
  position: relative;
  overflow: hidden;
}

.screen-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 153, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(100, 100, 255, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 153, 255, 0.05) 100%);
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(255, 100, 100, 0.1);
  padding: 4px;
  border: 1px solid rgba(255, 100, 100, 0.3);
}

.title {
  font-size: 28px;
  font-weight: bold;
  background: linear-gradient(90deg, #00d4ff, #0099ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.time-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.date {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.time {
  font-size: 36px;
  font-weight: bold;
  color: #00d4ff;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.header-right {
  display: flex;
const maxDim = Math.max(size.x, size.y, size.z);
const scale = maxDim > 0 ? 15 / maxDim : 1;  // 15 是缩放基准值
model.scale.set(scale, scale, scale);  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 1000px) {
  .header-right {
    gap: 15px;
  }
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 255, 136, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-dot.online {
  background: #00ff88;
  box-shadow: 0 0 10px #00ff88;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-indicator span {
  color: #00ff88;
  font-size: 14px;
}

.nav-links {
  display: flex;
  gap: 10px;
}

.nav-btn {
  padding: 10px 20px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  background: rgba(0, 212, 255, 0.2);
  color: #00d4ff;
}

.nav-btn.active {
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.3), rgba(0, 153, 255, 0.3));
  color: #00d4ff;
  border-color: #00d4ff;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.main-content {
  display: flex;
  height: calc(100% - 80px);
  padding: 20px;
  gap: 20px;
  position: relative;
  z-index: 10;
}

.left-panel, .right-panel {
  width: 350px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.center-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-section {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.15) 0%, rgba(0, 153, 255, 0.1) 100%);
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.title-icon {
  font-size: 18px;
}

.section-title span:last-child {
  color: #00d4ff;
  font-size: 16px;
  font-weight: 600;
}

.section-body {
  padding: 15px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.stat-item {
  background: rgba(0, 212, 255, 0.08);
  border-radius: 8px;
  padding: 20px 15px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 90px;
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 212, 255, 0.2);
}

.stat-value {
  font-size: 28px;
  font-weight: bold;
  color: #00d4ff;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
  margin-bottom: 5px;
}

.stat-value .unit {
  font-size: 16px;
  font-weight: normal;
}

.stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.device-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.device-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(0, 212, 255, 0.05);
  border-radius: 8px;
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
}

.device-item:hover {
  background: rgba(0, 212, 255, 0.1);
  transform: translateX(5px);
}

.device-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.device-status-dot.running {
  background: #00ff88;
  box-shadow: 0 0 10px #00ff88;
}

.device-status-dot.idle {
  background: #ffff00;
  box-shadow: 0 0 10px #ffff00;
}

.device-status-dot.maintenance {
  background: #ff6b6b;
  box-shadow: 0 0 10px #ff6b6b;
}

.device-info {
  flex: 1;
  min-width: 0;
}

.device-name {
  font-size: 14px;
  color: #fff;
  margin-bottom: 3px;
}

.device-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.alarm-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 150px;
  overflow-y: auto;
}

.alarm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
}

.alarm-item.high {
  background: rgba(255, 107, 107, 0.15);
  border-left: 3px solid #ff6b6b;
}

.alarm-item.medium {
  background: rgba(255, 200, 100, 0.15);
  border-left: 3px solid #ffc864;
}

.alarm-item.low {
  background: rgba(0, 212, 255, 0.1);
  border-left: 3px solid #00d4ff;
}

.alarm-level {
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 10px;
}

.alarm-item.high .alarm-level {
  background: #ff6b6b;
  color: #fff;
}

.alarm-item.medium .alarm-level {
  background: #ffc864;
  color: #333;
}

.alarm-item.low .alarm-level {
  background: #00d4ff;
  color: #fff;
}

.alarm-type {
  color: #fff;
  flex: 1;
}

.alarm-device {
  color: rgba(255, 255, 255, 0.6);
}

.alarm-time {
  color: rgba(255, 255, 255, 0.4);
}

.center-top {
  height: 380px;
}

.center-bottom {
  height: 350px;
}

.center-center {
  flex: 1;
}

.chart-section {
  height: 100%;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 12px;
  padding: 15px;
}

.chart-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.chart-title span:last-child {
  color: #00d4ff;
  font-size: 14px;
  font-weight: 600;
}

.chart-container {
  width: 100%;
  height: calc(100% - 40px);
}

.twin-container {
  height: 100%;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.twin-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.twin-title span:last-child {
  color: #00d4ff;
  font-size: 14px;
  font-weight: 600;
}

.twin-3d {
  flex: 1;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
}

.twin-controls {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  justify-content: flex-end;
}

.twin-controls button {
  padding: 8px 16px;
  background: rgba(0, 212, 255, 0.2);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 6px;
  color: #00d4ff;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.twin-controls button:hover {
  background: rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.energy-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.energy-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(0, 212, 255, 0.08);
  border-radius: 10px;
  border-left: 4px solid transparent;
}

.energy-item.water {
  border-left-color: #00d4ff;
}

.energy-item.electricity {
  border-left-color: #ffff00;
}

.energy-item.gas {
  border-left-color: #ff6b6b;
}

.energy-icon {
  font-size: 32px;
}

.energy-info {
  flex: 1;
}

.energy-value {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
}

.energy-unit {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.energy-trend {
  font-size: 12px;
  font-weight: bold;
}

.energy-trend.up {
  color: #ff6b6b;
}

.energy-trend.down {
  color: #00ff88;
}

.health-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 250px;
  overflow-y: auto;
}

.health-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.health-name {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.health-bar {
  height: 8px;
  background: rgba(0, 212, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.health-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d4ff, #00ff88);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.health-fill.warning {
  background: linear-gradient(90deg, #ffc864, #ff6b6b);
}

.health-info {
  display: flex;
  justify-content: space-between;
}

.health-value {
  font-size: 13px;
  color: #00d4ff;
  font-weight: bold;
}

.health-trend {
  font-size: 12px;
  font-weight: bold;
}

.health-trend.up {
  color: #00ff88;
}

.health-trend.down {
  color: #ff6b6b;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.security-item {
  background: rgba(0, 212, 255, 0.08);
  border-radius: 8px;
  padding: 15px;
  text-align: center;
}

.security-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.security-icon.safe {
  color: #00ff88;
}

.security-icon.warning {
  color: #ffc864;
}

.security-icon.success {
  color: #00d4ff;
}

.security-count {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 3px;
}

.security-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.camera-preview {
  margin-top: 15px;
}

.camera-title {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 10px;
}

.camera-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.camera-item {
  height: 60px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  overflow: hidden;
}

.camera-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
  }
}

.panel-section {
  animation: glow 4s ease-in-out infinite;
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 212, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.5);
}

.twin-fullscreen {
  width: 100%;
  height: calc(100% - 80px);
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 15px;
}

.twin-header {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 10px;
}

.twin-header .title-icon {
  font-size: 24px;
}

.twin-header span:nth-child(2) {
  color: #00d4ff;
  font-size: 18px;
  font-weight: 600;
}

.twin-hint {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.twin-hint span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.twin-canvas {
  flex: 1;
  min-height: 600px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.twin-controls {
  position: absolute;
  bottom: 15px;
  left: 15px;
  right: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 10px;
  z-index: 10;
}

.twin-controls button {
  padding: 10px 20px;
  background: rgba(0, 212, 255, 0.2);
  border: 1px solid rgba(0, 212, 255, 0.4);
  border-radius: 8px;
  color: #00d4ff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.twin-controls button:hover {
  background: rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.model-info {
  margin-left: auto;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.main-content {
  width: 100%;
  height: calc(100% - 80px);
}

.dashboard-view {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: row;
  gap: 15px;
  padding: 15px;
}

.device-view,
.energy-view,
.quality-view,
.datahub-view,
.analyze-view,
.aiassistant-view,
.agent-view,
.knowledge-view,
.ke-view,
.platform-view {
  display: none;
  width: 100%;
  height: 100%;
  flex-direction: column;
  gap: 15px;
  padding: 15px;
}

.twin-view {
  display: none;
  flex-direction: column;
  width: 100%;
  height: calc(100% - 80px);
  gap: 15px;
  padding: 15px;
}

.view-header {
  padding: 15px 20px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 10px;
  color: #00d4ff;
  font-size: 18px;
  font-weight: 600;
}

.view-content {
  flex: 1;
  overflow: auto;
}

.device-tabs {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  position: relative;
  z-index: 10;
}

.tab-btn {
  padding: 10px 25px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn.active {
  background: rgba(0, 212, 255, 0.3);
  color: #00d4ff;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.tab-btn:hover {
  background: rgba(0, 212, 255, 0.2);
}

.device-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.stat-box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.stat-box.running {
  background: rgba(0, 255, 100, 0.1);
  border-color: rgba(0, 255, 100, 0.3);
}

.stat-box.idle {
  background: rgba(255, 200, 0, 0.1);
  border-color: rgba(255, 200, 0, 0.3);
}

.stat-box.maintenance {
  background: rgba(255, 100, 100, 0.1);
  border-color: rgba(255, 100, 100, 0.3);
}

.stat-num {
  font-size: 32px;
  font-weight: 700;
}

.stat-box.running .stat-num {
  color: #00ff64;
}

.stat-box.idle .stat-num {
  color: #ffc800;
}

.stat-box.maintenance .stat-num {
  color: #ff6464;
}

.stat-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.device-grid-container {
  height: calc(100% - 60px);
  overflow: auto;
}

.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
}

.device-card {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.device-card:hover {
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
  transform: translateY(-2px);
}

.device-card-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.device-status-badge {
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.device-status-badge.running {
  background: rgba(0, 255, 100, 0.2);
  color: #00ff64;
  border: 1px solid rgba(0, 255, 100, 0.3);
}

.device-status-badge.idle {
  background: rgba(255, 200, 0, 0.2);
  color: #ffc800;
  border: 1px solid rgba(255, 200, 0, 0.3);
}

.device-status-badge.maintenance {
  background: rgba(255, 100, 100, 0.2);
  color: #ff6464;
  border: 1px solid rgba(255, 100, 100, 0.3);
}

.device-card-header .device-name {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.device-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.device-stat {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.energy-summary {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.energy-summary-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 25px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 12px;
}

.energy-summary-icon {
  font-size: 40px;
}

.energy-summary-info {
  flex: 1;
}

.energy-summary-value {
  color: #00d4ff;
  font-size: 32px;
  font-weight: 700;
}

.energy-summary-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.energy-summary-trend {
  font-size: 14px;
  font-weight: 600;
}

.energy-summary-trend.up {
  color: #00ff64;
}

.energy-summary-trend.down {
  color: #ff6464;
}

.energy-chart-container {
  height: calc(100% - 140px);
}

.chart-section-large {
  height: 100%;
}

.chart-container-large {
  width: 100%;
  height: calc(100% - 40px);
}

.quality-summary {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.quality-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 12px;
}

.quality-icon {
  font-size: 28px;
}

.quality-info {
  flex: 1;
}

.quality-value {
  color: #00d4ff;
  font-size: 22px;
  font-weight: 700;
}

.quality-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.security-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.camera-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 340px);
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.camera-item {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.camera-header {
  padding: 10px 15px;
  background: rgba(0, 212, 255, 0.15);
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  text-align: center;
}

.camera-item video {
  flex: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.camera-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 18px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 153, 255, 0.05) 100%);
}

.nav-links-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 800px;
  align-items: center;
}

.nav-links-wrap .nav-btn {
  padding: 8px 14px;
  font-size: 13px;
  min-width: 80px;
  text-align: center;
  flex-shrink: 0;
}

@media (max-width: 1400px) {
  .nav-links-wrap {
    max-width: 650px;
  }
  
  .nav-links-wrap .nav-btn {
    padding: 6px 10px;
    font-size: 12px;
    min-width: 70px;
  }
}

@media (max-width: 1200px) {
  .nav-links-wrap {
    max-width: 550px;
    gap: 6px;
  }
  
  .nav-links-wrap .nav-btn {
    padding: 5px 8px;
    font-size: 11px;
    min-width: 60px;
  }
}

@media (max-width: 1000px) {
  .nav-links-wrap {
    display: none;
  }
}

.req-lead {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.req-section {
  margin-bottom: 24px;
}

.req-h3 {
  color: #00d4ff;
  font-size: 16px;
  margin-bottom: 8px;
}

.req-p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.req-block-title {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 600;
  margin: 12px 0 8px;
}

.req-ul {
  margin-left: 18px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  line-height: 1.8;
}

.req-cards {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.req-card {
  flex: 1;
  min-width: 200px;
  padding: 16px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.req-card strong {
  color: #00d4ff;
}

.table-wrap {
  overflow: auto;
  border-radius: 8px;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 212, 255, 0.12);
}

.data-table th {
  background: rgba(0, 212, 255, 0.12);
  color: #00d4ff;
  font-weight: 600;
}

.data-table td {
  color: rgba(255, 255, 255, 0.85);
}

.data-table tr:hover td {
  background: rgba(0, 212, 255, 0.06);
}

.req-scroll {
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

.device-tabs-secondary {
  margin-bottom: 12px;
}

.tab-btn-ghost {
  padding: 8px 14px;
  font-size: 13px;
  background: rgba(0, 212, 255, 0.06);
}

.tab-btn-ghost.active {
  background: rgba(0, 212, 255, 0.28);
  color: #00d4ff;
}

.device-section {
  display: none;
}

.device-section.req-panel--active {
  display: block;
}

.analyze-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.analyze-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.chart-box {
  min-height: 220px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 10px;
  padding: 8px;
}

.chart-fill {
  width: 100%;
  height: 220px;
}

.twin-req-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.twin-req-col {
  flex: 1;
  min-width: 280px;
}

.chart-mini {
  width: 100%;
  height: 240px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.req-two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

@media (max-width: 1100px) {
  .req-two-col {
    grid-template-columns: 1fr;
  }
  .analyze-grid {
    grid-template-columns: 1fr;
  }
}

.agent-tabs,
.ke-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.agent-tab,
.ke-tab {
  padding: 8px 14px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  cursor: pointer;
}

.agent-tab.active,
.ke-tab.active {
  background: rgba(0, 212, 255, 0.3);
  color: #00d4ff;
}

.agent-panel,
.ke-panel {
  display: none;
  padding: 12px 0;
}

.agent-panel.req-panel--active,
.ke-panel.req-panel--active {
  display: block;
}

.req-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.req-form label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.req-form textarea,
.req-input {
  width: 100%;
  max-width: 640px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 13px;
}

.btn-secondary {
  align-self: flex-start;
  padding: 8px 18px;
  background: rgba(0, 212, 255, 0.2);
  border: 1px solid rgba(0, 212, 255, 0.4);
  border-radius: 8px;
  color: #00d4ff;
  cursor: pointer;
  font-size: 13px;
}

.btn-secondary:hover {
  background: rgba(0, 212, 255, 0.35);
}

.req-result {
  padding: 14px;
  background: rgba(0, 212, 255, 0.06);
  border-radius: 8px;
  border-left: 3px solid #00d4ff;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.req-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.req-timeline span {
  display: inline-block;
  min-width: 88px;
  color: #00d4ff;
  margin-right: 8px;
}

.req-pre {
  padding: 14px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  overflow-x: auto;
  border: 1px solid rgba(0, 212, 255, 0.15);
}

.req-map-placeholder {
  margin-top: 12px;
  padding: 40px 20px;
  text-align: center;
  background: linear-gradient(145deg, rgba(0, 40, 80, 0.5), rgba(10, 14, 46, 0.8));
  border: 1px dashed rgba(0, 212, 255, 0.35);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.req-map-placeholder span {
  display: block;
  font-size: 16px;
  color: #00d4ff;
  margin-bottom: 8px;
}

.req-map-placeholder small {
  color: rgba(255, 255, 255, 0.5);
}