/* ─── Skip Link (Accessibility) ─── */

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  padding: 8px 16px;
  background: var(--tc-primary);
  color: var(--text-inverse);
  border-radius: var(--border-radius-xs);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 8px;
}

/* ─── Focus States (Accessibility) ─── */

.nav-item:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: -2px;
  background: rgba(255, 255, 255, 0.04);
}

.btn:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: 2px;
}

.filter-btn:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: 2px;
}

.hamburger:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: 2px;
}

.client-selector:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: 2px;
}

.data-table tbody tr:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: -2px;
}

a:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: 2px;
}

.search-input:focus-visible {
  outline: none;
  border-color: var(--tc-primary);
  box-shadow: 0 0 0 3px rgba(106, 171, 181, 0.2);
}

.kanban-card:focus-visible,
.work-card:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: 2px;
}

.insights-autocomplete-tag:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: 2px;
}

/* ─── Cards ─── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.card:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-card-hover);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── KPI Cards ─── */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.kpi-card:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.kpi-change {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kpi-change.up { color: var(--change-up); }
.kpi-change.down { color: var(--change-down); }
.kpi-change.stable { color: var(--change-stable); }

/* ─── Score Gauge (SVG) ─── */

.gauge-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}

.gauge-svg {
  width: 200px;
  height: 120px;
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 14;
  stroke-linecap: round;
}

.gauge-fill {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
  transition: stroke-dasharray 1.5s ease;
}

.gauge-score {
  font-size: 42px;
  font-weight: 800;
  fill: var(--text-primary);
  text-anchor: middle;
  dominant-baseline: middle;
  font-family: var(--font-body);
}

.gauge-label {
  font-size: 14px;
  font-weight: 600;
  fill: var(--text-muted);
  text-anchor: middle;
  font-family: var(--font-body);
}

.gauge-grade {
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  margin-top: 8px;
  padding: 3px 12px;
  border-radius: 20px;
  display: inline-block;
}

