/* ===== 设计基调 =====
   品牌色改为青绿色系（来客GEO品牌色），其余保持克制：状态色（成功/警告/危险）
   和品牌色是两套独立token，不会因为换品牌色导致"警告"状态看起来像主按钮。
*/
:root {
  --paper: #F2F4F6;
  --surface: #FFFFFF;
  --ink: #15262A;
  --slate: #5B6673;
  --line: #DEE3E8;
  --signal: #0A66B8;        /* 品牌色：按钮/当前导航/状态点/焦点框——跟侧边栏、登录页统一用这个海蓝色 */
  --signal-weak: #D9ECFF;
  --signal-dark: #084E8C;
  --ok: #3C7A5B;
  --ok-weak: #E3F0E9;
  --warn: #B9762C;
  --warn-weak: #F3E7D8;
  --bad: #B14438;
  --bad-weak: #F7E6E4;
  --radius: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}

#app { display: flex; min-height: 100vh; }

/* ---------- 侧边栏 ---------- */
/* 侧边栏整体换成蓝色系主题：醒目的浅蓝底色（不能太深，要保证蓝色文字还看得清），
   一级目录（首页 + 各分组标题）统一用 #0A66B8 这个海蓝色，跟顶部品牌名呼应；
   二级目录（分组展开后的具体页面链接）保持原来的深灰色文字，继续维持主次区分。 */
