/* ============================================================
   环境风险双重预防机制系统 - 样式 v3 科技感
   深色主题 · 霓虹青蓝 · 玻璃拟态 · 网格光效
   ============================================================ */

:root {
  --primary: #22d3ee;
  --primary-dark: #06b6d4;
  --primary-light: rgba(34, 211, 238, 0.12);
  --primary-soft: rgba(34, 211, 238, 0.1);
  --accent: #34d399;
  --accent-soft: rgba(52, 211, 153, 0.12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.12);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.12);
  --info: #38bdf8;

  --bg: #070b16;
  --bg-elevated: #0c1224;
  --bg-pattern:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(34, 211, 238, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(99, 102, 241, 0.08), transparent 45%),
    linear-gradient(180deg, #070b16 0%, #0a1020 100%);
  --surface: rgba(15, 23, 42, 0.72);
  --surface-solid: #0f172a;
  --surface-2: rgba(30, 41, 59, 0.55);
  --surface-3: rgba(51, 65, 85, 0.4);
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);
  --border-glow: rgba(34, 211, 238, 0.35);
  --text: #e2e8f0;
  --text-2: #94a3b8;
  --text-3: #64748b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
  --shadow-primary: 0 0 20px rgba(34, 211, 238, 0.25), 0 4px 16px rgba(0, 0, 0, 0.4);
  --glow-primary: 0 0 12px rgba(34, 211, 238, 0.35);
  --glow-soft: 0 0 24px rgba(34, 211, 238, 0.12);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 999px;

  --major: #f87171;
  --larger: #fb923c;
  --general: #fbbf24;
  --low: #38bdf8;

  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --focus: 0 0 0 3px rgba(34, 211, 238, 0.28);
  --glass: blur(16px) saturate(140%);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  background-image: var(--bg-pattern);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
}

body {
  padding-bottom: env(safe-area-inset-bottom, 0);
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 75%);
}

body > *:not(.modal-overlay):not(.toast-box):not(.img-preview-overlay):not(.webgl-fx-canvas) {
  position: relative;
  z-index: 1;
}
body > .modal-overlay,
body > .toast-box,
body > .img-preview-overlay {
  position: fixed !important;
}
body > .modal-overlay { z-index: 10050 !important; }
body > .toast-box { z-index: 10100 !important; }
body > .img-preview-overlay { z-index: 10200 !important; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color .15s var(--ease), text-shadow .15s var(--ease);
}
a:hover {
  color: #67e8f9;
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.4);
}

img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

/* ============ 顶部导航 ============ */
.top-nav {
  background: rgba(8, 12, 24, 0.82);
  color: #fff;
  padding: 0 20px 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45), inset 0 -1px 0 rgba(34, 211, 238, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border-bottom: 1px solid rgba(34, 211, 238, 0.12);
}

.top-nav::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .45), rgba(52, 211, 153, .35), transparent);
  pointer-events: none;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff !important;
  font-weight: 650;
  font-size: 15px;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  min-width: 0;
}
.nav-brand:hover { color: #fff !important; opacity: .95; text-shadow: none; }

.nav-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.25), rgba(99, 102, 241, 0.2));
  border: 1px solid rgba(34, 211, 238, 0.35);
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.25), inset 0 1px 0 rgba(255,255,255,.12);
  flex-shrink: 0;
}

.nav-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  background: linear-gradient(90deg, #e2e8f0, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.6);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(34, 211, 238, 0.12);
  box-shadow: inset 0 0 20px rgba(34, 211, 238, 0.04);
}

.nav-link {
  color: rgba(226, 232, 240, .78) !important;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  transition: all .2s var(--ease);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
  text-shadow: none !important;
}
.nav-link:hover {
  color: #fff !important;
  background: rgba(34, 211, 238, 0.12);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.15);
}
.nav-link.active {
  color: #041016 !important;
  background: linear-gradient(135deg, #22d3ee, #67e8f9);
  font-weight: 600;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.4);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.08);
  color: #67e8f9;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.nav-toggle:hover {
  background: rgba(34, 211, 238, 0.16);
  box-shadow: var(--glow-primary);
}