/* ─── Tables ─── */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.data-table thead th:hover {
  color: var(--text-secondary);
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr.selected {
  background: var(--tc-primary-glow);
}

.data-table tbody td {
  padding: 12px 16px;
  color: var(--text-secondary);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.data-table .keyword-cell {
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
}

.data-table .keyword-cell:hover {
  color: var(--tc-primary);
}

/* ─── Position Badge ─── */

.position-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.position-badge.top3 { background: rgba(34, 197, 94, 0.15); color: var(--pos-top3); }
.position-badge.top10 { background: rgba(106, 171, 181, 0.15); color: var(--pos-top10); }
.position-badge.top20 { background: rgba(245, 158, 11, 0.15); color: var(--pos-top20); }
.position-badge.below20 { background: rgba(239, 68, 68, 0.15); color: var(--pos-below20); }
.position-badge.unranked { background: rgba(128, 139, 148, 0.15); color: var(--pos-unranked); }

/* ─── Change Arrow ─── */

.change-indicator {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.change-indicator.up { color: var(--change-up); }
.change-indicator.down { color: var(--change-down); }
.change-indicator.stable { color: var(--change-stable); }

/* ─── Badges ─── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-critical { background: var(--severity-critical-bg); color: var(--severity-critical); }
.badge-warning { background: var(--severity-warning-bg); color: var(--severity-warning); }
.badge-notice { background: var(--severity-notice-bg); color: var(--severity-notice); }
.badge-pass { background: var(--severity-pass-bg); color: var(--severity-pass); }

.badge-high { background: rgba(239, 68, 68, 0.12); color: var(--priority-high); }
.badge-medium { background: rgba(245, 158, 11, 0.12); color: var(--priority-medium); }
.badge-low { background: rgba(34, 197, 94, 0.12); color: var(--priority-low); }

.badge-theme {
  background: rgba(106, 171, 181, 0.12);
  color: var(--tc-primary);
}

/* ─── Difficulty Badge ─── */

.difficulty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.difficulty-bar {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.difficulty-fill {
  height: 100%;
  border-radius: 2px;
  transition: width var(--transition-normal);
}

/* ─── Filter Tabs ─── */

.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--border-color-hover);
  background: rgba(255, 255, 255, 0.04);
}

.filter-btn.active {
  background: var(--tc-primary-glow);
  border-color: var(--tc-primary);
  color: var(--tc-primary);
}

.filter-btn .count {
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.7;
}

/* ─── Finding Cards ─── */

.finding-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 16px 16px 16px 20px;
  margin-bottom: 12px;
  border-left: 3px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.finding-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.finding-card.critical { border-left-color: var(--severity-critical); }
.finding-card.warning { border-left-color: var(--severity-warning); }
.finding-card.notice { border-left-color: var(--severity-notice); }

.finding-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.finding-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.6;
}

.finding-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.finding-fix {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
  color: var(--tc-primary);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.finding-fix svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* ─── Lighthouse Mini Gauges ─── */

.lighthouse-gauge-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.lighthouse-gauge-item {
  text-align: center;
}

.lighthouse-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── Core Web Vitals ─── */

.cwv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cwv-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  border-left: 4px solid;
}

.cwv-good { border-left-color: var(--success); }
.cwv-needs-improvement { border-left-color: var(--warning, #f59e0b); }
.cwv-poor { border-left-color: var(--severity-critical); }

.cwv-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.cwv-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.cwv-status {
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cwv-good .cwv-status { color: var(--success); }
.cwv-needs-improvement .cwv-status { color: var(--warning, #f59e0b); }
.cwv-poor .cwv-status { color: var(--severity-critical); }

/* ─── Category Breakdown ─── */

.category-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.category-name {
  width: 160px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.category-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.category-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
  width: 0;
}

.category-score {
  width: 40px;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ─── Kanban ─── */

.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  min-height: 400px;
}

.kanban-column {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px;
  min-height: 300px;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.kanban-column-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.kanban-column-count {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 10px;
}

.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100px;
}

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition: all var(--transition-fast);
}

.kanban-card:active {
  cursor: grabbing;
  box-shadow: var(--shadow-lg);
  transform: rotate(1deg);
}

.kanban-card:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.kanban-card.sortable-ghost {
  opacity: 0.3;
}

.kanban-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.kanban-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ─── Progress Bar ─── */

.progress-container {
  margin-bottom: 24px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.progress-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.progress-value {
  font-size: 14px;
  color: var(--tc-primary);
  font-weight: 600;
}

.progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--tc-primary);
  border-radius: 4px;
  transition: width 1s ease;
}

/* ─── Buttons ─── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: var(--border-radius-xs);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--tc-primary);
  color: var(--text-inverse);
  border-color: var(--tc-primary);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-color);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-color-hover);
  color: var(--text-primary);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

/* ─── Grid Layouts ─── */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ─── Section Spacing ─── */

.section {
  margin-bottom: var(--section-gap);
}

.section-container {
  margin-bottom: var(--section-gap);
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Empty State ─── */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* ─── Search Input ─── */

.search-input {
  width: 100%;
  max-width: 320px;
  padding: 8px 14px 8px 36px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xs);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
  transition: border-color var(--transition-fast);
}

.search-input::placeholder {
  color: var(--text-muted);
}

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

.search-wrapper {
  position: relative;
  margin-bottom: 16px;
}

/* ─── Work Tab — Timeline ─── */

.work-timeline {
  margin-bottom: 32px;
}

.work-week {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 4px;
  padding: 16px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: transparent;
  position: relative;
  margin-left: 20px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

/* Timeline vertical line */
.work-timeline > .section-title ~ .work-week::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 0;
  bottom: -4px;
  width: 2px;
  background: var(--border-color);
}

.work-timeline > .section-title ~ .work-week:last-child::before {
  bottom: 50%;
}

/* Timeline dot */
.work-week::after {
  content: '';
  position: absolute;
  left: -16px;
  top: 22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  border: 2px solid var(--bg-body);
  z-index: 1;
}

/* Current week */
.work-week.work-week-active {
  border-color: var(--tc-primary);
  background: rgba(106, 171, 181, 0.05);
}

.work-week.work-week-active::after {
  background: var(--tc-primary);
  box-shadow: 0 0 8px rgba(106, 171, 181, 0.4);
}

/* Past weeks */
.work-week.work-week-past::after {
  background: var(--text-muted);
}

/* Future weeks */
.work-week:not(.work-week-active):not(.work-week-past)::after {
  background: transparent;
  border-color: var(--text-muted);
}

/* Week label */
.work-week-label {
  min-width: 120px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Task cards in timeline row */
.work-week-tasks {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ─── Work Tab — Task Cards ─── */

.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  border-left: 3px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  cursor: grab;
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 340px;
}

.work-card:active {
  cursor: grabbing;
  box-shadow: var(--shadow-lg);
  transform: rotate(1deg);
}

.work-card:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.work-card.sortable-ghost {
  opacity: 0.3;
}

.work-card.sortable-drag {
  opacity: 0.9;
  box-shadow: var(--shadow-lg);
}

/* Status colors */
.work-card.completed {
  border-left-color: var(--severity-pass);
}

.work-card.completed .work-card-title {
  color: var(--text-muted);
}

.work-card.in-progress {
  border-left-color: #f59e0b;
}

.work-card.planned {
  border-left-color: var(--border-color);
}

.work-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.work-card-title svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.work-card-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  margin-left: 20px;
}

.work-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: 20px;
}

/* ─── Work Tab — In Progress Section ─── */

.work-in-progress {
  margin-bottom: 32px;
}

.work-in-progress .section-title .badge {
  background: #f59e0b;
  color: #000;
}

.work-in-progress-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.work-in-progress-grid .work-card {
  max-width: none;
  padding: 14px;
}

/* ─── Work Tab — Completed Section ─── */

.work-completed {
  margin-bottom: 32px;
}

.work-completed .section-title .badge {
  background: var(--severity-pass);
  color: #fff;
}

/* Completed cards use same grid as in-progress but with muted opacity */
#work-completed-cards .work-card {
  opacity: 0.8;
}

#work-completed-cards .work-card:hover {
  opacity: 1;
}

/* Empty drop zone placeholder */
.work-drop-zone {
  min-height: 60px;
}

.work-drop-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 16px;
  color: var(--text-muted);
  font-size: 13px;
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius-sm);
}

