/* ═══════════════════════════════════════════════════════════════
   Vista Brain — SEO Suite v6.0 — Manus Design System
   OKLCH Theme System — pixel-perfect match of Manus reference
   Font: DM Sans + JetBrains Mono
   March 2026
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Theme Tokens (Dark = default) ─────────────────────── */

.seo-section {
  --bg: oklch(0.13 0.025 260);
  --card: oklch(0.18 0.025 260);
  --fg: oklch(0.9 0.01 260);
  --dim: oklch(0.6 0.02 260);
  --border: oklch(0.28 0.02 260);
  --pri: oklch(0.65 0.14 250);
  --sec: oklch(0.22 0.025 260);
  --sb: oklch(0.15 0.025 260);
  --sb-border: oklch(0.28 0.02 260);
  --sb-accent: oklch(0.22 0.025 260);
  --input: oklch(0.25 0.02 260);

  --teal: oklch(0.75 0.15 175);
  --blue: oklch(0.65 0.18 250);
  --coral: oklch(0.65 0.2 25);
  --amber: oklch(0.75 0.15 85);
  --purple: oklch(0.6 0.15 300);

  --pc0: oklch(0.75 0.15 175);
  --pc1: oklch(0.65 0.15 200);
  --pc2: oklch(0.55 0.15 250);
  --pc3: oklch(0.65 0.15 250);
  --pc4: oklch(0.75 0.15 85);
  --pc5: oklch(0.65 0.2 25);
  --pc6: oklch(0.5 0.02 260);

  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  display: flex;
  height: 100%;
  overflow: hidden;
}

/* ── 2. Light Theme Override ──────────────────────────────── */

.seo-section.seo-light {
  --bg: oklch(0.97 0.003 260);
  --card: oklch(1 0 0);
  --fg: oklch(0.2 0.03 260);
  --dim: oklch(0.5 0.02 260);
  --border: oklch(0.9 0.005 260);
  --pri: oklch(0.50 0.14 250);
  --sec: oklch(0.94 0.01 260);
  --sb: oklch(0.98 0.002 260);
  --sb-border: oklch(0.9 0.005 260);
  --sb-accent: oklch(0.94 0.01 260);
  --input: oklch(0.9 0.005 260);
}

/* ── 3. Layout Structure ──────────────────────────────────── */

.seo-sidebar {
  width: 248px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--sb);
  border-right: 1px solid var(--sb-border);
  flex-shrink: 0;
  transition: width 0.3s ease;
  overflow: hidden;
}

.seo-sidebar.collapsed {
  width: 60px;
}

.seo-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.seo-topbar {
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 20;
  flex-shrink: 0;
}

.seo-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* ── 4. Sidebar Components ────────────────────────────────── */

.seo-sb-header {
  padding: 16px 16px 8px;
}

.seo-sb-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.seo-sb-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, oklch(0.75 0.15 175), oklch(0.5 0.15 250));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.seo-sb-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
}

.seo-sb-subtitle {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--pri);
}

.seo-sb-project {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--sb-accent);
  margin-bottom: 8px;
}

.seo-sb-project select {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 11px;
  font-weight: 500;
  color: var(--fg);
  cursor: pointer;
  font-family: inherit;
}

.seo-sb-project select option {
  background: var(--card);
  color: var(--fg);
}

.seo-sb-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px;
}

.seo-sb-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  position: relative;
  text-align: left;
  background: transparent;
  color: var(--dim);
  transition: all 0.2s;
  font-family: inherit;
}

.seo-sb-item:hover {
  background: var(--sb-accent);
}

.seo-sb-item.active {
  background: var(--sb-accent);
  color: var(--pri);
  font-weight: 600;
}

.seo-sb-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 0 3px 3px 0;
  background: var(--pri);
}

.seo-sb-item.parent-active {
  color: var(--pri);
  font-weight: 600;
}

.seo-sb-item .seo-badge {
  font-size: 8px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: oklch(0.65 0.14 250 / 0.15);
  color: var(--pri);
}

.seo-sb-children {
  margin-left: 24px;
  padding-left: 12px;
  border-left: 1px solid var(--sb-border);
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.seo-sb-child {
  text-align: left;
  padding: 5px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 400;
  background: transparent;
  color: var(--dim);
  font-family: inherit;
  transition: all 0.15s;
}

.seo-sb-child:hover {
  background: var(--sb-accent);
}

.seo-sb-child.active {
  font-weight: 600;
  background: oklch(0.65 0.14 250 / 0.08);
  color: var(--pri);
}

.seo-sb-footer {
  padding: 12px;
  border-top: 1px solid var(--sb-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.seo-sb-footer button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: none;
  border: none;
  color: var(--dim);
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
}

.seo-sb-footer span {
  font-size: 9px;
  color: var(--dim);
}

/* Collapsed sidebar */
.seo-sidebar.collapsed .seo-sb-header,
.seo-sidebar.collapsed .seo-sb-nav,
.seo-sidebar.collapsed .seo-sb-footer {
  display: none;
}

.seo-sb-collapsed-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 8px;
}

.seo-sb-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--dim);
  transition: all 0.2s;
}

