.pancake-reconcile-panel {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  overflow: hidden;
  background: var(--bg-body);
}

.pancake-toolbar,
.pancake-connection,
.pancake-summary-card,
.pancake-results {
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 3px 12px var(--shadow-light);
}

.pancake-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
}

.pancake-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.pancake-field--uid {
  flex: 1 1 420px;
}

.pancake-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pancake-input-count {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pancake-field label,
.pancake-connection label {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
}

.pancake-input {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: var(--bg-input);
  color: var(--text-primary);
  font: inherit;
}

.pancake-uid-input {
  min-height: 64px;
  max-height: 140px;
  resize: vertical;
  line-height: 1.45;
}

.pancake-input:focus-visible,
.pancake-run-btn:focus-visible,
.pancake-config-btn:focus-visible,
.pancake-message-list summary:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

.pancake-audit-detail summary:focus-visible,
.pancake-alert-toggle:focus-within {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

.pancake-run-btn,
.pancake-config-btn {
  min-height: 40px;
}

.pancake-run-btn {
  min-width: 150px;
}

.pancake-run-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pancake-spin 0.75s linear infinite;
  vertical-align: -2px;
}

@keyframes pancake-spin {
  to { transform: rotate(360deg); }
}

.pancake-connection {
  flex: 0 0 auto;
  padding: 10px 12px;
  border-radius: 10px;
}

.pancake-connection summary {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.pancake-connection-status {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.pancake-page-panel{display:flex;flex-direction:column;gap:10px;min-width:0}
.pancake-page-heading,.pancake-page-title{display:flex;align-items:center;justify-content:space-between;gap:10px}
.pancake-page-heading strong{font-size:14px}.pancake-page-heading button{flex-shrink:0}
.pancake-page-panel p{margin:0;line-height:1.5}
.pancake-page-filters{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:8px}
.pancake-page-filters label{display:flex;flex-direction:column;gap:5px;min-width:0}
.pancake-page-filters input,.pancake-page-filters select{box-sizing:border-box;width:100%;min-width:0;min-height:32px;padding:5px 7px;border:1px solid var(--dc-border,var(--border));border-radius:5px;background:var(--dc-surface,var(--bg-card));color:var(--dc-text,var(--text-primary));font:inherit}
.pancake-page-filters :is(input,select):focus-visible,.pancake-credentials summary:focus-visible{outline:2px solid var(--dc-blue,#2563eb);outline-offset:2px}
.pancake-page-list{max-height:340px;overflow:auto;display:flex;flex-direction:column;gap:8px;overscroll-behavior:contain}
.pancake-page-card{padding:10px;border:1px solid var(--dc-border,var(--border));border-left:3px solid #d97706;border-radius:6px;overflow-wrap:anywhere}
.pancake-page-card[data-page-state=ready]{border-left-color:#059669}
.pancake-page-card[data-page-state=denied],.pancake-page-card[data-page-state=unsupported]{border-left-color:#dc2626}
.pancake-page-card strong{font-size:13px}.pancake-platform{flex-shrink:0;font-size:11px;border:1px solid var(--dc-border,var(--border));border-radius:10px;padding:2px 7px}
.pancake-page-state{margin-top:7px;font-weight:700}.pancake-page-card p{font-size:12px;margin:4px 0}.pancake-page-card small,#pancakePageCount{color:var(--dc-muted,var(--text-secondary));font-size:11px}
.pancake-page-empty{padding:14px;background:var(--dc-soft,var(--bg-input));border-radius:5px}
.pancake-credentials{margin-top:10px;padding-top:10px;border-top:1px solid var(--dc-border,var(--border))}
.pancake-credentials>summary{font-size:12px;justify-content:flex-start}.pancake-credentials>.pancake-config-grid{padding-top:10px!important}
.dc-tool-popover.pancake-pages-popover{max-width:min(720px,calc(100vw - 16px))}
.dc-tool-row button[data-connection=partial]{border-color:#d97706;color:var(--dc-text);background:var(--dc-soft)}
@media(max-width:580px){.pancake-page-filters{grid-template-columns:1fr}.pancake-page-title{align-items:flex-start}.pancake-page-list{max-height:36vh}}

/* Page connection manager: one scrolling surface, clear counts, individual repair. */
.dc-tool-popover.pancake-pages-popover{max-width:min(1120px,calc(100vw - 16px));max-height:calc(100dvh - 120px);padding:20px;box-sizing:border-box;border-radius:12px;white-space:normal;overflow-x:hidden;overflow-y:auto}
.pancake-pages-popover>.pancake-connection,.pancake-page-panel{box-sizing:border-box;width:100%;min-width:0;max-width:100%}
.pancake-page-heading{align-items:flex-start;flex-wrap:wrap}.pancake-page-heading strong{font-size:18px}.pancake-page-heading p{font-size:12px;color:var(--dc-muted,#64748b);margin-top:5px}
.pancake-page-actions{display:flex;gap:8px;flex-wrap:wrap}
.pancake-page-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.dc-subheader-ui .pancake-pages-popover .pancake-page-stats button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:72px;padding:10px;background:var(--dc-soft,#f5f7fb);color:var(--dc-text,#243550)}
.pancake-page-stats strong{font-size:25px;line-height:1.1}.pancake-page-stats span{font-size:12px}
.dc-subheader-ui .pancake-pages-popover button[aria-pressed=true]{border-color:#2563eb;background:#eff6ff;color:#1e40af}
.pancake-page-filters{grid-template-columns:minmax(0,1fr) minmax(160px,.4fr);align-items:end}
.pancake-page-filters .pancake-platform-select{display:none}
.pancake-platform-tabs{display:flex;gap:8px;flex-wrap:wrap;padding:10px 0;border-block:1px solid var(--dc-border,#dce4f1)}
.dc-subheader-ui .pancake-pages-popover .pancake-platform-tabs button{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:7px 10px;border:1px solid transparent}
.pancake-platform-tabs button>span:last-child{border-radius:12px;padding:1px 6px;background:#e2e8f0;color:#334155;font-size:11px}
.pancake-platform-mark{display:inline-flex;align-items:center;justify-content:center;flex:0 0 18px;width:18px;height:18px;border-radius:4px;background:#64748b;color:#fff;font-size:14px;font-weight:700;font-family:Arial,sans-serif}
.pancake-platform-mark[data-platform=facebook]{background:#1877f2}.pancake-platform-mark[data-platform=instagram]{background:#be185d}.pancake-platform-mark[data-platform=tiktok]{background:#111827}
.pancake-page-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:14px;max-height:none;overflow:visible}
.pancake-page-card{box-sizing:border-box;min-width:0;padding:12px;border:1px solid var(--dc-border,#dce4f1);border-radius:9px;background:var(--dc-surface,#fff)}
.pancake-page-card[data-page-state=ready]{border-left-color:var(--dc-border,#dce4f1)}
.pancake-page-card:is([data-page-state=denied],[data-page-state=missing],[data-page-state=temporary],[data-page-state=unsupported]){border-color:#e7b56b}
.pancake-page-overview{display:flex;align-items:flex-start;gap:10px;min-width:0}
.pancake-page-identity{min-width:0;flex:1}.pancake-page-identity strong{display:block;max-width:100%;font-size:13px;line-height:1.4;font-weight:600;white-space:normal;overflow-wrap:anywhere}
.pancake-page-choice{display:flex;align-items:flex-start;gap:8px;cursor:pointer;min-width:0}
.pancake-page-choice input[type=checkbox]{flex:0 0 16px;width:16px;height:16px;min-height:16px;padding:0;margin:2px 0 0;accent-color:#2563eb}
.pancake-page-choice strong{flex:1;min-width:0}
.pancake-progress-row td{padding:12px;background:#eff6ff;color:#1e40af;font-weight:600;text-align:center}
.pancake-live-drift{padding:8px 12px;margin:6px 0;border-radius:6px;background:#eff6ff;color:#1e40af;font-size:12px;line-height:1.5;white-space:normal}
.pancake-page-handle{display:flex;align-items:flex-start;gap:5px;max-width:100%;font-size:11px;color:var(--dc-muted,#64748b);margin-top:5px;white-space:normal;overflow-wrap:anywhere}
.pancake-page-handle-text{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.pancake-page-identity small{display:block;margin-top:5px;overflow-wrap:anywhere;font-size:10px}
.pancake-page-indicator{display:flex;align-items:center;justify-content:center;flex:0 0 21px;width:21px;height:21px;border-radius:50%;background:#fff1db;color:#92400e;font-size:15px;font-weight:700}
[data-page-state=ready] .pancake-page-indicator{background:#dcfce7;color:#166534}
.pancake-page-card .pancake-page-state{font-size:12px;margin-top:12px;line-height:1.4}
.pancake-page-detail{margin-top:8px;font-size:12px}.pancake-page-detail>summary{cursor:pointer;min-height:28px;padding-block:3px;color:var(--dc-muted,#64748b)}
.pancake-page-detail[open] summary{color:var(--dc-text,#243550)}
.dc-subheader-ui .pancake-pages-popover .pancake-page-token-btn{margin-top:8px;min-height:36px;width:100%;font-size:12px}
.pancake-page-empty{grid-column:1/-1}
.pancake-pages-popover .pancake-credentials{border:1px solid var(--dc-border,#dce4f1);border-radius:8px;padding:12px;margin:0}
.pancake-pages-popover .pancake-credentials>summary{cursor:pointer;min-height:28px;font-size:13px;font-weight:600}
.pancake-pages-popover .pancake-credentials .pancake-config-help{display:block!important;font-size:12px}
.pancake-pages-popover #pancakeUserToken{box-sizing:border-box;width:100%;font-family:monospace;min-height:42px;margin-top:6px}
.pancake-page-token-dialog{box-sizing:border-box;width:min(480px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;padding:24px;border:1px solid #dce4f1;border-radius:12px;background:#fff;color:#243550;font-family:inherit}
.pancake-page-token-dialog::backdrop{background:#0f172a66}
.pancake-page-token-dialog form{display:flex;flex-direction:column;gap:12px}.pancake-page-token-dialog h2{text-align:center;font-size:18px;margin:0 0 4px}.pancake-page-token-dialog p{font-size:13px;line-height:1.5;margin:0;overflow-wrap:anywhere}
.pancake-page-token-dialog label{font-size:13px;font-weight:600}.pancake-page-token-dialog input{box-sizing:border-box;width:100%;min-height:44px;border:1px solid #cbd5e1;border-radius:6px;padding:9px 10px;font:13px monospace;background:#fff;color:#243550}
.pancake-page-token-dialog button{min-height:40px;padding:8px 12px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#243550;font:inherit;font-size:13px;cursor:pointer}
.pancake-token-dialog-actions{display:flex;gap:8px;justify-content:flex-end}.pancake-token-dialog-actions [type=submit]{background:#2563eb;border-color:#2563eb;color:#fff}
.pancake-page-token-dialog [data-token-message]{color:#92400e}.pancake-page-token-dialog :is(button,input):focus-visible,.pancake-pages-popover :is(button,summary):focus-visible{outline:2px solid #2563eb;outline-offset:2px}
@media(max-width:900px){.pancake-page-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:580px){.dc-tool-popover.pancake-pages-popover{padding:12px}.pancake-page-list{grid-template-columns:minmax(0,1fr)}.pancake-page-filters{grid-template-columns:1fr}.pancake-page-heading strong{font-size:16px}.pancake-page-actions{width:100%}.pancake-page-stats{gap:6px}.pancake-page-stats span{font-size:11px}.pancake-platform-tabs{gap:4px}}
@media(max-width:580px){
 .pancake-page-heading>div>p{display:none}
 #pancakePageSummary{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #pancakeCredentials:not([open]){display:none}
 .pancake-page-filters{grid-template-columns:minmax(0,1fr) minmax(130px,.85fr)}
 .dc-subheader-ui .pancake-pages-popover .pancake-platform-tabs button{padding:5px 6px;gap:4px;font-size:11px;min-height:34px}
 .pancake-platform-tabs .pancake-platform-mark{width:16px;height:16px;flex-basis:16px}
}

.pancake-config-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding-top: 10px;
}

.pancake-config-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pancake-config-help {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

.pancake-summary-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 8px;
  overflow-x: auto;
}

.pancake-summary-card {
  min-width: 110px;
  padding: 9px 11px;
  border-radius: 9px;
}

.pancake-summary-card span {
  display: block;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.pancake-summary-card strong {
  display: block;
  margin-top: 4px;
  color: var(--text-primary);
  font-size: 21px;
  line-height: 1;
}

.pancake-summary-card[data-tone="alert"] strong,
.pancake-summary-card[data-tone="data-gap"] strong,
.pancake-summary-card[data-tone="missing"] strong,
.pancake-summary-card[data-tone="rdt-gap"] strong { color: #f59e0b; }
.pancake-summary-card[data-tone="pancake-rdt"] strong { color: #a78bfa; }
.pancake-summary-card[data-tone="airtable-rdt"] strong { color: #60a5fa; }

.pancake-notice {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.pancake-notice[hidden] { display: none !important; }
.pancake-notice[data-tone="success"] { border-color: #10b981; color: #10b981; }
.pancake-notice[data-tone="warning"] { border-color: #f59e0b; color: #f59e0b; }
.pancake-notice[data-tone="error"] { border-color: #ef4444; color: #ef4444; }

.pancake-result-tools {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}

.pancake-alert-toggle {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.pancake-alert-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #f59e0b;
}

.pancake-visible-count {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pancake-results {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border-radius: 10px;
  scrollbar-gutter: stable;
}

.pancake-result-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--text-table);
  font-size: 12px;
}

.pancake-result-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 9px 10px;
  border-bottom: 2px solid var(--table-border);
  background: var(--table-th-bg);
  color: var(--text-secondary);
  text-align: left;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
}

.pancake-result-table th:nth-child(1) { width: 13%; }
.pancake-result-table th:nth-child(2) { width: 14%; }
.pancake-result-table th:nth-child(3) { width: 11%; }
.pancake-result-table th:nth-child(4) { width: 22%; }
.pancake-result-table th:nth-child(5) { width: 12%; }
.pancake-result-table th:nth-child(6) { width: 28%; }

.pancake-result-table td {
  padding: 10px;
  border-bottom: 1px solid var(--table-border);
  vertical-align: top;
  line-height: 1.45;
}

.pancake-result-table th:not(:last-child),
.pancake-result-table td:not(:last-child) {
  border-right: 1px solid var(--table-border);
}

.pancake-result-table tbody tr:last-child td { border-bottom: 0; }
.pancake-result-table tbody tr[data-status="alert"] { background: rgba(245, 158, 11, 0.08); }
.pancake-result-table tbody tr[data-status="no_data"] { background: rgba(148, 163, 184, 0.07); }

.pancake-status-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.pancake-status-badge--ok { color: #10b981; background: rgba(16, 185, 129, 0.14); }
.pancake-status-badge--alert { color: #f59e0b; background: rgba(245, 158, 11, 0.14); }
.pancake-status-badge--no_data { color: #94a3b8; background: rgba(148, 163, 184, 0.14); }
.pancake-status-badge--airtable_only { color: #b45309; background: rgba(245, 158, 11, 0.14); }

.pancake-uid-code {
  display: inline-block;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.pancake-compare-pair {
  display: grid;
  grid-template-columns: 94px max-content;
  align-items: baseline;
  justify-content: start;
  gap: 6px;
  margin-bottom: 4px;
}

.pancake-compare-pair span {
  color: var(--text-secondary);
  font-size: 10px;
}

.pancake-compare-pair strong {
  color: var(--text-primary);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.pancake-missing-group {
  margin-bottom: 7px;
}

.pancake-missing-group strong,
.pancake-missing-group span {
  display: block;
}

.pancake-missing-group strong {
  color: #fbbf24;
  font-size: 10px;
}

.pancake-missing-group span {
  margin-top: 2px;
  color: var(--text-primary);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.pancake-missing-group--secondary strong { color: #60a5fa; }

.pancake-rdt-gap {
  display: inline-flex;
  margin-top: 3px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  font-size: 9px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pancake-rdt-gap--alert {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
}

.pancake-audit-detail > summary {
  min-height: 32px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.pancake-customer-list {
  display: grid;
  max-height: min(65vh, 720px);
  gap: 12px;
  margin-top: 10px;
  overflow: auto;
}

.pancake-customer-audit {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-body);
}

.pancake-customer-audit[data-status="pancake_only"],
.pancake-customer-audit--rdt-mismatch {
  border-color: rgba(245, 158, 11, 0.55);
}

.pancake-customer-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.pancake-customer-state {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  font-size: 12px;
  font-weight: 800;
}

.pancake-customer-state--pancake_only,
.pancake-customer-audit--rdt-mismatch .pancake-customer-state {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
}

.pancake-customer-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px 16px;
  margin: 10px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.pancake-customer-facts span {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.pancake-customer-name {
  color: var(--text-primary);
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pancake-missing-names { margin-top: 3px; font-size: 11px; }
.pancake-missing-names .pancake-customer-name { font-weight: 500; }
.pancake-conversation-link {
  display: inline-block;
  min-height: 24px;
  padding: 3px 0;
  color: #93c5fd;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  border-radius: 3px;
  overflow-wrap: anywhere;
}
.pancake-conversation-link:hover { color: var(--text-primary); }
.pancake-conversation-link:focus-visible,
.pancake-conversation-choices > summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.pancake-link-icon { margin-left: 4px; vertical-align: -1px; }
.pancake-conversation-choices { font-size: 10px; font-weight: 500; }
.pancake-conversation-choices > summary {
  width: fit-content;
  min-height: 24px;
  padding: 3px 0;
  color: var(--text-secondary);
  cursor: pointer;
}
.pancake-conversation-choices ul { margin: 0 0 4px; padding-left: 16px; }
body.light-theme .pancake-conversation-link { color: #1d4ed8; }
body.light-theme .pancake-conversation-link:hover { color: var(--text-primary); }
@media (pointer: coarse) {
  .pancake-conversation-link,
  .pancake-conversation-choices > summary { min-height: 44px; padding: 10px 0; }
}

.pancake-cell-note {
  display: block;
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 10px;
}

.pancake-message-list summary {
  min-height: 28px;
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 800;
}

.pancake-message-list ol {
  margin: 7px 0 0;
  padding-left: 22px;
}

.pancake-message-list li {
  margin-bottom: 7px;
  color: var(--text-primary);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pancake-message-list time {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
}

.pancake-empty {
  height: 150px;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 700;
}

body.light-theme .pancake-summary-card[data-tone="matched"] strong,
body.light-theme .pancake-status-badge--ok,
body.light-theme .pancake-notice[data-tone="success"] { color: #047857; }
body.light-theme .pancake-summary-card[data-tone="alert"] strong,
body.light-theme .pancake-summary-card[data-tone="data-gap"] strong,
body.light-theme .pancake-summary-card[data-tone="missing"] strong,
body.light-theme .pancake-summary-card[data-tone="rdt-gap"] strong,
body.light-theme .pancake-status-badge--alert,
body.light-theme .pancake-notice[data-tone="warning"] { color: #92400e; }
body.light-theme .pancake-summary-card[data-tone="airtable-rdt"] strong,
body.light-theme .pancake-missing-group--secondary strong,
body.light-theme .pancake-uid-code { color: #1d4ed8; }
body.light-theme .pancake-summary-card[data-tone="pancake-rdt"] strong { color: #6d28d9; }
body.light-theme .pancake-missing-group strong,
body.light-theme .pancake-rdt-gap--alert,
body.light-theme .pancake-customer-state--pancake_only,
body.light-theme .pancake-customer-audit--rdt-mismatch .pancake-customer-state { color: #92400e; }
body.light-theme .pancake-notice[data-tone="error"] { color: #b91c1c; }

@media (prefers-reduced-motion: reduce) {
  .pancake-run-spinner { animation-duration: 0.01ms; }
}

@media (max-width: 860px) {
  .pancake-reconcile-panel { padding: 6px; }
  .pancake-toolbar { align-items: stretch; flex-direction: column; }
  .pancake-result-tools { align-items: flex-start; flex-direction: column; }
  .pancake-config-grid { grid-template-columns: 1fr; }
  .pancake-config-help { grid-column: auto; }
  .pancake-run-btn { width: 100%; }
}

.pancake-audit-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:180px;padding:24px}
.pancake-audit-loading .pancake-run-spinner{width:32px;height:32px;margin:0;border:3px solid #2563eb26;border-top-color:#2563eb}
.pancake-loading-scope{font-size:12px;font-weight:400;opacity:.75}
.pancake-ai-config{display:flex;flex-direction:column;gap:8px;margin-top:12px;min-width:0}
.pancake-ai-config p{font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.pancake-ai-consent{display:flex;align-items:flex-start;gap:8px}
.pancake-ai-consent input{flex:0 0 auto}
.pancake-ai-actions{display:flex;flex-wrap:wrap;gap:8px}
.pancake-classification-reason{grid-column:1/-1;font-size:14px;overflow-wrap:anywhere}
.pancake-customer-facts .pancake-sop-warning{display:inline-block;grid-column:1/-1;padding:6px 10px;border:1px solid #fcd34d;border-radius:4px;background:#fffbeb;color:#92400e;font-size:14px;line-height:1.5;white-space:normal;overflow-wrap:anywhere}
/* Reading details must wrap even inside the compact table/toolbar theme. */
.pancake-audit-detail{min-width:0;font-size:14px;line-height:1.6;white-space:normal}
.pancake-audit-detail .pancake-customer-name{font-size:16px;line-height:1.5}
.pancake-audit-detail :is(.pancake-cell-note,.pancake-conversation-choices){font-size:14px}
.dc-subheader-ui .pancake-audit-detail summary,
.pancake-audit-detail > summary{font-size:14px;line-height:1.6;white-space:normal;min-height:36px}
.dc-subheader-ui .pancake-audit-detail summary > span:not([aria-hidden]){overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}
body.light-theme .pancake-customer-facts{color:#475569}
body.light-theme .pancake-customer-state--matched{color:#065f46;background:#ecfdf5}
body.light-theme .pancake-result-table .pancake-cell-note,
body.light-theme .pancake-result-table .pancake-compare-pair span{color:#475569}
body.light-theme .pancake-result-table .pancake-rdt-gap:not(.pancake-rdt-gap--alert){color:#166534}
.dc-subheader-ui .pancake-diagnostic-btn{margin-top:8px;min-height:32px;padding:5px 9px;font-size:12px;white-space:normal}
.pancake-diagnostic-dialog [data-diagnostic-result]{font-size:14px;line-height:1.6;overflow-wrap:anywhere}
.pancake-diagnostic-dialog [data-diagnostic-result][data-tone=warning]{padding:10px;background:#fffbeb;color:#92400e;border-radius:6px}
.pancake-diagnostic-dialog [data-diagnostic-result][data-tone=success]{padding:10px;background:#ecfdf5;color:#065f46;border-radius:6px}
.pancake-discovery { padding: 8px 12px; color: #174476; background: #eff6ff; border: 1px solid #cbdcf5; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.pancake-discovery[hidden] { display: none; }
