/* ============================================
   SEO REPORTER — GLOBAL STYLES
   ============================================ */

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #242836;
  --border: #2e3347;
  --text: #e8eaf0;
  --text-muted: #7a7f9a;
  --accent: #6c63ff;
  --accent-hover: #5a52e0;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Login ─────────────────────────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
}

.login-brand {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.login-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid var(--red);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--red);
  margin-bottom: 16px;
}

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Dashboard layout ──────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-brand { font-size: 17px; font-weight: 700; }
.topbar-controls { display: flex; gap: 10px; align-items: center; }

select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
}

select:focus { outline: none; border-color: var(--accent); }

.btn-logout {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:hover { border-color: var(--accent); color: var(--text); }

.container { max-width: 1200px; margin: 0 auto; padding: 28px 24px; }

/* ── Score cards ────────────────────────────────────────────────── */
.scorecards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.scorecards-five {
  grid-template-columns: repeat(5, 1fr);
}

.scorecard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
}

.scorecard-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scorecard-value {
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}

.scorecard-meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.change-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.change-badge.good { background: rgba(34,197,94,0.15); color: var(--green); }
.change-badge.poor { background: rgba(239,68,68,0.15); color: var(--red); }
.change-badge.neutral { background: var(--border); color: var(--text-muted); }

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-healthy { background: rgba(34,197,94,0.15); color: var(--green); }
.status-attention { background: rgba(245,158,11,0.15); color: var(--amber); }
.status-critical { background: rgba(239,68,68,0.15); color: var(--red); }

/* ── Charts ─────────────────────────────────────────────────────── */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 768px) {
  .charts-row { grid-template-columns: 1fr; }
}

.chart-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.chart-box h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 18px;
}

