:root {
  --bg-shell: #eff1f5;
  --bg-panel: #ffffff;
  --border: #e5e7eb;
  --border-subtle: #eef0f3;

  --text-primary: #1f2937;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;

  --sidebar-bg: #0e1524;
  --sidebar-text: #b8bfcf;
  --sidebar-header: #6b7488;
  --sidebar-active-bg: #1a2236;
  --sidebar-active-border: #6366f1;

  --accent: #6366f1;
  --accent-light: #eef2ff;
  --accent-hover: #4f46e5;

  --topbar-brand: #3aa9c4;

  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-border: #059669;

  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --danger-border: #dc2626;
  --danger-text: #991b1b;

  --warning-bg: #fef9c3;
  --warning-border: #eab308;
  --warning-text: #a16207;

  --info: #0ea5e9;
  --info-bg: #e0f2fe;
  --info-border: #bae6fd;
}

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

body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background: var(--bg-shell);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Layout Shell ── */
.app-shell {
  border-radius: 8px;
  overflow: hidden;
  border: 0.5px solid var(--border);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top Bar ── */
.topbar {
  background: var(--bg-panel);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-brand-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--topbar-brand);
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-brand-icon-inner {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
}

.topbar-brand-text {
  font-size: 17px;
  font-weight: 500;
  color: var(--topbar-brand);
  letter-spacing: 0.5px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-search {
  width: 180px;
  height: 28px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  color: var(--text-faint);
  background: transparent;
}

.topbar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  border: 1px solid #d1d5db;
}

/* ── Body (Sidebar + Main) ── */
.app-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ── Sidebar ── */
.sidebar {
  width: 220px;
  background: var(--sidebar-bg);
  padding: 20px 0;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar-section-label {
  color: var(--sidebar-header);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  padding: 0 20px;
  margin-bottom: 10px;
  margin-top: 24px;
}

.sidebar-section-label:first-child {
  margin-top: 0;
}

.sidebar-item {
  color: var(--sidebar-text);
  font-size: 13px;
  padding: 9px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  border-left: 2px solid transparent;
}

.sidebar-item:hover {
  background: rgba(255,255,255,0.04);
  color: #ffffff;
}

.sidebar-item.active {
  color: #ffffff;
  background: var(--sidebar-active-bg);
  border-left: 2px solid var(--sidebar-active-border);
  padding-left: 18px;
  font-weight: 500;
}

.sidebar-item-icon {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  padding: 28px 32px;
  overflow-y: auto;
  background: var(--bg-shell);
}

/* ── View System ── */
.view { display: none; animation: fadeIn 0.3s ease; }
.view.active { display: block; }

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

/* ── Section Header ── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
}

.section-title {
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 500;
}

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

/* ── Cards (White panels) ── */
.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 16px;
}

.card-header {
  padding: 18px 24px 0 24px;
}

.card-body {
  padding: 18px 24px;
}

.card-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

/* ── Buttons ── */
.btn {
  padding: 11px 22px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

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

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

.btn-secondary:hover {
  background: #fafbfc;
  color: var(--text-primary);
}

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

.btn-full { width: 100%; margin-top: 12px; }

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.15s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: var(--border-subtle);
  transform: scale(1.1);
}

.btn-icon:active { transform: scale(0.9); }

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

.tab-btn {
  background: none;
  border: none;
  padding: 10px 16px;
  border-bottom: 2px solid transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn:hover {
  color: var(--text-primary);
}

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

/* ── Data Table ── */
.table-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: #fafbfc;
  padding: 10px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  font-size: 13px;
  color: var(--text-primary);
}

.data-table tbody tr {
  transition: background 0.1s;
  border-left: 3px solid transparent;
}

.data-table tbody tr:hover {
  background: #fafbfc;
}

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

/* Column Width Hints */
.td-id { width: 50px; font-family: monospace; font-size: 11px; color: var(--text-faint); }
.td-platform { width: 50px; text-align: center; }
.td-campaign { width: 140px; }
.td-adset { width: 140px; }
.td-ad { width: 140px; }
.td-status { width: 95px; }
.td-comment-card { width: 500px; }
.td-reply { width: 20%; min-width: 150px; }
.td-icon { width: 44px; text-align: center; }
.td-actions { white-space: nowrap; }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1.4;
}

.badge-accent {
  background: var(--accent-light);
  color: var(--accent-hover);
}

.badge-danger {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
}

.badge-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-border);
}

.badge-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning-text);
}

.badge-neutral {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: var(--text-muted);
}

/* ── Reply Bubbles ── */
.reply-bubble {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 4px;
}

.reply-bubble:last-child { margin-bottom: 0; }

.reply-bubble-info {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  color: #0369a1;
  font-weight: 500;
}

.reply-bubble-danger {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #b91c1c;
}

.reply-bubble-neutral {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
}

/* ── Reasoning Drawer ── */
.row-reasoning {
  background: #fafbfc;
  border-left: 3px solid var(--accent) !important;
}