/* ─── Work Tab — Next Month Preview ─── */

.work-next-month {
  margin-bottom: 32px;
}

.work-next-month-list {
  background: var(--bg-card);
  border: 1px dashed var(--border-color-hover);
  border-radius: var(--border-radius-sm);
  opacity: 0.75;
}

.work-next-month-list:hover {
  opacity: 0.9;
}

.work-next-month-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  min-height: 44px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.work-next-month-row:last-child {
  border-bottom: none;
}

.work-next-month-row .work-next-month-title {
  flex: 1 1 150px;
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 0;
}

/* ─── Work Tab — Section Headers ─── */

.work-section-header {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ─── Tooltip ─── */

.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-tooltip);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--border-radius-xs);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  margin-bottom: 6px;
  box-shadow: var(--shadow-md);
}

.tooltip:hover::after {
  opacity: 1;
}

/* ─── Chart Container ─── */

.chart-container {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.chart-container:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-card-hover);
}

.chart-wrapper {
  position: relative;
  height: 300px;
}

/* ─── Modal ─── */

.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
}

.modal-backdrop.visible {
  display: flex;
}

.modal {
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 28px;
  width: 90%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.modal-field {
  margin-bottom: 16px;
}

.modal-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.modal-field input,
.modal-field select {
  width: 100%;
  padding: 8px 14px;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xs);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
}

.modal-field input:focus,
.modal-field select:focus {
  outline: none;
  border-color: var(--tc-primary);
}

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

/* ─── Quick Wins ─── */

.quick-win-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--border-color);
}

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

.quick-win-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--tc-primary-glow);
  color: var(--tc-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.quick-win-text {
  flex: 1;
}

.quick-win-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.quick-win-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── AI Readiness Category Card ─── */

.ai-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.ai-category-card:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.ai-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ai-category-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.ai-category-score {
  font-size: 20px;
  font-weight: 700;
}

.ai-category-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.ai-category-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease;
}

.ai-findings-list {
  list-style: none;
  padding: 0;
}

.ai-finding {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ai-finding-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

/* ─── AI Visibility Tab ─── */

.ai-vis-empty-state {
  padding: 32px 20px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.ai-vis-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--text-muted);
  opacity: 0.5;
}

.ai-vis-empty-icon svg {
  width: 100%;
  height: 100%;
}

.ai-vis-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.ai-vis-empty-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.ai-vis-empty-checklist {
  margin-top: 20px;
  text-align: left;
  border-left: 3px solid var(--tc-primary);
  padding-left: 16px;
}

.ai-vis-empty-checklist-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.ai-vis-empty-checklist ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ai-vis-empty-checklist li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 3px 0;
  position: relative;
  padding-left: 16px;
}

.ai-vis-empty-checklist li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--tc-primary);
}

.ai-vis-competitor-you {
  background: rgba(106, 171, 181, 0.08);
}

.ai-vis-competitor-you td {
  color: #fff;
}

.ai-vis-status-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.ai-vis-status-badge.active {
  background: var(--severity-pass-bg);
  color: var(--severity-pass);
}

