/* ============ 健康宝 Web 后台 · 科技蓝白风 ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #F3F7FC; color: #1F2D3D; font-size: 15px;
}

/* ---- 登录 ---- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1667D6, #3B8BFF);
}
.login-card {
  width: 400px; background: #fff; border-radius: 16px;
  padding: 48px 40px; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.login-logo { font-size: 30px; font-weight: 700; color: #1667D6; text-align: center; }
.login-sub { font-size: 13px; color: #8A9BB3; text-align: center; margin: 10px 0 32px; }
.login-tip { font-size: 12px; color: #AAB8CC; margin-top: 20px; text-align: center; }

/* ---- 布局 ---- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; background: #0E2A52; color: #fff;
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0;
}
.logo { font-size: 22px; font-weight: 700; padding: 28px 24px; color: #7FB2FF; }
.nav-item {
  padding: 16px 24px; cursor: pointer; font-size: 15px; color: #B9C9E0;
  border-left: 4px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,0.06); }
.nav-item.active { background: rgba(59,139,255,0.18); color: #fff; border-left-color: #3B8BFF; font-weight: 600; }
.sidebar-footer { margin-top: auto; padding: 20px 24px; font-size: 13px; color: #8FA6C6; }
.logout { cursor: pointer; margin-top: 8px; color: #FF8A8A; }
.logout:hover { text-decoration: underline; }

.main { flex: 1; margin-left: 220px; padding: 28px 32px 60px; }
.page-title { font-size: 22px; margin-bottom: 20px; color: #0E2A52; }

/* ---- 卡片 / 统计 ---- */
.card {
  background: #fff; border-radius: 12px; padding: 20px 24px;
  box-shadow: 0 2px 10px rgba(22,103,214,0.06); margin-bottom: 20px;
}
.card h3 { font-size: 16px; color: #0E2A52; margin-bottom: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 20px; }
.stat-card {
  background: #fff; border-radius: 12px; padding: 24px;
  box-shadow: 0 2px 10px rgba(22,103,214,0.06); text-align: center;
}
.stat-num { font-size: 34px; font-weight: 700; color: #1667D6; }
.stat-label { font-size: 14px; color: #8A9BB3; margin-top: 6px; }
.chart-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; }
.chart-card { margin-bottom: 20px; }
.chart { height: 300px; }

/* ---- 表格 ---- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; padding: 10px 8px; color: #4A5B74;
  border-bottom: 2px solid #E6EEF9; white-space: nowrap;
}
.table td { padding: 12px 8px; border-bottom: 1px solid #F0F5FB; }
.table tr:hover td { background: #F8FBFF; }
.strong { font-weight: 600; }
.wrap { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.small { font-size: 12px; color: #8A9BB3; }
.gray { color: #8A9BB3; }
.mt16 { margin-top: 16px; }

.link { color: #1667D6; cursor: pointer; margin-right: 12px; }
.link:hover { text-decoration: underline; }
.link.danger { color: #E5484D; }
.empty { text-align: center; color: #AAB8CC; padding: 32px 0; }

/* ---- 筛选栏 / 表单 ---- */
.filter-bar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filter-input, input, select {
  padding: 9px 12px; border: 1px solid #D7E2F2; border-radius: 8px;
  font-size: 14px; outline: none; background: #fff; color: #1F2D3D;
}
input:focus, select:focus { border-color: #3B8BFF; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: #4A5B74; margin-bottom: 6px; }
.field input, .field select { width: 100%; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-grid label { color: #8A9BB3; margin-right: 8px; font-size: 13px; }
.info-grid .full { grid-column: span 2; }

/* ---- 按钮 ---- */
.btn {
  padding: 9px 18px; border-radius: 8px; border: 1px solid #D7E2F2;
  background: #fff; color: #1F2D3D; font-size: 14px; cursor: pointer;
}
.btn:hover { border-color: #3B8BFF; color: #1667D6; }
.btn.primary { background: linear-gradient(135deg, #1667D6, #3B8BFF); color: #fff; border: none; }
.btn.primary:hover { opacity: 0.92; }
.btn.ghost { background: #EAF2FF; color: #1667D6; border-color: #C7DBF9; }
.btn.block { width: 100%; padding: 12px; font-size: 15px; }

/* ---- 标签 ---- */
.level { padding: 3px 12px; border-radius: 20px; font-size: 12px; }
.level-positive { background: #E6F7EF; color: #0E9F6E; }
.level-normal { background: #EAF2FF; color: #1667D6; }
.level-attention { background: #FDECEC; color: #E5484D; }

/* ---- 分页 ---- */
.pager { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; align-items: center; }
.pager button {
  min-width: 32px; height: 32px; border: 1px solid #D7E2F2; background: #fff;
  border-radius: 6px; cursor: pointer; color: #1F2D3D;
}
.pager button.on { background: #1667D6; color: #fff; border-color: #1667D6; }
.pager button:disabled { color: #C4D2E5; cursor: not-allowed; }

/* ---- 弹窗 ---- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(14,42,82,0.45);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal {
  background: #fff; border-radius: 14px; width: 640px; max-width: 92vw;
  max-height: 84vh; overflow: auto; padding: 26px 28px;
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; font-size: 18px; font-weight: 700; color: #0E2A52;
}
.modal-close { cursor: pointer; color: #8A9BB3; font-size: 22px; line-height: 1; }

/* ---- 合规提示条 ---- */
.tip-bar {
  background: #F0F8F5; border-left: 4px solid #12A182;
  color: #2C5B50; font-size: 13px; line-height: 1.6;
  padding: 10px 14px; border-radius: 6px; margin-bottom: 16px;
}
