/* 工业战术深色主题 - 全局样式 */
:root {
  --bg: #121417;
  --fg: #E8E6E1;
  --muted: #1C1F24;
  --border: #2A2E35;
  --primary: #FF9800;
  --accent: #00E676;
  --destructive: #FF3D00;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 自定义滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--muted); }
::-webkit-scrollbar-thumb { background: #3A3F47; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #4A5058; }

/* 数据遥测风格：左侧琥珀竖条标记 */
.telemetry-bar {
  position: relative;
  padding-left: 14px;
}
.telemetry-bar::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--primary);
  border-radius: 2px;
}

/* 状态标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.tag-online { color: var(--accent); border-color: rgba(0,230,118,0.35); background: rgba(0,230,118,0.08); }
.tag-offline { color: #8A8F98; border-color: rgba(138,143,152,0.25); background: rgba(138,143,152,0.06); }
.tag-admin { color: var(--primary); border-color: rgba(255,152,0,0.35); background: rgba(255,152,0,0.08); }
.tag-muted { color: var(--destructive); border-color: rgba(255,61,0,0.35); background: rgba(255,61,0,0.08); }
.tag-private { color: #7AA2FF; border-color: rgba(122,162,255,0.3); background: rgba(122,162,255,0.08); }

/* 切角面板 */
.panel {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* 入场动画 */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeUp 0.3s ease-out both; }

/* 表格行 hover */
.row-hover:hover { background: rgba(255,255,255,0.03); }

/* 输入框 */
.field {
  background: #0F1114;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  padding: 8px 12px;
  font-size: 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
}
.field:focus { border-color: var(--primary); }
.field::placeholder { color: #5C616B; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: #1A1206; }
.btn-primary:hover { background: #FFA91C; }
.btn-muted { background: var(--muted); color: var(--fg); border-color: var(--border); }
.btn-muted:hover { background: #23262C; }
.btn-danger { background: transparent; color: var(--destructive); border-color: rgba(255,61,0,0.4); }
.btn-danger:hover { background: rgba(255,61,0,0.1); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* 模态遮罩 */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  padding: 20px;
}

/* toast */
.toast {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 100;
  display: flex; flex-direction: column; gap: 8px;
}
.toast-item {
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--muted);
  animation: fadeUp 0.2s ease-out;
}
.toast-success { border-left: 3px solid var(--accent); }
.toast-error { border-left: 3px solid var(--destructive); }
.toast-info { border-left: 3px solid var(--primary); }
/* ==== 部署兜底：tailwind Play CDN 不含 tailwindcss-animate 插件，
   防止 .animate-in 入场元素卡在 opacity:0 透明态（2026-09-05） ==== */
.animate-in,
[class*="animate-in"] {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: opacity .2s ease;
}
