/* Fokal Agent - Dark Theme Styles */

:root {
  /* Colors */
  --bg-primary: #0E0E10;
  --bg-secondary: #161618;
  --bg-tertiary: #1E1E22;
  --bg-hover: #252529;

  --text-primary: #FFFFFF;
  --text-secondary: #A0A0A8;
  --text-muted: #6B6B75;

  --accent-blue: #4AC0FF;
  --accent-blue-hover: #3AAFEE;
  --accent-green: #00E676;
  --accent-red: #FF5252;
  --accent-yellow: #FFD54F;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(74, 192, 255, 0.5);

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Typography */
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html, body {
  height: 100%;
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
}

/* App Layout */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 900px;
  margin: 0 auto;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  padding-right: 64px; /* Leave space for fixed toggle button */
  border-bottom: 1px solid var(--border-color);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 32px;
  height: 32px;
}

.logo-text {
  font-weight: 600;
  font-size: 18px;
}

.tagline {
  color: var(--text-muted);
  font-size: 14px;
}

/* Header User (Auth) */
.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-email {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* Chat Container */
.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Welcome Message */
.welcome-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  flex: 1;
}

.welcome-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
}

.welcome-message h1 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.welcome-message p {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 400px;
  margin-bottom: 24px;
}

.example-queries {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.example-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius-lg);
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.example-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--accent-blue);
}

/* Message Bubbles */
.message {
  display: flex;
  gap: 12px;
  max-width: 100%;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.message.user .message-avatar {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.message.assistant .message-avatar {
  background: var(--bg-tertiary);
  padding: 6px;
}

.message.assistant .message-avatar img {
  width: 100%;
  height: 100%;
}

.message-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  max-width: 85%;
  border: 1px solid var(--border-color);
}

.message.user .message-content {
  background: var(--accent-blue);
  color: #000;
  border-color: transparent;
}

.message-content p:last-child {
  margin-bottom: 0;
}

/* Status Card */
.status-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 16px 0;
}

.status-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.status-card-query {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
}

.status-badge.visible {
  background: rgba(0, 230, 118, 0.15);
  color: var(--accent-green);
}

.status-badge.not-visible {
  background: rgba(255, 82, 82, 0.15);
  color: var(--accent-red);
}

.status-explanation {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.top-action {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--accent-blue);
}

/* Suggestion Buttons */
.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.suggestion-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.suggestion-btn:hover {
  background: var(--accent-blue);
  color: #000;
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

/* Add to Action Queue link */
.message-actions {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.add-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s ease;
}

.add-action-btn:hover {
  color: var(--accent-yellow);
}

/* Progress/Thinking Indicators - subtle, muted */
.progress-line {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin: 2px 0;
  opacity: 0.7;
}

.progress-line .done {
  color: var(--accent-green);
}

.progress-line.last {
  margin-bottom: 16px;
}

/* Discovery - Simple inline styles */
.brand-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 12px 0 8px 0;
  display: block;
  line-height: 1.4;
}

.feature-line {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 6px 0;
  display: block;
}

.feature-line::first-letter {
  color: var(--accent-blue);
}

.competitors-line {
  color: var(--text-muted);
  font-size: 14px;
  margin: 12px 0;
  display: block;
}

.tree {
  color: var(--text-muted);
  font-family: var(--font-mono);
}

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

.icon-error {
  color: var(--accent-red);
}

/* Status Card - the main verdict card */
.status-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 20px 0;
}

.status-card.visible {
  border-color: rgba(0, 230, 118, 0.3);
}

.status-card.not-visible {
  border-color: rgba(255, 82, 82, 0.3);
}

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

.status-domain {
  font-weight: 600;
  font-size: 16px;
}

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

.status-badge.visible {
  background: rgba(0, 230, 118, 0.15);
  color: var(--accent-green);
}

.status-badge.not-visible {
  background: rgba(255, 82, 82, 0.15);
  color: var(--accent-red);
}

.status-query {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.status-summary {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.status-action {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
}

.status-action .action-label {
  color: var(--accent-blue);
  font-weight: 500;
  margin-right: 8px;
}

/* Error display */
.error {
  color: var(--accent-red);
}

/* Sources section */
.sources-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-muted);
}

.sources-label {
  color: var(--text-secondary);
  margin-right: 8px;
}

.source-link {
  color: var(--accent-blue);
  text-decoration: none;
  margin-right: 8px;
}

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

/* Loading Indicator */
.loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.loading-dots {
  display: flex;
  gap: 4px;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  background: var(--accent-blue);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.loading-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 4px;
}

/* Cancelled state */
.cancelled {
  color: var(--text-muted);
  font-style: italic;
}

/* Tools Container - like Claude Code */
.tools-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.tool-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 10px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--text-muted);
  color: var(--text-secondary);
}

.tool-item.running {
  border-left-color: var(--accent-blue);
  color: var(--text-primary);
}

.tool-item.done {
  border-left-color: var(--accent-green);
}

.tool-item.error {
  border-left-color: var(--accent-red);
}

.tool-icon {
  font-size: 14px;
}

.tool-name {
  font-weight: 500;
}

.tool-summary {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 8px;
  color: var(--text-muted);
}

.tool-summary.done {
  color: var(--accent-green);
}

.tool-summary.error {
  color: var(--accent-red);
}

/* Todos Container - sticky at bottom like Claude Code */
.todos-container {
  position: sticky;
  bottom: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 16px;
  padding: 12px 16px;
}

.todos-container:empty {
  display: none;
  padding: 0;
  margin: 0;
  border: none;
}

.todos-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-color);
}

