/* BRS量化平台 — 全局样式 */
:root {
  --bg: #f6f8f6;
  --card-bg: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #16a34a;
  --primary-light: #dcfce7;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --warning: #f59e0b;
  --border: #e2e8f0;
  --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  max-width: 480px; margin: 0 auto; padding-bottom: 80px;
  -webkit-font-smoothing: antialiased;
}
/* 导航栏 */
.navbar {
  display: flex; justify-content: space-around; align-items: center;
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: 60px;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border); z-index: 100;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--text-muted); font-size: 11px; padding: 8px 16px;
}
.nav-item.active { color: var(--primary); }
.nav-item .icon { font-size: 20px; }
/* 卡片 */
.card {
  background: var(--card-bg); border-radius: var(--radius);
  padding: 16px; margin: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
/* 标题 */
.page-title { font-size: 22px; font-weight: 700; padding: 16px 16px 0; }
.section-title { font-size: 15px; font-weight: 600; color: var(--text-muted); margin: 16px 0 8px; padding-left: 4px; }
/* 数据展示 */
.stat-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.stat-row:last-child { border-bottom: none; }
.stat-label { color: var(--text-muted); font-size: 14px; }
.stat-value { font-weight: 600; font-size: 14px; }
.profit { color: var(--primary); }
.loss { color: var(--danger); }
/* 按钮 */
.btn {
  display: block; width: 100%; padding: 14px; border: none; border-radius: var(--radius);
  font-size: 16px; font-weight: 600; text-align: center; cursor: pointer; transition: opacity 0.2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn:active { opacity: 0.7; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
/* 输入框 */
.input-group { margin-bottom: 14px; }
.input-group label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.input {
  width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 15px; background: white; outline: none;
}
.input:focus { border-color: var(--primary); }
/* 表格 */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 8px 4px; color: var(--text-muted); font-weight: 500; border-bottom: 1px solid var(--border); }
td { padding: 8px 4px; border-bottom: 1px solid var(--border); }
/* 提示消息 */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  padding: 10px 20px; border-radius: 8px; font-size: 14px; z-index: 200;
  animation: fadeIn 0.3s; max-width: 90%; text-align: center;
}
.toast-error { background: var(--danger); color: white; }
.toast-success { background: var(--primary); color: white; }
@keyframes fadeIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
/* 状态标签 */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600;
}
.badge-green { background: var(--primary-light); color: var(--primary); }
.badge-red { background: var(--danger-light); color: var(--danger); }
.badge-gray { background: #f1f5f9; color: var(--text-muted); }
/* 链接 */
a { color: var(--primary); text-decoration: none; }
/* 隐藏 */
.hidden { display: none; }
