/* 保山机场场务驱鸟班组智慧管理系统 · 民航科技风样式 */
:root {
  /* 夜空底色 */
  --bg-0: #05070f;
  --bg-1: #0a0f22;
  --bg-2: #0f1730;
  /* 玻璃表面 */
  --glass: rgba(15, 23, 48, 0.55);
  --card: rgba(17, 27, 56, 0.66);
  --card-border: rgba(110, 150, 255, 0.16);
  /* 主色：驾驶舱蓝 */
  --primary: #3b82f6;
  --primary-2: #2f6bff;
  --primary-glow: rgba(59, 130, 246, 0.45);
  /* 航管青（雷达 / 观测） */
  --cyan: #22d3ee;
  --cyan-glow: rgba(34, 211, 238, 0.40);
  /* 雷达绿（统计 / 鸟情） */
  --green: #34d399;
  /* 品牌红金（呼应 Logo） */
  --gold: #e3b341;
  --red: #e23b4e;
  /* 文本 */
  --text: #e9eefb;
  --muted: #8b97b6;
  --radius: 16px;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg-0);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.2px;
}

/* ============ 背景装饰层 ============ */
.bg-grid {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(47, 107, 255, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 82% 82%, rgba(226, 59, 78, 0.10) 0%, transparent 42%),
    linear-gradient(135deg, #05070f 0%, #0a0f22 50%, #070b1a 100%);
  z-index: -3;
}
.bg-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(110, 150, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 150, 255, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 82%);
  mask-image: radial-gradient(circle at center, black 0%, transparent 82%);
}
/* 雷达扫描（右上角） */
.bg-radar {
  position: fixed;
  top: -150px; right: -150px;
  width: 440px; height: 440px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center, transparent 0 58px, rgba(34, 211, 238, 0.10) 58px 59px),
    conic-gradient(from 0deg, rgba(34, 211, 238, 0.45), rgba(34, 211, 238, 0) 74deg, rgba(34, 211, 238, 0) 360deg);
  -webkit-mask: radial-gradient(circle at center, #000 0 152px, transparent 153px);
  mask: radial-gradient(circle at center, #000 0 152px, transparent 153px);
  opacity: 0.42;
  z-index: -2;
  pointer-events: none;
  animation: radarSpin 9s linear infinite;
}
/* 航班航线弧（左下） */
.bg-arcs {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  z-index: -2;
  pointer-events: none;
  opacity: 0.55;
}
/* 透视跑道（底部） */
.bg-runway {
  position: fixed;
  left: 50%; bottom: -36px;
  transform: translateX(-50%) perspective(720px) rotateX(64deg);
  transform-origin: bottom center;
  width: min(640px, 92vw); height: 280px;
  background: linear-gradient(to top, rgba(20, 34, 70, 0.6), rgba(20, 34, 70, 0));
  border-left: 2px solid rgba(120, 150, 220, 0.16);
  border-right: 2px solid rgba(120, 150, 220, 0.16);
  -webkit-mask: linear-gradient(to top, #000, transparent 88%);
  mask: linear-gradient(to top, #000, transparent 88%);
  z-index: -2;
  pointer-events: none;
  opacity: 0.7;
}
.bg-runway::after {
  content: "";
  position: absolute;
  left: 50%; top: 6%; bottom: 0;
  width: 0;
  border-left: 2px dashed rgba(190, 210, 255, 0.22);
  transform: translateX(-50%);
}
.bg-glow {
  position: fixed;
  top: -20%; left: -10%;
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, transparent 60%);
  filter: blur(80px);
  animation: drift 18s ease-in-out infinite alternate;
  z-index: -1;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(8%, 12%) scale(1.15); }
}
@keyframes radarSpin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }
/* 修复：显式声明 hidden 属性优先于任何 display 设置（否则 .btn-tool 等 display 会覆盖 UA 的 [hidden] 规则） */
[hidden] { display: none !important; }
.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 登录门控 ============ */
.login-gate {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(3px);
  background:
    radial-gradient(circle at 50% 38%, rgba(34, 211, 238, 0.10) 0%, transparent 46%);
}
.login-card {
  width: min(520px, 92vw);
  padding: 46px 40px 40px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(20, 32, 64, 0.82), rgba(12, 18, 38, 0.78));
  border: 1px solid var(--card-border);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: rise 0.8s ease-out;
}
.login-card::before {
  content: "";
  position: absolute;
  top: -2px; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--red), var(--primary), var(--cyan));
}
@keyframes rise {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-logo {
  width: 132px; height: 132px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(227, 179, 65, 0.15), rgba(226, 59, 78, 0.12));
  box-shadow: 0 0 0 2px rgba(227, 179, 65, 0.32), 0 8px 32px rgba(0, 0, 0, 0.35);
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
}
.login-logo img { width: 100%; height: 100%; object-fit: contain; }
.login-title {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.35;
  background: linear-gradient(90deg, #fff 0%, #ffd699 55%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-subtitle {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.login-hint { margin: 18px 0 0; color: var(--muted); font-size: 13px; }

/* ============ 按钮 ============ */
.btn-primary, .btn-tool, .btn-small {
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
  font-family: inherit;
}
.btn-primary {
  padding: 14px 38px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 22px rgba(59, 130, 246, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px var(--primary-glow); }
.btn-glow { position: relative; overflow: hidden; }
.btn-glow::after {
  content: "";
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-glow:hover::after { opacity: 1; }
.btn-icon { font-size: 18px; display: inline-flex; }

.btn-tool {
  width: 38px; height: 38px;
  background: var(--glass);
  border: 1px solid var(--card-border);
  color: var(--text);
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.btn-tool:hover { background: rgba(255, 255, 255, 0.08); box-shadow: 0 0 14px rgba(59, 130, 246, 0.25); }
.btn-danger { color: #ff9a9a; border-color: rgba(255, 100, 100, 0.25); }
.btn-danger:hover { background: rgba(255, 80, 80, 0.15); }

.btn-small {
  padding: 7px 14px;
  background: var(--glass);
  border: 1px solid var(--card-border);
  color: var(--text);
  font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
}
.btn-small:hover { background: rgba(255, 255, 255, 0.08); }

/* ============ 主面板 ============ */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 13px 22px;
  background: rgba(5, 7, 15, 0.82);
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}
.brand { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; min-width: 0; max-width: 420px; overflow: hidden; }
/* 左上角系统图标（Logo 图片，保持不变） */
.brand-logo {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(227, 179, 65, 0.15), rgba(226, 59, 78, 0.12));
  box-shadow: 0 0 0 1.5px rgba(227, 179, 65, 0.35);
  padding: 5px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-text { min-width: 0; overflow: hidden; }
.brand-text h1 {
  margin: 0; font-size: clamp(15px, 1.25vw, 19px); font-weight: 700; letter-spacing: 0.5px;
  background: linear-gradient(90deg, #fff, #cfe0ff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-text span { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.toolbar { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.search { position: relative; }
.search input {
  padding: 10px 16px 10px 38px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  width: 230px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
}
.search::before {
  content: "⌕";
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 17px;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18); width: 250px; }

/* ============ 顶栏信息区（问候 + 天气 扁平 inline，与标题行无缝融合） ============ */
.topbar-info { display: flex; align-items: center; gap: 18px; padding: 0 8px; flex: 0 1 auto; min-width: 0; justify-content: flex-end; }
.tb-line {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0; background: transparent; border: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.tb-line > span { color: var(--muted); }
.tb-line > span b { color: var(--text); font-weight: 600; }
.tb-ico {
  width: auto; height: auto; flex: none;
  background: transparent; border: 0; border-radius: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: color .15s ease;
}
.tb-ico svg { width: 15px; height: 15px; stroke-width: 1.6; }
.ico-inline { display: inline-flex; width: 13px; height: 13px; opacity: .7; vertical-align: -2px; }
.ico-inline svg { width: 13px; height: 13px; stroke-width: 1.6; }
.tb-sep { opacity: .35; font-weight: 400; user-select: none; }
.tb-line:hover .tb-ico { color: var(--cyan); }
.tb-line:hover { color: var(--text); }

/* ============ 主体 ============ */
.main { flex: 1; padding: 24px 28px 10px; max-width: 1600px; width: 100%; margin: 0 auto; }
.status-bar {
  margin-bottom: 18px;
  padding: 12px 18px;
  border-radius: 10px;
  background: rgba(227, 179, 65, 0.10);
  border: 1px solid rgba(227, 179, 65, 0.25);
  color: #f0dca0;
  font-size: 13px;
}
.status-bar.error { background: rgba(255, 80, 80, 0.10); border-color: rgba(255, 80, 80, 0.25); color: #ffabab; }
.status-bar.success { background: rgba(52, 211, 153, 0.10); border-color: rgba(52, 211, 153, 0.25); color: #a8f0c5; }
.status-bar.info { background: rgba(34, 211, 238, 0.10); border-color: rgba(34, 211, 238, 0.25); color: #a8ecf6; }

/* ============ 分类导航 ============ */
.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.category-chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--card-border);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 7px;
}
.category-chip .chip-icon { display: inline-flex; opacity: 0.85; }
.category-chip .chip-icon svg { width: 15px; height: 15px; }
.category-chip.active, .category-chip:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.28), rgba(226, 59, 78, 0.16));
  border-color: rgba(59, 130, 246, 0.45);
  color: #fff;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.22);
}
.category-chip .count { margin-left: 4px; color: var(--gold); font-weight: 700; }

/* ============ 分类区块 ============ */
.category-sections { display: flex; flex-direction: column; gap: 34px; }
.category-section {}
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(110, 150, 255, 0.12);
  position: relative;
}
.section-header::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 64px; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  border-radius: 2px;
}
.section-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10), 0 4px 14px rgba(0, 0, 0, 0.3);
}
.section-icon svg { width: 20px; height: 20px; }
.section-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: 0.5px; }
.section-count { margin-left: auto; font-size: 13px; color: var(--muted); }

