/* 数据统计、图表、消息中心的补充样式 */

canvas { display: block; width: 100% !important; max-width: 100%; }
.card { max-width: 100%; }

.bell { position: relative; }
.bell-dot {
  position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff;
  font-size: 10px; line-height: 16px; text-align: center; font-weight: 700;
}

.stat-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
}
.seg-group {
  display: inline-flex; background: #eef1f8; border-radius: 8px; padding: 3px;
}
.seg {
  border: 0; background: transparent; padding: 6px 12px; border-radius: 6px;
  font-size: 12.5px; color: #4a5265; cursor: pointer; font-family: inherit;
}
.seg.on { background: #fff; color: var(--brand); font-weight: 700; box-shadow: 0 1px 3px rgba(28, 39, 76, .12); }
.export-row { display: flex; gap: 8px; flex-wrap: wrap; }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px;
}
.stat-card {
  background: #fff; border: 1px solid #dde2ee; border-radius: 10px;
  padding: 12px 14px; box-shadow: 0 2px 6px rgba(28, 39, 76, .05);
}
.stat-card .num { font-size: 22px; font-weight: 700; line-height: 1.2; }
.stat-card .lab { font-size: 11.5px; color: #6b7484; margin-top: 4px; }
.stat-card .num.green { color: var(--green); }
.stat-card .num.red { color: var(--red); }
.stat-card .num.blue { color: var(--brand); }

.stat-two {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px;
}
@media (max-width: 820px) { .stat-two { grid-template-columns: 1fr; } }

table.mini { width: 100%; border-collapse: collapse; font-size: 12px; }
table.mini th, table.mini td { border-bottom: 1px solid #eceff6; padding: 5px 6px; text-align: left; }
table.mini th { color: #6b7484; font-weight: 600; }

@media (max-width: 860px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .card { overflow-x: auto; }
  table.mini { font-size: 11px; }
  table.mini th, table.mini td { padding: 4px 4px; }
  .stat-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .export-row .btn { font-size: 11.5px; padding: 7px 10px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 10px 10px; }
  .stat-card .num { font-size: 18px; }
  .topbar { overflow: hidden; }
  .topbar .clock { display: none; }
  .topbar .right { gap: 6px; }
  .topbar .right .btn { font-size: 11px; padding: 6px 8px; }
  .seg { padding: 6px 9px; font-size: 12px; }
}
table.mini td.green { color: var(--green); }
table.mini td.red { color: var(--red); }

.msg-list { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
.msg-item { padding: 12px 14px; border-bottom: 1px solid #eceff6; }
.msg-item:last-child { border-bottom: 0; }
.msg-item.unread { background: #f7f9ff; }
.msg-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.msg-top .dot { width: 7px; height: 7px; border-radius: 50%; background: #c9cfdb; }
.msg-item.unread .dot { background: var(--brand); }
.msg-body { font-size: 12.5px; color: #4a5265; line-height: 1.75; margin-top: 5px; }
.msg-time { font-size: 11px; color: #8a90a0; margin-top: 5px; }
.msg-item.lv-danger { border-left: 3px solid var(--red); }
.msg-item.lv-warn { border-left: 3px solid #d98500; }
.remind-names {
  background: #fff6e6; border: 1px dashed #e0b062; border-radius: 8px;
  padding: 8px 10px; margin-top: 6px; font-size: 12.5px; line-height: 1.7; color: #7a5200;
}
a.link, button.link {
  border: 0; background: transparent; color: var(--brand); font-size: 12px;
  cursor: pointer; padding: 0; text-decoration: underline; font-family: inherit;
}
textarea.input { resize: vertical; font-family: inherit; }
