/* ===========================
   扬尘监测系统 - 科技可视化大屏风格
   深蓝渐变底 + 霓虹亮色文字 + 发光卡片
   =========================== */

:root {
  /* 主色系 - 亮科技蓝 */
  --tech-blue: #00d4ff;
  --tech-blue-dark: #0099cc;
  --tech-blue-deep: #0066aa;
  --tech-cyan: #00f0ff;
  --tech-glow: rgba(0, 212, 255, 0.5);
  --tech-glow-soft: rgba(0, 212, 255, 0.15);

  /* 强调色 */
  --accent-green: #00ff9f;
  --accent-orange: #ffaa00;
  --accent-red: #ff4757;
  --accent-purple: #a855f7;

  /* 背景层 */
  --bg-base: #0b1628;
  --bg-gradient-1: #0d1f3c;
  --bg-gradient-2: #0a1525;
  --bg-card: rgba(16, 33, 65, 0.6);
  --bg-card-hover: rgba(20, 42, 80, 0.7);
  --bg-input: rgba(10, 25, 50, 0.5);
  --bg-sidebar: rgba(8, 18, 38, 0.95);

  /* 边框 */
  --border-glow: rgba(0, 212, 255, 0.25);
  --border-light: rgba(0, 212, 255, 0.12);

  /* 文字 - 高亮度确保可读 */
  --text-bright: #ffffff;
  --text-primary: #e8f4ff;
  --text-secondary: #8eb4d8;
  --text-muted: #5a7a9e;

  /* 布局 */
  --sidebar-width: 240px;
  --topbar-height: 56px;
  --shadow-blue: 0 0 20px rgba(0, 212, 255, 0.15);
  --shadow-blue-hover: 0 0 30px rgba(0, 212, 255, 0.25);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-base);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(0, 119, 182, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: var(--tech-blue);
  transition: color .2s;
}

a:hover {
  color: var(--tech-cyan);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-bright);
}

/* ===========================
   Bootstrap 覆盖 - 大屏风格
   =========================== */
.btn-primary {
  background: linear-gradient(135deg, var(--tech-blue-dark), var(--tech-blue));
  border: 1px solid rgba(0, 212, 255, 0.4);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 212, 255, 0.25);
  text-shadow: 0 0 6px rgba(0, 212, 255, 0.5);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--tech-blue), var(--tech-cyan));
  border-color: var(--tech-blue);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
}
.btn-success {
  background: linear-gradient(135deg, #00997a, var(--accent-green));
  border: 1px solid rgba(0, 255, 159, 0.3);
  color: #fff;
}
.btn-success:hover {
  background: linear-gradient(135deg, var(--accent-green), #00ffaa);
  box-shadow: 0 4px 16px rgba(0, 255, 159, 0.3);
}
.btn-warning {
  background: linear-gradient(135deg, #cc8800, var(--accent-orange));
  border: 1px solid rgba(255, 170, 0, 0.3);
  color: #fff;
}
.btn-danger {
  background: linear-gradient(135deg, #cc2a3a, var(--accent-red));
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: #fff;
}
.btn-outline-primary {
  color: var(--tech-blue);
  border-color: rgba(0, 212, 255, 0.4);
  background: rgba(0, 212, 255, 0.05);
}
.btn-outline-primary:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: var(--tech-blue);
  color: var(--tech-cyan);
}
.btn-outline-danger {
  color: var(--accent-red);
  border-color: rgba(255, 71, 87, 0.4);
  background: rgba(255, 71, 87, 0.05);
}
.btn-outline-danger:hover {
  background: rgba(255, 71, 87, 0.15);
  border-color: var(--accent-red);
  color: #ff6b7a;
}
.btn-outline-secondary {
  color: var(--text-secondary);
  border-color: rgba(142, 180, 216, 0.25);
  background: rgba(255, 255, 255, 0.03);
}
.btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(142, 180, 216, 0.4);
  color: var(--text-primary);
}
.btn-outline-warning {
  color: var(--accent-orange);
  border-color: rgba(255, 170, 0, 0.4);
  background: rgba(255, 170, 0, 0.05);
}

/* ===========================
   日期选择框 - 日历图标全局样式
   =========================== */
input[type="date"],
input[type="datetime-local"],
input[type="time"] {
  color-scheme: dark;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.8) sepia(0.3) hue-rotate(140deg);
  cursor: pointer;
  opacity: 1;
  width: 18px;
  height: 18px;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
  filter: invert(1) brightness(2.2) sepia(0.5) hue-rotate(140deg);
}
.btn-outline-warning:hover {
  background: rgba(255, 170, 0, 0.15);
  border-color: var(--accent-orange);
  color: #ffbb33;
}
.btn-outline-info {
  color: var(--tech-blue);
  border-color: rgba(0, 212, 255, 0.4);
  background: rgba(0, 212, 255, 0.05);
}
.btn-outline-info:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: var(--tech-blue);
  color: var(--tech-cyan);
}
.btn-outline-success {
  color: var(--accent-green);
  border-color: rgba(0, 255, 159, 0.4);
  background: rgba(0, 255, 159, 0.05);
}
.btn-outline-success:hover {
  background: rgba(0, 255, 159, 0.15);
  border-color: var(--accent-green);
  color: #00ffaa;
}