.seo-sb-icon-btn.active {
  background: oklch(0.6 0.2 300);
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 4px 12px oklch(0.6 0.2 300 / 0.3);
}

/* ── 5. Topbar ────────────────────────────────────────────── */

.seo-tb-badge {
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--sec);
  color: var(--dim);
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
}

.seo-tb-domain {
  padding: 4px 10px;
  border-radius: 6px;
  background: oklch(0.75 0.15 175 / 0.1);
  color: var(--teal);
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.seo-tb-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--sec);
  color: var(--dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.seo-tb-btn:hover {
  background: var(--card);
  color: var(--fg);
}

.seo-tb-date {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--sec);
}

.seo-tb-date select {
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.seo-tb-date select option {
  background: var(--card);
  color: var(--fg);
}

/* ── 6. Cards ─────────────────────────────────────────────── */

.seo-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s;
}

.seo-metric-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  transition: all 0.3s;
  cursor: default;
  overflow: hidden;
}

.seo-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ── 7. Tables ────────────────────────────────────────────── */

.seo-table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.seo-table th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.seo-table td {
  padding: 12px 16px;
}

.seo-table tbody tr {
  border-bottom: 1px solid oklch(0.28 0.02 260 / 0.5);
  transition: background 0.15s;
  cursor: pointer;
}

.seo-section.seo-light .seo-table tbody tr {
  border-bottom: 1px solid oklch(0.9 0.005 260 / 0.5);
}

.seo-table tbody tr:hover {
  background: oklch(0.22 0.025 260 / 0.5);
}

.seo-section.seo-light .seo-table tbody tr:hover {
  background: oklch(0.94 0.01 260 / 0.5);
}

.seo-table tbody tr:last-child {
  border-bottom: none;
}

/* ── 8. Hero Banner ───────────────────────────────────────── */

.seo-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 130px;
}

.seo-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seo-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2));
}

.seo-hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

/* ── 9. AI Insights Panel ─────────────────────────────────── */

.seo-ai-insights {
  background: oklch(0.75 0.15 175 / 0.06);
  border: 1px solid oklch(0.75 0.15 175 / 0.12);
  border-radius: 12px;
  padding: 16px;
}

/* ── 10. Filter Buttons ───────────────────────────────────── */

.seo-filter-btn {
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  background: transparent;
  color: var(--dim);
  font-family: inherit;
}

.seo-filter-btn.active {
  background: var(--pri);
  color: #fff;
}

.seo-filter-btn:not(.active):hover {
  background: var(--sec);
}

/* ── 11. Search Input ─────────────────────────────────────── */

.seo-search-wrap {
  position: relative;
}

.seo-search-wrap svg,
.seo-search-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dim);
}

.seo-search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  font-size: 13px;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}

.seo-search-input::placeholder {
  color: var(--dim);
}

.seo-search-input:focus {
  border-color: var(--pri);
}

/* ── 12. Position Badges ──────────────────────────────────── */

.seo-pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 26px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

/* ── 13. Distribution Bar ─────────────────────────────────── */

.seo-dist-bar {
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  background: var(--sec);
}

.seo-dist-bar > div {
  transition: width 0.5s;
}

/* ── 14. Gauge (animated) ─────────────────────────────────── */

.seo-gauge-circle {
  transition: stroke-dashoffset 1.2s ease-out;
}

/* ── 15. Progress Bars ────────────────────────────────────── */

.seo-progress {
  height: 6px;
  border-radius: 3px;
  background: var(--sec);
  overflow: hidden;
}

.seo-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s;
}

/* ── 16. Grid Layouts ─────────────────────────────────────── */

.seo-grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.seo-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.seo-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.seo-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.seo-grid-2-1-1 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
.seo-grid-1-3 { display: grid; grid-template-columns: 1fr 3fr; gap: 16px; }
.seo-grid-1-2-1 { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 16px; }

/* ── 17. Chat Section ─────────────────────────────────────── */

.seo-chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
}

.seo-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.seo-chat-bubble {
  max-width: 80%;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-line;
}

.seo-chat-bubble.assistant {
  background: var(--sec);
  color: var(--fg);
  border: 1px solid var(--border);
}

.seo-chat-bubble.user {
  background: var(--pri);
  color: #fff;
}

.seo-chat-input-area {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

.seo-chat-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  font-size: 13px;
  outline: none;
  font-family: inherit;
}

.seo-chat-input::placeholder {
  color: var(--dim);
}

