/* 心情零钱 · 管理后台样式（不依赖任何构建工具） */
* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1f2733;
  background: #f4f6f9;
  font-size: 14px;
}
.boot-loading { padding: 80px; text-align: center; color: #667085; line-height: 1.8; }
.boot-error { color: #b42318; }
.boot-error strong { font-size: 16px; }

/* 登录 */
.login-wrap { min-height: 100%; display: flex; align-items: center; justify-content: center; background: #eef2f7; }
.login-card {
  width: 380px; padding: 36px 34px 28px; background: #fff; border: 1px solid #e4e8ef;
  border-radius: 14px; box-shadow: 0 8px 30px rgba(31, 39, 51, .07);
}
.login-card .el-input { margin-bottom: 14px; }
.login-brand { font-size: 24px; font-weight: 600; letter-spacing: 1px; color: #1f2733; }
.login-sub { color: #8a94a6; margin: 6px 0 26px; font-size: 13px; }
.login-btn { width: 100%; margin-top: 6px; }
.login-error { color: #d03050; margin-top: 14px; font-size: 13px; text-align: center; }
.login-foot { margin-top: 22px; text-align: center; color: #a3abba; font-size: 12px; }

/* 布局 */
.layout { display: flex; min-height: 100%; }
.sidebar { width: 208px; flex: 0 0 208px; background: #1d2735; color: #c9d2df; display: flex; flex-direction: column; }
.brand { padding: 22px 20px 24px; font-size: 17px; font-weight: 600; color: #fff; letter-spacing: .5px; }
.brand-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #f2b84b; margin-right: 9px; }
.brand-tail { font-size: 11px; font-weight: 400; color: #7d8ca1; margin-left: 8px; }
.sidebar nav { flex: 1; padding: 0 10px; }
.nav-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; margin-bottom: 4px; border-radius: 8px;
  color: #aeb9c9; text-decoration: none; font-size: 13.5px; transition: background .15s;
}
.nav-item:hover { background: #2a3648; color: #fff; }
.nav-item.active { background: #2f6fd0; color: #fff; }
.nav-badge { background: #d03050; color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 11px; }
.sidebar-foot { padding: 18px 20px; font-size: 11px; color: #6f7d91; border-top: 1px solid #2a3648; line-height: 1.7; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; background: #fff; border-bottom: 1px solid #e7ebf1;
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
}
.topbar-title { font-size: 16px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.who { color: #5a6474; font-size: 13px; }
.db-chip { font-size: 12px; padding: 3px 10px; border-radius: 12px; }
.db-chip.ok { background: #e8f5ec; color: #1a7f45; }
.db-chip.bad { background: #fdecec; color: #c02c38; }
.content { padding: 22px 24px 40px; overflow: auto; }

/* 看板 */
.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: #fff; border: 1px solid #e7ebf1; border-radius: 10px; padding: 18px 20px; }
.kpi-label { color: #7c8798; font-size: 13px; }
.kpi-value { font-size: 28px; font-weight: 600; margin: 8px 0 4px; letter-spacing: .5px; }
.kpi-hint { color: #a3abba; font-size: 12px; }
.panel { background: #fff; border: 1px solid #e7ebf1; border-radius: 10px; padding: 18px 20px; margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-head strong { font-size: 14px; font-weight: 600; }
.legend { color: #98a2b3; font-size: 12px; }
.lg { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin: 0 5px 0 12px; }
.lg.blue { background: #2f6fd0; }
.lg.green { background: #43a877; }
.chart { display: flex; align-items: flex-end; gap: 12px; height: 175px; padding-top: 8px; }
.chart-col { flex: 1; text-align: center; }
.chart-bars { height: 140px; display: flex; align-items: flex-end; justify-content: center; gap: 5px; border-bottom: 1px solid #e7ebf1; }
.bar { width: 20px; border-radius: 3px 3px 0 0; transition: height .3s; }
.bar.blue { background: #2f6fd0; }
.bar.green { background: #43a877; }
.chart-label { color: #98a2b3; font-size: 12px; margin-top: 8px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-pill { background: #f2f5fa; border: 1px solid #e4e9f1; border-radius: 16px; padding: 5px 14px; font-size: 13px; }
.tag-pill b { color: #2f6fd0; margin-left: 6px; }

/* 表格与工具条 */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar-total { color: #8a94a6; font-size: 13px; margin-left: 6px; }
.grid { width: 100%; background: #fff; }
.pager { margin-top: 16px; justify-content: flex-end; }
.muted { color: #a3abba; }
code { background: #f4f6f9; padding: 2px 6px; border-radius: 4px; font-size: 12px; }
.notice { background: #fff8e8; border: 1px solid #f5dfab; color: #8a6420; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; line-height: 1.7; }
.json-view { background: #f7f9fc; border: 1px solid #e7ebf1; border-radius: 8px; padding: 14px; max-height: 340px; overflow: auto; font-size: 12px; line-height: 1.6; margin: 0; }

/* 抽屉 */
.detail-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #f0f2f6; font-size: 13px; }
.detail-row span { color: #8a94a6; }
.detail-row b { font-weight: 500; }
.detail-title { margin: 20px 0 10px; font-size: 14px; }
.coin-line { padding: 8px 0; border-bottom: 1px solid #f4f6f9; font-size: 13px; line-height: 1.6; }
.coin-tag { display: inline-block; background: #eef3fb; color: #2f6fd0; border-radius: 4px; padding: 1px 7px; margin-right: 8px; font-size: 12px; }

/* 微信扫码登录 */
.login-divider { position: relative; text-align: center; margin: 18px 0 14px; color: #b3bbc8; font-size: 12px; }
.login-divider::before, .login-divider::after {
  content: ''; position: absolute; top: 50%; width: 38%; height: 1px; background: #e7ebf1;
}
.login-divider::before { left: 0; }
.login-divider::after { right: 0; }
.login-divider span { background: #fff; padding: 0 10px; position: relative; }
.wx-btn { margin-left: 0 !important; color: #1a7f45; border-color: #b9dfc9; }

/* 人员管理 */
.one-time-pwd {
  font-family: Consolas, Monaco, monospace; font-size: 18px; letter-spacing: 1px;
  background: #f4f6f9; border: 1px dashed #c9d3e0; border-radius: 8px;
  padding: 14px; text-align: center; user-select: all;
}
.log-line { padding: 9px 0; border-bottom: 1px solid #f0f2f6; font-size: 12.5px; line-height: 1.8; }
.log-line code { margin-left: 8px; }

/* 看板下钻、分布图与报表 */
.kpi.clickable { cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.kpi.clickable:hover { border-color: #2f6fd0; box-shadow: 0 4px 14px rgba(47, 111, 208, .12); transform: translateY(-1px); }
.kpi-link { margin-top: 8px; color: #2f6fd0; font-size: 12px; }
.shortcut-row { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.bar-list { display: flex; flex-direction: column; gap: 9px; }
.bar-list.compact { gap: 6px; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.bar-row.clickable { cursor: pointer; }
.bar-row.clickable:hover .bar-name { color: #2f6fd0; }
.bar-name { flex: 0 0 106px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 9px; background: #f0f3f8; border-radius: 5px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: #2f6fd0; border-radius: 5px; }
.bar-fill.warn { background: #e8a33d; }
.bar-fill.teal { background: #3aa6a0; }
.bar-fill.purple { background: #8a6cd1; }
.bar-num { flex: 0 0 58px; text-align: right; font-weight: 600; font-size: 12px; }
.bar-num small { display: block; color: #a3abba; font-weight: 400; font-size: 10px; }
.group-title { color: #8a94a6; font-size: 12px; margin: 14px 0 8px; }
.tag-pill.alt { background: #f5f8f4; border-color: #e0eadf; }
.tag-pill.alt b { color: #3aa6a0; }
.bar.teal { background: #3aa6a0; }
.lg.teal { background: #3aa6a0; }
.chart.slim { gap: 2px; }
.chart.slim .chart-col { min-width: 0; }
.chart.slim .chart-bars { gap: 1px; }
.chart.slim .bar { width: auto; flex: 1; max-width: 13px; }
.chart.slim .chart-label { font-size: 10px; white-space: nowrap; }