/* ============ 容器布局 ============ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  animation: pageIn .35s var(--ease);
}
.container-sm {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  animation: pageIn .35s var(--ease);
}
.container-lg {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  animation: pageIn .35s var(--ease);
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.page-header { margin-bottom: 22px; gap: 12px; }
.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--text);
  line-height: 1.3;
  text-shadow: 0 0 30px rgba(34, 211, 238, 0.15);
}
.page-header .subtitle {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}

/* ============ 卡片 ============ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.04);
  border: 1px solid var(--border);
  padding: 20px 22px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.card:hover {
  box-shadow: var(--shadow), var(--glow-soft);
  border-color: rgba(34, 211, 238, 0.22);
}
.card-title {
  font-size: 15px;
  font-weight: 650;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.card-title .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

/* ============ 看板统计 ============ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow), 0 0 20px rgba(34, 211, 238, 0.1);
  border-color: rgba(34, 211, 238, 0.28);
}
.stat-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #22d3ee, #6366f1);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}
.stat-card.danger::before {
  background: linear-gradient(180deg, #f87171, #ef4444);
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.5);
}
.stat-card.warning::before {
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.45);
}
.stat-card.success::before {
  background: linear-gradient(180deg, #34d399, #10b981);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.45);
}
.stat-card::after {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.12), transparent 70%);
  pointer-events: none;
}
.stat-card.danger::after { background: radial-gradient(circle, rgba(248, 113, 113, 0.12), transparent 70%); }
.stat-card.warning::after { background: radial-gradient(circle, rgba(251, 191, 36, 0.12), transparent 70%); }
.stat-card.success::after { background: radial-gradient(circle, rgba(52, 211, 153, 0.12), transparent 70%); }

.stat-label {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.stat-value {
  font-size: 28px;
  font-weight: 750;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.15;
  position: relative;
  z-index: 1;
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.15);
}
.stat-value .unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-3);
  margin-left: 4px;
  text-shadow: none;
}
.stat-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 6px;
  position: relative;
  z-index: 1;
}

/* ============ 风险等级四色块 ============ */
.risk-colors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.risk-color-card {
  border-radius: 12px;
  padding: 16px 10px;
  color: #fff;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
}
.risk-color-card:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 28px rgba(0,0,0,.4);
}
.risk-color-card.major {
  background: linear-gradient(145deg, #ef4444, #991b1b);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.3);
}
.risk-color-card.larger {
  background: linear-gradient(145deg, #f97316, #9a3412);
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.3);
}
.risk-color-card.general {
  background: linear-gradient(145deg, #fbbf24, #b45309);
  color: #1c1917;
  box-shadow: 0 6px 18px rgba(251, 191, 36, 0.25);
}
.risk-color-card.low {
  background: linear-gradient(145deg, #38bdf8, #0369a1);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.3);
}
.risk-color-card .count {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.risk-color-card .name {
  font-size: 12px;
  opacity: .92;
  margin-top: 4px;
  font-weight: 500;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.status-row:last-child { border-bottom: none; padding-bottom: 0; }
.status-row:first-child { padding-top: 0; }
.status-row .status-count {
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  min-width: 28px;
  text-align: right;
}
.status-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(51, 65, 85, 0.6);
  border-radius: var(--radius-full);
  overflow: hidden;
  max-width: 120px;
  margin-left: auto;
  margin-right: 12px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.3);
}
.status-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width .5s var(--ease);
  box-shadow: 0 0 8px currentColor;
}

/* ============ 快捷入口磁贴 ============ */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.quick-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text) !important;
  transition: all .2s var(--ease);
  cursor: pointer;
  text-align: left;
  min-height: 84px;
  text-shadow: none !important;
}
.quick-tile:hover {
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.15), var(--shadow);
  transform: translateY(-2px);
  color: #67e8f9 !important;
}
.quick-tile .qt-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--primary);
  border: 1px solid rgba(34, 211, 238, 0.2);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.12);
}
.quick-tile.primary {
  background: linear-gradient(145deg, rgba(6, 182, 212, 0.35), rgba(14, 116, 144, 0.5));
  border-color: rgba(34, 211, 238, 0.45);
  color: #ecfeff !important;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.2), var(--shadow);
}
.quick-tile.primary:hover {
  filter: brightness(1.1);
  color: #fff !important;
  border-color: rgba(103, 232, 249, 0.6);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.35), var(--shadow);
}
.quick-tile.primary .qt-icon {
  background: rgba(255,255,255,.12);
  color: #ecfeff;
  border-color: rgba(255,255,255,.18);
  box-shadow: none;
}
.quick-tile .qt-title {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}
.quick-tile .qt-desc {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.35;
}
.quick-tile.primary .qt-desc { color: rgba(236, 254, 255, .75); }