.seo-chat-send {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, oklch(0.75 0.15 175), oklch(0.5 0.15 250));
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seo-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.seo-suggestion-btn {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  text-align: left;
  background: var(--sec);
  color: var(--fg);
  border: 1px solid oklch(0.28 0.02 260 / 0.5);
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}

.seo-section.seo-light .seo-suggestion-btn {
  border-color: oklch(0.9 0.005 260 / 0.5);
}

.seo-suggestion-btn:hover {
  background: var(--card);
  border-color: var(--border);
}

/* ── 18. Utility Classes ──────────────────────────────────── */

.seo-mono {
  font-family: 'JetBrains Mono', monospace;
}

.seo-flex-col {
  display: flex;
  flex-direction: column;
}

.seo-gap-18 { gap: 18px; }
.seo-gap-16 { gap: 16px; }
.seo-gap-12 { gap: 12px; }
.seo-gap-8 { gap: 8px; }

/* ── 19. Animations ───────────────────────────────────────── */

@keyframes seo-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

@keyframes seo-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.seo-content > div {
  animation: seo-fade-in 0.3s ease-out;
}

/* ── 20. Scrollbar ────────────────────────────────────────── */

.seo-section ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.seo-section ::-webkit-scrollbar-track {
  background: transparent;
}

.seo-section ::-webkit-scrollbar-thumb {
  background: oklch(0.5 0.02 260 / 0.3);
  border-radius: 3px;
}

.seo-section ::-webkit-scrollbar-thumb:hover {
  background: oklch(0.5 0.02 260 / 0.5);
}

/* ── 21. Responsive ───────────────────────────────────────── */

@media (max-width: 1200px) {
  .seo-grid-6 { grid-template-columns: repeat(3, 1fr); }
  .seo-grid-2-1-1 { grid-template-columns: 1fr; }
  .seo-grid-1-2-1 { grid-template-columns: 1fr; }
  .seo-grid-1-3 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .seo-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .seo-grid-3 { grid-template-columns: 1fr; }
  .seo-sidebar { width: 60px; }
}

/* ── 22. Report Cards ─────────────────────────────────────── */

.seo-report-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.seo-report-card:hover {
  border-color: var(--pri);
  transform: translateY(-2px);
}

/* ── 23. Cannibalization Items ────────────────────────────── */

.seo-cann-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.seo-cann-item.expanded {
  border-color: var(--amber);
}

.seo-cann-item.expanded.high {
  border-color: oklch(0.65 0.2 25 / 0.35);
}

.seo-cann-item.expanded.medium {
  border-color: oklch(0.75 0.15 85 / 0.35);
}

.seo-cann-item.expanded.low {
  border-color: oklch(0.65 0.15 200 / 0.35);
}

.seo-cann-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  text-align: left;
  border: none;
  cursor: pointer;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
}

.seo-cann-detail {
  padding: 0 24px 20px;
  border-top: 1px solid oklch(0.28 0.02 260 / 0.3);
}

.seo-section.seo-light .seo-cann-detail {
  border-top-color: oklch(0.9 0.005 260 / 0.3);
}

/* ── 24. Status Badges ────────────────────────────────────── */

.seo-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
}

.seo-severity-badge {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

/* ── 25. Wins/Drops cards ─────────────────────────────────── */

.seo-wd-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.seo-wd-card.selected {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.seo-wd-card.wins.selected {
  border-color: var(--teal);
}

.seo-wd-card.drops.selected {
  border-color: var(--coral);
}

/* ── 26. Page Audit Toggle ────────────────────────────────── */

.seo-audit-toggle {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  font-family: inherit;
}

.seo-audit-toggle:hover {
  border-color: var(--pri);
}

/* ── 27. Chart Containers ─────────────────────────────────── */

.seo-chart-container {
  position: relative;
  width: 100%;
}

.seo-chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ── 28. Module Switcher Buttons ─────────────────────────── */

.seo-sb-switchers {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 16px;
  margin-bottom: 6px;
}

.seo-sb-switch {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--sb-accent);
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  color: var(--dim);
  transition: all 0.15s;
  font-family: inherit;
  text-align: left;
}

.seo-sb-switch:hover {
  background: var(--border);
  color: var(--fg);
}

.seo-sb-switch-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.seo-sb-switch-arrow {
  margin-left: auto;
  font-size: 9px;
  opacity: 0.4;
}

/* ── 29. Enhanced Chat (Manus-style) ────────────────────── */

.seo-chat-msg-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.seo-chat-msg-row.user {
  flex-direction: row-reverse;
}

.seo-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.seo-chat-avatar.bot {
  background: linear-gradient(135deg, oklch(0.75 0.15 175), oklch(0.5 0.15 250));
  box-shadow: 0 2px 8px oklch(0.75 0.15 175 / 0.3);
}

.seo-chat-avatar.human {
  background: var(--sec);
  border: 1px solid var(--border);
}

.seo-chat-bubble h2 {
  font-size: 13px;
  font-weight: 700;
  margin: 8px 0 4px;
}

.seo-chat-bubble h3 {
  font-size: 12px;
  font-weight: 600;
  margin: 6px 0 3px;
}

.seo-chat-bubble ul, .seo-chat-bubble ol {
  margin: 4px 0;
  padding-left: 16px;
}

.seo-chat-bubble li {
  font-size: 12px;
  line-height: 1.6;
  color: var(--fg);
  opacity: 0.85;
}

.seo-chat-bubble table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.seo-chat-bubble th {
  padding: 6px 10px;
  background: var(--sec);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
}

.seo-chat-bubble td {
  padding: 5px 10px;
  border-top: 1px solid oklch(0.28 0.02 260 / 0.3);
  font-size: 11px;
  opacity: 0.85;
}

.seo-chat-time {
  font-size: 9px;
  color: var(--dim);
  text-align: right;
  margin-top: 6px;
}

.seo-typing-dots {
  display: flex;
  gap: 5px;
  padding: 4px 0;
}

.seo-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
  opacity: 0.4;
  animation: seo-bounce 1.2s infinite;
}

