:root {
  --bg: #f4f6f9;
  --card-bg: #ffffff;
  --border: #e5e9ef;
  --muted: #8a93a6;
  --accent: #2c3e50;
}

body {
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #2c3e50;
}

.brand-icon { font-size: 1.3em; margin-right: 4px; }

/* ─────── 仪表盘卡片 ─────── */

.stat-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: transform .15s ease, box-shadow .15s ease;
  height: 100%;
}
.stat-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
}
.stat-card .card-title { font-size: 1rem; font-weight: 600; }
.stat-card .status-badge { font-weight: 500; font-size: .72rem; }
.card-title-link {
  position: relative;
  cursor: pointer;
  transition: color .15s ease;
}
.card-title-link:hover {
  color: var(--primary, #0d6efd) !important;
  text-decoration: underline !important;
}
.card-title-link i { transition: transform .15s ease; }
.card-title-link:hover i { transform: translate(2px, -2px); }

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.metric-item {
  background: #fafbfc;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  padding: 10px 12px;
}
.metric-item.wide {
  grid-column: span 2;
}
.metric-item .metric-label {
  font-size: .72rem;
  color: var(--muted);
  margin-bottom: 4px;
  letter-spacing: .02em;
}
.metric-item .metric-value {
  font-size: 1.15rem;
  font-weight: 600;
  word-break: break-all;
}
.metric-item.tone-success .metric-value { color: #16a34a; }
.metric-item.tone-info    .metric-value { color: #2563eb; }
.metric-item.tone-warning .metric-value { color: #d97706; }
.metric-item.tone-danger  .metric-value { color: #dc2626; }
.metric-item.tone-muted   .metric-value { color: var(--accent); }

.loading-stub { padding: 40px 0; }

/* ─────── 搜索 ─────── */

.search-hero {
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.search-result-group {
  margin-bottom: 20px;
}
.search-result-group .group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: #1a2230;
  color: #fff;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  font-size: .9rem;
}
.search-result-group .group-body {
  border: 1px solid var(--border);
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  background: #fff;
}
.search-hit {
  padding: 12px 14px;
  border-top: 1px solid #f0f3f7;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.search-hit:first-child { border-top: none; }
.search-hit .hit-summary { font-size: .92rem; }
.search-hit .hit-meta {
  font-size: .72rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, monospace;
}
.search-hit details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: .8rem;
  list-style: none;
}
.search-hit details summary::before {
  content: '▸ ';
}
.search-hit details[open] summary::before {
  content: '▾ ';
}
.search-hit pre {
  background: #1a2230;
  color: #d6deeb;
  padding: 10px 14px;
  font-size: .75rem;
  border-radius: 6px;
  margin-top: 6px;
  max-height: 320px;
  overflow: auto;
}

/* ─────── 登录页 ─────── */

.login-body {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 14px;
  padding: 40px 32px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