.reasoning-drawer {
  padding: 12px 20px;
  font-size: 12px;
  color: #475569;
  line-height: 1.6;
  font-style: italic;
  border-top: 1px dashed var(--border);
}

/* ── Form Styles ── */
.form-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px 32px;
}

/* Inline mini-spinner for extract button */
.spinner-sm {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #d1d5db;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin-sm 0.6s linear infinite;
}
@keyframes spin-sm {
  to { transform: rotate(360deg); }
}

.form-group { margin-bottom: 18px; }
.form-row { display: flex; gap: 16px; }
.form-half { flex: 1; }

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

input, textarea, select {
  width: 100%;
  background: #fafbfc;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  transition: border-color 0.15s, background 0.15s;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  padding: 0;
  flex-shrink: 0;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  background: #ffffff;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-faint);
  font-size: 13px;
}

/* ── Utility ── */
.hidden { display: none; }

.success-msg {
  color: var(--success);
  margin-top: 12px;
  text-align: center;
  font-weight: 500;
  font-size: 13px;
}

/* ── Status Accent Colors on Rows ── */
.row-hateful { border-left-color: var(--danger-border) !important; }
.row-question { border-left-color: var(--success-border) !important; }
.row-pending { border-left-color: var(--warning-border) !important; }

/* ── Source Tree Picker ── */
.source-tree-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.source-tree-list .source-tree-list {
  padding-left: 24px;
  border-left: 1px solid var(--border-subtle);
  margin-left: 12px;
}

.tree-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-primary);
  transition: background 0.1s;
  cursor: default;
}

.tree-node:hover {
  background: #f3f4f6;
}

.tree-node.checked {
  background: var(--accent-light);
}

.tree-toggle {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 10px;
  flex-shrink: 0;
  border-radius: 3px;
  transition: background 0.1s, transform 0.15s;
  user-select: none;
}

.tree-toggle:hover {
  background: var(--border);
}

.tree-toggle.expanded {
  transform: rotate(90deg);
}

.tree-toggle.leaf {
  visibility: hidden;
}

.tree-check {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

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

.tree-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-label-name {
  font-weight: 500;
}

.tree-label-id {
  font-size: 11px;
  color: var(--text-faint);
  font-family: 'SF Mono', ui-monospace, monospace;
  margin-left: 8px;
}

.tree-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}

.tree-node:hover .tree-actions {
  opacity: 1;
}

.tree-override-btn {
  font-size: 11px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.1s, color 0.1s;
}

.tree-override-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tree-override-btn.has-override {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

.tree-children.collapsed {
  display: none;
}

.tree-status-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 500;
  flex-shrink: 0;
}

.tree-status-active {
  background: #dcfce7;
  color: #166534;
}

.tree-status-paused {
  background: #fef3c7;
  color: #92400e;
}

/* ── Reply Textarea Inline Editor ── */
.reply-textarea {
  width: 100%;
  min-height: 52px;
  resize: vertical;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fafbfc;
  color: var(--text-primary);
  font-family: inherit;
  line-height: 1.5;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.reply-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 2px var(--accent-light);
}
.reply-editor-container {
  margin-top: 4px;
}
.meta-reply-input-wrapper {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-shell, #f0f2f5);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}
.meta-reply-input-wrapper:focus-within {
  border-color: var(--accent);
  background-color: var(--bg-panel, #ffffff);
  box-shadow: 0 0 0 2px var(--accent-light), inset 0 1px 2px rgba(0,0,0,0.05);
}

/* ── Visual Split-View Cockpit (Right Pane) ── */
:root {
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content {
  transition: padding-right 220ms var(--ease);
}

.right-pane {
  position: relative;
  z-index: 40;
  width: 660px; /* Drawer wide standard */
  height: 100%;
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 220ms var(--ease), border-left-width 220ms var(--ease);
  box-shadow: -1px 0 0 var(--border), -8px 0 24px rgba(17,24,39,0.04);
  flex-shrink: 0;
}
.right-pane.collapsed {
  width: 0px !important;
  border-left-width: 0px !important;
  border-left: none !important;
}
@media (max-width: 768px) {
  .right-pane {
    width: 100% !important;
    max-width: 100vw !important;
    position: fixed !important;
    left: 0 !important;
    top: 56px !important; /* Topbar height */
    height: calc(100vh - 56px) !important;
  }
}

/* Drawer / Cockpit inner structures */
.drawer-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.drawer-head-id {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-muted);
}
.drawer-head-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}
.drawer-close {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--text-muted);
}
.drawer-close:hover {
  background: var(--border-subtle);
  color: var(--text-primary);
}
.drawer-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
}
.drawer-section {
  margin-bottom: 18px;
}
.drawer-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* Cockpit Navigation Arrows */
.cockpit-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
}
.cockpit-nav-btn {
  background: var(--bg-shell);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 4px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  font-size: 12px;
  transition: all 0.15s;
}
.cockpit-nav-btn:hover {
  background: var(--border-subtle);
  color: var(--text-primary);
}
.cockpit-counter {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 4px;
}