.todos-title {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.todos-count {
  font-family: var(--font-mono);
  color: var(--accent-blue);
}

.todos-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.todo-item.completed {
  color: var(--text-muted);
  text-decoration: line-through;
}

.todo-item.in_progress {
  color: var(--text-primary);
}

.todo-icon {
  font-size: 12px;
  width: 16px;
  text-align: center;
}

.todo-item.completed .todo-icon {
  color: var(--accent-green);
}

.todo-item.in_progress .todo-icon {
  color: var(--accent-blue);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Input Bar */
.input-bar {
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.input-bar form {
  display: flex;
  gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 4px 4px 4px 16px;
  transition: border-color 0.2s ease;
}

.input-bar form:focus-within {
  border-color: var(--border-focus);
}

.input-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
}

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

.input-bar button {
  background: var(--accent-blue);
  border: none;
  color: #000;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.input-bar button:hover {
  background: var(--accent-blue-hover);
}

.input-bar button:disabled {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* Markdown Rendering - Professional Typography */

/* Headings - tight, professional sizing */
.message-content h1 {
  font-size: 16px;
  font-weight: 600;
  margin: 16px 0 8px 0;
  color: var(--text-primary);
}

.message-content h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 14px 0 6px 0;
  color: var(--text-primary);
}

.message-content h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 12px 0 4px 0;
  color: var(--text-secondary);
}

.message-content h1:first-child,
.message-content h2:first-child,
.message-content h3:first-child {
  margin-top: 0;
}

/* Paragraphs - tighter */
.message-content p {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.5;
}

/* Code blocks - subtle, not prominent */
.message-content pre {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px 10px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  margin: 8px 0;
  line-height: 1.4;
}

.message-content code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-tertiary);
  padding: 1px 4px;
  border-radius: 3px;
}

.message-content pre code {
  background: transparent;
  padding: 0;
}

/* Lists - tighter spacing */
.message-content ul, .message-content ol {
  margin: 6px 0;
  padding-left: 20px;
}

.message-content li {
  margin: 2px 0;
  font-size: 14px;
}

/* Nested lists */
.message-content li ul, .message-content li ol {
  margin: 2px 0;
}

/* Links */
.message-content a {
  color: var(--accent-blue);
  text-decoration: none;
}

.message-content a:hover {
  text-decoration: underline;
}

/* Tables - clean, professional */
.message-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 13px;
}

.message-content th {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.message-content td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.message-content tr:last-child td {
  border-bottom: none;
}

/* Strong/Bold - not too heavy */
.message-content strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* Blockquotes */
.message-content blockquote {
  border-left: 2px solid var(--accent-blue);
  padding-left: 12px;
  margin: 8px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

/* Horizontal rules */
.message-content hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 12px 0;
}

/* ASCII Box rendering */
.message-content .ascii-box {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.4;
  white-space: pre;
  background: var(--bg-tertiary);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin: 12px 0;
  overflow-x: auto;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--bg-hover);
}

/* Checklist Items */
.checklist {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  margin: 4px 0;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.checklist-item:hover {
  background: var(--bg-hover);
}

.checklist-item.checked {
  opacity: 0.7;
}

.checklist-item.checked .checklist-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.check-box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-muted);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  transition: all 0.15s ease;
}

.checklist-item.checked .check-box {
  background: var(--accent-green);
  border-color: var(--accent-green);
}

.check-box::after {
  content: '';
  display: none;
}

.checklist-item.checked .check-box::after {
  display: block;
  content: '\2713';
  color: var(--bg-primary);
  font-size: 12px;
  font-weight: 700;
}

.checklist-text {
  flex: 1;
  line-height: 1.4;
}

/* Nested checklist (indented) */
.checklist-item.nested {
  margin-left: 28px;
  background: transparent;
  border-left: 2px solid var(--border-color);
  border-radius: 0;
  padding-left: 16px;
}

.checklist-item.nested:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* ═══════════════════════════════════════════════════════════════
   NEW SPLIT LAYOUT - Chat (60%) + Right Panel (40%)
   ═══════════════════════════════════════════════════════════════ */

.app-container {
  display: grid;
  grid-template-columns: 1fr 400px;
  height: 100vh;
  overflow: hidden;
}

@media (min-width: 1200px) {
  .app-container {
    grid-template-columns: 60% 40%;
  }
}

/* Chat Panel (Left) */
.chat-panel {
  display: flex;
  flex-direction: column;
  min-width: 400px;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-primary);
}

.chat-panel .header {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.chat-panel .chat-container {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  overflow-y: auto;
}

.chat-panel .input-bar {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* Right Panel (Action Queue + Canvas) */
.right-panel {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-color);
  background: var(--bg-secondary);
  height: 100vh;
  overflow: hidden;
}

/* Tab Bar */
.right-panel__tabs {
  display: flex;
  height: 48px;
  border-bottom: 1px solid var(--border-color);
  padding: 0 12px;
  gap: 4px;
  align-items: flex-end;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.panel-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.panel-tab:hover:not(:disabled) {
  color: var(--text-secondary);
}

.panel-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-blue);
}

.panel-tab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.panel-tab__badge {
  background: var(--accent-blue);
  color: #000;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.panel-tab__badge:empty {
  display: none;
}

/* Panel Content Area */
.right-panel__content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Action Queue Panel */
.action-queue {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.action-queue[style*="display: none"] {
  visibility: hidden;
}

/* Canvas Panel (in right panel) */
.canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
}

/* Action Queue Empty State */
.aq-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  flex: 1;
}

.aq-empty__icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.aq-empty__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.aq-empty__text {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 240px;
  line-height: 1.5;
}

/* AQ Loading State */
.aq-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 24px;
  color: var(--text-muted);
}

.aq-loading__spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: aq-spin 0.8s linear infinite;
}

@keyframes aq-spin {
  to { transform: rotate(360deg); }
}

.aq-loading__text {
  font-size: 14px;
}

/* Canvas Empty State */
.canvas__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  flex: 1;
  height: 100%;
}

.canvas__empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

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