/* 卡片 - 半透明发光 */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 10px;
  box-shadow: var(--shadow-card), inset 0 0 20px rgba(0, 212, 255, 0.03);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}
.card-header {
  background: rgba(0, 212, 255, 0.06);
  border-bottom: 1px solid var(--border-glow);
  color: var(--tech-blue);
  font-weight: 600;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}
.card-body {
  color: var(--text-primary);
}

/* 表单控件 */
.form-control, .form-select {
  background: var(--bg-input);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--text-primary);
}
.form-control:focus, .form-select:focus {
  background: rgba(10, 25, 50, 0.7);
  border-color: var(--tech-blue);
  box-shadow: 0 0 0 .2rem rgba(0, 212, 255, 0.15);
  color: var(--text-bright);
}
.form-control::placeholder {
  color: var(--text-muted);
}
.form-label {
  color: var(--text-secondary);
  font-weight: 500;
}
.form-select option {
  background: #0d1f3c;
  color: var(--text-primary);
}
.input-group-text {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--tech-blue);
}

/* 表格 - 强制覆盖 Bootstrap 表格 CSS 变量 */
.table {
  --bs-table-color: #e8f4ff;
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(0, 212, 255, 0.45);
  --bs-table-accent-bg: transparent;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
  --bs-table-striped-color: #e8f4ff;
  --bs-table-active-bg: rgba(0, 212, 255, 0.08);
  --bs-table-active-color: #e8f4ff;
  --bs-table-hover-bg: rgba(0, 212, 255, 0.06);
  --bs-table-hover-color: #00d4ff;
  color: #e8f4ff;
  border-color: rgba(0, 212, 255, 0.45);
}
.table > :not(caption) > * > * {
  background-color: transparent;
  color: #e8f4ff;
  border-color: rgba(0, 212, 255, 0.45);
}
.table td {
  color: #e8f4ff;
  border-color: rgba(0, 212, 255, 0.45);
}
.table th {
  color: #e8f4ff;
  border-color: rgba(0, 212, 255, 0.5);
}
.table-light {
  background: rgba(0, 212, 255, 0.1) !important;
  color: #00d4ff !important;
  font-weight: 600;
  text-shadow: 0 0 6px rgba(0, 212, 255, 0.2);
}
.table-light th {
  color: #00d4ff !important;
  border-color: rgba(0, 212, 255, 0.25) !important;
}
.table-hover > tbody > tr:hover > * {
  background-color: rgba(0, 212, 255, 0.06);
  color: #00d4ff;
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(255, 255, 255, 0.02);
  color: #e8f4ff;
}
.table-bordered {
  border-color: rgba(0, 212, 255, 0.45);
}
.table-bordered td, .table-bordered th {
  border-color: rgba(0, 212, 255, 0.45);
}
/* 表格容器：支持垂直滚动固定表头 */
.table-responsive {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 320px);
  min-height: 300px;
  -webkit-overflow-scrolling: touch;
}
/* 所有表格单元格显示完整网格线（不依赖 table-bordered） */
.table thead th {
  border-bottom: 1px solid rgba(0, 212, 255, 0.6);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 31, 60, 0.98);
  backdrop-filter: blur(4px);
}
.table td {
  border-top: 1px solid rgba(0, 212, 255, 0.35);
  border-bottom: 1px solid rgba(0, 212, 255, 0.25);
}
/* 表格单元格文本截断 */
.table .cell-truncate {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  cursor: help;
}
/* 表格内所有元素强制继承亮色 */
.table td span,
.table td small,
.table td div,
.table td a,
.table td p,
.table th span,
.table th small,
.table th div {
  color: #e8f4ff;
}
.table td a {
  color: #00d4ff;
}
.table td a:hover {
  color: #00f0ff;
}
/* 表格内 text-dark 等覆盖 */
.table .text-dark { color: #e8f4ff !important; }
.table .text-muted { color: #8eb4d8 !important; }

/* 覆盖 Bootstrap 浅色类 */
.bg-white {
  background-color: var(--bg-card) !important;
  color: var(--text-primary);
}
.bg-light {
  background-color: rgba(255, 255, 255, 0.03) !important;
  color: var(--text-primary);
}
.card-header.bg-white {
  background-color: rgba(0, 212, 255, 0.06) !important;
  color: var(--tech-blue);
  border-bottom: 1px solid var(--border-glow);
}
.text-dark { color: var(--text-primary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-primary { color: var(--tech-blue) !important; }
.text-success { color: var(--accent-green) !important; }
.text-danger { color: var(--accent-red) !important; }
.text-warning { color: var(--accent-orange) !important; }
.text-info { color: var(--tech-blue) !important; }
.text-light { color: var(--text-secondary) !important; }
.text-white { color: var(--text-bright) !important; }
.border { border: 1px solid var(--border-light) !important; }
.border-bottom { border-bottom: 1px solid var(--border-light) !important; }
.border-top { border-top: 1px solid var(--border-light) !important; }
.shadow-sm { box-shadow: var(--shadow-card) !important; }

/* 分页 */
.pagination .page-link {
  background: var(--bg-input);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--tech-blue);
}
.pagination .page-link:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--tech-blue);
  color: var(--tech-cyan);
}
.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, var(--tech-blue-dark), var(--tech-blue));
  border-color: var(--tech-blue);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 212, 255, 0.35);
}
.pagination .page-item.disabled .page-link {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  border-color: var(--border-light);
}

