/* ===== 陪读一本书 - 后台公用样式 ===== */

/* 后台布局 */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.dash-welcome h2 {
  margin-bottom: 4px;
}

.dash-welcome p {
  font-size: 0.9rem;
}

/* 统计卡片组 */
.dash-stat {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-stat .card {
  flex: 1;
  min-width: 140px;
  text-align: center;
  padding: 20px;
}

.dash-stat .num {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-serif);
}

.dash-stat .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 排课/进度条目 */
.schedule-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg-surface);
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.schedule-time {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 50px;
}

.schedule-info {
  flex: 1;
}

.schedule-info h4 {
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.schedule-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 书籍进度条目 */
.book-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-surface);
  border-radius: var(--radius);
  margin-bottom: 10px;
}

.book-progress .cover {
  font-size: 2rem;
  flex-shrink: 0;
}

.book-progress .info {
  flex: 1;
}

.book-progress .info h4 {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.book-progress .info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 财务流水行 */
.finance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.finance-row:last-child {
  border: none;
}

.amount-in {
  color: #2ecc71;
  font-weight: 600;
}

.amount-out {
  color: #e74c3c;
  font-weight: 600;
}

/* 返回链接 */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.back-link:hover {
  color: var(--primary);
}

/* 数据表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.data-table tr:hover td {
  background: var(--bg-hover);
}

/* 状态点 */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-dot.active {
  background: #2ecc71;
}

.status-dot.pending {
  background: var(--gold);
}

.status-dot.blocked {
  background: #e74c3c;
}

/* 简单柱状图 */
.chart-bar {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 100px;
  padding: 0 8px;
}

.chart-bar div {
  flex: 1;
  border-radius: 4px 4px 0 0;
  transition: height 0.5s;
}

/* 面板切换 */
.panel {
  display: none;
}

.panel.active {
  display: block;
}