.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: #EAF4FF;
  border-right: 1px solid var(--line);
  padding: 20px 0;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 0 20px 20px;
  font-size: 20px;
  font-weight: 700;
  border-bottom: 1px solid rgba(10,102,184,0.2);
  margin-bottom: 12px;
  color: #0A66B8;
}
.sidebar-brand small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #0A66B8;
  margin-top: 8px;
}
.nav-group { margin-bottom: 4px; }
.nav-group-title {
  padding: 10px 20px;
  font-size: 14.5px;
  font-weight: 700;
  color: #0A66B8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.nav-group-title:hover { background: #DDEEFF; }
.nav-group-arrow { font-size: 11px; font-weight: 400; color: #5B8CB8; }

.nav-top-link {
  display: block;
  padding: 10px 20px;
  font-size: 14.5px;
  font-weight: 700;
  color: #0A66B8;
  text-decoration: none;
  cursor: pointer;
}
.nav-top-link:hover { background: #DDEEFF; }
.nav-top-link.active { background: #C8E4FF; }

.nav-item {
  display: block;
  padding: 6px 20px 6px 24px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  border-left: 2px solid transparent;
  cursor: pointer;
}
.nav-item:hover { background: #DDEEFF; }
.nav-item.active {
  border-left-color: #0A66B8;
  color: #0A66B8;
  background: #C8E4FF;
  font-weight: 500;
}

/* ---------- 主体 ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 16px; font-weight: 600; margin: 0; }
.topbar-right { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--slate); }
.topbar-right a { color: var(--slate); cursor: pointer; text-decoration: underline; }

.content { padding: 24px; max-width: 1600px; }

/* ---------- 卡片/面板 ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.panel-header h2 { font-size: 15px; font-weight: 600; margin: 0; }
.panel-desc { color: var(--slate); font-size: 13px; margin: -8px 0 16px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}
.btn:hover { background: var(--paper); }
.btn-primary { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn-primary:hover { opacity: 0.9; background: var(--signal); }
.btn-danger { color: var(--bad); border-color: var(--bad); background: var(--surface); }
.btn-danger:hover { background: var(--bad-weak); }
.btn-success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-success:hover { opacity: 0.9; background: var(--ok); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 20px; margin-bottom: 16px; }
.form-grid.single { grid-template-columns: 1fr; }
.field label { display: block; font-size: 13px; color: var(--slate); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
}
.field textarea { min-height: 100px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--signal); outline-offset: -1px; border-color: var(--signal);
}
.field-full { grid-column: 1 / -1; }
.field-hint { font-size: 12px; color: var(--slate); margin-top: 4px; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { color: var(--slate); font-weight: 500; }
td.actions { white-space: nowrap; width: 1%; }
td.actions .btn { margin-right: 6px; }
tr:hover td { background: var(--paper); }
.empty-row td { text-align: center; color: var(--slate); padding: 32px 0; }

/* ---------- 状态点 ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.status.ok .status-dot { background: var(--ok); }
.status.ok { color: var(--ok); }
.status.warn .status-dot { background: var(--warn); }
.status.warn { color: var(--warn); }
.status.bad .status-dot { background: var(--bad); }
.status.bad { color: var(--bad); }

/* ================= 登录页（来客GEO品牌视觉，左右分栏） ================= */
.login-wrap {
  display: flex;
  min-height: 100vh;
  width: 100%;
  /* 横向渐变：左边亮蓝、往右逐渐加深到深海军蓝（仅限登录页，不影响登录后的青绿主题） */
  background: linear-gradient(90deg, #2E7FD4 0%, #1A4F91 45%, #061B38 100%);
  position: relative;
  overflow: hidden;
}
.login-locale-switch {
  position: absolute;
  top: 24px; right: 32px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  cursor: pointer;
  z-index: 5;
  backdrop-filter: blur(4px);
}
.login-locale-switch:hover { background: rgba(255,255,255,0.22); }

.login-hero {
  flex: 1.15;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 70px;
  position: relative;
  color: #fff;
  min-width: 0;
  overflow: hidden;
}

/* ---- 背景装饰：铺满整个登录页（不只是左侧hero区域），纯CSS/SVG，不需要任何图片素材 ----
   装饰层是 .login-wrap 的直接子元素、绝对定位铺满全屏，这样登录卡片右边的空间也能看到
   世界地图和飞向枢纽的小人动效，不再被切断在左侧面板里。 */
.login-hero-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.login-hero-content {
  position: relative;
  z-index: 1;
}
.login-panel-wrap { position: relative; z-index: 1; }

.login-globe-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}

/* 枢纽核心：常驻发光（不是动画，是静态的柔和光晕），制造"磁吸中心"的视觉重量感 */
.login-hub-core {
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.95)) drop-shadow(0 0 20px rgba(191,224,255,0.65));
}

/* 飞向枢纽的WhatsApp图标——图标本身的颜色写死在SVG路径里（WhatsApp品牌绿），
   这里只控制发光效果，改成跟图标颜色呼应的绿色光晕而不是之前的蓝色 */
.login-arc-person { filter: drop-shadow(0 0 5px rgba(37,211,102,0.9)); will-change: transform; }
.login-arc-person-alt { opacity: 0.9; filter: drop-shadow(0 0 4px rgba(37,211,102,0.75)); will-change: transform; }

/* 枢纽向外辐射的光点（沿SVG路径跑），用更大的尺寸/发光强度制造更明显的动感 */
.login-arc-dot {
  filter: drop-shadow(0 0 6px rgba(159,240,228,0.95));
}

/* 枢纽本身的雷达式扩散波纹：从小圆放大淡出，循环播放，三层错开制造连续波浪感 */
.login-hub-ping {
  transform-box: fill-box;
  transform-origin: center;
  animation: login-hub-ping 3s cubic-bezier(.2,.7,.3,1) infinite;
}
.login-hub-ping-2 { animation-delay: 1s; }
.login-hub-ping-3 { animation-delay: 2s; }
@keyframes login-hub-ping {
  0%   { transform: scale(0.25); opacity: 0.9; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* 目的地光点的呼吸脉冲，幅度比之前大很多 */
.login-dest-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: login-glow-pulse 2.2s ease-in-out infinite;
}
@keyframes login-glow-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.6); }
  50% { opacity: 1; transform: scale(1.6); }
}

/* "GEO"字母点阵星座容器：整体用百分比定位到背景装饰区域里，内部每颗星星
   的坐标是固定像素（照着GEO字形摆的），不随视口大小变化比例、字形不会被拉变形 */
.login-geo-constellation {
  position: absolute;
  left: 33%; top: 30%;
}

/* 星星闪烁飘动粒子——用普通HTML定位（不是SVG内部），避免跟SVG自己的transform属性打架。
   性能说明：51颗星星同时做 transform+opacity 动画、又叠着模糊发光，对浏览器主线程负担
   很重，之前这是导致"点击按钮没反应/很慢"的主要原因——text-shadow动画每一帧都要在CPU上
   重新计算模糊范围再重绘，元素一多就会拖慢整个页面，连带点击事件响应都被挤到后面。
   这版做了两处优化：①光晕层数从4层精简到2层，减少每帧要算的模糊范围；
   ②加 will-change 提示浏览器把这些元素提前丢给GPU做合成层，transform/opacity变化时
   不用重新跑CPU端的重绘流程，明显更流畅。 */
.login-star {
  position: absolute;
  color: #ffffff;
  text-shadow:
    0 0 6px rgba(255,255,255,1),
    0 0 20px rgba(191,224,255,0.8);
  pointer-events: none;
  mix-blend-mode: screen;
  will-change: transform, opacity;
  animation: login-star-move var(--star-dur, 1.3s) ease-in-out infinite;
  animation-delay: var(--star-delay, 0s);
}
@keyframes login-star-move {
  0%   { transform: translate(0, 0) scale(0.5) rotate(0deg); opacity: 0.2; filter: brightness(1); }
  50%  { transform: translate(var(--star-dx, 2px), -10px) scale(1.5) rotate(10deg); opacity: 1; filter: brightness(1.8); }
  100% { transform: translate(0, 0) scale(0.5) rotate(0deg); opacity: 0.2; filter: brightness(1); }
}
@media (prefers-reduced-motion: reduce) {
  .login-star { animation: none; opacity: 0.85; filter: brightness(1.3); }
}

.login-hero-dots {
  position: absolute;
  bottom: 26px; left: 50px;
  width: 96px; height: 64px;
  background-image: radial-gradient(rgba(255,255,255,0.4) 1.4px, transparent 1.4px);
  background-size: 14px 14px;
}

@media (prefers-reduced-motion: reduce) {
  .login-hub-ping, .login-dest-dot, .login-arc-dot, .login-arc-dot * {
    animation: none;
  }
}
.login-hero-eyebrow {
  font-size: 13px;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 14px;
  font-weight: 600;
}
.login-hero-title {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 18px;
}
.login-hero-sub {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 18px;
  color: #EAF3FF;
}
.login-hero-desc {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255,255,255,0.85);
  max-width: 440px;
  margin-bottom: 34px;
}
.login-feature-row {
  display: flex;
  gap: 14px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.login-feature-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #fff;
}
.login-feature-badge .icon-circle {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.login-pill-row { display: flex; gap: 12px; flex-wrap: wrap; max-width: 600px; }
.login-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
}

