/* ============================================================
   EchoTik 数据大盘 · 用户端浅色主题
   设计令牌（配色 / 字体 / 阴影 / 圆角 / 动画）
   ============================================================ */
:root {
  /* 配色：浅色系，主色为 EchoTik 品牌橙金 */
  --brand: #ff8a00;
  --brand-2: #ffb020;
  --brand-grad: linear-gradient(135deg, #ffb020, #ff7a00);
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f3f8;
  --text: #1f2733;
  --text-2: #5b667a;
  --muted: #97a1b3;
  --line: #e8ecf3;
  --green: #16a34a;
  --red: #ef4444;
  --blue: #2f6bff;
  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow: 0 4px 16px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, 0.12);
  /* 圆角 */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  /* 动画 */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.22s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { display: block; }
button { font-family: inherit; }

.hidden { display: none !important; }

/* 内联 SVG 图标：默认继承文字色与尺寸 */
.ic-svg { display: inline-flex; align-items: center; justify-content: center; }
.ic-svg svg { width: 1em; height: 1em; display: block; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
[data-icon] svg { width: 100%; height: 100%; display: block; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d5dbe6; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #c2cad8; }

/* 进入动画 */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
.fade-up { animation: fadeUp var(--dur) var(--ease) both; }

/* 通用按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--r-sm); font-size: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  cursor: pointer; transition: all var(--dur) var(--ease);
}
.btn:hover { border-color: #d3dae6; box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  border: none; color: #fff; font-weight: 600;
  background: var(--brand-grad);
  box-shadow: 0 4px 14px rgba(255, 138, 0, 0.32);
}
.btn-primary:hover { filter: brightness(1.04); box-shadow: 0 6px 18px rgba(255, 138, 0, 0.4); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* 表单控件 */
select, input[type="text"], input[type="password"] {
  padding: 9px 13px; border-radius: var(--r-sm); font-size: 14px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
select:focus, input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.14);
}

/* 分段时间选择器（周/月/年） */
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--r-sm); padding: 3px; }
.seg button {
  border: none; background: transparent; color: var(--text-2);
  padding: 6px 16px; font-size: 13px; border-radius: 6px; cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.seg button.active { background: var(--surface); color: var(--brand); font-weight: 600; box-shadow: var(--shadow-sm); }

/* 消息条 */
.msg-bar { padding: 11px 15px; border-radius: var(--r-sm); font-size: 13px; margin-bottom: 16px; }
.msg-err { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.msg-ok { background: #f0fdf4; color: var(--green); border: 1px solid #bbf7d0; }