/* 徽章 */
.badge.bg-danger {
  background: linear-gradient(135deg, var(--accent-red), #cc2a3a) !important;
  box-shadow: 0 0 8px rgba(255, 71, 87, 0.3);
}
.badge.bg-warning {
  background: linear-gradient(135deg, var(--accent-orange), #cc8800) !important;
  color: #fff !important;
  box-shadow: 0 0 8px rgba(255, 170, 0, 0.3);
}
.badge.bg-info {
  background: linear-gradient(135deg, var(--tech-blue), var(--tech-blue-dark)) !important;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}
.badge.bg-primary {
  background: linear-gradient(135deg, var(--tech-blue), var(--tech-blue-dark)) !important;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}
.badge.bg-secondary {
  background: rgba(142, 180, 216, 0.2) !important;
  color: var(--text-secondary) !important;
}
.badge.bg-success {
  background: linear-gradient(135deg, var(--accent-green), #00997a) !important;
  box-shadow: 0 0 8px rgba(0, 255, 159, 0.3);
}

/* 导航药丸 */
.nav-pills .nav-link {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
}
.nav-pills .nav-link.active {
  background: linear-gradient(135deg, var(--tech-blue-dark), var(--tech-blue));
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 212, 255, 0.3);
  text-shadow: 0 0 6px rgba(0, 212, 255, 0.5);
}

/* Modal */
.modal-content {
  background: #0d1f3c;
  border: 1px solid var(--border-glow);
  color: var(--text-primary);
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 212, 255, 0.1);
}
.modal-header {
  background: rgba(0, 212, 255, 0.06);
  border-bottom: 1px solid var(--border-glow);
}
.modal-header .modal-title {
  color: var(--tech-blue);
  font-weight: 600;
}
.modal-footer {
  border-top: 1px solid var(--border-glow);
}
.modal-backdrop.show {
  opacity: 0.7;
}

/* 下拉菜单 */
.dropdown-menu {
  background: #0d1f3c;
  border: 1px solid var(--border-glow);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.dropdown-item {
  color: var(--text-primary);
}
.dropdown-item:hover {
  background: rgba(0, 212, 255, 0.1);
  color: var(--tech-cyan);
}

/* alert */
.alert {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  color: var(--text-primary);
}
.alert-info {
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.2);
  color: var(--tech-blue);
}

/* ===========================
   登录页
   =========================== */
.login-page {
  background: var(--bg-base);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(0, 119, 182, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 212, 255, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 15px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: rgba(13, 31, 60, 0.85);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 212, 255, 0.1);
  padding: 40px 30px;
  backdrop-filter: blur(20px);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--tech-blue), var(--tech-blue-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.35), 0 0 20px rgba(0, 212, 255, 0.2);
}

.login-header h2 {
  font-size: 22px;
  color: var(--tech-blue);
  margin-bottom: 6px;
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

.login-header p {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.login-form .form-group {
  margin-bottom: 18px;
}

.login-form .input-group-text {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-right: none;
  color: var(--tech-blue);
}

.login-form .form-control {
  background: rgba(10, 25, 50, 0.5);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-left: none;
  color: var(--text-bright);
  padding: 12px;
}

.login-form .form-control:focus {
  box-shadow: none;
  border-color: var(--tech-blue);
  background: rgba(10, 25, 50, 0.7);
}

.login-form .form-control::placeholder {
  color: var(--text-muted);
}

.login-btn {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid rgba(0, 212, 255, 0.4);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--tech-blue-dark), var(--tech-blue));
  color: #fff;
  transition: all .2s;
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.3);
  text-shadow: 0 0 6px rgba(0, 212, 255, 0.5);
}

.login-btn:hover {
  box-shadow: 0 6px 28px rgba(0, 212, 255, 0.45);
  transform: translateY(-1px);
}