.tips-list {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tips-list p {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  gap: 8px;
  line-height: 1.45;
}
.tips-list p::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(34, 211, 238, 0.6);
}

/* ============ 表格 ============ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.5);
}
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.5); }
.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.25);
  border-radius: 4px;
}
.table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 211, 238, 0.4);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th, .data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table th {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.9));
  font-weight: 650;
  color: var(--primary);
  font-size: 12px;
  letter-spacing: .02em;
  position: sticky;
  top: 0;
  z-index: 1;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.2);
}
.data-table tbody tr { transition: background .12s ease; }
.data-table tbody tr:hover { background: rgba(34, 211, 238, 0.06); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table td.wrap { white-space: normal; max-width: 280px; }
.data-table .empty-row td {
  text-align: center;
  color: var(--text-3);
  padding: 48px 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.toolbar-left, .toolbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.search-box { position: relative; min-width: 200px; }
.search-box input { padding-left: 34px; }
.search-box::before {
  content: '⌕';
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 14px;
  pointer-events: none;
}

/* ============ 徽章 ============ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: #fff;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.01em;
  box-shadow: 0 0 10px rgba(0,0,0,.2);
}
.badge-outline {
  background: transparent;
  border: 1px solid;
  box-shadow: none;
}
.badge-major { background: var(--major); box-shadow: 0 0 10px rgba(248, 113, 113, 0.35); }
.badge-larger { background: var(--larger); box-shadow: 0 0 10px rgba(251, 146, 60, 0.35); }
.badge-general { background: var(--general); color: #1c1917; box-shadow: 0 0 10px rgba(251, 191, 36, 0.3); }
.badge-low { background: var(--low); box-shadow: 0 0 10px rgba(56, 189, 248, 0.35); }
.badge-pending { background: var(--danger); }
.badge-fixing { background: var(--warning); color: #1c1917; }
.badge-fixed { background: var(--info); }
.badge-verified { background: var(--success); color: #042f2e; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
  transition: all .18s var(--ease);
  line-height: 1.4;
  user-select: none;
  white-space: nowrap;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
}
.btn-primary {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: #042f2e;
  font-weight: 650;
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.3), 0 2px 8px rgba(0,0,0,.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #22d3ee, #06b6d4);
  color: #042f2e;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.45), 0 4px 12px rgba(0,0,0,.35);
}
.btn-success {
  background: linear-gradient(135deg, #34d399, #059669);
  color: #042f2e;
  font-weight: 650;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.25);
}
.btn-success:hover {
  background: linear-gradient(135deg, #6ee7b7, #34d399);
  color: #042f2e;
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.4);
}
.btn-danger {
  background: linear-gradient(135deg, #f87171, #dc2626);
  color: #fff;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.25);
}
.btn-danger:hover {
  background: linear-gradient(135deg, #fca5a5, #ef4444);
  color: #fff;
  box-shadow: 0 0 18px rgba(248, 113, 113, 0.4);
}
.btn-warning {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #1c1917;
  font-weight: 650;
}
.btn-default {
  background: rgba(15, 23, 42, 0.7);
  border-color: var(--border);
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
}
.btn-default:hover {
  background: rgba(30, 41, 59, 0.8);
  color: var(--text);
  border-color: rgba(34, 211, 238, 0.3);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.1);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}
.btn-ghost:hover {
  background: rgba(34, 211, 238, 0.08);
  color: var(--primary);
}
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 7px; }
.btn-lg { padding: 12px 22px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
}

/* ============ 表单 ============ */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-2);
}
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: rgba(7, 11, 22, 0.65);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-control::placeholder { color: #475569; }
.form-control:hover { border-color: var(--border-strong); }
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus), 0 0 16px rgba(34, 211, 238, 0.12);
  background: rgba(7, 11, 22, 0.85);
}
textarea.form-control {
  resize: vertical;
  min-height: 88px;
  line-height: 1.55;
}
select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2322d3ee' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-color: rgba(7, 11, 22, 0.65);
  padding-right: 32px;
}
option {
  background: #0f172a;
  color: var(--text);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-hint {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 5px;
  line-height: 1.4;
}

/* ============ 风险点卡片 ============ */
.rp-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.rp-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 0 20px rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.3);
}
.rp-card-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  position: relative;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.5), transparent);
}
.rp-card-head::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}
.rp-card.major .rp-card-head::before { background: var(--major); box-shadow: 0 0 8px rgba(248, 113, 113, 0.5); }
.rp-card.larger .rp-card-head::before { background: var(--larger); box-shadow: 0 0 8px rgba(251, 146, 60, 0.5); }
.rp-card.general .rp-card-head::before { background: var(--general); box-shadow: 0 0 8px rgba(251, 191, 36, 0.45); }
.rp-card.low .rp-card-head::before { background: var(--low); box-shadow: 0 0 8px rgba(56, 189, 248, 0.5); }
.rp-name {
  font-weight: 650;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--text);
}
.rp-meta { font-size: 12px; color: var(--text-3); }
.rp-card-body { padding: 14px 16px; }
.rp-card-body p {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 8px;
}
.rp-card-foot {
  padding: 11px 16px;
  background: rgba(7, 11, 22, 0.45);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
  border-top: 1px solid var(--border);
}

