/* 资源看板 — 对齐 ai-edu.huayuntiantu.com/databaseBoard */
.drb-page {
  --drb-primary: #c0271b;
  --drb-border: #e8ecf3;
  color: #1e293b;
}

.drb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.drb-head-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drb-head-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #c0271b, #e63323);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.drb-head-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.drb-head-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #c0271b;
  font-size: 12px;
  font-weight: 600;
}

.drb-head-link {
  font-size: 13px;
  color: #64748b;
  text-decoration: none;
}

.drb-head-link:hover {
  color: #c0271b;
}

.drb-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border: 1px solid var(--drb-border);
  border-radius: 12px;
  background: #fff;
}

.drb-select {
  min-width: 120px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--drb-border);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: #334155;
  outline: none;
}

.drb-select:focus {
  border-color: #f8a99e;
}

.drb-date-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--drb-border);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
  color: #475569;
}

.drb-query-btn {
  height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #c0271b, #c0271b);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.drb-query-btn:hover {
  opacity: 0.92;
}

.drb-filter-tip {
  width: 100%;
  font-size: 12px;
  color: #94a3b8;
}

.drb-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 14px;
}

.drb-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 960px) {
  .drb-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.drb-kpi-card {
  padding: 16px 18px;
  border: 1px solid var(--drb-border);
  border-radius: 12px;
  background: #fff;
}

.drb-kpi-label {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 6px;
}

.drb-kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.drb-kpi-trend {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
}

.drb-kpi-trend.up {
  color: #c0271b;
}

.drb-kpi-trend.down {
  color: #c0271b;
}

.drb-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.drb-panel {
  border: 1px solid var(--drb-border);
  border-radius: 12px;
  background: #fff;
  padding: 16px;
  min-height: 280px;
}

.drb-panel-wide {
  grid-column: 1 / -1;
}

.drb-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 14px;
}

.drb-donut-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.drb-donut {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  flex-shrink: 0;
}

.drb-legend {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drb-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.drb-legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.drb-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.drb-legend-name {
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drb-legend-val {
  font-weight: 600;
  color: #0f172a;
}

.drb-trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 200px;
  padding-top: 8px;
}

.drb-trend-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.drb-trend-bar {
  width: 100%;
  max-width: 48px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #c0271b, #c0271b);
  min-height: 8px;
}

.drb-trend-label {
  font-size: 11px;
  color: #94a3b8;
}

.drb-table-wrap {
  overflow-x: auto;
}

.drb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.drb-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid var(--drb-border);
}

.drb-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.drb-table tbody tr:hover {
  background: #f8fafc;
}

.drb-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.drb-rank.top {
  background: #eef2ff;
  color: #c0271b;
}

.drb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 200px;
  color: #94a3b8;
  font-size: 13px;
}

.drb-empty.hidden {
  display: none;
}
