/* geo.css — GEO 管理面板共享样式（浅色主题） */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f5f6f8; --panel: #ffffff; --border: #e2e6ec;
  --text: #1f2733; --muted: #6b7686; --accent: #2563eb;
  --ok: #16a34a; --warn: #d97706; --err: #dc2626; --info: #0ea5e9;
  --radius: 10px; --shadow: 0 1px 3px rgba(16,24,40,.08);
}
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
}
a { color: var(--accent); text-decoration: none; }

.layout { display: flex; min-height: 100vh; }

/* ------- 侧边栏 ------- */
.sidebar {
  width: 210px; background: #161d2a; color: #cdd6e4; flex-shrink: 0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .logo { padding: 18px 16px; font-size: 16px; font-weight: 700; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08); letter-spacing: .5px; }
.sidebar .logo small { display: block; font-size: 11px; color: #7d8aa0; font-weight: 400; margin-top: 3px; }
.sidebar nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.sidebar .nav-group {
  padding: 14px 18px 4px; font-size: 11px; color: #6b7a92; letter-spacing: 1px;
  text-transform: uppercase; font-weight: 600;
}
.sidebar nav a {
  display: block; padding: 8px 18px; color: #aeb9c9; font-size: 13.5px;
  border-left: 3px solid transparent; transition: all .15s;
}
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active { background: rgba(37,99,235,.25); color: #fff;
  border-left-color: var(--accent); }

/* 系统区：固定在侧边栏底部，与客户内容隔离 */
.sidebar .sys-nav {
  margin-top: auto; padding: 8px 0 12px;
  border-top: 1px solid rgba(255,255,255,.1);
  background: #121927;
}
.sidebar .sys-nav .nav-group { padding-top: 10px; }
.sidebar .sys-nav a {
  display: block; padding: 8px 18px; color: #8a97ab; font-size: 13.5px;
  border-left: 3px solid transparent; transition: all .15s;
}
.sidebar .sys-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidebar .sys-nav a.active { background: rgba(220,38,38,.16); color: #fff;
  border-left-color: #ef4444; }

/* ------- 主区 ------- */
.main { flex: 1; padding: 22px 26px; min-width: 0; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; font-weight: 700; }
.page-head .sub { color: var(--muted); font-size: 13px; }
.page-head .spacer { flex: 1; }

/* 侧边栏顶部客户切换器（与客户内容同区，隔离于底部系统区） */
.client-switch {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 12px 6px; padding: 8px 10px;
  background: #1d2637; border: 1px solid #33405a; border-radius: 8px;
}
.client-switch .cs-label {
  font-size: 11px; color: #7d8aa0; font-weight: 600; white-space: nowrap; letter-spacing: 1px;
}
.client-switch select {
  flex: 1; min-width: 0; background: #232c3d; color: #fff; border: 1px solid #38445a;
  border-radius: 6px; padding: 6px 8px; font-size: 13px; font-weight: 600;
  outline: none; cursor: pointer;
}
.client-switch select:hover, .client-switch select:focus { border-color: #6366f1; }
.client-switch select:focus { box-shadow: 0 0 0 2px rgba(99,102,241,.25); }
.btn {
  background: var(--accent); color: #fff; border: none; border-radius: 7px;
  padding: 7px 14px; font-size: 13px; cursor: pointer; transition: filter .15s;
}
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--accent);
  border: 1px solid var(--accent); }
.btn.small { padding: 3px 9px; font-size: 12px; border-radius: 5px; }
.btn.danger { background: var(--err); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-link { color: var(--accent); text-decoration: none; font-size: 13px; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }

/* ------- 卡片 ------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; margin-bottom: 18px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px; }
.card .k { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.card .v { font-size: 24px; font-weight: 700; }
.card .v small { font-size: 12px; color: var(--muted); font-weight: 400; }
.card .v.good { color: var(--ok); } .card .v.warn { color: var(--warn); } .card .v.bad { color: var(--err); }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 18px; }
.panel h3 { font-size: 15px; margin-bottom: 12px; font-weight: 600; }

/* ------- 表格 ------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border);
  vertical-align: top; word-break: break-all; }
th { color: var(--muted); font-weight: 600; font-size: 12px; background: #fafbfc; }
tr:hover td { background: #f8fafc; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 12px; }
.tag.ok { background: #dcfce7; color: var(--ok); }
.tag.warn { background: #fef3c7; color: var(--warn); }
.tag.err { background: #fee2e2; color: var(--err); }
.tag.info { background: #e0f2fe; color: var(--info); }
.tag.muted { background: #f1f5f9; color: var(--muted); }
.tag.accent { background: #dbeafe; color: var(--accent); }

/* ------- 筛选 ------- */
.filters { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input {
  border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px;
  font-size: 13px; background: #fff; outline: none; min-width: 120px;
}
.filters input { min-width: 220px; }

/* ------- 趋势条形 ------- */
.trend { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-top: 8px; }
.trend .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.trend .bar { width: 100%; max-width: 34px; background: var(--accent); border-radius: 4px 4px 0 0;
  min-height: 2px; opacity: .85; }
.trend .bar.warn { background: var(--warn); }
.trend .lbl { font-size: 11px; color: var(--muted); }

/* ------- 提示条 ------- */
.toast {
  position: fixed; right: 20px; bottom: 20px; background: #1f2733; color: #fff;
  padding: 10px 16px; border-radius: 8px; font-size: 13px; z-index: 99;
  opacity: 0; transform: translateY(8px); transition: all .25s; pointer-events: none;
  max-width: 420px; box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.toast.show { opacity: 1; transform: translateY(0); }
.cli-code {
  background: #f1f5f9; border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 10px; font-family: Consolas, monospace; font-size: 12px;
  margin: 6px 0; word-break: break-all; display: flex; justify-content: space-between; gap: 10px;
}
.mono { font-family: Consolas, monospace; font-size: 12px; }
.empty { color: var(--muted); text-align: center; padding: 26px 0; }
.dim { color: var(--muted); font-size: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

/* ------- 客户防误操作提示 ------- */
.client-note { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe;
  border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px; font-weight: 600; }
.warn-banner { background: #fef3c7; border: 1px solid #fcd34d; color: #92400e;
  border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; line-height: 1.6; }
