/* GEO 监测控制台样式 */
* { box-sizing: border-box; }
:root {
  --ink: #0f172a; --sub: #64748b; --line: #e6eaf0; --bg: #f5f7fa;
  --brand: #0f766e; --brand-2: #14b8a6; --warn: #c2410c; --bad: #b91c1c; --ok: #047857;
  --card: #fff; --radius: 12px;
}
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink); font: 14px/1.6 "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--brand); text-decoration: none; }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 20% 20%, #e7f6f4, #f5f7fa 60%); }
.login-card { width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 34px 32px; box-shadow: 0 12px 40px rgba(15,23,42,.08); }
.login-card h1 { font-size: 22px; margin: 0 0 4px; }
.login-card p { color: var(--sub); font-size: 13px; margin: 0 0 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; outline: none; transition: .15s; }
.input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(20,184,166,.14); }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #0b5f58; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.full { width: 100%; justify-content: center; }

/* ---------- 布局 ---------- */
.app { display: grid; grid-template-columns: 212px 1fr; min-height: 100vh; }
.side { background: #0b1220; color: #cbd5e1; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; }
.logo { display: flex; align-items: center; gap: 9px; padding: 4px 8px 18px; }
.logo .dot { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--brand-2), var(--brand)); }
.logo b { color: #fff; font-size: 15px; letter-spacing: .5px; }
.logo small { display: block; color: #64748b; font-size: 11px; font-weight: 400; }
.nav-item { padding: 9px 12px; border-radius: 9px; cursor: pointer; font-size: 13.5px; color: #94a3b8; display: flex; justify-content: space-between; }
.nav-item:hover { background: #131c2e; color: #e2e8f0; }
.nav-item.active { background: #12302c; color: #5eead4; }
.side-foot { margin-top: auto; font-size: 11px; color: #475569; padding: 10px 8px 0; border-top: 1px solid #1e293b; }

.main { padding: 0 0 40px; }
.topbar { position: sticky; top: 0; z-index: 9; background: rgba(245,247,250,.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 12px 26px; display: flex; align-items: center; gap: 12px; }
.topbar .title { font-weight: 600; font-size: 15px; }
.topbar .spacer { flex: 1; }
.select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.content { padding: 22px 26px; }

/* ---------- 卡片 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g2 { grid-template-columns: 1.15fr .85fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; position: relative; overflow: hidden; }
.kpi .k { font-size: 12px; color: var(--sub); }
.kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -.5px; margin-top: 2px; }
.kpi .d { font-size: 12px; margin-top: 4px; color: var(--sub); }
.kpi .accent { position: absolute; right: -18px; top: -18px; width: 62px; height: 62px; border-radius: 50%; background: #ecfdf5; }
.up { color: var(--ok); } .down { color: var(--bad); }

h3.sec { font-size: 14px; font-weight: 600; margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; }
h3.sec span.hint { font-weight: 400; font-size: 12px; color: var(--sub); }

table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tb th { text-align: left; color: var(--sub); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
table.tb td { padding: 9px 10px; border-bottom: 1px solid #f1f5f9; }
table.tb tr:hover td { background: #fafcfd; }
.num { font-variant-numeric: tabular-nums; text-align: right; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; background: #ecfdf5; color: var(--ok); border: 1px solid #d1fae5; }
.tag.bad { background: #fef2f2; color: var(--bad); border-color: #fee2e2; }
.tag.warn { background: #fff7ed; color: var(--warn); border-color: #fed7aa; }
.tag.gray { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }

.bar { height: 7px; background: #eef2f7; border-radius: 99px; overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-2), var(--brand)); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #f8fafc; border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; font-size: 12px; color: #334155; }
.chip b { color: var(--brand); }

.empty { text-align: center; color: var(--sub); padding: 40px 10px; font-size: 13px; }

/* ---------- 上次进度 ---------- */
.progress { height: 6px; background: #eef2f7; border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, #14b8a6, #0f766e); transition: width .4s; }

/* ---------- 抽屉 ---------- */
.drawer-mask { position: fixed; inset: 0; background: rgba(15,23,42,.42); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: 560px; max-width: 92vw; background: #fff; z-index: 41; display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(15,23,42,.12); }
.drawer header { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.drawer .body { padding: 18px 22px; overflow: auto; flex: 1; }
.drawer footer { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
pre.md { white-space: pre-wrap; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 13px; line-height: 1.75; }

/* ---------- 提示 ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #0b1220; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px; z-index: 60; }
.toast.err { background: var(--bad); }

@media (max-width: 1080px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g2, .g3 { grid-template-columns: 1fr; }
  .app { grid-template-columns: 68px 1fr; }
  .side .logo b, .side small, .nav-item span.t { display: none; }
}