.register-link {
  font-size: 13px;
  color: var(--text-muted);
}
.register-link a {
  color: var(--tech-blue);
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===========================
   主框架布局
   =========================== */
.main-page {
  overflow: hidden;
}

/* 侧边栏 */
.sidebar-nav {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  background-image: linear-gradient(180deg, rgba(0, 212, 255, 0.04) 0%, transparent 30%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease;
  border-right: 1px solid var(--border-glow);
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.sidebar-header {
  padding: 16px 20px;
  background: rgba(0, 212, 255, 0.06);
  border-bottom: 1px solid var(--border-glow);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--tech-blue);
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.logo-link i {
  font-size: 24px;
  color: var(--tech-blue);
  filter: drop-shadow(0 0 4px rgba(0, 212, 255, 0.5));
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
}

.sidebar-user {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(0, 212, 255, 0.03);
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--tech-blue), var(--tech-blue-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  box-shadow: 0 2px 12px rgba(0, 212, 255, 0.3);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  color: var(--text-bright);
  font-size: 14px;
  font-weight: 600;
}

.user-role {
  color: var(--tech-blue);
  font-size: 12px;
}

.sidebar-menu {
  list-style: none;
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.sidebar-menu::-webkit-scrollbar {
  width: 4px;
}

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

.menu-section {
  padding: 12px 20px 4px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  transition: all .2s;
  position: relative;
}

.sidebar-menu li a:hover {
  background: rgba(0, 212, 255, 0.08);
  color: var(--tech-cyan);
  padding-left: 24px;
}

.sidebar-menu li a:hover i {
  color: var(--tech-cyan);
}

.sidebar-menu li a.active {
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.15), transparent);
  color: var(--tech-blue);
  border-left: 3px solid var(--tech-blue);
  font-weight: 600;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

.sidebar-menu li a i {
  width: 20px;
  text-align: center;
  color: rgba(0, 212, 255, 0.5);
  transition: color .2s;
}

.sidebar-menu li a.active i {
  color: var(--tech-blue);
  filter: drop-shadow(0 0 3px rgba(0, 212, 255, 0.4));
}

.sidebar-menu li a .badge {
  margin-left: auto;
  font-size: 11px;
}

.sidebar-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
}

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 13px;
  transition: all .2s;
  background: transparent;
}

.btn-logout:hover {
  background: rgba(255, 71, 87, 0.1);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* 主内容区 */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: margin .3s ease;
}

/* 顶部导航 */
.top-navbar {
  height: var(--topbar-height);
  background: rgba(13, 31, 60, 0.8);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.btn-toggle-sidebar {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--tech-blue);
  cursor: pointer;
}

.navbar-title {
  font-size: 14px;
  color: var(--text-bright);
  font-weight: 600;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.2);
}

.navbar-right {
  margin-left: auto;
}

.btn-logout-top {
  color: var(--text-secondary);
  font-size: 18px;
  padding: 8px;
}

.btn-logout-top:hover {
  color: var(--accent-red);
}

.content-wrapper {
  padding: 20px;
}

/* 遮罩 */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

/* PC端遮罩始终隐藏 */
@media (min-width: 769px) {
  .sidebar-overlay {
    display: none !important;
  }
}

/* ===========================
   统计卡片
   =========================== */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card), inset 0 0 20px rgba(0, 212, 255, 0.03);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  backdrop-filter: blur(10px);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-blue-hover), inset 0 0 20px rgba(0, 212, 255, 0.05);
  border-color: rgba(0, 212, 255, 0.4);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
}

.stat-card-blue .stat-icon {
  background: linear-gradient(135deg, var(--tech-blue), var(--tech-blue-dark));
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.3), 0 0 20px rgba(0, 212, 255, 0.15);
}
.stat-card-red .stat-icon {
  background: linear-gradient(135deg, var(--accent-red), #cc2a3a);
  box-shadow: 0 4px 16px rgba(255, 71, 87, 0.3);
}
.stat-card-green .stat-icon {
  background: linear-gradient(135deg, var(--accent-green), #00997a);
  box-shadow: 0 4px 16px rgba(0, 255, 159, 0.3);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--tech-blue);
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===========================
   快捷操作卡片
   =========================== */
.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  transition: all .2s;
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
}

.quick-action-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-blue-hover);
  border-color: rgba(0, 212, 255, 0.4);
  color: var(--tech-cyan);
}

.quick-action-card i {
  font-size: 32px;
  color: var(--tech-blue);
  filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.4));
}

.quick-action-card:hover i {
  color: var(--tech-cyan);
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.5));
}

.quick-action-card span {
  font-size: 14px;
}

/* ===========================
   通用页面卡片
   =========================== */
.page-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.page-card-header {
  padding: 16px 20px;
  background: rgba(0, 212, 255, 0.06);
  border-bottom: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-card-header h5 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--tech-blue);
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.2);
}

.page-card-body {
  padding: 20px;
}

/* 搜索栏 */
.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.search-bar .form-control,
.search-bar .form-select {
  width: auto;
  min-width: 140px;
}

.search-bar .btn {
  white-space: nowrap;
}

/* 数据表格 */
.table-container {
  overflow-x: auto;
}

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

.data-table th {
  background: rgba(0, 212, 255, 0.08);
  padding: 12px 8px;
  text-align: center;
  font-weight: 600;
  color: var(--tech-blue);
  border-bottom: 2px solid rgba(0, 212, 255, 0.15);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  color: var(--text-primary);
}

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

/* 在线状态 */
.status-online {
  color: var(--accent-green);
  font-size: 20px;
  filter: drop-shadow(0 0 4px rgba(0, 255, 159, 0.4));
}
.status-offline {
  color: var(--accent-red);
  font-size: 20px;
}

/* 分页 */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  flex-wrap: wrap;
  gap: 10px;
}

.pagination-info {
  font-size: 13px;
  color: var(--text-secondary);
}

.pagination-controls {
  display: flex;
  gap: 4px;
}

.pagination-controls button {
  padding: 6px 12px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  background: var(--bg-input);
  color: var(--tech-blue);
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
}