/* ============ 二维码 ============ */
.qr-box {
  display: inline-block;
  padding: 14px;
  background: #fff;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.15);
}
.qr-box canvas, .qr-box img { display: block; margin: 0 auto; }
.qr-label {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-2);
  word-break: break-all;
}

.scan-area {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1;
  background: #020617;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  margin: 0 auto;
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .15), 0 0 24px rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
}
#scan-reader { width: 100%; height: 100%; }
#scan-reader video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}
.scan-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(103, 232, 249, .55);
  font-size: 13px;
  gap: 8px;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.08), transparent 60%),
    radial-gradient(circle at center, #0f172a, #020617);
}

/* ============ Toast ============ */
.toast-box {
  position: fixed;
  top: calc(var(--nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  padding: 11px 20px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all .28s var(--ease);
  z-index: 9999;
  box-shadow: var(--shadow-lg), 0 0 20px rgba(34, 211, 238, 0.15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  max-width: min(90vw, 420px);
  text-align: center;
  border: 1px solid rgba(34, 211, 238, 0.25);
}
.toast-box.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast-box.error {
  background: rgba(127, 29, 29, 0.92);
  border-color: rgba(248, 113, 113, 0.4);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(248, 113, 113, 0.2);
}
.toast-box.success {
  background: rgba(6, 78, 59, 0.92);
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(52, 211, 153, 0.2);
}
.toast-box.warning {
  background: rgba(120, 53, 15, 0.92);
  border-color: rgba(251, 191, 36, 0.4);
}

/* ============ Modal ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  opacity: 0;
  transition: opacity .22s var(--ease);
  padding: 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-overlay.show { opacity: 1; }
.modal-dialog {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(.96) translateY(8px);
  transition: transform .22s var(--ease);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .55), 0 0 40px rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.modal-overlay.show .modal-dialog {
  transform: scale(1) translateY(0);
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.06), transparent);
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: none;
  font-size: 22px;
  color: var(--text-3);
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.modal-close:hover {
  color: var(--primary);
  background: rgba(34, 211, 238, 0.1);
}
.modal-body {
  padding: 20px;
  overflow-y: auto;
}
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: rgba(7, 11, 22, 0.5);
}
.confirm-text { font-size: 14px; color: var(--text); line-height: 1.6; }
.modal-dialog.lg { max-width: 860px; }

/* ============ 空状态 ============ */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-3);
}
.empty-state .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.15);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.1);
}
.empty-state .title {
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 600;
}

