/* ============================================================================
 * Admin Layout Styles
 * Uses brand fonts and colors from the main application
 * ============================================================================ */

/* Admin Layout Base */
.admin-layout {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--gray-ghost);
}

/* ============================================================================
 * Header
 * ============================================================================ */
.admin-header {
  background: white;
  border-bottom: 1px solid var(--gray-800);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
}

.admin-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.admin-logo-image {
  height: 28px;
  width: auto;
}

.admin-logo-badge {
  background: var(--color-primary);
  color: white;
  font-size: 0.625rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-user {
  color: var(--gray-500);
  font-size: 0.875rem;
}

/* ============================================================================
 * Container & Layout
 * ============================================================================ */
.admin-container {
  display: flex;
  max-width: 1600px;
  margin: 0 auto;
  min-height: calc(100vh - 57px);
}

/* ============================================================================
 * Sidebar
 * ============================================================================ */
.admin-sidebar {
  width: 250px;
  background: white;
  border-right: 1px solid var(--gray-800);
  padding: 1.5rem 0;
  flex-shrink: 0;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-nav-section {
  margin-top: 1.5rem;
}

.admin-nav-section-title {
  font-size: 0.6875rem;
  text-transform: uppercase;
  color: var(--gray-500);
  padding: 0 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  color: var(--gray-500);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: all 0.15s ease;
}

.admin-nav-item:hover {
  background-color: var(--gray-ghost);
  color: var(--gray-500);
}

.admin-nav-item.active {
  background-color: rgba(233, 51, 37, 0.08);
  color: var(--color-primary);
  border-right: 3px solid var(--color-primary);
  font-weight: 700;
}

.admin-nav-icon {
  font-size: 1.125rem;
}

.admin-nav-label {
  flex: 1;
}

/* ============================================================================
 * Main Content
 * ============================================================================ */
.admin-main {
  flex: 1;
  padding: 1.5rem 2rem;
  overflow-x: auto;
}

.admin-page-header {
  margin-bottom: 1.5rem;
}

.admin-page-header h1 {
  font-size: 1.75rem;
  font-weight: 900;
  font-style: italic;
  margin: 0 0 0.25rem 0;
  color: var(--gray-500);
}

.admin-page-header p {
  color: var(--gray-500);
  margin: 0;
}

/* ============================================================================
 * Alerts
 * ============================================================================ */
.admin-alert {
  padding: 0.875rem 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
}

.admin-alert-success {
  background: rgba(33, 150, 19, 0.1);
  color: var(--green);
  border: 1px solid rgba(33, 150, 19, 0.3);
}

.admin-alert-danger {
  background: rgba(233, 51, 37, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(233, 51, 37, 0.3);
}

.admin-alert-warning {
  background: rgba(255, 215, 0, 0.15);
  color: #92400e;
  border: 1px solid rgba(255, 215, 0, 0.4);
}

.admin-alert-info {
  background: rgba(59, 130, 246, 0.1);
  color: #1e40af;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Legacy alert classes (for backwards compatibility) */
.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
}

.alert-success {
  background: rgba(33, 150, 19, 0.1);
  color: var(--green);
  border: 1px solid rgba(33, 150, 19, 0.3);
}

.alert-danger {
  background: rgba(233, 51, 37, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(233, 51, 37, 0.3);
}

.alert-warning {
  background: rgba(255, 215, 0, 0.15);
  color: #92400e;
  border: 1px solid rgba(255, 215, 0, 0.4);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  color: #1e40af;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* ============================================================================
 * Dashboard Stats
 * ============================================================================ */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: white;
  padding: 1.25rem;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--color-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.stat-card.stat-warning {
  border-left-color: var(--yellow);
}

.stat-card.stat-success {
  border-left-color: var(--green);
}

.stat-card.stat-danger {
  border-left-color: var(--color-primary);
}

.stat-card.stat-info {
  border-left-color: #3b82f6;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 500;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 900;
  font-style: italic;
  color: var(--gray-500);
}

.stat-value.success {
  color: var(--green);
}

.stat-value.danger {
  color: var(--color-primary);
}

.stat-value.warning {
  color: #d97706;
}

.stat-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
}

.stat-link:hover {
  text-decoration: underline;
}

/* ============================================================================
 * Dashboard Grid
 * ============================================================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 1.5rem;
}

.dashboard-section {
  background: white;
  padding: 1.25rem;
  border-radius: var(--border-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.dashboard-section h2 {
  font-size: 1.125rem;
  font-weight: 900;
  font-style: italic;
  margin: 0 0 1rem 0;
  color: var(--gray-500);
}

/* ============================================================================
 * Tables
 * ============================================================================ */
.table-container {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table th {
  text-align: left;
  padding: 0.75rem;
  background: var(--gray-ghost);
  font-weight: 700;
  color: var(--gray-500);
  border-bottom: 2px solid var(--gray-800);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

.admin-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--gray-800);
  color: var(--gray-500);
}

.admin-table tr:hover {
  background-color: var(--gray-ghost);
}

.admin-table a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.admin-table a:hover {
  text-decoration: underline;
}

/* ============================================================================
 * Badges
 * ============================================================================ */
.badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-draft {
  background: var(--gray-800);
  color: var(--gray-500);
}

.badge-pending_review {
  background: rgba(255, 215, 0, 0.2);
  color: #92400e;
}

.badge-approved {
  background: rgba(33, 150, 19, 0.15);
  color: var(--green);
}

.badge-rejected {
  background: rgba(233, 51, 37, 0.15);
  color: var(--color-primary);
}

.badge-published {
  background: rgba(59, 130, 246, 0.15);
  color: #1e40af;
}

.badge-primary {
  background: var(--color-primary);
  color: white;
  margin-left: 0.5rem;
}

.badge-secondary {
  background: var(--gray-800);
  color: var(--gray-500);
}

.badge-success {
  background: rgba(33, 150, 19, 0.15);
  color: var(--green);
}

.badge-warning {
  background: rgba(255, 215, 0, 0.2);
  color: #92400e;
}

.badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: #1e40af;
}

.badge-domestic {
  background: rgba(33, 150, 19, 0.15);
  color: var(--green);
}

.badge-international {
  background: rgba(255, 215, 0, 0.2);
  color: #92400e;
}

/* ============================================================================
 * Status Badges
 * ============================================================================ */
.status-badge {
  padding: 0.25rem 0.625rem;
  border-radius: 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-badge.status-pending {
  background: rgba(255, 215, 0, 0.2);
  color: #92400e;
}

.status-badge.status-running {
  background: rgba(59, 130, 246, 0.15);
  color: #1e40af;
}

.status-badge.status-completed {
  background: rgba(33, 150, 19, 0.15);
  color: var(--green);
}

.status-badge.status-failed {
  background: rgba(233, 51, 37, 0.15);
  color: var(--color-primary);
}

.status-badge.status-cancelled {
  background: var(--gray-800);
  color: var(--gray-500);
}

/* Adapter Badges */
.badge-espn {
  background: rgba(233, 51, 37, 0.15);
  color: var(--color-primary);
}

.badge-sidearm {
  background: rgba(59, 130, 246, 0.15);
  color: #1e40af;
}

.badge-prestosports {
  background: rgba(33, 150, 19, 0.15);
  color: var(--green);
}

.badge-ncaa,
.badge-ncaa_stats {
  background: rgba(0, 74, 148, 0.15);
  color: #004a94;
}

/* ============================================================================
 * Buttons (Admin-specific overrides)
 * ============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--gray-700);
  color: var(--gray-500);
}

.btn-outline:hover {
  background: var(--gray-ghost);
  border-color: var(--gray-500);
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  border: 2px solid var(--color-primary-dark);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-success {
  background: var(--green);
  color: white;
}

.btn-success:hover {
  background: #1a7a0f;
}

.btn-danger {
  background: var(--color-primary);
  color: white;
}

.btn-danger:hover {
  background: var(--color-primary-dark);
}

.btn-full {
  width: 100%;
}

/* ============================================================================
 * Content Box
 * ============================================================================ */
.content-box {
  background: white;
  padding: 1.25rem;
  border-radius: var(--border-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.25rem;
}

.content-box h2,
.content-box h3 {
  margin: 0 0 1rem 0;
  font-weight: 900;
  font-style: italic;
  color: var(--gray-500);
}

.content-box h2 {
  font-size: 1.125rem;
}

.content-box h3 {
  font-size: 1rem;
}

/* ============================================================================
 * Filter Bar
 * ============================================================================ */
.filter-bar {
  background: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--gray-500);
  background: var(--gray-ghost);
  transition: all 0.15s ease;
  font-size: 0.875rem;
  font-weight: 600;
}

.filter-btn:hover {
  background: var(--gray-800);
  color: var(--gray-500);
}

.filter-btn.active {
  background: var(--color-primary);
  color: white;
}

/* ============================================================================
 * Forms
 * ============================================================================ */
.admin-form {
  max-width: 800px;
}

.form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--gray-800);
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-section h2,
.form-section h3 {
  margin: 0 0 1.25rem 0;
  font-size: 1.125rem;
  font-weight: 900;
  font-style: italic;
  color: var(--gray-500);
}

.form-group,
.form-field {
  margin-bottom: 1.25rem;
}

.form-group label,
.form-field label {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 700;
  color: var(--gray-500);
  font-size: 0.875rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-700);
  border-radius: var(--border-radius);
  font-size: 0.9375rem;
  font-family: inherit;
  background: white;
  color: var(--gray-500);
  transition: border-color 0.15s ease;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(233, 51, 37, 0.1);
}

.form-input::placeholder {
  color: var(--gray-600);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.field-help {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkbox-field .form-checkbox {
  margin-top: 0.25rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-primary);
}

.checkbox-field label {
  margin-bottom: 0;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  padding-top: 1.5rem;
}

/* ============================================================================
 * Search & Filters
 * ============================================================================ */
.search-form {
  width: 100%;
}

.search-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--gray-700);
  border-radius: var(--border-radius);
  font-size: 0.9375rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.filter-select {
  padding: 0.5rem 1rem;
  border: 1px solid var(--gray-700);
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  background: white;
}

.filter-form {
  margin-bottom: 1.25rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.filter-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.filter-actions {
  display: flex;
  gap: 0.75rem;
}

/* ============================================================================
 * Detail Pages
 * ============================================================================ */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.25rem;
}

@media (max-width: 1024px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.detail-main,
.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.detail-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--gray-900);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 700;
  color: var(--gray-500);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-value {
  color: var(--gray-500);
}

.detail-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.625rem;
}

.detail-list dt {
  font-weight: 700;
  color: var(--gray-500);
  font-size: 0.8125rem;
}

.detail-list dd {
  margin: 0;
  color: var(--gray-500);
}

/* ============================================================================
 * Code & JSON Blocks
 * ============================================================================ */
.code-block {
  background: var(--gray-ghost);
  padding: 1rem;
  border-radius: var(--border-radius);
  overflow-x: auto;
  font-size: 0.8125rem;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

.metadata-json {
  background: var(--gray-ghost);
  border: 1px solid var(--gray-800);
  border-radius: var(--border-radius);
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.8125rem;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

.error-message pre {
  background: rgba(233, 51, 37, 0.08);
  border: 1px solid rgba(233, 51, 37, 0.2);
  border-radius: var(--border-radius);
  padding: 1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: var(--color-primary);
}

/* ============================================================================
 * Meta Items
 * ============================================================================ */
.meta-item {
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--gray-900);
}

.meta-item:last-child {
  border-bottom: none;
}

.meta-label {
  font-size: 0.6875rem;
  color: var(--gray-500);
  text-transform: uppercase;
  margin-bottom: 0.125rem;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.meta-value {
  color: var(--gray-500);
  font-size: 0.875rem;
}

/* ============================================================================
 * Stats Tables & Progress
 * ============================================================================ */
.stats-table {
  width: 100%;
  border-collapse: collapse;
}

.stats-table th,
.stats-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-800);
}

.stats-table th {
  font-weight: 700;
  color: var(--gray-500);
  background: var(--gray-ghost);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.progress-bar,
.duration-bar {
  width: 180px;
  height: 22px;
  background: var(--gray-800);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #1a7a0f);
  transition: width 0.3s ease;
}

.duration-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.6875rem;
  font-weight: 700;
  transition: width 0.3s ease;
}

.stat-value-large {
  font-size: 2.5rem;
  font-weight: 900;
  font-style: italic;
  color: var(--gray-500);
  text-align: center;
  margin: 1rem 0;
}

.success-rate {
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius);
  font-weight: 700;
  font-size: 0.875rem;
}