.pagination-controls button:hover:not(:disabled) {
  background: rgba(0, 212, 255, 0.15);
  color: var(--tech-cyan);
  border-color: var(--tech-blue);
}

.pagination-controls button:disabled {
  opacity: .3;
  cursor: not-allowed;
}

/* 操作按钮 */
.btn-action {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  margin: 0 2px;
}

/* 地图容器 */
.map-container {
  width: 100%;
  height: calc(100vh - var(--topbar-height) - 80px);
  min-height: 400px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-glow);
}

/* 图表容器 */
.chart-container {
  width: 100%;
  min-height: 400px;
}

/* 终端样式 */
.terminal {
  background: #0a1525;
  color: var(--tech-blue);
  font-family: "Courier New", monospace;
  font-size: 13px;
  padding: 16px;
  border-radius: 8px;
  height: 500px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid var(--border-glow);
}

.terminal::-webkit-scrollbar {
  width: 6px;
}

.terminal::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.2);
  border-radius: 3px;
}

/* ===========================
   移动端适配 - 完整响应式
   =========================== */
@media (max-width: 768px) {
  /* 侧边栏 - 抽屉式 */
  .sidebar-nav {
    transform: translateX(-100%);
    width: 280px;
    z-index: 1100;
  }
  .sidebar-nav.show {
    transform: translateX(0);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.4);
  }
  .sidebar-toggle {
    display: block;
  }

  /* 主内容区全宽 */
  .main-content {
    margin-left: 0;
  }

  /* 手机端允许页面滚动（主页地图等内容需要上下滚动） */
  .main-page {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 顶栏 */
  .btn-toggle-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  .top-navbar {
    padding: 0 10px;
    gap: 8px;
  }
  .navbar-title {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
  }

  /* 内容区域内边距 */
  .content-wrapper {
    padding: 10px;
  }

  /* 统计卡片 */
  .stat-card {
    padding: 12px;
    gap: 10px;
  }
  .stat-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
    border-radius: 10px;
  }
  .stat-value {
    font-size: 22px;
  }
  .stat-label {
    font-size: 12px;
  }

  /* 快捷操作卡片 */
  .quick-action-card {
    padding: 14px 8px;
    gap: 8px;
  }
  .quick-action-card i {
    font-size: 24px;
  }
  .quick-action-card span {
    font-size: 12px;
  }

  /* 页面卡片 */
  .page-card {
    margin-bottom: 12px;
    border-radius: 8px;
  }
  .page-card-header {
    padding: 10px 12px;
  }
  .page-card-header h5 {
    font-size: 14px;
  }
  .page-card-body {
    padding: 10px;
  }

  /* 搜索栏 - 垂直排列 */
  .search-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .search-bar .form-control,
  .search-bar .form-select {
    width: 100%;
    min-width: 0;
  }
  .search-bar .btn {
    width: 100%;
  }
  .search-bar > div,
  .search-bar > .col-auto {
    width: 100%;
  }

  /* Bootstrap row 间距缩小 */
  .row.g-3 {
    --bs-gutter-y: 0.5rem;
    --bs-gutter-x: 0.5rem;
  }

  /* 表格 - 横向滚动 + 垂直滚动固定表头 */
  .table-responsive {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 380px);
    min-height: 250px;
    -webkit-overflow-scrolling: touch;
  }
  .table {
    font-size: 13px;
    min-width: 600px;
  }
  .table th,
  .table td {
    padding: 8px 6px;
    white-space: nowrap;
  }
  .data-table {
    font-size: 12px;
  }
  .data-table th,
  .data-table td {
    padding: 8px 4px;
  }

  /* 分页 */
  .pagination-container {
    justify-content: center;
    flex-direction: column;
    gap: 8px;
  }
  .pagination-info {
    font-size: 12px;
    text-align: center;
  }
  .pagination-controls {
    flex-wrap: wrap;
    justify-content: center;
  }
  .pagination-controls button {
    padding: 4px 8px;
    font-size: 12px;
  }

  /* 图表容器 */
  .chart-container {
    min-height: 280px;
  }
  #mainChart, #compareChart {
    height: 320px !important;
  }
  #lineChart {
    height: 400px !important;
  }
  #trendChart {
    height: 260px !important;
  }

  /* 仪表盘 - 2列布局 */
  #gaugeRow > .col-sm-4 {
    width: 50%;
  }
  #gaugeRow > .col-sm-4 > .card > .card-body > div {
    height: 160px !important;
  }

  /* 卡片 */
  .card {
    margin-bottom: 12px;
    border-radius: 8px;
  }
  .card-header {
    padding: 10px 12px;
    font-size: 14px;
  }
  .card-body {
    padding: 10px;
  }

  /* Modal 全屏化 */
  .modal-dialog {
    margin: 8px;
  }
  .modal-content {
    max-height: calc(100vh - 16px);
    overflow-y: auto;
  }
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 12px;
  }

  /* 表单 */
  .form-control,
  .form-select {
    font-size: 14px;
  }
  .form-label {
    font-size: 13px;
    margin-bottom: 4px;
  }
  .btn {
    font-size: 14px;
  }
  .btn-sm {
    font-size: 12px;
    padding: 4px 8px;
  }
  .btn-group {
    flex-wrap: wrap;
    gap: 2px;
  }
  .btn-group .btn {
    border-radius: 4px !important;
  }

  /* 指标复选框 */
  .metric-checkbox {
    font-size: 12px;
    padding: 3px 8px;
  }

  /* 图表类型按钮 */
  .chart-type-btn {
    font-size: 12px;
    padding: 4px 8px;
  }

  /* 导航药丸 */
  .nav-pills .nav-link {
    font-size: 13px;
    padding: 6px 12px;
  }
  .nav-pills {
    flex-wrap: wrap;
    gap: 4px;
  }

  /* Tab */
  .nav-tabs .nav-link {
    font-size: 13px;
    padding: 6px 10px;
  }

  /* 地图容器 */
  .map-container {
    height: calc(100vh - 120px);
    min-height: 300px;
    border-radius: 8px;
  }

  /* 终端 */
  .terminal {
    height: 350px;
    font-size: 12px;
    padding: 10px;
  }

  /* 终端页面容器 */
  .terminal-container {
    height: calc(100vh - 140px);
    min-height: 300px;
  }

  /* layer 弹窗适配 */
  .layui-layer {
    max-width: calc(100vw - 20px) !important;
  }
  .layui-layer-content {
    max-height: 60vh !important;
    overflow-y: auto;
  }

  /* form-check-inline 换行 */
  .form-check-inline {
    margin-bottom: 4px;
  }

  /* flex-wrap 按钮组 */
  .d-flex.flex-wrap {
    gap: 8px;
  }

  /* 设备管理批量操作栏 */
  .d-flex.justify-content-between {
    flex-direction: column;
    align-items: stretch !important;
    gap: 8px;
  }

  /* 下拉菜单全宽 */
  .dropdown-menu {
    min-width: 200px;
  }

  /* Bootstrap col-auto 在搜索栏中变为全宽 */
  .row .col-auto {
    width: 100%;
    max-width: 100%;
  }

  /* 搜索栏 row 内的列垂直排列 */
  .row.g-2 > .col-12,
  .row.g-2 > .col-md-2,
  .row.g-2 > .col-md-3,
  .row.g-2 > .col-md-4,
  .row.g-2 > .col-md-6 {
    width: 100%;
    max-width: 100%;
  }

  /* 日期输入框 */
  input[type="date"],
  input[type="datetime-local"],
  input[type="time"] {
    min-height: 38px;
    -webkit-appearance: none;
    appearance: none;
    color-scheme: dark;
  }

  /* 日期选择器日历图标 - 深色背景下反色显示 */
  input[type="date"]::-webkit-calendar-picker-indicator,
  input[type="datetime-local"]::-webkit-calendar-picker-indicator,
  input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.5);
    cursor: pointer;
    opacity: 0.85;
  }

  /* select 和 input 在手机上去除 min-width 限制 */
  .form-control,
  .form-select {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 首页统计卡片改为2列 */
  .row .col-md-3:not(.col-12) {
    width: 50%;
  }

  /* 快捷操作改为2列 */
  .row .col-md-2:not(.col-12) {
    width: 50%;
  }

  /* 搜索栏中 select[id^="sel"] 去除 min-width */
  select[id^="sel"] {
    min-width: 0 !important;
  }

  /* 批量操作按钮栏 */
  .batch-actions {
    flex-direction: column;
    gap: 6px;
  }
  .batch-actions .btn {
    width: 100%;
  }

  /* 表格操作列不换行 */
  .table td:last-child,
  .table th:last-child {
    white-space: nowrap;
  }

  /* layer 弹窗内表单全宽 */
  .layui-layer-content form .row > [class*="col-"] {
    width: 100%;
    max-width: 100%;
  }

  /* 侧边栏菜单字号 */
  .sidebar-menu li a {
    padding: 10px 16px;
    font-size: 14px;
  }
  .sidebar-menu .menu-section span {
    font-size: 11px;
    padding: 6px 16px 4px;
  }

  /* 侧边栏用户信息 */
  .sidebar-user {
    padding: 10px 14px;
  }
  .user-avatar {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  .user-name {
    font-size: 13px;
  }
  .user-role {
    font-size: 11px;
  }

  /* page-card h5 标题 */
  .page-card > h5,
  .page-card .page-card-header h5 {
    font-size: 15px;
  }

  /* 内联 flex 布局改为 stack */
  .d-flex.align-items-center.just-content-between {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px;
  }

  /* badge 在手机端不要太小 */
  .badge {
    font-size: 11px;
    padding: 3px 6px;
  }

  /* hidden-xs 在手机端隐藏 */
  .hidden-xs,
  .d-none.d-md-table-cell {
    display: none !important;
  }

  /* 侧边栏 logo */
  .sidebar-header {
    padding: 12px 14px;
  }
  .logo-text {
    font-size: 16px;
  }
}

/* 小屏手机 <= 576px */
@media (max-width: 576px) {
  /* 登录页 */
  .login-card {
    padding: 24px 16px;
    border-radius: 12px;
  }
  .login-header h2 {
    font-size: 18px;
  }
  .login-icon {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  /* 快捷操作 - 固定2列 */
  .quick-action-card {
    padding: 12px 6px;
  }
  .quick-action-card i {
    font-size: 22px;
  }
  .quick-action-card span {
    font-size: 11px;
  }

  /* 统计卡片紧凑 */
  .stat-card {
    padding: 10px;
  }
  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  .stat-value {
    font-size: 20px;
  }

  /* 顶栏标题缩短 */
  .navbar-title {
    font-size: 12px;
  }

  /* 表格更小 */
  .table {
    font-size: 12px;
  }
  .table th,
  .table td {
    padding: 6px 4px;
  }

  /* 仪表盘更小 */
  #gaugeRow > .col-sm-4 > .card > .card-body > div {
    height: 140px !important;
  }

  /* 图表更小 */
  #mainChart, #compareChart {
    height: 280px !important;
  }
  #lineChart {
    height: 320px !important;
  }
  #trendChart {
    height: 220px !important;
  }

  /* 首页统计卡片单列 */
  .row .col-md-3:not(.col-12) {
    width: 100%;
  }

  /* 快捷操作2列保留但更紧凑 */
  .row .col-md-2:not(.col-12) {
    width: 50%;
  }

  /* 搜索栏 label 和 input 紧凑 */
  .form-label {
    font-size: 12px;
    margin-bottom: 2px;
  }

  /* 分页按钮更小 */
  .pagination-controls button {
    padding: 3px 6px;
    font-size: 11px;
  }

  /* sidebar 宽度收窄 */
  .sidebar-nav {
    width: 250px;
  }

  /* content-wrapper 内边距进一步缩小 */
  .content-wrapper {
    padding: 8px;
  }

  /* 主页地图高度缩小，避免占满屏幕 */
  #homeMapContainer {
    height: 300px !important;
  }

  /* page-card 内边距缩小 */
  .page-card {
    padding: 10px;
  }

  /* 顶栏高度减小 */
  .top-navbar {
    height: 48px;
  }
  .btn-toggle-sidebar {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
}