.seo-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.seo-typing-dot:nth-child(3) { animation-delay: 0.3s; }

.seo-chat-suggestions {
  padding: 0 20px 12px;
}

.seo-chat-suggestions-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--dim);
  margin-bottom: 10px;
}

/* ── 30. KD Bar (Keyword Difficulty) ────────────────────── */

.seo-kd-bar {
  width: 48px;
  height: 6px;
  border-radius: 3px;
  background: var(--sec);
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}

.seo-kd-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s;
}

/* ── 31. SERP Feature Badges ────────────────────────────── */

.seo-serp-badge {
  display: inline-flex;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  background: var(--sec);
  color: var(--dim);
  border: 1px solid oklch(0.28 0.02 260 / 0.3);
}

.seo-section.seo-light .seo-serp-badge {
  border-color: oklch(0.9 0.005 260 / 0.3);
}

/* ── 32. Coverage / Stacked Bar ─────────────────────────── */

.seo-coverage-bar {
  height: 16px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  background: var(--sec);
}

.seo-coverage-bar > div {
  height: 100%;
  transition: width 0.8s ease-out;
}

/* ── 33. Schema Status Dots ─────────────────────────────── */

.seo-schema-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.seo-schema-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  margin: 1px 2px;
}

/* ── 34. CWV Status Bar ─────────────────────────────────── */

.seo-cwv-bar {
  height: 24px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
}

.seo-cwv-bar > div {
  height: 100%;
  transition: width 0.6s;
}

/* ── 35. Star Rating ────────────────────────────────────── */

.seo-star { color: oklch(0.5 0.02 260 / 0.3); }
.seo-star.filled { color: oklch(0.75 0.15 85); }

/* ── 36. Donut Legend ───────────────────────────────────── */

.seo-donut-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

.seo-donut-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.seo-donut-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ── 37. Topbar Company Badge ───────────────────────────── */

.seo-tb-company {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--sec);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}

.seo-tb-company i {
  color: var(--teal);
}

/* ── 38. Notification Dot ───────────────────────────────── */

.seo-tb-btn.has-dot {
  position: relative;
}

.seo-tb-btn.has-dot::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: oklch(0.65 0.18 250);
  border: 2px solid var(--card);
}

/* ── 39. Content Area (renamed from seo-content for clarity) */

.seo-content-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.seo-content-area > div {
  max-width: 1600px;
  margin: 0 auto;
  animation: seo-fade-in 0.3s ease-out;
}

/* ── 40. Visibility Bar (Competitors) ───────────────────── */

.seo-vis-bar {
  height: 22px;
  border-radius: 0 4px 4px 0;
  transition: width 0.6s ease-out;
}

/* ── 41. AI Badge (inline) ──────────────────────────────── */

.seo-ai-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  background: oklch(0.75 0.15 175 / 0.12);
  color: var(--teal);
  margin-left: 6px;
}

/* ── 42. Responsive additions ───────────────────────────── */

@media (max-width: 600px) {
  .seo-grid-6 { grid-template-columns: repeat(2, 1fr); }
  .seo-grid-4 { grid-template-columns: 1fr; }
  .seo-hero { height: 100px; }
  .seo-hero-content { padding: 0 16px; }
}

/* ── 43. Print ──────────────────────────────────────────── */

@media print {
  .seo-sidebar, .seo-topbar { display: none; }
  .seo-content-area { padding: 0; }
  .seo-card, .seo-metric-card { break-inside: avoid; }
}
