* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #f3f5f8; color: #1f2937;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; }
#app { height: 100%; }
.boot { padding: 40px; color: #888; }

/* 登录页 */
.login-wrap { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%); }
.login-card { width: 380px; max-width: 100%; background: #fff; border-radius: 10px; padding: 32px 28px 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.login-card h1 { font-size: 20px; margin: 0 0 4px; }
.login-card p { color: #6b7280; margin: 0 0 24px; font-size: 13px; }

/* 布局 */
.layout { height: 100%; display: flex; }
.aside { width: 200px; flex-shrink: 0; background: #1e293b; color: #cbd5e1; display: flex; flex-direction: column; }
.aside .brand { height: 56px; display: flex; align-items: center; padding: 0 20px; font-weight: 600; color: #fff;
  font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.06); }
.aside .el-menu { border-right: 0; background: transparent; flex: 1; }
.aside .el-menu-item { color: #cbd5e1; height: 44px; line-height: 44px; }
.aside .el-menu-item:hover { background: rgba(255,255,255,.06); }
.aside .el-menu-item.is-active { color: #fff; background: #2563eb; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.header { height: 56px; background: #fff; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center;
  justify-content: space-between; padding: 0 20px; flex-shrink: 0; }
.header .title { font-size: 16px; font-weight: 600; }
.header .user { display: flex; align-items: center; gap: 12px; color: #6b7280; font-size: 13px; }
.content { flex: 1; overflow: auto; padding: 16px 20px 40px; }

.card { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 16px; border: 1px solid #eef0f3; }
.card-title { font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.card-title .sub { font-weight: normal; color: #6b7280; font-size: 12px; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid #eef0f3; border-radius: 8px; padding: 14px 16px; }
.stat .label { color: #6b7280; font-size: 12px; }
.stat .value { font-size: 24px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .extra { color: #9ca3af; font-size: 12px; margin-top: 2px; }
.stat.warn .value { color: #d97706; }
.stat.danger .value { color: #dc2626; }
.stat.ok .value { color: #16a34a; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.toolbar .el-input, .toolbar .el-select { width: 180px; }
.pager { display: flex; justify-content: flex-end; margin-top: 12px; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.muted { color: #9ca3af; }
.danger-text { color: #dc2626; }
.ok-text { color: #16a34a; }
.warn-text { color: #d97706; }
.link { color: #2563eb; cursor: pointer; }
.link:hover { text-decoration: underline; }
.pre { white-space: pre-wrap; word-break: break-all; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 6px;
  padding: 10px 12px; max-height: 360px; overflow: auto; margin: 0; }
.field-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; }
.field-row .k { width: 120px; flex-shrink: 0; color: #6b7280; padding-top: 2px; }
.field-row .v { flex: 1; min-width: 0; word-break: break-all; }
.tip { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; padding: 10px 12px; border-radius: 6px; font-size: 13px; line-height: 1.7; margin-bottom: 12px; }
.tip.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.section-gap { height: 12px; }

/* 抽屉和弹窗不超过屏幕宽度 */
.el-drawer { max-width: 100vw; }
.el-dialog { max-width: calc(100vw - 32px); }

@media (max-width: 760px) {
  .aside { width: 64px; }
  .aside .brand span, .aside .el-menu-item span { display: none; }
  .content { padding: 12px; }
  .toolbar .el-input, .toolbar .el-select { width: 100%; }
}