.success-rate.success {
  background: rgba(33, 150, 19, 0.15);
  color: var(--green);
}

.success-rate.warning {
  background: rgba(255, 215, 0, 0.2);
  color: #92400e;
}

/* ============================================================================
 * Empty States
 * ============================================================================ */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--gray-500);
}

.empty-state p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.empty-message {
  text-align: center;
  padding: 2rem;
  color: var(--gray-500);
  font-style: italic;
}

/* ============================================================================
 * Header Actions
 * ============================================================================ */
.header-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.header-with-action h1 {
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
}

.back-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

/* ============================================================================
 * Pagination
 * ============================================================================ */
.pagination-container {
  display: flex;
  justify-content: center;
  padding: 1.25rem 0;
}

/* ============================================================================
 * Confidence Scores
 * ============================================================================ */
.confidence-score {
  font-weight: 700;
}

.confidence-score.score-high {
  color: var(--green);
}

.confidence-score.score-medium {
  color: #d97706;
}

.confidence-score.score-low {
  color: var(--color-primary);
}

.confidence-indicator {
  width: 100%;
  max-width: 180px;
}

.confidence-bar {
  background: linear-gradient(to right, var(--color-primary), #d97706, var(--green));
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius);
  font-size: 0.6875rem;
  font-weight: 700;
  text-align: center;
  min-width: 50px;
}

