.page-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
}

.empty-card {
  text-align: center;
  padding: 3rem 2rem;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ── 历史记录页头部 ──────────────────────────────────────── */
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 48px 20px;
  border-bottom: 1px solid var(--border);
}

.history-header h1 {
  font-size: 22px;
  font-weight: 700;
}

/* ── 记录列表 ────────────────────────────────────────────── */
.history-list {
  max-width: 860px;
  margin: 24px auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── 单条记录卡片 ────────────────────────────────────────── */
.history-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}

.history-card:hover {
  border-color: #444;
}

.card-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 48px;
  text-align: center;
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
}

.card-error {
  margin-top: 6px;
  font-size: 12px;
  color: #f66;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 状态徽章 ────────────────────────────────────────────── */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.status-pending    { background: #333; color: #aaa; }
.status-processing { background: #2a2a00; color: #f5c842; }
.status-detected   { background: #002a40; color: #4ac8f5; }
.status-done       { background: #002a10; color: #4af58a; }
.status-error      { background: #2a0000; color: #f54a4a; }

/* ── 操作按钮区 ──────────────────────────────────────────── */
.card-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-view {
  display: inline-block;
  padding: 8px 16px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--radius-sm);
  transition: opacity 0.15s;
  white-space: nowrap;
}

.btn-view:hover { opacity: 0.85; }

.btn-view-disabled {
  display: inline-block;
  padding: 8px 16px;
  background: var(--surface2);
  color: var(--text-dim);
  font-size: 13px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.btn-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.btn-delete:hover {
  border-color: #f54a4a;
  color: #f54a4a;
  background: rgba(245, 74, 74, 0.08);
}

.btn-delete:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .history-header {
    padding: 20px 16px;
    gap: 12px;
  }
  .history-header h1 {
    font-size: 18px;
  }
  .history-list {
    padding: 0 16px;
  }
  .history-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .card-actions {
    justify-content: flex-end;
  }
  .btn-view,
  .btn-view-disabled {
    width: 100%;
    text-align: center;
  }
}