.ai-vis-status-badge.not-yet {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.ai-vis-table-summary {
  font-size: 13px;
  color: var(--text-muted);
  padding: 12px 16px;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.ai-vis-overview-summary {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.ai-vis-aio-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(6, 182, 212, 0.12);
  color: #06B6D4;
}

.ai-vis-rec-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  border-left: 4px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.ai-vis-rec-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.ai-vis-rec-card.ai-vis-rec-high {
  border-left-color: var(--severity-critical);
}

.ai-vis-rec-card.ai-vis-rec-medium {
  border-left-color: var(--severity-warning);
}

.ai-vis-rec-card.ai-vis-rec-low {
  border-left-color: var(--tc-primary);
}

.ai-vis-rec-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ai-vis-priority-badge {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ai-vis-priority-badge.high {
  background: var(--severity-critical-bg);
  color: var(--severity-critical);
}

.ai-vis-priority-badge.medium {
  background: var(--severity-warning-bg);
  color: var(--severity-warning);
}

.ai-vis-priority-badge.low {
  background: var(--severity-notice-bg);
  color: var(--tc-primary);
}

.ai-vis-rec-category {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.ai-vis-rec-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.ai-vis-rec-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ─── Local Tab ─── */

.local-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.impression-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.impression-bar {
  height: 100%;
  background: var(--tc-primary);
  border-radius: 3px;
  transition: width 0.6s ease;
}

.local-review-score {
  font-size: 48px;
  font-weight: 700;
  color: #D4A853;
  line-height: 1;
  margin-bottom: 12px;
}

.local-stars {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
}

.local-review-count {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.local-pack-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.local-pack-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.local-pack-text {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
}

.local-change {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.local-change.up { color: var(--change-up); }
.local-change.down { color: var(--change-down); }

/* ─── Skeleton Loader ─── */

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--border-radius-sm);
}

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

/* ─── Competitor Comparison ─── */

#tab-competitors .data-table th,
#tab-competitors .data-table td {
  white-space: nowrap;
  padding: 10px 12px;
}

.threat-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.threat-badge.high { background: rgba(239, 68, 68, 0.12); color: var(--severity-critical); }
.threat-badge.medium { background: rgba(245, 158, 11, 0.12); color: var(--severity-warning); }
.threat-badge.low { background: rgba(34, 197, 94, 0.12); color: var(--severity-pass); }

/* ─── Login Gate ─── */

.login-gate {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-body);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.login-container {
  text-align: center;
  max-width: 400px;
  width: 90%;
  padding: 40px;
}

.login-logo {
  width: 180px;
  height: auto;
  margin-bottom: 32px;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

.login-form {
  text-align: left;
}

.login-field {
  margin-bottom: 20px;
}

.login-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.login-field input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-body);
  transition: border-color var(--transition-fast);
}

.login-field input:focus {
  outline: none;
  border-color: var(--tc-primary);
  box-shadow: 0 0 0 3px rgba(106, 171, 181, 0.15);
}

.login-field input::placeholder {
  color: var(--text-muted);
}

.login-btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  justify-content: center;
}

.login-error {
  display: none;
  color: var(--severity-critical);
  font-size: 13px;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: var(--severity-critical-bg);
  border-radius: var(--border-radius-xs);
}

.login-footer {
  margin-top: 28px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  50% { transform: translateX(8px); }
  75% { transform: translateX(-4px); }
}

.dashboard.hidden {
  display: none !important;
}

/* ─── Demo Badge (GA4 Not Connected) ─── */

.card-badge.demo-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: rgba(245, 158, 11, 0.12);
  color: #F59E0B;
}

/* ─── GA4 Placeholder (Not Connected State) ─── */

.ga4-placeholder {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
}

.ga4-placeholder p {
  margin: 0;
}

/* ─── Traffic Grid ─── */

.traffic-grid {
  padding: 16px;
}

.traffic-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.traffic-kpis .kpi-card {
  padding: 12px;
  text-align: center;
}

.traffic-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.traffic-chart-half {
  height: 220px;
  position: relative;
}

.traffic-chart-half canvas {
  max-height: 180px;
}

.traffic-pages-list {
  max-height: 200px;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .traffic-kpis { grid-template-columns: repeat(2, 1fr); }
  .traffic-charts { grid-template-columns: 1fr; }
}

/* ─── Results Section Header ─── */

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

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

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Site Preview ─── */

.site-preview-card {
  overflow: hidden;
  padding: 0;
}

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