/* 超小屏 <= 375px */
@media (max-width: 375px) {
  .navbar-title {
    font-size: 11px;
  }
  .stat-value {
    font-size: 18px;
  }
  .quick-action-card span {
    font-size: 10px;
  }
}

/* 加载动画 */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 212, 255, 0.15);
  border-top: 2px solid var(--tech-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  color: rgba(0, 212, 255, 0.2);
}

.empty-state p {
  font-size: 14px;
}

/* Tab样式 */
.nav-tabs .nav-link {
  color: var(--text-secondary);
  font-size: 14px;
  border: none;
  padding: 8px 16px;
}

.nav-tabs .nav-link.active {
  color: var(--tech-blue);
  border-bottom: 2px solid var(--tech-blue);
  background: none;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.2);
}

.nav-tabs {
  border-bottom: 1px solid var(--border-light);
}

/* 图表类型切换按钮 */
.chart-type-btn {
  padding: 6px 12px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  background: var(--bg-input);
  color: var(--tech-blue);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
}

.chart-type-btn.active {
  background: linear-gradient(135deg, var(--tech-blue-dark), var(--tech-blue));
  color: #fff;
  border-color: var(--tech-blue);
  box-shadow: 0 2px 12px rgba(0, 212, 255, 0.25);
}

/* 指标复选框 */
.metric-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  color: var(--text-secondary);
  background: var(--bg-input);
  transition: all .2s;
}