/* ── Data panels ────────────────────────────────────────────────── */
.panels-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .panels-row { grid-template-columns: 1fr; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.panel-header h3 {
  font-size: 14px;
  font-weight: 600;
}

.panel-body { padding: 16px 20px; }

/* ── Tables ─────────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

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

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface2); }

.word-break { word-break: break-all; font-size: 12px; }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green); }
.text-amber { color: var(--amber); }
.text-red { color: var(--red); }

/* ── AI Analysis sections ───────────────────────────────────────── */
.ai-section {
  margin-bottom: 20px;
}

.ai-section h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ai-section p, .ai-section li {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

.ai-section ul {
  padding-left: 18px;
}

.ai-section li { margin-bottom: 4px; }

/* ── Loading / empty states ──────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: var(--text-muted);
}

.skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--border) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .container { padding: 16px; }
  .scorecards { grid-template-columns: 1fr 1fr; }
  .scorecards-five { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 0 16px; }
}
/* ── Report Detail Page ─────────────────────────────────────────── */
.report-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 24px;
}

.report-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.report-site-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.report-url {
  font-size: 13px;
  color: var(--text-muted);
}

.report-score-block {
  text-align: right;
}

.report-score {
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}

.report-meta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.meta-chip {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.report-history-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.history-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.history-dot:hover { border-color: var(--border); background: var(--surface2); }
.history-dot.active { border-color: var(--accent); background: rgba(108,99,255,0.08); }

.history-dot-score {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.history-dot-date {
  font-size: 10px;
  color: var(--text-muted);
}

/* ── Tabs ─────────────────────────────────────────────────────────── */
.tabs-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-panel { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.tab-section { margin-bottom: 28px; }
.tab-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

/* ── Metric grid ──────────────────────────────────────────────────── */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-align: center;
}

.metric-val {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.metric-lbl {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* ── Issues list ──────────────────────────────────────────────────── */
.issues-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.issue-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.issue-critical { border-left: 3px solid var(--red); }
.issue-warning { border-left: 3px solid var(--amber); }
.issue-info { border-left: 3px solid var(--accent); }

.issue-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.issue-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.issue-severity {
  font-weight: 600;
  text-transform: uppercase;
}

.issue-page {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── AI text ──────────────────────────────────────────────────────── */
.ai-text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}

.ai-text p { margin-bottom: 12px; }
.ai-text li { margin-bottom: 6px; }

/* ── Clickable scorecard ──────────────────────────────────────────── */
.scorecard.clickable { cursor: pointer; transition: border-color 0.15s; }
.scorecard.clickable:hover { border-color: var(--accent); }

/* ── Empty state ──────────────────────────────────────────────────── */
.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.table-url {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

/* ── Admin Panel ─────────────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  min-height: calc(100vh - 80px);
}

.admin-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  height: fit-content;
  position: sticky;
  top: 80px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: none;
  background: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
  text-align: left;
}

.admin-nav-btn:hover { background: var(--surface2); color: var(--text); }
.admin-nav-btn.active { background: rgba(108,99,255,0.15); color: var(--accent); }

.nav-icon { font-size: 16px; }

.admin-main { min-width: 0; }

.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.admin-panel-header h2 { font-size: 20px; font-weight: 700; }

.admin-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-email { font-weight: 500; }

.btn-action {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
}

.btn-action:hover { border-color: var(--accent); color: var(--accent); }
.btn-action:disabled { opacity: 0.4; cursor: not-allowed; }

.table-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.btn-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
}

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

.btn-icon .spinner {
  animation: spin 1s linear infinite;
  color: #00f5d4;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.btn-icon.btn-delete-account:hover {
  border-color: var(--red);
  color: var(--red);
}

.cb-scheduled {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── Workflows ─────────────────────────────────────────────────────── */
.wf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.wf-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.wf-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.wf-id {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.wf-meta {
  font-size: 12px;
  margin-bottom: 14px;
}

.wf-active { color: var(--green); }
.wf-inactive { color: var(--text-muted); }

.btn-trigger {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: var(--font);
  width: 100%;
}

.btn-trigger:hover { background: var(--accent-hover); }
.btn-trigger:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Settings ─────────────────────────────────────────────────────── */
.settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
}

.settings-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.settings-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
}

.settings-card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.settings-card-val {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.settings-card-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.settings-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-link {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.15s;
}

.settings-link:hover { border-color: var(--accent); color: var(--accent); }

/* ── Modal ─────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  width: 100%;
  max-width: 420px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
}

.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }

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

/* ── Checkbox lists (inline forms) ────────────────────────────────── */
.cb-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 5px 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
}

.cb-row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.cb-row span {
  word-break: break-word;
  line-height: 1.4;
}

/* ============================================
   NEW REPORT STYLES — Score Bars, Accordions, Checklists
   ============================================ */

/* ── Score Bars ───────────────────────────────────────────────────── */
.score-bar-wrap {
  width: 100%;
  background: var(--surface2);
  border-radius: 6px;
  height: 28px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 6px 0 0 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 50px;
  transition: width 0.6s ease;
}

.score-bar-fill.high { background: var(--green); }
.score-bar-fill.med { background: var(--amber); }
.score-bar-fill.low { background: var(--red); }

.score-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

.score-bar-section {
  margin-bottom: 16px;
}

/* ── Callout Boxes ────────────────────────────────────────────────── */
.callout {
  padding: 14px 18px;
  border-radius: 8px;
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.6;
}

.callout-info {
  background: rgba(33,150,243,0.1);
  border-left: 4px solid #2196f3;
  color: #bbdefb;
}

.callout-warn {
  background: rgba(255,152,0,0.1);
  border-left: 4px solid #ff9800;
  color: #ffe0b2;
}

.callout-error {
  background: rgba(239,68,68,0.1);
  border-left: 4px solid var(--red);
  color: #ffcdd2;
}

.callout-success {
  background: rgba(34,197,94,0.1);
  border-left: 4px solid var(--green);
  color: #c8e6c9;
}

.callout strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

/* ── Accordion / Checklist ────────────────────────────────────────── */
.accordion-section {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface2);
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}

.accordion-header:hover { background: var(--border); }

.accordion-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.accordion-header-title {
  font-size: 14px;
  font-weight: 600;
}

.accordion-header-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.accordion-header-toggle {
  font-size: 18px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.accordion-header.open .accordion-header-toggle {
  transform: rotate(180deg);
}

.accordion-body {
  display: none;
  padding: 16px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.accordion-body.open {
  display: block;
  animation: fadeIn 0.2s ease;
}

/* ── Checklist Item ───────────────────────────────────────────────── */
.checklist-item {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.checklist-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.checklist-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.checklist-header input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--accent);
}

.checklist-header-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.checklist-header-title.done {
  text-decoration: line-through;
  color: var(--text-muted);
}

.checklist-why {
  margin: 8px 0 12px 32px;
  padding: 10px 14px;
  background: var(--surface2);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  border-left: 3px solid var(--accent);
}

.checklist-steps {
  margin-left: 32px;
}

.checklist-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  line-height: 1.5;
}

.checklist-step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ── SEO Audit Cards ──────────────────────────────────────────────── */
.audit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
}

.audit-card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.audit-card-explanation {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.audit-status-good { color: var(--green); }
.audit-status-warning { color: var(--amber); }
.audit-status-critical { color: var(--red); }

/* ── Audit Card Fix Instructions ─────────────────────────────── */
.audit-card-fix {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--surface2);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
}
.audit-card-fix-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 4px;
}
.audit-card-fix-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  white-space: pre-wrap;
}

/* ── GEO Score Row ───────────────────────────────────────────── */
.geo-score-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ── Koray Content Gaps Table ───────────────────────────────────── */
table.koray-gaps-table td.gap-keywords {
  text-align: left !important;
  max-width: 220px;
  font-size: 12px;
  line-height: 1.5;
}
table.koray-gaps-table td.gap-topic {
  text-align: left !important;
  max-width: 180px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
}

.funnel-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.funnel-tofu {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.funnel-mofu {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}
.funnel-bofu {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Left-align To Page and Anchor Text in Internal Linking table */
table.koray-links-table td:nth-child(2),
table.koray-links-table td:nth-child(3) {
  text-align: left !important;
}

/* ── Keyword Table (top 30) ───────────────────────────────────────── */
.keyword-table td:nth-child(1) { font-weight: 500; }
.keyword-table td:nth-child(2),
.keyword-table td:nth-child(3),
.keyword-table td:nth-child(4) { text-align: center; }

.keyword-position {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.keyword-position.good { background: rgba(34,197,94,0.15); color: var(--green); }
.keyword-position.ok { background: rgba(245,158,11,0.15); color: var(--amber); }
.keyword-position.poor { background: rgba(239,68,68,0.15); color: var(--red); }

/* ── Traffic Metrics Grid (larger cards) ──────────────────────────── */
.traffic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.traffic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.traffic-card-value {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 6px;
}

.traffic-card-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* ── Report Section Layout ────────────────────────────────────────── */
.report-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
}

.report-section-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-section-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: #48cae4;
  margin: 50px 0 30px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Health Analysis Layout ───────────────────────────────────────── */
.health-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.health-box {
  background: var(--surface2);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.health-box-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.health-box-text {
  font-size: 14px;
  line-height: 1.7;
}

/* ── Content Studio ─────────────────────────────────────────────── */
.content-studio-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .content-studio-grid { grid-template-columns: 1fr; }
}

/* ── Popular Pages List ───────────────────────────────────────────── */
.page-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

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

.page-item-path {
  font-size: 13px;
  font-weight: 500;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-item-sessions {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ── What is Working section ──────────────────────────────────── */
.working-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.working-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.working-item:last-child {
  margin-bottom: 0;
}

.working-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
  font-weight: 700;
  font-size: 13px;
}