.canvas__empty-text {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 260px;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   Action Queue Header and Sections (New Design)
   ═══════════════════════════════════════════════════════════════ */

.aq-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.aq-header--empty {
  text-align: center;
  padding: 40px 20px;
}

.aq-header__title {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.aq-header__subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.aq-header__breakdown {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Action Queue Sections */
.aq-section {
  padding: 16px 12px;
}

.aq-section__header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 0 8px;
}

.aq-section__items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aq-section--done {
  border-top: 1px solid var(--border-color);
  margin-top: 8px;
  padding-top: 20px;
}

.aq-section--done .aq-section__header {
  color: var(--accent-green);
}

/* Action Queue Items */
.aq-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.aq-item:hover {
  border-color: var(--accent-blue);
  background: var(--bg-hover);
}

.aq-item--done {
  opacity: 0.8;
}

.aq-item--done:hover {
  opacity: 1;
}

.aq-item__status {
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  line-height: 1.5;
}

.aq-item__status--done {
  color: var(--accent-green);
}

.aq-item__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aq-item__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

.aq-item__desc,
.aq-item__meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.aq-item__cta {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  background: var(--accent-blue);
  color: #000;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.aq-item__cta:hover {
  opacity: 0.9;
}

.aq-item__cta--view {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.aq-item__cta--view:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   Cluster Accordion (Page-level visibility)
   ═══════════════════════════════════════════════════════════════ */

.aq-item--cluster {
  padding: 0;
  flex-direction: column;
}

.aq-item__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  width: 100%;
  cursor: pointer;
}

.aq-item__expand {
  font-size: 10px;
  color: var(--text-muted);
  width: 12px;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.aq-item--cluster .aq-item__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aq-item--cluster .aq-item__meta {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.aq-item__progress {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-blue);
  min-width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* Pages container */
.aq-item__pages {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out;
  border-top: 0 solid var(--border-color);
}

.aq-item--cluster[data-expanded="true"] .aq-item__pages {
  max-height: 400px;
  border-top-width: 1px;
  overflow-y: auto;
}

/* Individual page row */
.aq-page {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 28px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  background: var(--bg-secondary);
}

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

.aq-page:hover {
  background: var(--bg-hover);
}

.aq-page--empty {
  color: var(--text-muted);
  font-style: italic;
  justify-content: center;
  padding: 16px;
}

.aq-page__status {
  font-size: 10px;
  width: 12px;
  flex-shrink: 0;
}

.aq-page[data-status="complete"] .aq-page__status { color: var(--accent-green); }
.aq-page[data-status="in_progress"] .aq-page__status { color: var(--accent-yellow, #f0b429); }
.aq-page[data-status="needed"] .aq-page__status { color: var(--text-muted); }

.aq-page__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.aq-page__volume {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 40px;
  text-align: right;
  flex-shrink: 0;
}

.aq-page__type {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.aq-page__type[data-type="pillar"] {
  background: var(--accent-purple, #8b5cf6);
  color: #fff;
}

.aq-page__type[data-type="supporting"] {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.aq-page__cta {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  background: var(--accent-blue);
  color: #000;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.aq-page:hover .aq-page__cta {
  opacity: 1;
}

.aq-page[data-status="complete"] .aq-page__cta {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════
   Preview Cards (Inline chat cards for generated content)
   ═══════════════════════════════════════════════════════════════ */

.preview-card {
  margin: 16px 0;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.preview-card:hover {
  border-color: var(--accent-blue);
  background: var(--bg-tertiary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.preview-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.preview-card__icon {
  font-size: 18px;
  flex-shrink: 0;
}

.preview-card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.preview-card__snippet {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.preview-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: var(--accent-blue);
  color: #000;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.preview-card__cta:hover {
  opacity: 0.9;
}

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

/* ═══════════════════════════════════════════════════════════════
   Canvas Header Info (Context Link & Meta)
   ═══════════════════════════════════════════════════════════════ */

.canvas-header-info {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.canvas-context {
  display: inline-block;
  font-size: 12px;
  color: var(--accent-blue);
  margin-bottom: 8px;
  cursor: pointer;
  text-decoration: none;
}

.canvas-context:hover {
  text-decoration: underline;
}

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

.canvas-meta .canvas-draft-type {
  margin-bottom: 0;
}

.canvas-meta .canvas-word-count {
  margin: 0;
  padding: 0;
  border: none;
}

/* Mark Done button states */
.canvas-btn--done {
  background: var(--accent-green) !important;
  border-color: var(--accent-green) !important;
  color: #000 !important;
  cursor: not-allowed;
}

/* AQ Item highlight animation */
.aq-item--highlight {
  animation: aqHighlight 2s ease-out;
}

@keyframes aqHighlight {
  0% {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
  }
  100% {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
  }
}

/* Mobile: Full-screen panels with navigation */
@media (max-width: 768px) {
  .app-container {
    grid-template-columns: 1fr;
    padding-bottom: 60px; /* Space for mobile nav */
  }

  .chat-panel {
    min-width: 100%;
  }

  .chat-panel .header {
    padding-right: 16px; /* Remove extra padding on mobile */
  }

  .right-panel {
    position: fixed;
    inset: 0;
    bottom: 60px; /* Above mobile nav */
    transform: translateX(100%);
    transition: transform 0.25s ease-out;
    z-index: 100;
  }

  .right-panel.active {
    transform: translateX(0);
  }

  .chat-panel.hidden {
    display: none;
  }

  /* Mobile navigation bar */
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    z-index: 200;
    padding: 0;
  }

  .mobile-nav__btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 11px;
    cursor: pointer;
    transition: color 0.15s;
    position: relative;
  }

  .mobile-nav__btn.active {
    color: var(--accent-blue);
  }

  .mobile-nav__btn:hover {
    color: var(--text-primary);
  }

  .mobile-nav__icon {
    font-size: 20px;
  }

  .mobile-nav__badge {
    position: absolute;
    top: 8px;
    right: calc(50% - 20px);
    background: var(--accent-blue);
    color: #000;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
  }

  .mobile-nav__badge:empty {
    display: none;
  }

  /* Adjust preview cards on mobile */
  .preview-card {
    margin: 12px 0;
    padding: 14px 16px;
  }

  /* Adjust AQ items on mobile */
  .aq-item {
    padding: 10px;
  }

  .aq-item__cta {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* Hide mobile nav on desktop */
.mobile-nav {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════
   LEGACY: Projects Sidebar (keeping for backwards compatibility)
   ═══════════════════════════════════════════════════════════════ */

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

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

.projects-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 18px;
}

.projects-close:hover {
  color: var(--text-primary);
}

.projects-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.projects-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.project-group {
  margin-bottom: 16px;
}

.project-domain {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 12px 4px;
}

.plan-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin: 4px 0;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.plan-card:hover {
  border-color: var(--accent-blue);
}

.plan-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
}

.plan-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  line-height: 1.4;
  /* Allow text to wrap for readability */
}

.plan-card-progress {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-left: 8px;
}

.plan-card-items {
  display: none;
  padding: 0 12px 12px;
}

.plan-card.expanded .plan-card-items {
  display: block;
}

.plan-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.plan-item:hover {
  color: var(--text-primary);
}

.plan-item.checked {
  color: var(--text-muted);
  text-decoration: line-through;
}

.plan-item-checkbox {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 2px solid var(--text-muted);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.plan-item.checked .plan-item-checkbox {
  background: var(--accent-green);
  border-color: var(--accent-green);
}

.plan-item.checked .plan-item-checkbox::after {
  content: '\2713';
  color: var(--bg-primary);
  font-size: 10px;
  font-weight: 700;
}

.plan-card-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.plan-card:hover .plan-card-delete {
  opacity: 1;
}

.plan-card-delete:hover {
  color: var(--accent-red);
}

/* Save to Project Button */
.save-to-project-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 12px;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.15s ease;
}

.save-to-project-btn:hover {
  background: var(--accent-blue);
  color: #000;
  border-color: var(--accent-blue);
}

.save-to-project-btn .icon {
  font-size: 14px;
}

/* Plan Item Status Indicators */
.plan-item-status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-left: auto;
  flex-shrink: 0;
}

.plan-item-status.pending {
  background: rgba(107, 107, 117, 0.2);
  color: var(--text-muted);
}

.plan-item-status.in_progress {
  background: rgba(74, 192, 255, 0.2);
  color: var(--accent-blue);
}

.plan-item-status.draft_ready {
  background: rgba(255, 213, 79, 0.2);
  color: var(--accent-yellow);
}

.plan-item-status.complete {
  background: rgba(0, 230, 118, 0.2);
  color: var(--accent-green);
}

.plan-item-draft-icon {
  color: var(--accent-yellow);
  margin-left: 4px;
}

/* Context Card */
.context-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin: 16px 0;
  overflow: hidden;
}

.context-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.context-card-header .icon {
  font-size: 16px;
}

.context-card-body {
  padding: 12px 16px;
}

.context-card-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border-color);
}

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

.context-card-item .icon {
  color: var(--text-muted);
  width: 16px;
  text-align: center;
}

.context-card-item .label {
  color: var(--text-secondary);
  flex: 1;
}

.context-card-item .value {
  color: var(--text-primary);
  font-weight: 500;
}

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

.context-card-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.context-card-action {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 20px;
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.context-card-action:hover {
  background: var(--accent-blue);
  color: #000;
  border-color: var(--accent-blue);
}

/* Inline Draft Display */
.draft-display {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin: 16px 0;
  overflow: hidden;
}

.draft-display-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.draft-display-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.draft-display-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.draft-display-meta .status-badge {
  padding: 2px 8px;
  font-size: 11px;
}

.draft-display-content {
  padding: 16px;
  max-height: 400px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
}

.draft-display-content.collapsed {
  max-height: 150px;
  position: relative;
}

.draft-display-content.collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, var(--bg-tertiary));
  pointer-events: none;
}

.draft-display-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
}

.draft-action-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.draft-action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.draft-action-btn.primary {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #000;
}

.draft-action-btn.primary:hover {
  background: var(--accent-blue-hover);
}

/* SEO Metadata Display */
.seo-metadata {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 12px;
  font-size: 12px;
}

.seo-metadata-title {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

.seo-metadata-item {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  color: var(--text-secondary);
}

.seo-metadata-item .label {
  color: var(--text-muted);
  min-width: 100px;
}

.seo-metadata-item .value {
  color: var(--text-primary);
  word-break: break-word;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .header {
    padding: 12px 16px;
  }

  .tagline {
    display: none;
  }

  .chat-container {
    padding: 16px;
  }

  .input-bar {
    padding: 12px 16px 16px;
  }

  .message-content {
    max-width: 90%;
  }

  .welcome-message h1 {
    font-size: 18px;
  }

  .example-queries {
    flex-direction: column;
    width: 100%;
  }

  .example-btn {
    width: 100%;
  }
}

/* ============================================
   Audit Cards
   ============================================ */

.audits-section {
  margin-bottom: 16px;
}

.audit-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}

.audit-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.audit-card-header:hover {
  background: var(--bg-hover);
}

.audit-card-icon {
  font-size: 16px;
}

.audit-card-title {
  flex: 1;
  font-weight: 500;
  font-size: 13px;
}

.audit-card-score {
  font-weight: 600;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.audit-card-score.good {
  background: rgba(0, 230, 118, 0.2);
  color: var(--accent-green);
}

.audit-card-score.medium {
  background: rgba(255, 213, 79, 0.2);
  color: var(--accent-yellow);
}

.audit-card-score.poor {
  background: rgba(255, 82, 82, 0.2);
  color: var(--accent-red);
}

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

.audit-card-summary {
  padding: 0 12px 8px;
  display: flex;
  gap: 12px;
  font-size: 12px;
}

.gap-count {
  color: var(--accent-red);
}

.resolved-count {
  color: var(--accent-green);
}

.audit-card-gaps {
  display: none;
  padding: 8px 12px 12px;
  border-top: 1px solid var(--border-color);
}

.audit-card.expanded .audit-card-gaps {
  display: block;
}

/* Gap Items */
.gap-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin-bottom: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

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

.gap-status-icon {
  font-size: 12px;
}

.gap-query {
  flex: 1;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gap-actions {
  display: flex;
  gap: 6px;
}

.gap-action-btn {
  padding: 4px 8px;
  font-size: 10px;
  background: var(--accent-blue);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}

.gap-action-btn:hover {
  background: var(--accent-blue-hover);
}

.gap-verified-label {
  color: var(--accent-green);
  font-size: 10px;
  font-weight: 500;
}

/* Gap severity indicators */
.gap-item.high {
  border-left: 2px solid var(--accent-red);
}

.gap-item.medium {
  border-left: 2px solid var(--accent-yellow);
}

.gap-item.low {
  border-left: 2px solid var(--accent-green);
}

/* Gap status styling */
.gap-item.resolved,
.gap-item.verified {
  opacity: 0.7;
}

.gap-item.verified .gap-query {
  text-decoration: line-through;
}

/* ============================================
   Unified Visibility Audit Cards
   ============================================ */

.audit-card.unified {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  border-left: 3px solid var(--text-muted);
}

.audit-card.unified.status-invisible {
  border-left-color: #dc3545;
}

.audit-card.unified.status-weak {
  border-left-color: #ffc107;
}

.audit-card.unified.status-partial {
  border-left-color: #fd7e14;
}

.audit-card.unified.status-strong {
  border-left-color: #28a745;
}

.audit-card.unified .status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--bg-tertiary);
}

.audit-card.unified .status-badge.status-invisible {
  color: #dc3545;
}

.audit-card.unified .status-badge.status-weak {
  color: #ffc107;
}

.audit-card.unified .status-badge.status-partial {
  color: #fd7e14;
}

.audit-card.unified .status-badge.status-strong {
  color: #28a745;
}

.audit-card.unified .foundation-status {
  margin-top: 8px;
  padding: 8px;
  border-radius: 4px;
  background: var(--bg-tertiary);
  font-size: 0.85rem;
}

.audit-card.unified .foundation-status.foundation-poor {
  background: rgba(220, 53, 69, 0.1);
}

.audit-card.unified .foundation-status.foundation-developing {
  background: rgba(255, 193, 7, 0.1);
}

.audit-card.unified .foundation-status.foundation-solid {
  background: rgba(40, 167, 69, 0.1);
}

.audit-card.unified .foundation-summary {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.audit-card.unified .gap-categories {
  display: none;
  margin-top: 8px;
}

.audit-card.unified.expanded .gap-categories {
  display: block;
}

.gap-category {
  margin-bottom: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.gap-category-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--bg-tertiary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}

.gap-category-icon {
  font-size: 0.9rem;
}

.gap-category-name {
  flex: 1;
}

.gap-category-count {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.gap-category-items {
  padding: 4px 8px;
}

.gap-category.foundation .gap-category-header {
  background: rgba(220, 53, 69, 0.15);
}

.gap-category.content .gap-category-header {
  background: rgba(13, 110, 253, 0.15);
}

.gap-category.technical .gap-category-header {
  background: rgba(108, 117, 125, 0.15);
}

.gap-category.outreach .gap-category-header {
  background: rgba(102, 16, 242, 0.15);
}

.gap-item.unified {
  padding: 6px 8px;
  font-size: 0.8rem;
}

.gap-item.unified .gap-title {
  flex: 1;
  line-height: 1.3;
}

.gap-item.unified.severity-critical {
  border-left-color: #dc3545;
}

.gap-item.unified.severity-high {
  border-left-color: #fd7e14;
}

.gap-item.unified.severity-medium {
  border-left-color: #ffc107;
}

.gap-item.unified.severity-low {
  border-left-color: #28a745;
}

/* ============================================
   V2 Cluster Cards
   ============================================ */

.gap-categories.v2 {
  margin-top: 12px;
}

.gap-category.clusters .gap-category-header {
  background: rgba(13, 110, 253, 0.15);
}

.gap-category.authority .gap-category-header {
  background: rgba(102, 16, 242, 0.15);
}

/* Cluster Card */
.cluster-card {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  margin: 4px 0;
  padding: 8px;
  border-left: 3px solid #fd7e14;
}

.cluster-card.severity-critical {
  border-left-color: #dc3545;
}

.cluster-card.severity-high {
  border-left-color: #fd7e14;
}

.cluster-card.severity-medium {
  border-left-color: #ffc107;
}

.cluster-card.complete {
  border-left-color: #28a745;
  opacity: 0.7;
}

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

.cluster-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.cluster-progress {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 8px;
}

.cluster-meta {
  display: flex;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.cluster-volume {
  color: #0d6efd;
}

.cluster-ai {
  color: var(--text-secondary);
}

/* Cluster Pages List */
.cluster-pages {
  margin: 8px 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
}

.cluster-pages.collapsed {
  max-height: 0;
  margin: 0;
}

.cluster-page {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.cluster-page .page-type {
  opacity: 0.7;
}

.cluster-page .page-title {
  flex: 1;
}

.cluster-page .page-status {
  font-size: 0.7rem;
  color: #28a745;
}

.cluster-page.complete {
  text-decoration: line-through;
  opacity: 0.6;
}

.cluster-page.in_progress .page-title {
  color: #ffc107;
}

/* Cluster Actions */
.cluster-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.cluster-action-btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.cluster-action-btn:hover {
  background: #0b5ed7;
}

.cluster-expand-btn {
  padding: 6px 10px;
  font-size: 0.7rem;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.cluster-expand-btn:hover {
  background: var(--bg-hover);
}

/* V2 Technical/Authority Gap Items */
.gap-item.technical,
.gap-item.authority {
  padding: 6px 8px;
  font-size: 0.8rem;
}

/* ============================================
   Flat Audit Card Styles (Greatness Page style)
   ============================================ */

.audit-card.flat {
  background: rgba(17, 24, 32, 0.8);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.audit-flat-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.audit-flat-header .status-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(255, 193, 7, 0.15);
}

.audit-flat-header .status-badge.status-invisible {
  background: rgba(220, 53, 69, 0.15);
}

.audit-flat-header .status-badge.status-weak {
  background: rgba(255, 193, 7, 0.15);
}

.audit-flat-header .status-badge.status-partial {
  background: rgba(253, 126, 20, 0.15);
}

.audit-flat-header .status-badge.status-strong {
  background: rgba(40, 167, 69, 0.15);
}

.audit-flat-header .foundation-badge {
  font-size: 11px;
  color: var(--text-muted);
}

.audit-flat-header .audit-date {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
}

.audit-flat-list {
  display: flex;
  flex-direction: column;
}

/* Section headers within audit */
.audit-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.audit-section:last-child {
  border-bottom: none;
}

.audit-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 6px;
  margin-top: 4px;
}

.audit-section-header .section-icon {
  font-size: 12px;
}

.audit-section-header .section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.audit-flat-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.15s ease;
}

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

.audit-flat-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.audit-flat-row.complete {
  opacity: 0.5;
}

.audit-flat-row .row-icon {
  display: none; /* Icons now in section headers */
}

.audit-flat-row .row-label {
  flex: 1;
  font-size: 13px;
  color: #e0e0e0;
  line-height: 1.4;
}

.audit-flat-row .row-count {
  font-size: 12px;
  color: #888;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.audit-flat-row .row-action {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.audit-flat-row .row-action:hover {
  background: rgba(99, 102, 241, 0.3);
  transform: translateX(2px);
}

.audit-flat-row.complete .row-action {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}

.audit-flat-row.complete .row-action:hover {
  transform: none;
}

/* Volume display in cluster rows */
.audit-flat-row .row-volume {
  font-size: 11px;
  color: #6b7280;
  font-family: var(--font-mono);
  margin-left: 6px;
}

/* New cluster indicator (no audit metadata yet) */
.audit-flat-row.new-cluster {
  border-left: 2px solid #f59e0b;
}

.audit-flat-row.new-cluster .row-label::after {
  content: 'new';
  font-size: 9px;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  padding: 2px 4px;
  border-radius: 3px;
  margin-left: 6px;
}

/* Hide old nested styles when .flat class is present */
.audit-card.flat .gap-categories,
.audit-card.flat .cluster-card,
.audit-card.flat .gap-category-items {
  display: none;
}

/* ============================================
   Interactive Todos Enhancements
   ============================================ */

.todos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.todos-controls {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.todo-pause-btn {
  padding: 2px 6px;
  font-size: 10px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  cursor: pointer;
  opacity: 0.6;
}

.todo-pause-btn:hover:not(:disabled) {
  opacity: 1;
  background: var(--bg-hover);
}

.todo-pause-btn:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.todo-item .todo-text {
  flex: 1;
}

.todo-item.has-draft {
  cursor: pointer;
}

.todo-item.has-draft:hover {
  background: rgba(255, 255, 255, 0.03);
}

.todo-view-btn {
  padding: 2px 8px;
  font-size: 10px;
  background: rgba(74, 192, 255, 0.15);
  color: var(--accent-blue);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.todo-view-btn:hover {
  background: rgba(74, 192, 255, 0.25);
}

/* ============================================
   Action Queue Styles
   ============================================ */

/* Action Queue Container */
.action-queue {
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.action-queue-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.action-queue-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 18px;
}

.action-queue-close:hover {
  color: var(--text-primary);
}

.action-queue-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

/* Action Queue Empty State */
.action-queue-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ============================================
   Action Queue Sections (Collapsible)
   ============================================ */

.action-queue-section {
  margin-bottom: 12px;
}

.action-queue-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.action-queue-section-header:hover {
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

.action-queue-section.collapsed .action-queue-section-header {
  border-radius: var(--radius-sm);
}

.action-queue-section:not(.collapsed) .action-queue-section-header {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.section-chevron {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.action-queue-section.collapsed .section-chevron {
  transform: rotate(-90deg);
}

.section-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.section-name {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.section-count {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 10px;
}

.action-queue-section-content {
  border: 1px solid var(--border-color);
  border-top: none;
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  padding: 8px;
  background: var(--bg-secondary);
}

.action-queue-section.collapsed .action-queue-section-content {
  display: none;
}

/* Section-specific colors */
.action-queue-section.pinned .section-name {
  color: var(--accent-yellow);
}

.action-queue-section.clusters .section-name {
  color: var(--accent-blue);
}

.action-queue-section.technical .section-name {
  color: var(--text-secondary);
}

.action-queue-section.authority .section-name {
  color: #a78bfa;
}

.action-queue-section.done .section-name {
  color: var(--accent-green);
}

/* ============================================
   Action Queue Cards (Glass Morphism)
   ============================================ */

.action-queue-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

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

.action-queue-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.action-queue-card.active {
  border-color: var(--accent-blue);
  background: rgba(74, 192, 255, 0.08);
}

.action-queue-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.action-queue-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  flex: 1;
}

.action-queue-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================
   Progress Indicators
   ============================================ */

/* Progress Bar */
.action-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}

.action-progress-fill {
  height: 100%;
  background: var(--accent-blue);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.action-progress-fill.complete {
  background: var(--accent-green);
}

/* Progress Text */
.action-progress-text {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.action-progress-text.complete {
  color: var(--accent-green);
}

/* ============================================
   Status Badges
   ============================================ */

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

.action-status-badge.pending {
  background: rgba(107, 107, 117, 0.2);
  color: var(--text-muted);
}

.action-status-badge.in-progress {
  background: rgba(74, 192, 255, 0.15);
  color: var(--accent-blue);
}

.action-status-badge.draft-ready {
  background: rgba(255, 213, 79, 0.15);
  color: var(--accent-yellow);
}

.action-status-badge.done {
  background: rgba(0, 230, 118, 0.15);
  color: var(--accent-green);
}

/* ============================================
   Activity Indicators
   ============================================ */

.action-activity-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--accent-blue);
}

.action-activity-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-blue);
  border-radius: 50%;
  animation: actionPulse 1.5s ease-in-out infinite;
}

@keyframes actionPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.action-activity-text {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================
   Add to Action Queue Modal
   ============================================ */

.pin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.pin-modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.pin-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  width: 400px;
  max-width: 90vw;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.pin-modal-overlay.visible .pin-modal {
  transform: scale(1);
}

.pin-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.pin-modal-icon {
  font-size: 20px;
}

.pin-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.pin-modal-input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
}

.pin-modal-input:focus {
  border-color: var(--border-focus);
}

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

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

.pin-modal-btn {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pin-modal-btn.cancel {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.pin-modal-btn.cancel:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.pin-modal-btn.confirm {
  background: var(--accent-yellow);
  border: none;
  color: #000;
}

.pin-modal-btn.confirm:hover {
  background: #e6c13e;
}

/* Pin insight preview */
.pin-insight-preview {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
  max-height: 100px;
  overflow-y: auto;
  line-height: 1.5;
}

/* ============================================
   Action Buttons
   ============================================ */

.action-buttons {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* View Button */
.action-btn.view {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

.action-btn.view:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.5);
}

/* Approve Button */
.action-btn.approve {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid rgba(0, 230, 118, 0.3);
  color: var(--accent-green);
}

.action-btn.approve:hover {
  background: rgba(0, 230, 118, 0.25);
  border-color: rgba(0, 230, 118, 0.5);
}

/* Copy Button */
.action-btn.copy {
  background: rgba(74, 192, 255, 0.15);
  border: 1px solid rgba(74, 192, 255, 0.3);
  color: var(--accent-blue);
}

.action-btn.copy:hover {
  background: rgba(74, 192, 255, 0.25);
  border-color: rgba(74, 192, 255, 0.5);
}

/* Review Button */
.action-btn.review {
  background: rgba(255, 213, 79, 0.15);
  border: 1px solid rgba(255, 213, 79, 0.3);
  color: var(--accent-yellow);
}

.action-btn.review:hover {
  background: rgba(255, 213, 79, 0.25);
  border-color: rgba(255, 213, 79, 0.5);
}

/* Work Button (Start working on action) */
.action-btn.work {
  background: var(--accent-blue);
  border: none;
  color: #000;
}

.action-btn.work:hover {
  background: var(--accent-blue-hover);
}

/* Delete/Remove Button */
.action-btn.remove {
  background: rgba(255, 82, 82, 0.1);
  border: 1px solid rgba(255, 82, 82, 0.2);
  color: var(--accent-red);
  opacity: 0.6;
}

.action-btn.remove:hover {
  background: rgba(255, 82, 82, 0.2);
  border-color: rgba(255, 82, 82, 0.4);
  opacity: 1;
}

/* ============================================
   Cluster-specific Action Queue Card
   ============================================ */

.action-queue-card.cluster .cluster-pages-preview {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cluster-page-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  padding: 3px 0;
}

.cluster-page-item .page-icon {
  font-size: 10px;
  color: var(--text-muted);
}

.cluster-page-item .page-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cluster-page-item.complete {
  color: var(--text-muted);
  text-decoration: line-through;
}

.cluster-page-item.complete .page-icon {
  color: var(--accent-green);
}

/* ============================================
   Done Section Specific Styles
   ============================================ */

.action-queue-section.done .action-queue-card {
  opacity: 0.7;
}

.action-queue-section.done .action-queue-card:hover {
  opacity: 1;
}

.action-queue-section.done .action-queue-card-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ============================================
   Agent Activity Banner
   ============================================ */

.agent-activity-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(74, 192, 255, 0.08);
  border: 1px solid rgba(74, 192, 255, 0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.agent-activity-banner .activity-icon {
  width: 8px;
  height: 8px;
  background: var(--accent-blue);
  border-radius: 50%;
  animation: actionPulse 1.5s ease-in-out infinite;
}

.agent-activity-banner .activity-text {
  flex: 1;
  font-size: 12px;
  color: var(--accent-blue);
}

.agent-activity-banner .activity-action {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ============================================
   Action Queue Responsive Adjustments
   ============================================ */

@media (max-width: 600px) {
  .action-queue-section-header {
    padding: 8px 10px;
  }

  .action-queue-card {
    padding: 10px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-btn {
    width: 100%;
    justify-content: center;
  }

  .pin-modal {
    width: 95vw;
    padding: 20px;
  }
}

/* ============================================
   Action Section Styles (JS class names)
   ============================================ */

.action-section {
  margin-bottom: 8px;
}

.action-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.action-section-header:hover {
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

.action-section:not(.collapsed) .action-section-header {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.action-section-items {
  border: 1px solid var(--border-color);
  border-top: none;
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  padding: 8px;
  background: var(--bg-secondary);
}

.action-section.collapsed .action-section-items {
  display: none;
}

/* Section colors */
.pinned-section .section-title { color: var(--accent-yellow); }
.clusters-section .section-title { color: var(--accent-blue); }
.technical-section .section-title { color: var(--text-secondary); }
.authority-section .section-title { color: #a78bfa; }
.done-section .section-title { color: var(--accent-green); }

/* Action Queue Items */
.action-queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.action-queue-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(2px);
}

.action-queue-item.cluster:hover {
  border-color: var(--accent-blue);
}

.action-queue-item.technical:hover {
  border-color: var(--text-muted);
}

.action-queue-item.authority:hover {
  border-color: #a78bfa;
}

.action-label {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.4;
}

.action-progress {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-primary);
  padding: 2px 8px;
  border-radius: 10px;
}

.action-go-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.action-go-btn:hover {
  background: rgba(99, 102, 241, 0.3);
  transform: translateX(2px);
}

.action-empty {
  text-align: center;
  padding: 16px;
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

/* Pinned Items */
.pinned-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 213, 79, 0.08);
  border: 1px solid rgba(255, 213, 79, 0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pinned-item:hover {
  background: rgba(255, 213, 79, 0.12);
  border-color: rgba(255, 213, 79, 0.3);
}

.pinned-icon {
  font-size: 14px;
}

.pinned-title {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
}

.pinned-source {
  font-size: 11px;
  color: var(--text-muted);
}

.pinned-delete-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s ease;
  border-radius: 4px;
}

.pinned-item:hover .pinned-delete-btn {
  opacity: 1;
}

.pinned-delete-btn:hover {
  background: rgba(255, 82, 82, 0.2);
  color: var(--accent-red);
}

/* Done items */
.action-queue-item.done {
  opacity: 0.6;
}

.action-queue-item.done .action-label {
  text-decoration: line-through;
  color: var(--text-muted);
}

.action-icon {
  font-size: 12px;
}

/* ============================================
   IMAGE CARD - Generated images in chat
   ============================================ */
.image-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-secondary);
  margin: 12px 0;
  max-width: 100%;
}

.image-card--16x9 {
  aspect-ratio: 16/9;
}

.image-card--1x1 {
  aspect-ratio: 1/1;
  max-width: 400px;
}

.image-card__container {
  width: 100%;
  height: 100%;
}

.image-card__container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-card__actions {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s;
}

.image-card:hover .image-card__actions {
  opacity: 1;
}

.image-card__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s;
}

.image-card__btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

/* ============================================
   GENERATE IMAGE BUTTON - Canvas actions
   ============================================ */
.canvas-btn.generating {
  opacity: 0.7;
  cursor: wait;
}

.canvas-btn.generating::after {
  content: '';
  width: 12px;
  height: 12px;
  border: 2px solid var(--text-muted);
  border-top-color: transparent;
  border-radius: 50%;
  animation: btn-spin 1s linear infinite;
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   OPPORTUNITIES SECTION (Phase 4: UI Integration)
   ============================================ */
.aq-section--opportunities {
  margin-top: 16px;
}

.aq-section--opportunities .aq-section__header {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border-bottom: 2px solid #f59e0b;
}

.aq-item--opportunity {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.aq-item--opportunity:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.aq-item--opportunity .aq-item__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  cursor: pointer;
}

.aq-item--opportunity .aq-item__expand {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.aq-item--opportunity[data-expanded="true"] .aq-item__expand {
  transform: rotate(90deg);
}

.aq-item--opportunity .aq-item__title {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aq-item--opportunity .aq-item__type {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Effort badge styles */
.aq-item__effort {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.effort--low {
  background: #d1fae5;
  color: #065f46;
}

.effort--medium {
  background: #fef3c7;
  color: #92400e;
}

.effort--high {
  background: #fee2e2;
  color: #991b1b;
}

/* Expanded details */
.aq-item__details {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.aq-item__instruction {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.aq-item__target,
.aq-item__competitors {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.aq-item__target a {
  color: var(--accent-blue);
  word-break: break-all;
}

.aq-item__target a:hover {
  text-decoration: underline;
}

.aq-item--opportunity .aq-item__cta {
  margin-top: 12px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.aq-item--opportunity .aq-item__cta:hover {
  background: var(--accent-blue-hover, #2563eb);
}

/* Technical Issues Section (Phase 6) */
.aq-section--technical .aq-section__header {
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
  color: #9d174d;
  border-bottom: 2px solid #ec4899;
}

.aq-item--technical-issue {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.aq-item--technical-issue:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.aq-item--technical-issue .aq-item__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  cursor: pointer;
}

.aq-item--technical-issue .aq-item__expand {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.aq-item--technical-issue[data-expanded="true"] .aq-item__expand {
  transform: rotate(90deg);
}

.aq-item--technical-issue .aq-item__favicon {
  font-size: 14px;
  flex-shrink: 0;
}

.aq-item--technical-issue .aq-item__title {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Severity badge styles */
.aq-item__severity {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.severity--critical {
  background: #fecaca;
  color: #7f1d1d;
}

.severity--high {
  background: #fee2e2;
  color: #991b1b;
}

.severity--medium {
  background: #fef3c7;
  color: #92400e;
}

.severity--low {
  background: #d1fae5;
  color: #065f46;
}

.aq-item--technical-issue .aq-item__details {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.aq-item--technical-issue .aq-item__description {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.aq-item--technical-issue .aq-item__affected {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.aq-item--technical-issue .aq-item__list {
  margin: 8px 0 0 0;
  padding-left: 20px;
}

.aq-item--technical-issue .aq-item__list li {
  margin: 4px 0;
  word-break: break-all;
}

.aq-item--technical-issue .aq-item__more {
  color: var(--text-muted);
  font-style: italic;
}

.aq-item--technical-issue .aq-item__action {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.aq-item--technical-issue .aq-item__cta {
  margin-top: 12px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.aq-item--technical-issue .aq-item__cta:hover {
  background: var(--accent-blue-hover, #2563eb);
}

/* Citation Section styles */
.aq-section--citations .aq-section__header {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  color: #3730a3;
  border-bottom: 2px solid #6366f1;
}

.aq-item--citation {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.aq-item--citation:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.aq-item--citation .aq-item__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  cursor: pointer;
}

.aq-item--citation .aq-item__expand {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.aq-item--citation[data-expanded="true"] .aq-item__expand {
  transform: rotate(90deg);
}

.aq-item--citation .aq-item__favicon {
  font-size: 14px;
  flex-shrink: 0;
}

.aq-item--citation .aq-item__title {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aq-item--citation .aq-item__type {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Score badge styles */
.aq-item__score {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.score--high {
  background: #d1fae5;
  color: #065f46;
}

.score--medium {
  background: #fef3c7;
  color: #92400e;
}

.score--low {
  background: #fee2e2;
  color: #991b1b;
}

.aq-item--citation .aq-item__details {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.aq-item--citation .aq-item__finding,
.aq-item--citation .aq-item__status,
.aq-item--citation .aq-item__competitors,
.aq-item--citation .aq-item__action {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.aq-item--citation .aq-item__cta {
  margin-top: 12px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.aq-item--citation .aq-item__cta:hover {
  background: var(--accent-blue-hover, #2563eb);
}
