/* 智云统计 - 全站样式 */
:root {
  --primary: #2f6bff;
  --primary-dark: #1e4fd6;
  --primary-light: #eaf0ff;
  --accent: #00b578;
  --warn: #ff8800;
  --danger: #f53f3f;
  --text: #1d2433;
  --text-2: #5c667a;
  --text-3: #9aa3b5;
  --bg: #f5f7fb;
  --card: #ffffff;
  --border: #e6eaf2;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(29, 36, 51, 0.06);
  --shadow-lg: 0 8px 32px rgba(29, 36, 51, 0.1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ===== 通用组件 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 22px; border-radius: 8px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  border: 1px solid transparent; transition: all .18s;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-danger { background: #fff; color: var(--danger); border-color: #ffd6d6; }
.btn-danger:hover { background: #fff1f1; }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; border-radius: 6px; }
.btn-lg { height: 48px; padding: 0 32px; font-size: 16px; border-radius: 10px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.card-hd {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; font-size: 15px;
}
.card-bd { padding: 20px; }

.input, select.input, textarea.input {
  width: 100%; height: 42px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; color: var(--text); background: #fff;
  outline: none; transition: border .18s, box-shadow .18s;
}
textarea.input { height: auto; padding: 10px 14px; resize: vertical; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 107, 255, .12); }
.form-item { margin-bottom: 18px; }
.form-item label {
  display: block; margin-bottom: 6px; font-size: 13px;
  color: var(--text-2); font-weight: 500;
}

.tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; }
.tag-blue { background: var(--primary-light); color: var(--primary); }
.tag-green { background: #e8f8f1; color: var(--accent); }
.tag-orange { background: #fff3e6; color: var(--warn); }
.tag-red { background: #fff1f1; color: var(--danger); }
.tag-gray { background: var(--bg); color: var(--text-2); }

.toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  background: #1d2433; color: #fff; padding: 10px 22px;
  border-radius: 8px; font-size: 14px; z-index: 9999;
  opacity: 0; pointer-events: none; transition: opacity .25s, top .25s;
}
.toast.show { opacity: 1; top: 36px; }
.toast.err { background: var(--danger); }
.toast.ok { background: var(--accent); }

/* ===== 顶部导航（官网 + 看板） ===== */
.nav {
  height: 62px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 32px;
  position: sticky; top: 0; z-index: 100;
}
.nav .logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 19px; font-weight: 700; color: var(--text);
}
.nav .logo .logo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #6a5cff);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px;
}
.nav-links { display: flex; gap: 28px; margin-left: 48px; flex: 1; }
.nav-links a { color: var(--text-2); font-size: 14px; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-actions { display: flex; gap: 12px; align-items: center; }

/* ===== 官网首页 ===== */
.hero {
  padding: 88px 32px 72px; text-align: center;
  background:
    radial-gradient(800px 320px at 50% -60px, rgba(47, 107, 255, .12), transparent),
    linear-gradient(180deg, #f8faff 0%, var(--bg) 100%);
}
.hero h1 { font-size: 46px; line-height: 1.25; font-weight: 700; letter-spacing: 1px; }
.hero h1 .hl { color: var(--primary); }
.hero .sub {
  margin: 20px auto 0; max-width: 620px;
  font-size: 17px; color: var(--text-2);
}
.hero .cta { margin-top: 36px; display: flex; gap: 14px; justify-content: center; }
.hero .meta { margin-top: 18px; color: var(--text-3); font-size: 13px; }

.section { padding: 72px 32px; max-width: 1120px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { font-size: 30px; font-weight: 700; }
.section-title p { margin-top: 10px; color: var(--text-2); font-size: 15px; }

.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.feature {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; transition: all .2s;
}
.feature:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: #d5e0ff; }
.feature .icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--primary); margin-bottom: 16px;
}
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { color: var(--text-2); font-size: 13.5px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { text-align: center; padding: 32px 20px; }
.step .num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--primary);
  color: #fff; font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { color: var(--text-2); font-size: 13.5px; }

.faq-item {
  border-bottom: 1px solid var(--border); padding: 18px 4px; cursor: pointer;
}
.faq-item h3 { font-size: 15px; display: flex; justify-content: space-between; }
.faq-item .a { display: none; margin-top: 10px; color: var(--text-2); font-size: 13.5px; }
.faq-item.open .a { display: block; }
.faq-item .arrow { transition: transform .2s; color: var(--text-3); }
.faq-item.open .arrow { transform: rotate(180deg); }

.footer {
  border-top: 1px solid var(--border); background: #fff;
  padding: 36px 32px; text-align: center; color: var(--text-3); font-size: 13px;
}
.footer .links { margin-bottom: 12px; display: flex; gap: 22px; justify-content: center; }
.footer .links a { color: var(--text-2); }

/* ===== 登录 / 注册 ===== */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(600px 300px at 80% 10%, rgba(47, 107, 255, .1), transparent),
    var(--bg);
  padding: 32px 16px;
}
.auth-card { width: 400px; padding: 40px 36px; }
.auth-card .logo { justify-content: center; margin-bottom: 8px; display: flex; }
.auth-card h2 { text-align: center; font-size: 22px; margin: 10px 0 6px; }
.auth-card .tip { text-align: center; color: var(--text-3); font-size: 13px; margin-bottom: 28px; }
.auth-links { margin-top: 18px; text-align: center; font-size: 13px; color: var(--text-2); }

/* ===== 看板布局 ===== */
.dash { display: flex; min-height: 100vh; }
.side {
  width: 208px; background: #fff; border-right: 1px solid var(--border);
  position: fixed; top: 62px; bottom: 0; left: 0; overflow-y: auto;
}
.side .menu { padding: 14px 10px; }
.side .menu-item {
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 14px; border-radius: 8px;
  color: var(--text-2); font-size: 14px; cursor: pointer;
  margin-bottom: 4px; user-select: none;
}
.side .menu-item:hover { background: var(--bg); color: var(--text); }
.side .menu-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.side .menu-item .mi { font-size: 17px; width: 20px; text-align: center; }

.main {
  flex: 1; margin-left: 208px; margin-top: 62px;
  padding: 22px 26px; min-width: 0;
}
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 62px;
  background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 26px; z-index: 100;
  gap: 16px;
}
.topbar .site-sel {
  height: 36px; min-width: 190px; padding: 0 32px 0 12px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239aa3b5' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none; cursor: pointer; outline: none;
}
.topbar .grow { flex: 1; }
.range-tabs { display: flex; background: var(--bg); border-radius: 8px; padding: 3px; }
.range-tabs .rt {
  height: 30px; padding: 0 16px; border-radius: 6px; font-size: 13px;
  color: var(--text-2); cursor: pointer; display: flex; align-items: center;
}
.range-tabs .rt.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

.page-head { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; }
.page-head h2 { font-size: 19px; }
.page-head .desc { color: var(--text-3); font-size: 13px; margin-top: 3px; }

/* 指标卡 */
.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px;
}
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px;
}
.stat .label { color: var(--text-2); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 27px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .sub { margin-top: 5px; font-size: 12px; color: var(--text-3); }
.stat .sub .up { color: var(--danger); }
.stat .sub .down { color: var(--accent); }

/* 图表 */
.chart { width: 100%; height: 320px; }
.chart-sm { height: 260px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; padding: 11px 14px; background: var(--bg);
  color: var(--text-2); font-size: 12.5px; font-weight: 600;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  font-size: 13.5px; word-break: break-all;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafbff; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .path { color: var(--primary); font-family: Consolas, monospace; font-size: 13px; }
.empty { text-align: center; color: var(--text-3); padding: 48px 0; font-size: 13.5px; }

/* 实时 */
.online-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #e8f8f1; color: var(--accent); border-radius: 24px;
  padding: 7px 18px; font-size: 15px; font-weight: 600;
}
.online-badge .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 181, 120, .5); }
  70% { box-shadow: 0 0 0 8px rgba(0, 181, 120, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 181, 120, 0); }
}

/* 代码块 */
.code-box {
  background: #1e2430; color: #d8dee9; border-radius: 10px;
  padding: 18px 20px; font-family: Consolas, Monaco, monospace;
  font-size: 13px; line-height: 1.7; overflow-x: auto;
  white-space: pre-wrap; word-break: break-all;
}
.code-box .cmt { color: #6b7688; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(20, 26, 40, .45);
  display: none; align-items: center; justify-content: center; z-index: 1000;
}
.modal-mask.show { display: flex; }
.modal {
  width: 440px; background: #fff; border-radius: 12px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.modal-hd {
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  font-size: 16px; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
}
.modal-hd .close { cursor: pointer; color: var(--text-3); font-size: 20px; line-height: 1; }
.modal-bd { padding: 22px; }
.modal-ft {
  padding: 14px 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}

@media (max-width: 960px) {
  .feature-grid, .steps { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { margin-left: 0; }
  .hero h1 { font-size: 32px; }
}