/* Meta Ad Creative Simulation block */
.fbad {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
  overflow: hidden;
  text-align: left;
}
.fbad-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 8px 12px;
}
.fbad-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-shell);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  letter-spacing: 0.05em;
}
.fbad-page {
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}
.fbad-page-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.fbad-sponsored {
  font-size: 10.5px;
  color: var(--text-muted);
}
.fbad-body {
  padding: 2px 12px 10px 12px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-primary);
  white-space: pre-line;
}
.fbad-image {
  background: #fafafa;
  height: 240px;
  display: grid;
  place-items: center;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}
.fbad-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-shell);
}
.fbad-cta-text {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}
.fbad-cta-domain {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.fbad-cta-headline {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fbad-cta-btn {
  padding: 7px 14px;
  border-radius: 6px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
}
.fbad-cta-btn:hover {
  background: var(--border-subtle);
}

/* Spinner */
.spinner-sm {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0,0,0,0.1);
  border-left-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Highlight row when selected in cockpit */
tr.active-audit {
  background-color: rgba(99, 102, 241, 0.06) !important;
}
tr.active-audit td {
  background-color: rgba(99, 102, 241, 0.06) !important;
  font-weight: 500;
}
tr.active-audit td:first-child {
  position: relative;
}
tr.active-audit td:first-child::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--accent);
  border-radius: 0 2px 2px 0;
}

/* ── Facebook Ad Simulation Media Assets ── */
.ad-sim-media-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ad-sim-media-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

/* ─── Compliance Review Queue Table Styles ─── */
.cq-table { font-size: 12px; table-layout: fixed; width: 100%; min-width: 1100px; }
.cq-table thead th { position: sticky; top: 0; background: var(--bg-subtle, #fafbfc); z-index: 1; }
.cq-table td { vertical-align: middle; padding: 10px 12px; }
.cq-table .cq-id { font-family: var(--font-mono, monospace); font-size: 11px; color: var(--text-muted); }
.cq-table .cq-expand { cursor: pointer; color: var(--text-faint); display: inline-block; width: 14px; transition: transform 120ms; font-size: 10px; user-select: none; }
.cq-table .cq-row.is-open .cq-expand { transform: rotate(90deg); color: var(--text-secondary); }
.cq-table .cq-row.is-selected { background: rgba(91, 91, 214, 0.04); box-shadow: inset 3px 0 0 var(--accent); }
.cq-ad-wrap { position: relative; width: 100%; max-width: 720px; }
.cq-ad { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-panel); width: 100%; min-width: 0; position: relative; z-index: 1; }
.cq-ad-wrap.has-dupes::before { content: ''; position: absolute; inset: 4px -4px -4px 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-panel); z-index: 0; }
.cq-ad-wrap.has-dupes::after { content: ''; position: absolute; inset: 8px -8px -8px 8px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--bg-subtle, #fafbfc); z-index: -1; opacity: 0.7; }
.cq-ad-dupes { position: absolute; top: -7px; right: -7px; z-index: 2; display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: #4f46e5; color: #fff; border: 2px solid var(--bg-panel); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); white-space: nowrap; }
.cq-ad-thumb { width: 72px; height: 72px; border-radius: 6px; background: repeating-linear-gradient(135deg, var(--bg-subtle, #fafbfc) 0, var(--bg-subtle, #fafbfc) 8px, var(--bg-muted, #f1f2f5) 8px, var(--bg-muted, #f1f2f5) 16px); flex-shrink: 0; display: grid; place-items: center; font-size: 28px; color: var(--text-faint); overflow: hidden; }
.cq-ad-thumb-wrap { display: inline-block; flex-shrink: 0; }
.cq-ad-body { min-width: 0; flex: 1; font-size: 12px; line-height: 1.45; }
.cq-ad-headline { font-weight: 700; color: var(--text-primary); font-size: 13.5px; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cq-ad-text { color: var(--text-secondary); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 2px; }
.cq-ad-url { font-family: var(--font-mono, monospace); font-size: 11px; color: var(--success-border, #059669); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cq-table td:has(.cq-ad-wrap), .cq-table td:has(.cq-ad) { padding: 14px 10px 14px 14px; vertical-align: middle; }
.cq-table td.cq-id, .cq-table th.cq-id-h { width: 48px; padding-left: 14px; padding-right: 6px; }
.cq-table .cq-hop,
.cq-table .cq-status,
.cq-table .cq-coh,
.cq-table .cq-risk-adv,
.cq-table .cq-risk-critical,
.cq-table .cq-risk-low,
.cq-table .cq-audit,
.cq-table .cq-dup-chip { white-space: nowrap; }
/* ── Comments Table Column Overrides ── */
#comments-table {
  table-layout: auto !important;
  width: 100% !important;
}
#comments-table th {
  white-space: nowrap !important;
}
#comments-table td {
  white-space: normal !important;
  word-break: break-word !important;
  vertical-align: middle !important;
}
#comments-table .td-platform {
  width: 80px !important;
}
#comments-table .td-icon {
  width: auto !important;
}