/* ============ 标签页 ============ */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
  background: var(--surface);
  border-radius: 12px 12px 0 0;
  padding: 6px 6px 0;
  border: 1px solid var(--border);
  border-bottom: none;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.tabs::-webkit-scrollbar { height: 0; }
.tab {
  padding: 11px 16px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all .15s var(--ease);
  border-radius: 8px 8px 0 0;
  font-weight: 500;
  user-select: none;
}
.tab:hover {
  color: var(--text);
  background: rgba(34, 211, 238, 0.06);
}
.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 650;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.1), transparent);
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.3);
}
.tab-pane { animation: fadePane .25s var(--ease); }
@keyframes fadePane {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* ============ 照片预览 ============ */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item.clickable { cursor: zoom-in; }
.photo-item.clickable:hover {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  transform: scale(1.02);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.3);
}
.photo-item .remove {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: rgba(0,0,0,.72); color: #fff;
  border-radius: 50%; border: none;
  font-size: 14px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.photo-item .remove:hover { background: var(--danger); }
.photo-add {
  aspect-ratio: 1;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); cursor: pointer;
  font-size: 24px;
  background: var(--surface-2);
  transition: all .15s;
}
.photo-add:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(34, 211, 238, 0.08);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.15);
}

.photo-thumbs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}
.photo-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: zoom-in;
  background: var(--surface-2);
  flex-shrink: 0;
  transition: transform .15s, outline .15s, box-shadow .15s;
}
.photo-thumb:hover {
  outline: 2px solid var(--primary);
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.3);
}
.photo-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all .15s;
}
.photo-more:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(34, 211, 238, 0.1);
}
.photo-grid-view .photo-item { cursor: zoom-in; }

.img-preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .18s;
  padding: 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.img-preview-overlay.show { opacity: 1; }
.img-preview-main {
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0,0,0,.6), 0 0 40px rgba(34, 211, 238, 0.1);
  background: #020617;
  border: 1px solid rgba(34, 211, 238, 0.15);
}
.img-preview-close,
.img-preview-nav {
  border: none;
  border-radius: 50%;
  background: rgba(34, 211, 238, .14);
  color: #e2e8f0;
  cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
  border: 1px solid rgba(34, 211, 238, 0.2);
}
.img-preview-close:hover,
.img-preview-nav:hover {
  background: rgba(34, 211, 238, .28);
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.3);
}
.img-preview-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 42px;
  height: 42px;
  font-size: 26px;
  line-height: 1;
}
.img-preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 30px;
  line-height: 1;
}
.img-preview-nav.prev { left: 18px; }
.img-preview-nav.next { right: 18px; }
.img-preview-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #e2e8f0;
  font-size: 13px;
  background: rgba(15, 23, 42, .75);
  padding: 5px 14px;
  border-radius: 999px;
  font-weight: 500;
  border: 1px solid rgba(34, 211, 238, 0.2);
}