/* ============================================================================
 * Info Box
 * ============================================================================ */
.info-box {
  margin-top: 1.5rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 1.25rem;
  border-radius: var(--border-radius);
}

.info-box h3 {
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
  color: #1e40af;
}

.info-box ul {
  margin-left: 1.25rem;
  color: #1e3a8a;
}

.info-box li {
  margin-bottom: 0.375rem;
}

/* ============================================================================
 * Merge UI
 * ============================================================================ */
.subtitle {
  font-size: 1rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

.merge-intro {
  border-left: 4px solid #d97706;
}

.merge-intro h2 {
  color: #d97706;
  margin-bottom: 1rem;
}

.merge-intro ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.merge-intro li {
  margin-bottom: 0.5rem;
}

.merge-comparison {
  background: white;
  padding: 1.25rem;
  border-radius: var(--border-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.25rem;
}

.comparison-header {
  margin-bottom: 1.25rem;
}

.comparison-header p {
  color: var(--gray-500);
  margin-top: 0.375rem;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--gray-800);
}

.comparison-column h3 {
  margin: 0 0 1rem 0;
  font-size: 0.875rem;
  text-transform: uppercase;
  color: var(--gray-500);
  letter-spacing: 0.05em;
}

.player-summary {
  background: var(--gray-ghost);
  padding: 1rem;
  border-radius: var(--border-radius);
}

.player-summary .meta {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
}

.comparison-table th {
  text-align: left;
  padding: 0.75rem;
  background: var(--gray-ghost);
  font-weight: 700;
  color: var(--gray-500);
  border-bottom: 2px solid var(--gray-800);
  font-size: 0.8125rem;
  text-transform: uppercase;
}

.comparison-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--gray-800);
  font-size: 0.875rem;
}