.metric-checkbox input {
  margin: 0;
}

.metric-checkbox.checked {
  background: rgba(0, 212, 255, 0.1);
  color: var(--tech-cyan);
  border-color: var(--tech-blue);
}

/* ===========================
   文本颜色辅助类
   =========================== */
.text-center { text-align: center; }

hr {
  border-color: var(--border-light);
  opacity: 0.5;
}

/* 搜索结果项（地图弹窗） */
.search-result-item:hover {
  background: rgba(0, 212, 255, 0.08) !important;
}

/* layer 弹窗适配 */
.layui-layer-title {
  background: rgba(0, 212, 255, 0.08) !important;
  color: var(--tech-blue) !important;
  border-bottom: 1px solid var(--border-glow) !important;
}
.layui-layer-content {
  background: #0d1f3c !important;
  color: var(--text-primary) !important;
}
.layui-layer-btn a {
  background: linear-gradient(135deg, var(--tech-blue-dark), var(--tech-blue)) !important;
  border-color: var(--tech-blue) !important;
  color: #fff !important;
}
.layui-layer-btn .layui-layer-btn1 {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--border-light) !important;
  color: var(--text-secondary) !important;
}
.layui-layer-loading {
  background: transparent !important;
}

/* 移动端设备卡片 */
.mobile-page {
  min-height: 100vh;
  background: var(--bg-base);
}
.mobile-navbar {
  background: rgba(13, 31, 60, 0.9);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-glow);
}
.mobile-navbar .mobile-title {
  color: var(--tech-blue);
  font-weight: 600;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.2);
}
.mobile-navbar .mobile-back, .mobile-navbar .mobile-action {
  color: var(--tech-blue);
}
.list-group-item {
  --bs-list-group-color: #e8f4ff;
  --bs-list-group-bg: var(--bg-card);
  --bs-list-group-border-color: rgba(0, 212, 255, 0.12);
  background: var(--bg-card);
  border: 1px solid rgba(0, 212, 255, 0.12);
  color: #e8f4ff;
}
.list-group-item:hover {
  background: rgba(0, 212, 255, 0.06);
  color: var(--tech-cyan);
}