/* ============ 卡片网格 ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
  gap: 18px;
}
.card {
  position: relative;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--red), var(--primary), var(--cyan));
  opacity: 0.75;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(110, 150, 255, 0.5);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.5), 0 0 24px rgba(59, 130, 246, 0.16);
}
.card-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.card-icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10);
}
.card-icon svg { width: 25px; height: 25px; }
.card-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.4; }
.card-desc {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  min-height: 38px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid currentColor;
}
.card-actions { display: flex; gap: 6px; align-items: center; }
.card-preview {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  font-size: 14px;
}
.card:hover .card-preview { background: rgba(34, 211, 238, 0.22); color: #fff; }
.card-arrow {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  color: var(--muted);
}
.card:hover .card-arrow { background: rgba(59, 130, 246, 0.25); color: #fff; }
/* 统一 SVG 线描图标尺寸（与 icons.js 同一套视觉语言） */
.btn-tool svg { width: 18px; height: 18px; }
.btn-icon svg { width: 18px; height: 18px; }
.card-preview svg, .card-arrow svg, .lock-badge svg { width: 15px; height: 15px; }
.lock-badge { display: inline-flex; align-items: center; justify-content: center; color: #f59e0b; }
.preview-tab svg { width: 14px; height: 14px; vertical-align: -2px; }

/* ============ 弹层 ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 10, 0.72);
  backdrop-filter: blur(4px);
}
.modal-content {
  position: relative;
  width: min(1180px, 96vw);
  height: min(86vh, 900px);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(13, 20, 42, 0.96), rgba(8, 12, 26, 0.96));
  border: 1px solid var(--card-border);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--card-border);
}
.modal-header h3 { margin: 0; font-size: 15px; }
.modal-actions { display: flex; gap: 10px; }
.modal-body { flex: 1; position: relative; }
/* 预览弹层 body 必须为 flex 列，否则 .preview-panes 的 flex:1 失效、面板高度塌成 0 导致记录/仪表盘空白 */
#previewModal .modal-body { display: flex; flex-direction: column; }
.modal-body iframe { width: 100%; height: 100%; border: none; }

/* ============ 表格内容预览 ============ */
.preview-modal-content { width: min(1120px, 96vw); }
.preview-loading, .preview-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.preview-tip { display: block; margin-top: 10px; font-size: 12px; color: var(--gold); }
.preview-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border);
  font-size: 13px;
  color: var(--muted);
}
.preview-toolbar select {
  background: var(--glass);
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.preview-count { margin-left: auto; font-size: 12px; color: var(--gold); }
.preview-table-wrap {
  overflow: auto;
  padding: 6px 16px 16px;
  max-height: calc(86vh - 134px);
}
.preview-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.preview-table th, .preview-table td {
  border: 1px solid var(--card-border);
  padding: 9px 11px;
  text-align: left;
  vertical-align: top;
  max-width: 300px;
  word-break: break-word;
}
.preview-table th {
  background: rgba(59, 130, 246, 0.14);
  color: #cfe0ff;
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}
.preview-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.025); }
.preview-table tbody tr:hover { background: rgba(59, 130, 246, 0.08); }