/* ============ 详情页 ============ */
.detail-section {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow .2s, border-color .2s;
}
.detail-section:hover {
  box-shadow: var(--shadow), var(--glow-soft);
  border-color: rgba(34, 211, 238, 0.2);
}
.detail-section h3 {
  font-size: 15px;
  font-weight: 650;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.detail-list { list-style: none; }
.detail-list li {
  padding: 10px 0;
  display: flex;
  gap: 12px;
  font-size: 14px;
  border-bottom: 1px dashed var(--border);
}
.detail-list li:last-child { border-bottom: none; }
.detail-list .label {
  width: 100px;
  flex-shrink: 0;
  color: var(--text-3);
  font-size: 13px;
}
.detail-list .value { color: var(--text); flex: 1; }

.measures-list {
  list-style: none;
  counter-reset: m;
}
.measures-list li {
  counter-increment: m;
  padding: 11px 12px 11px 42px;
  position: relative;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 13px;
  border: 1px solid transparent;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.measures-list li:hover {
  border-color: rgba(34, 211, 238, 0.25);
  background: rgba(34, 211, 238, 0.06);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.08);
}
.measures-list li::before {
  content: counter(m);
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  background: linear-gradient(145deg, #22d3ee, #0891b2);
  color: #042f2e;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 650;
  box-shadow: 0 0 10px rgba(34, 211, 238, .4);
}

/* ============ Hero 区 ============ */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(34, 211, 238, .18), transparent 28%),
    radial-gradient(circle at 15% 80%, rgba(99, 102, 241, .15), transparent 30%),
    linear-gradient(125deg, #0c1a35 0%, #0e2848 42%, #0a3d3a 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 34px 36px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 40px rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
}
.hero::before {
  content: '';
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, .15), transparent 70%);
  right: -40px; top: -60px;
  filter: blur(2px);
}
.hero::after {
  content: '⬡';
  position: absolute;
  right: 12px; bottom: -28px;
  font-size: 170px;
  opacity: .1;
  line-height: 1;
  pointer-events: none;
  color: #22d3ee;
  text-shadow: 0 0 40px rgba(34, 211, 238, 0.4);
}
.hero h1 {
  font-size: 26px;
  margin-bottom: 10px;
  font-weight: 750;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
  line-height: 1.3;
  background: linear-gradient(90deg, #f8fafc, #67e8f9 60%, #a5f3fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  opacity: .9;
  max-width: 720px;
  position: relative;
  z-index: 1;
  font-size: 14.5px;
  line-height: 1.65;
  color: #cbd5e1;
}
.hero-stats {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.hero-stat {
  min-width: 108px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(15, 23, 42, .45);
  border: 1px solid rgba(34, 211, 238, .2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.hero-stat:hover {
  background: rgba(34, 211, 238, .1);
  border-color: rgba(34, 211, 238, .4);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.15);
}
.hero-stat .num {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #67e8f9;
  text-shadow: 0 0 16px rgba(34, 211, 238, 0.4);
}
.hero-stat .lbl {
  font-size: 12px;
  opacity: .88;
  margin-top: 2px;
  color: #94a3b8;
}

/* ============ 时间线 ============ */
.timeline { list-style: none; padding-left: 0; }
.timeline li {
  position: relative;
  padding: 8px 0 20px 28px;
  border-left: 2px solid var(--border);
  margin-left: 8px;
}
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before {
  content: '';
  position: absolute;
  left: -7px; top: 10px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, .35), 0 0 10px rgba(34, 211, 238, .5);
}
.timeline li.done::before {
  background: var(--success);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, .35), 0 0 10px rgba(52, 211, 153, .45);
}
.timeline .tl-title { font-weight: 600; font-size: 14px; }
.timeline .tl-time { font-size: 12px; color: var(--text-3); }
.timeline .tl-content { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* ============ 信息提示框 ============ */
.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.5;
  border: 1px solid transparent;
}
.alert-info {
  background: rgba(34, 211, 238, 0.1);
  color: #a5f3fc;
  border-color: rgba(34, 211, 238, 0.25);
}
.alert-warning {
  background: rgba(251, 191, 36, 0.1);
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.3);
}
.alert-danger {
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.3);
}
.alert-success {
  background: rgba(52, 211, 153, 0.1);
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.3);
}

/* ============ 登录页 ============ */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 28px 16px;
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, .12), transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(99, 102, 241, .1), transparent 30%),
    var(--bg);
}
.login-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}
.login-card {
  width: 100%;
  max-width: 420px;
  padding: 32px 28px;
  border-radius: 18px;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  z-index: 1;
}
.login-brand {
  text-align: center;
  margin-bottom: 24px;
}
.login-brand .logo-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #042f2e;
  background: linear-gradient(145deg, #22d3ee, #34d399);
  box-shadow: 0 0 28px rgba(34, 211, 238, .4), 0 8px 20px rgba(0,0,0,.35);
}
.login-brand h1 {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text);
}
.login-brand p {
  color: var(--text-3);
  font-size: 13px;
  margin-top: 6px;
}
.login-tabs {
  display: flex;
  gap: 4px;
  background: rgba(7, 11, 22, 0.6);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  box-shadow: none;
}
.login-tabs .tab {
  flex: 1;
  text-align: center;
  border-bottom: none !important;
  border-radius: 9px;
  padding: 10px 8px;
  margin: 0;
  background: transparent;
}
.login-tabs .tab.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(52, 211, 153, 0.12));
  color: var(--primary);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.15);
  border: 1px solid rgba(34, 211, 238, 0.25);
}