.site-preview-url {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.site-preview-frame {
  position: relative;
  overflow: hidden;
  height: 160px;
  background: #f5f5f5;
}

.site-preview-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

/* ─── SERP Feature Pills & AI Badge ─── */

.serp-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  margin: 1px;
  color: #fff;
  line-height: 1.4;
  white-space: nowrap;
}

.ai-badge {
  display: inline-block;
  background: #06b6d4;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1.4;
}

.site-preview-frame::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, var(--bg-body));
  pointer-events: none;
}

/* ─── Insights Tab ─── */

/* Trends chart */
#insights-trends-chart {
  position: relative;
  min-height: 300px;
}

/* Content Gaps — difficulty bar + opportunity pills */
.insights-diff-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  max-width: 80px;
}

.insights-diff-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.insights-opp-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.insights-opp-high {
  background: rgba(34, 197, 94, 0.15);
  color: #22C55E;
}

.insights-opp-medium {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
}

.insights-opp-low {
  background: rgba(128, 139, 148, 0.15);
  color: #808B94;
}

/* Sentiment grid — chart left, mentions right */
.insights-sentiment-grid {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 1.5rem;
  align-items: start;
}

.insights-sentiment-chart-wrap {
  position: relative;
  height: 260px;
}

.insights-sentiment-center {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.insights-sentiment-total {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
}

.insights-sentiment-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Mention cards */
.insights-mentions-list {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.insights-mention-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--text-muted);
  border-radius: var(--border-radius-sm);
  padding: 14px 16px;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.insights-mention-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.insights-mention-card.insights-sent-positive {
  border-left-color: #22C55E;
}

.insights-mention-card.insights-sent-negative {
  border-left-color: #EF4444;
}

.insights-mention-card.insights-sent-neutral {
  border-left-color: #808B94;
}

.insights-mention-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.insights-mention-source {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--tc-primary);
}

.insights-mention-date {
  font-size: 12px;
  color: var(--text-muted);
}

.insights-mention-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.insights-mention-snippet {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.insights-sentiment-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.insights-sentiment-pill.insights-sent-positive {
  background: rgba(34, 197, 94, 0.15);
  color: #22C55E;
}

.insights-sentiment-pill.insights-sent-negative {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

.insights-sentiment-pill.insights-sent-neutral {
  background: rgba(128, 139, 148, 0.15);
  color: #808B94;
}

/* Autocomplete groups */
.insights-autocomplete-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.insights-autocomplete-group {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.insights-autocomplete-group:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.insights-autocomplete-seed {
  font-size: 14px;
  font-weight: 600;
  color: var(--tc-primary);
  margin-bottom: 10px;
}

.insights-autocomplete-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.insights-autocomplete-tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--tc-primary);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-secondary);
  background: transparent;
  transition: all var(--transition-fast);
  cursor: default;
}

.insights-autocomplete-tag:hover {
  background: var(--tc-primary-glow);
  color: var(--tc-primary);
}

/* Content Ideas — card grid */
.insights-ideas-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.insights-idea-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.insights-idea-card:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.insights-idea-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.insights-idea-source {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.insights-source-trend {
  background: rgba(139, 92, 246, 0.15);
  color: #8B5CF6;
}

.insights-source-gap {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
}

.insights-source-autocomplete {
  background: rgba(106, 171, 181, 0.15);
  color: #6AABB5;
}

.insights-source-combined {
  background: rgba(212, 168, 83, 0.15);
  color: #D4A853;
}

.insights-idea-priority {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.insights-priority-high {
  background: #22C55E;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

.insights-priority-medium {
  background: #F59E0B;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.insights-priority-low {
  background: #808B94;
}

.insights-idea-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.insights-idea-keyword {
  display: inline-block;
  padding: 2px 8px;
  background: var(--tc-primary-glow);
  color: var(--tc-primary);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 8px;
}

.insights-idea-rationale {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.insights-idea-meta {
  display: flex;
  gap: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.insights-idea-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}

.insights-idea-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.insights-idea-stat-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Keyword Opportunities — score bar + category pills */
.insights-opp-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  max-width: 80px;
}

.insights-opp-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #22C55E, #84CC16);
  transition: width 0.3s ease;
}

.insights-cat-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.insights-cat-quickwin {
  background: rgba(34, 197, 94, 0.15);
  color: #22C55E;
}

.insights-cat-longterm {
  background: rgba(106, 171, 181, 0.15);
  color: #6AABB5;
}

.insights-cat-stretch {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
}

/* Section containers + subtitles (uses --section-gap from variables) */

.section-container h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Table scroll wrapper */
.table-scroll {
  overflow-x: auto;
}