.preview-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 16px 0;
  border-bottom: 1px solid var(--card-border);
  flex-shrink: 0;
}
.preview-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s;
}
.preview-tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.preview-tab.active {
  color: #fff;
  border-bottom-color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
}
.preview-panes { flex: 1; position: relative; min-height: 0; }
.preview-pane { position: absolute; inset: 0; overflow: auto; }
.preview-pane.hidden { display: none; }
.preview-dash { width: 100%; height: 100%; display: flex; flex-direction: column; }
.preview-dash-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--card-border);
  font-size: 13px;
  flex-shrink: 0;
}
.preview-iframe { flex: 1; min-height: 0; width: 100%; border: none; background: #fff; }
.preview-dash-tip {
  padding: 8px 14px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--card-border);
}

/* ============ 页脚 ============ */
.footer {
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--card-border);
  background: rgba(5, 7, 15, 0.55);
}

/* ============ 排班入口组件 ============ */
.schedule-widget {
  margin-bottom: 22px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(167, 139, 250, 0.25);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(34, 211, 238, 0.06));
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.schedule-widget::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #8b5cf6, #22d3ee);
}
.sw-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sw-head .section-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(139, 92, 246, 0.08));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10);
}
.sw-head .section-icon svg { width: 20px; height: 20px; }
.sw-head .section-title { margin: 0; }
.sw-enter { margin-left: auto; text-decoration: none; }
.sw-body { min-height: 56px; }
.sw-shift { padding: 14px 16px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); }
.sw-shift-name { font-size: 22px; font-weight: 700; }
.sw-shift-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.sw-empty { color: var(--muted); font-size: 14px; padding: 8px 2px; line-height: 1.6; }
.sw-hint { font-size: 12.5px; opacity: 0.85; }
/* 今日全员班次列表 */
.sw-member {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: background .15s ease, border-color .15s ease;
}
.sw-member + .sw-member { margin-top: 6px; }
.sw-member.is-me { background: rgba(34, 211, 238, 0.07); border-color: rgba(34, 211, 238, 0.28); }
.sw-avatar {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; letter-spacing: 0;
}
.sw-name { font-size: 13.5px; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 6px; }
.sw-me-tag { font-size: 10px; font-weight: 600; color: #04202b; background: var(--cyan); border-radius: 6px; padding: 1.5px 6px; }
.sw-shift-text { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.sw-chip { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.sw-chip.is-none { color: var(--muted); background: rgba(148, 163, 184, 0.10); border: 1px solid rgba(148, 163, 184, 0.18); }
.sw-foot { margin-top: 12px; text-align: center; font-size: 12px; color: var(--muted); opacity: 0.8; }

/* ============ 响应式 ============ */
@media (max-width: 860px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 14px; }
  .topbar-info { width: 100%; flex-wrap: wrap; gap: 10px; }
  .toolbar { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .search input:focus { width: 100%; }
  .main { padding: 18px; }
  .brand-text h1 { font-size: 17px; }
  .login-title { font-size: 22px; }
  .bg-radar { width: 300px; height: 300px; }
}
/* 中等屏：信息区自适应压缩 */
@media (max-width: 1180px) and (min-width: 861px) {
  .topbar-info { gap: 14px; padding: 0 4px; }
  .search input { width: 200px; }
  .search input:focus { width: 220px; }
}

/* 移动端：取消预览按钮，卡片点击直接跳转模块 */
body.is-mobile .card-preview { display: none; }
body.is-mobile .card { cursor: pointer; }
body.is-mobile .card:hover { transform: none; }

/* ============ 问候栏 / 天气栏（位于系统标题栏下方） ============ */
.infobar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 28px 0;
  padding: 14px 22px 14px 20px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.infobar:hover {
  transform: translateY(-2px);
  border-color: rgba(110, 150, 255, 0.42);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.36), 0 0 18px rgba(59, 130, 246, 0.12);
}
/* 左侧色彩强调条：金(问候) / 青(天气) */
.infobar-accent {
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  border-radius: 14px 0 0 14px;
}
.infobar--greet .infobar-accent { background: linear-gradient(180deg, var(--gold), #ff8a52); }
.infobar--weather .infobar-accent { background: linear-gradient(180deg, var(--cyan), var(--primary)); }
/* 统一图标徽章 */
.infobar-ico {
  width: 42px; height: 42px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
}
.infobar-ico svg { width: 22px; height: 22px; }
.infobar--greet .infobar-ico { color: var(--gold); background: rgba(227, 179, 65, 0.12); border: 1px solid rgba(227, 179, 65, 0.28); }
.infobar--weather .infobar-ico { color: var(--cyan); background: rgba(34, 211, 238, 0.10); border: 1px solid rgba(34, 211, 238, 0.24); }
.infobar-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.infobar-title { font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.3; }
.infobar-title b { color: var(--gold); font-weight: 700; }
.infobar-sub { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.infobar-sub .ico-inline { display: inline-flex; width: 15px; height: 15px; opacity: .8; }
.infobar-sub .ico-inline svg { width: 15px; height: 15px; }
.infobar-aside { margin-left: auto; display: flex; align-items: center; }
.greet-tag {
  font-size: 12px; color: var(--muted);
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--card-border);
  white-space: nowrap;
}

/* 天气栏内部元素 */
.wx-loc { font-weight: 600; }
.wx-cond { display: inline-flex; align-items: center; gap: 7px; }
.wx-ico { display: inline-flex; width: 22px; height: 22px; color: var(--cyan); }
.wx-ico svg { width: 22px; height: 22px; }
.wx-text { font-weight: 600; color: var(--text); }
.wx-temp { color: var(--cyan); font-weight: 700; font-size: 15px; }
.wx-chips { display: inline-flex; gap: 8px; margin-left: 6px; }
.wx-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; color: var(--muted);
  padding: 2px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--card-border);
}
.wx-chip svg { width: 14px; height: 14px; }
.wx-prob {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(59, 130, 246, 0.10));
  border: 1px solid rgba(34, 211, 238, 0.30);
  color: var(--text); font-size: 13.5px; font-weight: 600;
  white-space: nowrap;
}
.wx-prob svg { width: 18px; height: 18px; color: var(--cyan); }
.wx-prob b { color: var(--cyan); font-size: 15px; }
.wx-stale { font-size: 11px; color: var(--gold); opacity: .85; margin-left: 2px; }
.muted, .loading { color: var(--muted); }

@media (max-width: 720px) {
  .infobar { margin: 14px 14px 0; padding: 12px 16px; gap: 12px; }
  .infobar-aside { margin-left: 0; width: 100%; }
  .greet-tag { width: 100%; text-align: center; }
  .wx-prob { width: 100%; justify-content: center; }
}

/* ============ 登录门控：外部用户登录 ============ */
.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0 4px; color: var(--muted); font-size: 12px; letter-spacing: 2px;
}
.login-divider::before, .login-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--card-border);
}
.btn-link {
  background: none; border: none; cursor: pointer;
  color: var(--cyan); font-size: 13px; font-family: inherit;
  padding: 8px 6px; transition: color .2s;
}
.btn-link:hover { color: #fff; text-decoration: underline; }
.ext-login-box { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 6px; }
.ext-login-box .btn-primary { justify-content: center; padding: 12px 20px; }
.input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--card-border);
  color: var(--text); font-size: 14px; font-family: inherit; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,0.15); }
