/* Hub Approval UI — Vanilla CSS */

:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e2e5eb;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #16a34a;
  --success-hover: #15803d;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --warning: #f59e0b;
  --radius: 0.5rem;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --font: system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Code", monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; }

/* --- Nav --- */
.topnav {
  background: var(--text); color: #fff; padding: 0 1.5rem;
  display: flex; align-items: center; height: 3.5rem;
}
.nav-logo { color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none; margin-right: 2rem; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 0.9rem; }
.nav-links a:hover { color: #fff; }
.nav-logout { margin-left: auto; }

/* --- Container --- */
.container { max-width: 80rem; margin: 0 auto; padding: 1.5rem; }

/* --- Login Page --- */
.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: var(--bg);
}
.login-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 2.5rem; width: 100%; max-width: 24rem; text-align: center;
}
.login-card h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.login-subtitle { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.9rem; }
.form-group { margin-bottom: 1rem; text-align: left; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.25rem; }
.form-group input {
  width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--border);
  border-radius: 0.375rem; font-size: 0.95rem;
}
.form-group input:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: var(--primary); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.5rem 1rem; border: none; border-radius: 0.375rem;
  font-size: 0.875rem; font-weight: 500; cursor: pointer; text-decoration: none;
  transition: background 0.15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: var(--success-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover { background: #d1d5db; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- Alerts --- */
.alert { padding: 0.75rem 1rem; border-radius: 0.375rem; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }

/* --- Stats Grid --- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.5rem; display: flex; flex-direction: column; align-items: center;
}
.stat-value { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); }

/* --- Tables --- */
.status-table { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 2rem; }
.status-table table { width: 100%; border-collapse: collapse; }
.status-table th { background: #f9fafb; text-align: left; padding: 0.75rem 1rem; font-size: 0.8rem; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.status-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.status-table tr:last-child td { border-bottom: none; }
.empty { text-align: center; color: var(--text-muted); padding: 2rem 1rem; }
.link-action { color: var(--primary); text-decoration: none; font-size: 0.85rem; }

/* --- Badges --- */
.badge {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 9999px;
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
}
.badge-draft { background: #e5e7eb; color: #374151; }
.badge-enriched { background: #dbeafe; color: #1e40af; }
.badge-pending_approval { background: #fef3c7; color: #92400e; }
.badge-approved { background: #d1fae5; color: #065f46; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-published { background: #ede9fe; color: #5b21b6; }

.quality-badge {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 9999px;
  font-size: 0.75rem; font-weight: 600;
}
.quality-green { background: #d1fae5; color: #065f46; }
.quality-yellow { background: #fef3c7; color: #92400e; }
.quality-red { background: #fee2e2; color: #991b1b; }

.similarity-alert {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 9999px;
  font-size: 0.75rem; font-weight: 600; background: #fee2e2; color: #991b1b;
}

/* --- Queue --- */
.queue-header { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.queue-count { color: var(--text-muted); font-size: 0.9rem; }

.filters-bar {
  display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem;
  background: var(--surface); padding: 0.75rem; border-radius: var(--radius); box-shadow: var(--shadow);
}
.filters-bar select {
  padding: 0.4rem 0.75rem; border: 1px solid var(--border); border-radius: 0.375rem;
  font-size: 0.85rem; background: #fff;
}

.bulk-bar {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem;
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: var(--radius);
  margin-bottom: 1rem;
}
#bulk-count { font-size: 0.9rem; font-weight: 600; color: var(--primary); }

/* --- Content Cards --- */
.content-cards { display: flex; flex-direction: column; gap: 0.5rem; }

.content-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--border); overflow: hidden;
}
.card-header {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem;
  cursor: pointer; user-select: none;
}
.card-header:hover { background: #f9fafb; }
.card-select { flex-shrink: 0; }
.card-title-area { flex: 1; min-width: 0; }
.card-title { font-size: 0.95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.25rem; align-items: center; }
.card-lang { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.card-slug { font-size: 0.75rem; color: var(--text-muted); font-family: var(--mono); }
.card-toggle { font-size: 1.25rem; color: var(--text-muted); font-weight: 300; width: 1.5rem; text-align: center; flex-shrink: 0; }

.card-body { padding: 0 1rem 1rem; border-top: 1px solid var(--border); }

/* SEO Preview */
.seo-preview {
  background: #fff; border: 1px solid var(--border); border-radius: 0.375rem;
  padding: 0.75rem; margin: 1rem 0; font-family: Arial, sans-serif;
}
.seo-title { color: #1a0dab; font-size: 1.1rem; font-weight: normal; margin-bottom: 0.15rem; }
.seo-url { color: #006621; font-size: 0.8rem; margin-bottom: 0.25rem; }
.seo-desc { color: #545454; font-size: 0.85rem; line-height: 1.4; }

.body-preview { margin: 1rem 0; }
.body-preview h4 { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.body-text { font-size: 0.9rem; line-height: 1.6; color: var(--text); max-height: 10rem; overflow-y: auto; }

.cta-preview {
  margin: 0.75rem 0; padding: 0.5rem 0.75rem; background: #eff6ff;
  border-left: 3px solid var(--primary); border-radius: 0 0.25rem 0.25rem 0;
  font-size: 0.85rem;
}

/* Card actions */
.card-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.inline-form { display: flex; gap: 0.5rem; align-items: center; }
.reject-note { padding: 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: 0.375rem; font-size: 0.85rem; width: 16rem; }

/* --- Empty state --- */
.empty-state { text-align: center; padding: 3rem; color: var(--text-muted); }

/* --- Pagination --- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
.page-info { font-size: 0.9rem; color: var(--text-muted); }

/* --- Responsive --- */
@media (max-width: 640px) {
  .filters-bar { flex-direction: column; }
  .card-meta { flex-direction: column; align-items: flex-start; }
  .inline-form { flex-direction: column; align-items: stretch; }
  .reject-note { width: 100%; }
}