/* ============ 加载骨架 ============ */
.skeleton {
  background: linear-gradient(90deg, rgba(30,41,59,.8) 25%, rgba(51,65,85,.6) 50%, rgba(30,41,59,.8) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============ 页面底部 ============ */
.page-footer {
  margin-top: 28px;
  padding: 18px 0 8px;
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
  border-top: 1px dashed var(--border);
}

/* ============ 环境风险可视化看板 ============ */
.viz-kpi {
  grid-template-columns: repeat(4, 1fr);
}
.chart-card .chart-wrap {
  position: relative;
  height: 260px;
  width: 100%;
}
.chart-card .chart-wrap-lg { height: 320px; }
.chart-wrap-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  height: 260px;
}
.chart-half {
  position: relative;
  height: 100%;
  min-width: 0;
}
.insight-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.insight-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 13px;
  color: var(--text);
  border-left: 3px solid var(--primary);
  transition: transform .15s, box-shadow .15s;
  border: 1px solid var(--border);
  border-left-width: 3px;
}
.insight-item:hover {
  transform: translateX(2px);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.08);
}
.insight-item .insight-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  background: var(--primary);
  box-shadow: 0 0 6px rgba(34, 211, 238, 0.6);
}
.insight-danger {
  border-left-color: var(--danger);
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.15);
}
.insight-danger .insight-dot { background: var(--danger); box-shadow: 0 0 6px rgba(248, 113, 113, 0.6); }
.insight-warning {
  border-left-color: var(--warning);
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.15);
}
.insight-warning .insight-dot { background: var(--warning); box-shadow: 0 0 6px rgba(251, 191, 36, 0.5); }
.insight-success {
  border-left-color: var(--success);
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.15);
}
.insight-success .insight-dot { background: var(--success); box-shadow: 0 0 6px rgba(52, 211, 153, 0.5); }
.insight-info {
  border-left-color: var(--info);
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.15);
}
.insight-info .insight-dot { background: var(--info); box-shadow: 0 0 6px rgba(56, 189, 248, 0.5); }

/* ============ 工具类 ============ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-success { color: var(--success); }
.text-muted { color: var(--text-3); }
.text-sm { font-size: 12px; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.hidden { display: none !important; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(7, 11, 22, 0.5); }
::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.22);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 211, 238, 0.4);
}

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
  .viz-kpi { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .risk-colors { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .top-nav { padding: 0 12px; height: 58px; }
  .container, .container-lg, .container-sm { padding: 18px 14px 32px; }
  .hero { padding: 22px 20px; }
  .hero h1 { font-size: 20px; }
  .chart-wrap-split { grid-template-columns: 1fr; height: auto; }
  .chart-half { height: 220px; }

  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 12px;
    left: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(8, 12, 24, 0.96);
    border: 1px solid rgba(34, 211, 238, .2);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(34, 211, 238, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .nav-menu.open { display: flex; }
  .nav-link {
    width: 100%;
    justify-content: flex-start;
    border-radius: 10px;
    padding: 12px 14px;
  }
  .nav-link.active {
    background: linear-gradient(135deg, #22d3ee, #67e8f9);
    color: #041016 !important;
  }
}

@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-auto { grid-template-columns: 1fr; }
  .nav-brand .nav-title { max-width: 140px; }
  .page-header h1 { font-size: 19px; }
  .stat-value { font-size: 22px; }
  .modal-dialog { max-height: 95vh; border-radius: 14px; }
  .data-table th, .data-table td { padding: 9px 8px; font-size: 12px; }
  .hero-stats { gap: 8px; }
  .hero-stat { min-width: calc(50% - 4px); flex: 1; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .viz-kpi { grid-template-columns: 1fr 1fr; }
  .chart-card .chart-wrap,
  .chart-card .chart-wrap-lg { height: 240px; }
  .login-card { padding: 24px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