.input::placeholder { color: var(--muted); }
.login-err { color: #ff9a9a; font-size: 13px; text-align: left; }

/* 外部访客打开模块时的提示横幅 */
.modal-ext-note {
  padding: 10px 20px;
  background: linear-gradient(90deg, rgba(227,179,65,0.14), rgba(226,59,78,0.10));
  border-bottom: 1px solid var(--card-border);
  color: #ffd699; font-size: 13px; letter-spacing: .3px;
}
/* 外部访客：模块名下多条仪表盘链接的切换条 */
.modal-ext-links {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 10px 20px;
  border-bottom: 1px solid var(--card-border);
  background: rgba(255,255,255,0.02);
}
.ext-link-chip {
  display: inline-block; text-decoration: none;
  padding: 5px 14px; border-radius: 999px; font-size: 12.5px; cursor: pointer;
  background: rgba(34,211,238,0.08); color: var(--cyan);
  border: 1px solid rgba(34,211,238,0.22);
  transition: background .15s ease, transform .15s ease;
}
.ext-link-chip:hover { background: rgba(34,211,238,0.18); transform: translateY(-1px); }
.ext-link-chip.active { background: var(--cyan); color: #04202b; font-weight: 600; border-color: var(--cyan); }

/* ============ 后台设置管理台 ============ */
.admin { min-height: 100vh; display: flex; flex-direction: column; }
.admin-topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  background: linear-gradient(135deg, rgba(20,32,64,0.9), rgba(12,18,38,0.85));
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(8px);
}
.admin-topbar .brand { display: flex; align-items: center; gap: 12px; }
.admin-topbar .brand img { width: 40px; height: 40px; border-radius: 50%; }
.admin-topbar h1 { font-size: 17px; margin: 0; font-weight: 700; }
.admin-topbar .sub { font-size: 12px; color: var(--muted); }
.admin-actions { display: flex; gap: 10px; }
.admin-back, .admin-logout {
  padding: 9px 16px; border-radius: 10px; cursor: pointer; font-size: 13px; font-family: inherit;
  background: var(--glass); border: 1px solid var(--card-border); color: var(--text); transition: all .2s;
}
.admin-back:hover, .admin-logout:hover { background: rgba(255,255,255,0.08); }
.admin-logout { color: #ff9a9a; border-color: rgba(255,100,100,0.25); }

.admin-tabs { display: flex; gap: 8px; padding: 18px 28px 0; flex-wrap: wrap; }
.admin-tab {
  padding: 10px 18px; border-radius: 10px 10px 0 0; cursor: pointer; font-size: 14px; font-family: inherit;
  background: rgba(255,255,255,0.03); border: 1px solid var(--card-border); border-bottom: none; color: var(--muted);
  transition: all .2s;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active { background: rgba(34,211,238,0.10); color: var(--cyan); border-color: rgba(34,211,238,0.3); }

.admin-body { padding: 0 28px 40px; flex: 1; }
.admin-panel { display: none; }
.admin-panel.active { display: block; }

.admin-card {
  margin-top: 18px; padding: 22px 24px;
  background: linear-gradient(160deg, rgba(20,32,64,0.7), rgba(12,18,38,0.6));
  border: 1px solid var(--card-border); border-radius: var(--radius);
}
.admin-card h2 { margin: 0 0 4px; font-size: 16px; }
.admin-card .desc { margin: 0 0 16px; color: var(--muted); font-size: 13px; }

.admin-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.admin-form .field { display: flex; flex-direction: column; gap: 6px; }
.admin-form label { font-size: 12px; color: var(--muted); }
.admin-form .admin-input {
  padding: 10px 12px; border-radius: 9px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border); color: var(--text); font-size: 14px; font-family: inherit; outline: none; min-width: 220px;
}
.admin-form .admin-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,0.15); }
.admin-btn {
  padding: 10px 18px; border-radius: 9px; cursor: pointer; font-size: 14px; font-family: inherit; border: none;
  color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); transition: all .2s;
}
.admin-btn:hover { transform: translateY(-1px); }
.admin-btn.gold { background: linear-gradient(135deg, var(--gold), #c8922e); }

.admin-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.admin-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--card-border);
}
.admin-row .name { font-size: 14px; font-weight: 600; }
.admin-row .meta { font-size: 12px; color: var(--muted); margin-left: 10px; }
.admin-row .del {
  padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; font-family: inherit;
  background: rgba(255,80,80,0.12); border: 1px solid rgba(255,100,100,0.3); color: #ff9a9a; transition: all .2s;
}
.admin-row .del:hover { background: rgba(255,80,80,0.22); }
.admin-empty { color: var(--muted); font-size: 13px; padding: 12px 2px; }
.admin-msg { margin-top: 12px; font-size: 13px; min-height: 18px; }
.admin-msg.ok { color: #5ee0a0; }
.admin-msg.err { color: #ff9a9a; }

.admin-kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 14px; }
.admin-kv .k { color: var(--muted); }
.admin-kv .v { color: var(--text); word-break: break-all; }

.admin-modules { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow: auto; }
.admin-module { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: rgba(255,255,255,0.03); border: 1px solid var(--card-border); font-size: 13px; }
.admin-module .mi { width: 22px; text-align: center; }
.admin-module .mn { font-weight: 600; }
.admin-module .mc { color: var(--muted); margin-left: auto; }
.admin-module .mops { display: flex; gap: 6px; margin-left: 8px; }
.admin-module .mop {
  padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer;
  background: rgba(34,211,238,0.10); color: var(--cyan); border: 1px solid rgba(34,211,238,0.22);
  transition: background .15s ease;
}
.admin-module .mop:hover { background: rgba(34,211,238,0.20); }
.admin-module .mop.del { background: rgba(255,80,80,0.10); color: #ff9a9a; border-color: rgba(255,80,80,0.22); }
.admin-module .mop.del:hover { background: rgba(255,80,80,0.22); }
.admin-module .mop.ok { background: rgba(94,224,160,0.10); color: #5ee0a0; border-color: rgba(94,224,160,0.25); }
.admin-module .mop.ok:hover { background: rgba(94,224,160,0.20); }
.admin-module.editing { border-color: rgba(34,211,238,0.4); }
.admin-module .mn-input { min-width: 180px; padding: 4px 8px; font-size: 13px; }
/* 链接分组 */
.link-group { margin-top: 14px; }
.link-group-name { font-size: 13px; font-weight: 600; color: var(--cyan); margin-bottom: 6px; }
.link-url { word-break: break-all; }
/* 下拉框与输入框同风格 */
.admin-form select.admin-input {
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px; cursor: pointer; min-width: 200px;
}
.admin-form select.admin-input option { background: #0e1630; color: var(--text); }

@media (max-width: 720px) {
  .admin-topbar, .admin-tabs, .admin-body { padding-left: 16px; padding-right: 16px; }
  .admin-form .admin-input { min-width: 160px; width: 100%; }
  .admin-module { flex-wrap: wrap; }
  .admin-module .mc { margin-left: 0; width: 100%; }
}

/* ============ 外部用户权限管理 ============ */
.batch-bar {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px; padding: 10px 14px;
  background: rgba(34,211,238,0.06); border: 1px solid rgba(34,211,238,0.2); border-radius: 10px;
  font-size: 13px; color: var(--cyan);
}
.admin-btn.plain { background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid var(--card-border); }
.user-row { align-items: center; }
.user-row .batch-check { width: 16px; height: 16px; accent-color: var(--cyan); cursor: pointer; flex: none; }
.user-row .ur-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; flex-wrap: wrap; }
.user-row .ur-ops { display: flex; gap: 6px; flex: none; }
.user-row .ur-ops .mop {
  padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer;
  background: rgba(34,211,238,0.10); color: var(--cyan); border: 1px solid rgba(34,211,238,0.22);
}
.user-row .ur-ops .mop:hover { background: rgba(34,211,238,0.20); }
.user-row .ur-ops .mop.rp { background: rgba(227,179,65,0.10); color: var(--gold); border-color: rgba(227,179,65,0.25); }
.user-row .ur-ops .mop.rp:hover { background: rgba(227,179,65,0.22); }
.user-row .ur-ops .mop.del { background: rgba(255,80,80,0.10); color: #ff9a9a; border-color: rgba(255,80,80,0.22); }
.user-row .ur-ops .mop.del:hover { background: rgba(255,80,80,0.22); }
.perm-badge {
  font-size: 11.5px; padding: 2px 9px; border-radius: 999px;
  background: rgba(34,211,238,0.10); color: var(--cyan); border: 1px solid rgba(34,211,238,0.22);
}
.perm-badge.all { background: rgba(94,224,160,0.10); color: #5ee0a0; border-color: rgba(94,224,160,0.25); }
.perm-badge.none { background: rgba(255,80,80,0.10); color: #ff9a9a; border-color: rgba(255,80,80,0.25); }
.log-row .log-time { flex: none; }
/* 权限配置弹层 */
.admin-modal { max-width: 640px; width: 92vw; }
.admin-modal-sm { max-width: 420px; }
.admin-modal-body { padding: 18px 22px; max-height: 70vh; overflow: auto; }
.perm-tools { display: flex; gap: 8px; margin: 10px 0 14px; flex-wrap: wrap; }
.perm-list { display: flex; flex-direction: column; gap: 14px; }
.perm-group-name { font-size: 12.5px; font-weight: 600; color: var(--cyan); margin-bottom: 6px; }
.perm-group { padding: 10px 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--card-border); border-radius: 10px; }
.perm-item {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 4px 14px 4px 0; font-size: 13px; cursor: pointer; color: var(--text);
}
.perm-item input { width: 15px; height: 15px; accent-color: var(--cyan); cursor: pointer; }
.perm-footer { display: flex; justify-content: flex-end; margin-top: 16px; }

/* ============ 外部访客：未授权模块锁定态 ============ */
.card.locked { opacity: 0.45; filter: grayscale(0.5); cursor: not-allowed; }
.card.locked:hover { transform: none; box-shadow: none; }
.card .lock-badge { font-size: 15px; line-height: 1; }
.card.biz-card { cursor: pointer; }

/* ICP 备案号（页脚） */
.footer .icp { color: var(--muted); text-decoration: none; transition: color .2s; }
.footer .icp:hover { color: var(--primary); }