/* form-check */
.form-check-input {
  background-color: var(--bg-input);
  border-color: rgba(0, 212, 255, 0.3);
}
.form-check-input:checked {
  background-color: var(--tech-blue);
  border-color: var(--tech-blue);
}
.form-check-label {
  color: var(--text-secondary);
}

/* ===========================
   主页地图
   =========================== */
#homeMapContainer {
  background: var(--bg-card);
}
#homeMapContainer .amap-logo,
#homeMapContainer .amap-copyright {
  display: none !important;
}
/* 手机端地图高度自适应 */
@media (max-width: 768px) {
  #homeMapContainer {
    height: 300px !important;
  }
}

/* ===========================
   协议模板搜索下拉组件
   =========================== */
.protocol-search-select {
  position: relative;
  z-index: 100;
}
.protocol-search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: #e8f4ff;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.875rem;
}
.protocol-search-input:focus {
  outline: none;
  border-color: var(--tech-cyan);
  box-shadow: 0 0 0 0.2rem rgba(0, 212, 255, 0.15);
}
.protocol-search-input::placeholder {
  color: #5a7a9e;
}
.protocol-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10000;
  background: rgba(13, 31, 60, 0.98);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 0 0 0.375rem 0.375rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  max-height: 300px;
  overflow: hidden;
}
.protocol-dropdown-search {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
}
.protocol-dropdown-search input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: #e8f4ff;
  padding: 0.3rem 0.6rem;
  border-radius: 0.25rem;
  font-size: 0.85rem;
}
.protocol-dropdown-search input:focus {
  outline: none;
  border-color: var(--tech-cyan);
}
.protocol-dropdown-list {
  max-height: 230px;
  overflow-y: auto;
}
.protocol-dropdown-item {
  padding: 8px 12px;
  cursor: pointer;
  color: #c0d8ec;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(0, 212, 255, 0.06);
  transition: background 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.protocol-dropdown-item:hover,
.protocol-dropdown-item.active {
  background: rgba(0, 212, 255, 0.12);
  color: var(--tech-cyan);
}
.protocol-dropdown-empty {
  padding: 16px;
  text-align: center;
  color: #5a7a9e;
  font-size: 0.85rem;
}
/* 滚动条样式 */
.protocol-dropdown-list::-webkit-scrollbar {
  width: 6px;
}
.protocol-dropdown-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.protocol-dropdown-list::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
  border-radius: 3px;
}
.protocol-dropdown-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.5);
}
/* 手机端下拉面板加宽 */
@media (max-width: 768px) {
  .protocol-dropdown {
    max-height: 260px;
  }
  .protocol-dropdown-list {
    max-height: 200px;
  }
}

/* ===========================
   导出弹窗组件
   =========================== */
.export-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.export-modal-box {
  background: rgba(13, 31, 60, 0.98);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  width: 90%;
  max-width: 460px;
  overflow: hidden;
}
.export-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(0, 212, 255, 0.08);
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
  color: #e8f4ff;
  font-weight: 600;
  font-size: 1rem;
}
.export-modal-header .export-modal-close {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.export-modal-header .export-modal-close:hover {
  opacity: 1;
}
.export-modal-body {
  padding: 20px;
}
.export-format-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.export-format-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 8px;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  color: #c0d8ec;
}
.export-format-item:hover {
  background: rgba(0, 212, 255, 0.12);
  border-color: rgba(0, 212, 255, 0.4);
}
.export-format-item input[type="radio"] {
  display: none;
}
.export-format-item input[type="radio"]:checked + span {
  color: var(--tech-cyan);
  font-weight: 600;
}
.export-format-item:has(input[type="radio"]:checked) {
  background: rgba(0, 212, 255, 0.15);
  border-color: var(--tech-cyan);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.2);
}
.export-format-item span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.export-modal-info {
  margin-top: 16px;
  padding: 10px 12px;
  background: rgba(0, 212, 255, 0.05);
  border-radius: 6px;
  color: #8eb4d8;
  font-size: 0.8rem;
}
.export-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid rgba(0, 212, 255, 0.15);
}
/* 手机端导出弹窗 */
@media (max-width: 576px) {
  .export-format-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .export-modal-box {
    width: 95%;
  }
}
/* 导出按钮统一样式 */
.btn-export {
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--tech-cyan);
}
.btn-export:hover {
  background: rgba(0, 212, 255, 0.2);
  color: #fff;
}

/* 用户设备数链接 */
.device-count-link {
  color: var(--tech-cyan, #00d4ff);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}
.device-count-link:hover {
  text-decoration: underline;
  color: #fff;
}