.login-stat-card {
  /* 跟着左边内容走正常排版流（不再用 position:absolute 脱离出去单独定位），
     这样视口高度变化时，它始终紧跟在上面的标签胶囊下方，不会和左边内容脱节 */
  width: 100%;
  max-width: 420px;
  margin-top: 28px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(6px);
}
.login-stat-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; color: #fff; font-size: 14px; font-weight: 600;
}
.login-stat-row { display: flex; justify-content: space-between; margin-top: 14px; }
.login-stat-item { text-align: left; }
.login-stat-num { font-size: 22px; font-weight: 800; color: #fff; }
.login-stat-label { font-size: 11.5px; color: rgba(255,255,255,0.7); margin-top: 2px; }

/* 趋势线动态攀爬：折线用 stroke-dashoffset 做"从左往右边画边爬升"的描边动画，
   画到70%进度时正好到达终点，停顿一下（剩下30%时间）再跳回起点循环——
   光点（上面SVG里用 animateMotion）的 keyTimes 也是同样的 0→0.7→1 节奏，
   两者时间轴对齐，看起来就像一个光点在领着折线实时往上冲。
   340 是折线总长度估算值（实际约325，留了一点余量确保线条能完全画出来）。*/
.login-trend-line {
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: login-trend-draw 3s cubic-bezier(.3,.7,.4,1) infinite;
}
@keyframes login-trend-draw {
  0%   { stroke-dashoffset: 340; }
  70%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}
.login-trend-dot {
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.95)) drop-shadow(0 0 10px rgba(191,224,255,0.7));
}
@media (prefers-reduced-motion: reduce) {
  .login-trend-line { animation: none; stroke-dashoffset: 0; }
}

