/* =====================================================================
   陪玩管理后台 · 仪表盘（Dashboard）专用样式
   仅作用于 Components/Pages/Dashboard.razor
   设计语言：浅色卡片 + 品牌粉红(#ff2e63) / 蓝(#2e7bff) 点缀
   ===================================================================== */

/* ---------- 容器 ---------- */
.dash { max-width: 1200px; }

/* ---------- 顶部标题栏 ---------- */
.dash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dash-title { display: flex; align-items: baseline; }
.dash-title h1 { margin: 0; font-size: 20px; color: #1f2937; }
.dash-sub { margin-left: 10px; color: #8a8f99; font-size: 13px; }

.dash-acts { display: flex; gap: 10px; }
.dash-acts .btn-ghost {
  height: 32px; padding: 0 14px; border-radius: 6px;
  border: 1px solid #d9dde3; background: #fff; color: #333;
  cursor: pointer; font-size: 13px;
}
.dash-acts .btn-primary {
  height: 32px; padding: 0 16px; border-radius: 6px;
  border: none; background: #2e7bff; color: #fff;
  cursor: pointer; font-size: 13px;
}

/* ---------- 二级 Tab 导航 ---------- */
.dash-tabs {
  display: flex; gap: 22px; flex-wrap: wrap;
  background: #fff; border-radius: 8px; padding: 12px 18px; margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.dash-tabs .dt-item { color: #555; font-size: 14px; text-decoration: none; padding: 2px; }
.dash-tabs .dt-item:hover { color: #2e7bff; }
.dash-tabs .dt-item.on { color: #2e7bff; font-weight: 700; position: relative; }
.dash-tabs .dt-item.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -14px;
  height: 2px; background: #2e7bff; border-radius: 2px;
}

/* ---------- 第一行：4 张大卡 ---------- */
.dash-cards-4 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px;
}
.dash-card {
  background: #fff; border-radius: 10px; padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.dc-head { display: flex; align-items: center; justify-content: space-between; }
.dc-title { font-size: 14px; color: #6b7280; font-weight: 600; }
.dc-tabs { display: inline-flex; gap: 4px; }
.dc-tab {
  border: none; background: transparent; color: #9097a3;
  font-size: 12px; padding: 3px 8px; border-radius: 4px; cursor: pointer;
}
.dc-tab.on { background: #e8f0ff; color: #2e7bff; font-weight: 600; }
.dc-num { font-size: 32px; font-weight: 800; color: #1f2937; margin-top: 12px; line-height: 1; }
.dc-foot { margin-top: 10px; font-size: 12px; color: #8a8f99; }
.dc-foot em { font-style: normal; color: #2e7bff; font-weight: 700; margin: 0 4px; }

/* ---------- 第二行：6 张数字卡 ---------- */
.dash-grid-6 {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 14px;
}
.g-cell {
  background: #fff; border-radius: 10px; padding: 16px 12px; text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.g-ico {
  display: inline-flex; width: 32px; height: 32px; line-height: 32px;
  justify-content: center; border-radius: 8px; background: #f3f5fa; font-size: 18px;
}
.g-ico-1 { background: #fde8f0; color: #ff2e63; }
.g-ico-2 { background: #fff4d6; color: #d98a00; }
.g-ico-3 { background: #e8f0ff; color: #2e7bff; }
.g-ico-4 { background: #e6f7ec; color: #1a9a4e; }
.g-ico-5 { background: #f0f1f4; color: #6b7280; }
.g-ico-6 { background: #fdeaea; color: #ff4d4f; }
.g-num { font-size: 22px; font-weight: 800; margin-top: 8px; color: #1f2937; }
.g-num-red { color: #ff2e63; }
.g-lbl { font-size: 12px; color: #8a8f99; margin-top: 4px; }

/* ---------- 第三行：6 个快捷入口 ---------- */
.dash-quick .q-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 18px 8px; background: #fff; border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05); text-decoration: none; color: #555;
}
.dash-quick .q-cell:hover {
  box-shadow: 0 4px 16px rgba(46,123,255,.12); transform: translateY(-1px); transition: all .15s;
}
.dash-quick .q-ico {
  width: 36px; height: 36px; border-radius: 10px; background: #f3f5fa;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 8px;
}
.dash-quick .q-lbl { font-size: 13px; color: #4b5563; }

/* ---------- 第四行：折线图 + 待处理事项 ---------- */
.dash-row { display: grid; grid-template-columns: 2.5fr 1fr; gap: 14px; }

/* 折线图 */
.dash-chart {
  background: #fff; border-radius: 10px; padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.ch-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ch-title { font-size: 16px; font-weight: 700; color: #1f2937; }
.ch-sub { font-size: 12px; color: #8a8f99; margin-top: 2px; }
.ch-legend { display: flex; align-items: center; gap: 18px; font-size: 12px; color: #6b7280; }
.ch-legend em { font-style: normal; color: #1f2937; font-weight: 600; margin-left: 4px; }
.ch-legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.lg-1 { background: #2e7bff; }
.lg-2 { background: #ff4d4f; }
.lg-3 { background: #26c281; }

.ch-body { position: relative; width: 100%; height: 320px; padding-left: 36px; padding-bottom: 28px; box-sizing: border-box; }
.ch-y-axis { position: absolute; top: 0; left: 0; bottom: 28px; width: 36px; }
.ch-ylab { position: absolute; right: 6px; font-size: 11px; color: #9ba1ad; transform: translateY(-50%); }
.ch-x-axis { position: absolute; left: 36px; right: 0; bottom: 0; height: 28px; }
.ch-xlab { position: absolute; bottom: 8px; transform: translateX(-50%); font-size: 11px; color: #9ba1ad; white-space: nowrap; }
.ch-hgrid { position: absolute; left: 36px; right: 0; top: 0; bottom: 28px; pointer-events: none; }
.ch-hline { position: absolute; left: 0; right: 0; height: 1px; background: #eef0f4; }
.ch-svg { position: absolute; left: 36px; right: 0; top: 0; bottom: 28px; width: calc(100% - 36px); height: calc(100% - 28px); display: block; }

/* 待处理事项 */
.dash-todo {
  background: #fff; border-radius: 10px; padding: 16px 8px 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.todo-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px 10px; border-bottom: 1px solid #f0f1f4;
}
.todo-title { font-size: 15px; font-weight: 700; color: #1f2937; }
.todo-more { font-size: 12px; color: #2e7bff; text-decoration: none; cursor: pointer; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li + li { border-top: 1px dashed #f0f1f4; }
.todo-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px; text-decoration: none; color: #4b5563; font-size: 13px;
}
.todo-link:hover { background: #fafbfc; }
.todo-link .todo-lbl { color: #4b5563; }
.todo-link .todo-num { color: #8a8f99; font-weight: 600; }
.todo-link-red .todo-num { color: #ff2e63; }

/* ---------- 响应式（窄屏） ---------- */
@media (max-width: 1024px) {
  .dash-cards-4 { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-6  { grid-template-columns: repeat(3, 1fr); }
  .dash-row     { grid-template-columns: 1fr; }
}