.comparison-table tr.different {
  background: rgba(255, 215, 0, 0.1);
}

.comparison-table tr:hover {
  background: var(--gray-ghost);
}

.comparison-table tr.different:hover {
  background: rgba(255, 215, 0, 0.15);
}

.association-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.association-item {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  background: var(--gray-ghost);
  border-radius: var(--border-radius);
}

.association-label {
  font-weight: 700;
  color: var(--gray-500);
}

.association-count {
  font-size: 1.25rem;
  font-weight: 900;
  font-style: italic;
  color: var(--color-primary);
}

.merge-actions {
  border-top: 2px solid var(--gray-800);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
}

/* ============================================================================
 * Review History
 * ============================================================================ */
.review-history {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.review-item {
  padding: 1rem;
  background: var(--gray-ghost);
  border-radius: var(--border-radius);
  border-left: 3px solid var(--color-primary);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.375rem;
  flex-wrap: wrap;
}

.review-reviewer {
  font-weight: 700;
  font-size: 0.875rem;
}

.review-time {
  color: var(--gray-500);
  font-size: 0.8125rem;
}

.review-notes {
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-top: 0.375rem;
  line-height: 1.5;
}

/* ============================================================================
 * Action Section
 * ============================================================================ */
.action-section {
  margin-bottom: 1rem;
}

.action-section:last-child {
  margin-bottom: 0;
}

/* ============================================================================
 * Content Grid
 * ============================================================================ */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

/* ============================================================================
 * Error Cells
 * ============================================================================ */
.error-cell {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  color: var(--color-primary);
}

/* ============================================================================
 * Scraping Section (Dashboard)
 * ============================================================================ */
.scraping-section {
  background: var(--gray-ghost);
  border: 1px solid var(--gray-800);
  padding: 1.25rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0;
}

.scraping-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.scrape-stat-card {
  background: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-800);
  text-align: center;
}

.scrape-stat-card.stat-info {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
}

.scrape-stat-card.stat-warning {
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.3);
}

.recent-failures {
  background: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(233, 51, 37, 0.3);
}

.recent-failures h3 {
  font-size: 0.9375rem;
  font-weight: 900;
  margin: 0 0 0.75rem 0;
  color: var(--color-primary);
}

.failure-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}

.failure-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(233, 51, 37, 0.15);
}

.failure-list li:last-child {
  border-bottom: none;
}

.failure-list a {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
}

.failure-list a:hover {
  text-decoration: underline;
}

/* ============================================================================
 * Badge List
 * ============================================================================ */
.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* ============================================================================
 * Utility Classes
 * ============================================================================ */
.text-muted {
  color: var(--gray-500);
}

.text-success {
  color: var(--green);
}

.text-danger {
  color: var(--color-primary);
}

.text-warning {
  color: #d97706;
}

/* ============================================================================
 * Responsive Adjustments
 * ============================================================================ */
@media (max-width: 768px) {
  .admin-sidebar {
    display: none;
  }

  .admin-main {
    padding: 1rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }
}