.login-footer {
  position: absolute; bottom: 20px; left: 0; right: 0;
  text-align: center; color: rgba(255,255,255,0.55); font-size: 12px;
}

.login-panel-wrap {
  flex: 0 0 680px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-box {
  /* 卡片改成深蓝底，跟白底时代比起来存在感强很多，不会被背景"吃掉" */
  background: linear-gradient(160deg, #123862 0%, #0A2544 100%);
  border-radius: 16px;
  padding: 48px 46px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 70px rgba(4, 16, 36, 0.55);
}
.login-box .eyebrow {
  color: #7DB8FF;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 10px;
  line-height: 1.4;
}
.login-box h1 { font-size: 22px; margin: 0 0 6px; font-weight: 800; color: #ffffff; }
.login-box p { font-size: 13.5px; color: rgba(255,255,255,0.65); margin: 0 0 28px; }
.login-box .field { margin-bottom: 18px; }
.login-box .field label { font-size: 13px; color: #ffffff; font-weight: 500; margin-bottom: 6px; }
.login-register-btn {
  display: block; width: 100%; text-align: center;
  padding: 10px; margin-top: 10px; border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.4); color: #ffffff;
  font-size: 13.5px; font-weight: 600; cursor: pointer; background: transparent;
}
.login-register-btn:hover { background: rgba(255,255,255,0.1); }

@media (max-width: 980px) {
  .login-hero { display: none; }
  .login-panel-wrap { flex: 1; }
}
.login-input-wrap { position: relative; }
.login-input-wrap input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  font-size: 14px;
  background: rgba(255,255,255,0.08);
  color: #ffffff;
}
.login-input-wrap input::placeholder { color: rgba(255,255,255,0.45); }
.login-input-wrap input:focus { outline: 2px solid #7DB8FF; outline-offset: -1px; background: rgba(255,255,255,0.14); }
.login-input-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.6); display: flex;
}
.login-input-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  cursor: pointer; color: rgba(255,255,255,0.6); background: none; border: none; padding: 2px; display: flex;
}
.login-terms-row {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; color: rgba(255,255,255,0.65); margin-bottom: 20px; line-height: 1.5;
}
.login-terms-row input { margin-top: 2px; }
.login-terms-row a { color: #7DB8FF; text-decoration: none; }
.login-terms-row a:hover { text-decoration: underline; }
.login-box .btn-primary {
  width: 100%; justify-content: center; margin-top: 4px;
  padding: 12px; border-radius: 10px; font-size: 15px; font-weight: 600;
  background: linear-gradient(135deg, #3B8CE8, #1A5BAE);
  border: none; color: #ffffff;
}
.login-error { color: #FF9B8A; font-size: 13px; margin-top: 10px; min-height: 18px; }
.login-contact-admin {
  text-align: center; margin-top: 22px; font-size: 13px; color: rgba(255,255,255,0.65);
}
.login-contact-admin a { color: #7DB8FF; cursor: pointer; text-decoration: none; font-weight: 500; }
.login-contact-admin a:hover { text-decoration: underline; }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed; top: 16px; right: 16px; z-index: 999;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  font-size: 13px; opacity: 0; transform: translateY(-6px); transition: all .2s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--bad); }

/* ---------- 工具类 ---------- */
.muted { color: var(--slate); }
.mt-8 { margin-top: 8px; }
.mb-0 { margin-bottom: 0; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.img-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); background: var(--paper); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; background: var(--paper); color: var(--slate); font-size: 12px; }

@media (max-width: 860px) {
  .sidebar { display: none; }
  .form-grid { grid-template-columns: 1fr; }
}
