/* ============================================================
   WebCrawler Pro — styles.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Syne:wght@400;600;700;800&display=swap');

:root {
  --bg: #0a0a0f;
  --surface: #111118;
  --surface2: #1a1a24;
  --border: #2a2a3a;
  --accent: #00ff88;
  --accent2: #ff3366;
  --accent3: #3388ff;
  --text: #e8e8f0;
  --muted: #666680;
  --mono: 'Space Mono', monospace;
  --sans: 'Syne', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── HEADER ── */
header {
  border-bottom: 1px solid var(--border);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo { font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--accent); letter-spacing: -1px; }
.logo span { color: var(--muted); }
.badge { font-family: var(--mono); font-size: 10px; background: var(--accent); color: var(--bg); padding: 2px 8px; border-radius: 2px; font-weight: 700; letter-spacing: 1px; }

/* ── CONTROL PANEL ── */
.control-panel { background: var(--surface); border-bottom: 1px solid var(--border); padding: 24px 32px; }
.url-row { display: flex; gap: 12px; align-items: stretch; margin-bottom: 16px; }

.url-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s;
}
.url-input:focus { border-color: var(--accent); }
.url-input::placeholder { color: var(--muted); }

.options-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.option-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 12px;
}
.option-group label { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
.option-group select,
.option-group input[type="number"] { background: transparent; border: none; color: var(--accent); font-family: var(--mono); font-size: 13px; outline: none; cursor: pointer; width: 100px; }
.option-group input[type="number"] { width: 60px; }
.option-group select option { background: var(--bg); }

/* ── MODE TOGGLE ── */
.mode-toggle { display: flex; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.mode-btn { padding: 8px 16px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; background: transparent; border: none; color: var(--muted); cursor: pointer; transition: all 0.2s; border-right: 1px solid var(--border); }
.mode-btn:last-child { border-right: none; }
.mode-btn.active { background: var(--accent); color: var(--bg); font-weight: 700; }

/* ── EXTRACT CHIPS ── */
.extract-row { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.extract-label { font-family: var(--mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-right: 4px; }
.chip { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; border: 1px solid var(--border); font-family: var(--mono); font-size: 11px; cursor: pointer; transition: all 0.15s; color: var(--muted); user-select: none; }
.chip.active { border-color: var(--accent); color: var(--accent); background: rgba(0,255,136,0.08); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── BUTTONS ── */
.crawl-btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.2s;
  white-space: nowrap;
}
.crawl-btn:hover { background: #00ffaa; transform: translateY(-1px); }
.crawl-btn:disabled { background: var(--muted); cursor: not-allowed; transform: none; }

.stop-btn {
  background: transparent;
  color: var(--accent2);
  border: 1px solid var(--accent2);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: none;
}
.stop-btn.visible { display: block; }

/* ── STATUS BAR ── */
.status-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 8px 32px;
  display: flex;
  gap: 24px;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
}
.stat { display: flex; align-items: center; gap: 6px; }
.stat-val { color: var(--accent); font-weight: 700; }
.stat-label { color: var(--muted); }
.progress-bar-wrap { flex: 1; height: 3px; background: var(--surface2); border-radius: 2px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); width: 0%; transition: width 0.3s; border-radius: 2px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.status-dot.running { background: var(--accent); animation: pulse 1s infinite; }
.status-dot.done { background: var(--accent3); }
.status-dot.error { background: var(--accent2); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ── MAIN LAYOUT ── */
.main { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 195px); overflow: hidden; }
.main.main--no-sidebar { grid-template-columns: 1fr; }
.main.main--no-sidebar .sidebar { display: none; }

/* ── SIDEBAR ── */
.sidebar { border-right: 1px solid var(--border); overflow-y: auto; background: var(--surface); }
.sidebar-header { padding: 12px 16px; border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--surface); z-index: 10; }
.sidebar-search { padding: 8px 10px; border-bottom: 1px solid var(--border); position: sticky; top: 41px; background: var(--surface); z-index: 10; }
.sidebar-search input {
  width: 100%; box-sizing: border-box; padding: 7px 10px;
  font-family: var(--mono); font-size: 11px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 4px; outline: none;
}
.sidebar-search input:focus { border-color: var(--accent3); }
.sidebar-search input::placeholder { color: var(--muted); }
.page-item { padding: 10px 16px; border-bottom: 1px solid rgba(42,42,58,0.5); cursor: pointer; transition: background 0.15s; display: flex; align-items: flex-start; gap: 8px; }
.page-item:hover { background: var(--surface2); }
.page-item.active { background: rgba(0,255,136,0.05); border-left: 2px solid var(--accent); }
.page-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.page-info { overflow: hidden; }
.page-url { font-family: var(--mono); font-size: 11px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.page-meta { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; }
.page-depth { padding: 1px 5px; background: var(--surface2); border-radius: 2px; font-size: 9px; }

/* ── TABS ── */
.right-panel { display: flex; flex-direction: column; overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid var(--border); background: var(--surface); overflow-x: auto; flex-shrink: 0; }
.tab { padding: 12px 20px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; transition: all 0.15s; border-right: 1px solid var(--border); }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-count { display: inline-block; background: var(--surface2); padding: 1px 6px; border-radius: 10px; font-size: 10px; margin-left: 6px; color: var(--muted); }
.tab.active .tab-count { background: rgba(0,255,136,0.15); color: var(--accent); }
.tab-scope {
  display: inline-block; margin-left: 4px; padding: 0 5px;
  font-size: 8px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--accent3); background: rgba(51,136,255,0.12); border-radius: 3px; vertical-align: middle;
}
.tabs-scope-hint {
  padding: 6px 16px; font-family: var(--mono); font-size: 10px; color: var(--muted);
  border-bottom: 1px solid var(--border); background: var(--surface); flex-shrink: 0;
}
.tabs-scope-hint .tab-scope { margin-left: 0; margin-right: 2px; }
.tab-content { flex: 1; overflow-y: auto; padding: 20px; display: none; }
.tab-content.active { display: block; }

/* ── ASSETS GRID ── */
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.asset-card { background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; transition: all 0.2s; cursor: pointer; }
.asset-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.asset-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--bg); display: block; }
.asset-thumb-placeholder { width: 100%; aspect-ratio: 16/9; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 32px; }
.asset-info { padding: 8px 10px; }
.asset-type { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 3px; }
.asset-url { font-family: var(--mono); font-size: 10px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-type-img { color: var(--accent); }
.asset-type-vid { color: #ff9900; }
.asset-type-aud { color: var(--accent3); }

/* ── ASSETS TOOLBAR & LIST ── */
.assets-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.assets-toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.assets-view-toggle { display: flex; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.assets-view-btn { padding: 6px 14px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; background: transparent; border: none; color: var(--muted); cursor: pointer; transition: all 0.15s; border-right: 1px solid var(--border); }
.assets-view-btn:last-child { border-right: none; }
.assets-view-btn.active { background: var(--accent); color: var(--bg); font-weight: 700; }
.assets-type-toggle { display: flex; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.assets-type-btn { padding: 6px 12px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; background: transparent; border: none; color: var(--muted); cursor: pointer; transition: all 0.15s; border-right: 1px solid var(--border); }
.assets-type-btn:last-child { border-right: none; }
.assets-type-btn.active { background: var(--accent3); color: #fff; font-weight: 700; }
.assets-toolbar-hint { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.assets-list-table .asset-list-thumb { width: 48px; height: 36px; object-fit: cover; border-radius: 3px; background: var(--bg); display: block; }
.assets-list-table .asset-list-thumb-wrap { width: 48px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--bg); border-radius: 3px; font-size: 18px; }
.assets-list-table .alt-missing { color: var(--accent2); font-style: italic; }
.assets-list-table .alt-ok { color: var(--text); }
.assets-list-table .used-on-cell { font-size: 11px; line-height: 1.5; }
.assets-list-table .used-on-link { color: var(--accent3); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.assets-list-table .used-on-link:hover { text-decoration: underline; }
.assets-export-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.assets-export-summary { font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* ── LINKS TABLE ── */
.links-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
.links-table th { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; background: var(--surface); position: sticky; top: 0; }
.links-table td { padding: 8px 12px; border-bottom: 1px solid rgba(42,42,58,0.5); color: var(--text); max-width: 0; }
.links-table tr:hover td { background: var(--surface2); }
.links-table .url-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent3); }
.links-table .text-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 10px; font-family: var(--mono); }
.tag-int { background: rgba(0,255,136,0.1); color: var(--accent); border: 1px solid rgba(0,255,136,0.2); }
.tag-ext { background: rgba(51,136,255,0.1); color: var(--accent3); border: 1px solid rgba(51,136,255,0.2); }

/* ── CONTENT SECTIONS ── */
.content-section { margin-bottom: 20px; }
.section-title { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.section-count { background: var(--surface2); padding: 1px 6px; border-radius: 10px; font-size: 10px; }
.content-item { padding: 8px 12px; background: var(--surface2); border-left: 2px solid var(--border); margin-bottom: 6px; font-size: 13px; line-height: 1.5; border-radius: 0 4px 4px 0; }
.content-item.h1 { border-left-color: var(--accent); font-size: 16px; font-weight: 700; }
.content-item.h2 { border-left-color: var(--accent3); font-size: 14px; font-weight: 600; }
.content-item.p { border-left-color: var(--border); font-size: 12px; color: var(--muted); max-height: 80px; overflow: hidden; }
.content-item.li { border-left-color: #ff9900; font-size: 12px; }
.content-item.schema { border-left-color: var(--accent2); font-family: var(--mono); font-size: 10px; white-space: pre; overflow-x: auto; max-height: 120px; color: #ff9980; }

/* ── SEO PANEL ── */
.seo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.seo-card { background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 14px; }
.seo-card-label { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 6px; }
.seo-card-value { font-size: 13px; line-height: 1.4; }
.seo-card-meta { font-family: var(--mono); font-size: 10px; margin-top: 6px; }
.seo-ok { color: var(--accent); }
.seo-warn { color: #ff9900; }
.seo-err { color: var(--accent2); }
.seo-issue { display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px; background: var(--surface2); border-radius: 4px; margin-bottom: 6px; font-size: 12px; }
.seo-issue .icon { flex-shrink: 0; }
.issue-desc { color: var(--text); }
.issue-fix { color: var(--muted); font-size: 11px; font-family: var(--mono); margin-top: 2px; }

/* ── SEO ACCORDION ── */
.seo-page-card { background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 10px; overflow: hidden; transition: border-color 0.2s; }
.seo-page-card.has-errors { border-left: 3px solid var(--accent2); }
.seo-page-card.has-warnings { border-left: 3px solid #ff9900; }
.seo-page-card.all-ok { border-left: 3px solid var(--accent); }
.seo-page-header { display: flex; align-items: center; padding: 10px 14px; cursor: pointer; gap: 10px; user-select: none; }
.seo-page-header:hover { background: rgba(255,255,255,0.03); }
.seo-page-path { flex: 1; font-family: var(--mono); font-size: 12px; color: var(--accent3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seo-page-badges { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.seo-badge { font-family: var(--mono); font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 700; }
.seo-badge-err { background: rgba(255,51,102,0.15); color: var(--accent2); border: 1px solid rgba(255,51,102,0.3); }
.seo-badge-warn { background: rgba(255,153,0,0.15); color: #ff9900; border: 1px solid rgba(255,153,0,0.3); }
.seo-badge-ok { background: rgba(0,255,136,0.1); color: var(--accent); border: 1px solid rgba(0,255,136,0.2); }
.seo-score-pill { font-family: var(--mono); font-size: 13px; font-weight: 800; min-width: 46px; text-align: right; }
.seo-chevron { font-size: 10px; color: var(--muted); transition: transform 0.2s; flex-shrink: 0; }
.seo-page-card.open .seo-chevron { transform: rotate(180deg); }
.seo-page-body { display: none; padding: 0 14px 14px; border-top: 1px solid var(--border); }
.seo-page-card.open .seo-page-body { display: block; }
.seo-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.seo-meta-item { background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 8px 10px; }
.seo-meta-key { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 4px; }
.seo-meta-val { font-size: 12px; line-height: 1.4; word-break: break-all; }
.seo-meta-len { font-family: var(--mono); font-size: 10px; margin-top: 3px; }
.seo-issues-title { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 10px 0 6px; }

/* ── LOG ── */
.log-wrap { background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 12px; font-family: var(--mono); font-size: 11px; flex: 1; min-height: 0; overflow-y: auto; }
.log-line { padding: 2px 0; border-bottom: 1px solid rgba(42,42,58,0.3); }
.log-line .ts { color: var(--muted); margin-right: 8px; }
.log-line .msg-ok { color: var(--accent); }
.log-line .msg-err { color: var(--accent2); }
.log-line .msg-info { color: var(--accent3); }
.log-line .msg-warn { color: #ff9900; }

/* ── EMPTY STATES ── */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--muted); gap: 12px; }
.empty-icon { font-size: 48px; opacity: 0.3; }
.empty-text { font-family: var(--mono); font-size: 12px; text-align: center; line-height: 1.8; }
.no-results { text-align: center; color: var(--muted); font-family: var(--mono); font-size: 12px; padding: 40px; }

/* ── MISC ── */
.copy-btn { padding: 2px 8px; background: transparent; border: 1px solid var(--border); color: var(--muted); font-family: var(--mono); font-size: 10px; border-radius: 3px; cursor: pointer; transition: all 0.15s; margin-left: 8px; }
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-select-note {
  font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 12px;
  padding: 8px 12px; background: var(--surface2); border-radius: 4px;
  border-left: 2px solid var(--accent3);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.page-select-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── SCROLLBARS ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ============================================================
   REPORT SCREEN
   ============================================================ */

/* ── Layout ── */
#tab-report { padding: 0; display: none; flex-direction: column; overflow: hidden; }
#tab-report.active { display: flex; }
#reportPanel { flex: 1; overflow-y: auto; padding: 20px; }
#reportEmpty { height: 100%; }

.report-section { margin-bottom: 28px; }
.report-section-title {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── KPI Row ── */
.report-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.report-kpi {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  text-align: center;
}
.report-kpi-val {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}
.report-kpi-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

/* ── Detail Cards ── */
.report-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.report-detail-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
}
.report-detail-card-title {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
  margin-bottom: 10px;
  font-weight: 700;
}

/* ── Bar Rows ── */
.report-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.report-bar-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  width: 150px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.report-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}
.report-bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; min-width: 2px; }
.report-bar-value {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}
.report-bar-pct {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  width: 32px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Filters ── */
.report-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 0 12px;
  margin-bottom: 0;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 5;
  border-bottom: 1px solid var(--border);
}
.report-search {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 4px;
  outline: none;
  width: 240px;
  transition: border-color 0.2s;
}
.report-search:focus { border-color: var(--accent); }
.report-filter-sel {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  padding: 7px 10px;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}
.report-filter-sel option { background: var(--bg); }
.report-reset-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  padding: 7px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}
.report-reset-btn:hover { border-color: var(--accent2); color: var(--accent2); }
.report-filter-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}

/* ── Table ── */
.report-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 1400px;
}
.report-table thead { position: sticky; top: 0; z-index: 4; }
.report-table th {
  background: var(--surface);
  padding: 8px 10px;
  text-align: left;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
}
.report-table th:last-child { border-right: none; }
.rt-sortable { cursor: pointer; }
.rt-sortable:hover { color: var(--text); background: var(--surface2); }
.rt-sorted { color: var(--accent) !important; }
.rt-sort-icon { opacity: 0.5; font-size: 9px; }
.report-table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(42,42,58,0.4);
  border-right: 1px solid rgba(42,42,58,0.4);
  vertical-align: top;
  line-height: 1.4;
}
.report-table td:last-child { border-right: none; }
.report-row { cursor: pointer; transition: background 0.1s; }
.report-row:hover td { background: rgba(255,255,255,0.02); }
.report-row:last-child td { border-bottom: none; }

/* cell types */
.rt-url-cell {
  font-family: var(--mono);
  font-size: 11px;
  min-width: 180px;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rt-text-cell {
  min-width: 140px;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

/* cell state colours */
.rt-cell-ok   { background: rgba(0,255,136,0.04); }
.rt-cell-warn { background: rgba(255,153,0,0.07); color: #ff9900; }
.rt-cell-err  { background: rgba(255,51,102,0.07); color: var(--accent2); }

/* badges */
.rt-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
}
.rt-badge-ok   { background: rgba(0,255,136,0.1);  color: var(--accent); border: 1px solid rgba(0,255,136,0.2); }
.rt-badge-warn { background: rgba(255,153,0,0.12); color: #ff9900;       border: 1px solid rgba(255,153,0,0.3); }
.rt-badge-err  { background: rgba(255,51,102,0.12);color: var(--accent2);border: 1px solid rgba(255,51,102,0.3); }

/* ── Export row ── */
.report-export-row { display: flex; gap: 10px; padding: 12px 0 0; }
.report-export-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.15s;
}
.report-export-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   PERSISTENCE — banner, history panel, header buttons
   ============================================================ */

/* ── Header action buttons ── */
.header-action-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  padding: 7px 14px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.15s;
  white-space: nowrap;
}
.header-action-btn:hover  { border-color: var(--accent); color: var(--accent); }
.header-action-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  padding: 7px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  letter-spacing: 0.5px;
}
.theme-toggle-btn:hover { border-color: var(--accent3); color: var(--accent3); }

.pedia-learn-link {
  display: inline-block;
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent3);
  text-decoration: none;
  white-space: nowrap;
}
.pedia-learn-link:hover { color: var(--accent); text-decoration: underline; }
.issue-fix .pedia-learn-link,
.task-fix .pedia-learn-link,
.signal-fix .pedia-learn-link { margin-top: 4px; margin-left: 0; }

/* ── Scan saved banner ── */
#scanSavedBanner {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  flex-wrap: wrap;
}
.scan-banner-icon  { font-size: 16px; flex-shrink: 0; }
.scan-banner-text  { color: var(--muted); white-space: nowrap; }
.scan-banner-input {
  flex: 1;
  min-width: 280px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--accent3);
  font-family: var(--mono);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 4px;
  outline: none;
  cursor: text;
}
.scan-banner-copy {
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  transition: background 0.15s;
}
.scan-banner-copy:hover { background: #00ffaa; }
.scan-banner-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  transition: color 0.15s;
}
.scan-banner-close:hover { color: var(--accent2); }

/* ── History panel (dropdown from header) ── */
#historyPanel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  overflow: hidden;
}
.history-panel-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#scanHistoryList {
  max-height: 360px;
  overflow-y: auto;
}
.scan-history-loading,
.scan-history-empty {
  padding: 24px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.scan-history-item {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(42,42,58,0.5);
  cursor: pointer;
  transition: background 0.1s;
}
.scan-history-item:hover { background: var(--surface2); }
.scan-history-item.active { border-left: 2px solid var(--accent); background: rgba(0,255,136,0.04); }
.scan-history-item:last-child { border-bottom: none; }
.scan-history-url {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.scan-history-meta {
  display: flex;
  gap: 12px;
  align-items: center;
}
.scan-history-date  { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.scan-history-pages { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.scan-history-score { font-family: var(--mono); font-size: 11px; font-weight: 700; }
.scan-history-id    { font-family: var(--mono); font-size: 9px; color: rgba(102,102,128,0.5); margin-top: 3px; }

/* ============================================================
   REPORT — insight panels, charts, flags
   ============================================================ */

/* Charts row */
.report-charts-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.report-chart-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  flex: 1;
  min-width: 220px;
}
.report-chart-card canvas {
  display: block;
  width: 100%;
  height: 150px;
  margin-top: 8px;
}

/* Insight panels */
.report-insights {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
/* Insight cards — <details>/<summary> for native collapse */
.insight-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.insight-card:hover { border-color: rgba(102,102,128,0.5); }
.insight-card[open]  { border-color: var(--border); }

/* Remove native marker — we use our own chevron */
.insight-card > summary { list-style: none; }
.insight-card > summary::-webkit-details-marker { display: none; }

.insight-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid transparent;
  background: var(--surface);
  cursor: pointer;
  user-select: none;
  transition: background 0.1s;
}
.insight-card[open] .insight-card-header { border-bottom-color: var(--border); }
.insight-card-header:hover { background: var(--surface2); }

.insight-card-icon    { font-size: 14px; flex-shrink: 0; }
.insight-card-title   { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text); flex: 1; }
.insight-card-count   { font-family: var(--mono); font-size: 14px; font-weight: 800; white-space: nowrap; }
.insight-card-chevron {
  font-size: 10px;
  color: var(--muted);
  flex-shrink: 0;
  margin-left: 4px;
  transition: transform 0.2s;
}
.insight-card[open] .insight-card-chevron { transform: rotate(180deg); }

.insight-card-body {
  padding: 12px 14px;
  max-height: 420px;
  overflow-y: auto;
}

.insight-ok   { font-family: var(--mono); font-size: 11px; color: var(--accent); padding: 4px 0; }
.insight-desc { font-size: 11px; color: var(--muted); margin-bottom: 8px; line-height: 1.5; }
.insight-sub-title { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 6px; }
.insight-more { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 6px; text-align: center; }
.insight-meta { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-left: 8px; flex-shrink: 0; }
.insight-meta.perf-slow { color: var(--accent2); }

.dup-group { margin-bottom: 10px; }
.dup-group:last-child { margin-bottom: 0; }
.dup-label {
  font-size: 11px;
  color: var(--text);
  background: var(--bg);
  padding: 4px 8px;
  border-radius: 3px;
  margin-bottom: 4px;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dup-url {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 11px;
}
.dup-url a { color: var(--accent3); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dup-url a:hover { text-decoration: underline; }

/* Table flags (DT, DD, DH, OR, TC) */
.rt-flag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 2px;
  margin-left: 4px;
  background: rgba(255,51,102,0.15);
  color: var(--accent2);
  border: 1px solid rgba(255,51,102,0.3);
  vertical-align: middle;
  cursor: help;
}
.rt-flag.rt-flag-warn {
  background: rgba(255,153,0,0.12);
  color: #ff9900;
  border-color: rgba(255,153,0,0.3);
}

/* ============================================================
   AUTH — user widget, usage bar, rate limit modal
   ============================================================ */

/* ── Usage bar (header) ── */
.user-usage-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.user-usage-bar-track {
  width: 80px;
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.user-usage-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease, background 0.3s;
}
.user-usage-label {
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
}

/* ── User avatar ── */
.user-avatar-wrap {
  position: relative;
  cursor: pointer;
}
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: block;
  transition: border-color 0.15s;
}
.user-avatar-wrap:hover .user-avatar { border-color: var(--accent); }
.user-avatar-placeholder {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface2);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── User dropdown menu ── */
.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 200px;
  z-index: 300;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  overflow: hidden;
}
.user-menu-name {
  padding: 12px 14px 2px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.user-menu-email {
  padding: 0 14px 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}
.user-menu-item {
  display: block;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.15s;
}
.user-menu-item:hover { background: var(--surface2); color: var(--accent2); }

/* ── Rate limit modal overlay ── */
.rl-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
  animation: rl-fade-in 0.2s ease;
}
@keyframes rl-fade-in { from { opacity: 0; } to { opacity: 1; } }

.rl-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 40px;
  max-width: 460px;
  width: 90%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  animation: rl-slide-up 0.25s ease;
}
@keyframes rl-slide-up { from { transform: translateY(20px); opacity:0; } to { transform: translateY(0); opacity:1; } }

.rl-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.rl-title {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}
.rl-desc {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}
.rl-desc strong { color: var(--text); }

.rl-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.rl-benefits-title {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 14px;
}

.rl-benefits {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
}
.rl-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  padding: 5px 0;
  line-height: 1.5;
}
.rl-benefits li strong { color: var(--text); }
.rl-check {
  color: var(--accent);
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Google sign-in button ── */
.rl-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  background: #fff;
  color: #1a1a1a;
  border: none;
  border-radius: 6px;
  padding: 12px 20px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin-bottom: 12px;
}
.rl-google-btn:hover {
  background: #f8f8f8;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}

.rl-dismiss {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  padding: 6px;
  transition: color 0.15s;
  width: 100%;
}
.rl-dismiss:hover { color: var(--text); }

/* ── Lazy-loaded asset images ── */
.asset-lazy {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.asset-lazy[src] {
  opacity: 1;
}
/* Placeholder shown while image hasn't loaded yet */
.asset-lazy-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

/* ============================================================
   SCHEMA SECTION
   ============================================================ */

.schema-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.schema-left, .schema-right { display: flex; flex-direction: column; gap: 0; }

/* Schema type inventory bars */
.schema-type-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.schema-type-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(51,136,255,0.12);
  color: var(--accent3);
  border: 1px solid rgba(51,136,255,0.25);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 120px;
}
.schema-type-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}
.schema-type-bar {
  height: 100%;
  background: var(--accent3);
  border-radius: 3px;
  min-width: 3px;
  transition: width 0.4s ease;
}
.schema-type-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent3);
  font-weight: 700;
  min-width: 20px;
  text-align: right;
}

/* Missing schema rows */
.schema-missing-row {
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
}

/* Page type chips */
.page-type-chip {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.page-type-homepage   { background: rgba(0,255,136,0.1);  color: var(--accent);  border: 1px solid rgba(0,255,136,0.2); }
.page-type-article    { background: rgba(51,136,255,0.1); color: var(--accent3); border: 1px solid rgba(51,136,255,0.2); }
.page-type-product    { background: rgba(255,153,0,0.1);  color: #ff9900;        border: 1px solid rgba(255,153,0,0.2); }
.page-type-faq        { background: rgba(153,51,255,0.1); color: #9933ff;        border: 1px solid rgba(153,51,255,0.2); }
.page-type-contact    { background: rgba(255,51,102,0.1); color: var(--accent2); border: 1px solid rgba(255,51,102,0.2); }
.page-type-local      { background: rgba(0,204,136,0.1);  color: #00cc88;        border: 1px solid rgba(0,204,136,0.2); }
.page-type-event      { background: rgba(255,100,0,0.1);  color: #ff6400;        border: 1px solid rgba(255,100,0,0.2); }
.page-type-recipe     { background: rgba(255,200,0,0.1);  color: #ffc800;        border: 1px solid rgba(255,200,0,0.2); }
.page-type-breadcrumb { background: rgba(100,100,100,0.1);color: var(--muted);   border: 1px solid var(--border); }
.page-type-unknown    { background: var(--surface2);       color: var(--muted);   border: 1px solid var(--border); }

/* Page type assignment list */
.page-type-list {
  max-height: 360px;
  overflow-y: auto;
}
.pt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(42,42,58,0.4);
}
.pt-row:last-child { border-bottom: none; }
.pt-url {
  flex: 1;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pt-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
}
.pt-select:focus { border-color: var(--accent); }
.pt-select option { background: var(--bg); }
.pt-has-schema {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  flex-shrink: 0;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pt-no-schema {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent2);
  flex-shrink: 0;
}

/* Schema recommendation panel */
.schema-recommend-panel {
  background: var(--surface);
  border: 1px solid var(--accent3);
  border-radius: 8px;
  margin-top: 16px;
  overflow: hidden;
}
.schema-recommend-inner { padding: 20px; }
.schema-recommend-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.schema-recommend-icon { font-size: 28px; flex-shrink: 0; }
.schema-recommend-title {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.schema-recommend-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.schema-required-types {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* Schema template code blocks */
.schema-template {
  margin-bottom: 14px;
}
.schema-template-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.schema-template-type {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent3);
}
.schema-copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
}
.schema-copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.schema-template-code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: #88cc88;
  overflow-x: auto;
  margin: 0;
  line-height: 1.6;
  white-space: pre;
}

/* ============================================================
   AEO / GEO SECTION
   ============================================================ */

.aeo-geo-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.aeo-geo-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface2);
}
.aeo-block { border-left: 3px solid #7c3aed; }
.geo-block  { border-left: 3px solid #0ea5e9; }

.aeo-geo-block-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.aeo-geo-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 3px 9px;
  border-radius: 3px;
}
.aeo-label { background: rgba(124,58,237,0.15); color: #a78bfa; border: 1px solid rgba(124,58,237,0.3); }
.geo-label  { background: rgba(14,165,233,0.12); color: #38bdf8; border: 1px solid rgba(14,165,233,0.3); }

.aeo-geo-sublabel {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}
.aeo-geo-score-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.aeo-geo-big-score {
  font-family: var(--mono);
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
}
.aeo-geo-score-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.aeo-geo-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* Failure bars */
.aeo-geo-fail-list { margin-top: 4px; }
.aeo-geo-fail-list-title {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 6px;
}
.aeo-geo-fail-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.aeo-geo-fail-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  width: 180px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aeo-geo-fail-bar-wrap {
  flex: 1;
  height: 5px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}
.aeo-geo-fail-bar { height: 100%; border-radius: 3px; min-width: 3px; }
.aeo-bar  { background: #7c3aed; }
.geo-bar  { background: #0ea5e9; }
.aeo-geo-fail-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  min-width: 18px;
  text-align: right;
}
.aeo-geo-all-ok {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  margin-top: 4px;
}

/* Per-page table */
.aeo-geo-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 6px; }
.aeo-geo-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 700px; }
.aeo-geo-table th {
  background: var(--surface);
  padding: 8px 12px;
  text-align: left;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.aeo-geo-table td {
  padding: 7px 12px;
  border-bottom: 1px solid rgba(42,42,58,0.4);
}
.aeo-geo-row { cursor: pointer; transition: background 0.1s; }
.aeo-geo-row:hover td { background: rgba(255,255,255,0.02); }
.aeo-geo-row:last-child td { border-bottom: none; }
.aeo-geo-url {
  font-family: var(--mono);
  font-size: 11px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aeo-geo-url a { color: var(--accent3); text-decoration: none; }
.aeo-geo-url a:hover { text-decoration: underline; }
.aeo-geo-score-pill {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  display: inline-block;
}
.aeo-geo-gap {
  font-size: 11px;
  color: var(--muted);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Detail drawer */
.aeo-geo-detail {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.aeo-geo-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.aeo-geo-detail-url {
  flex: 1;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aeo-geo-detail-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.aeo-geo-signal-col {
  padding: 16px;
  border-right: 1px solid var(--border);
}
.aeo-geo-signal-col:last-child { border-right: none; }
.aeo-geo-signal-col-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* Signal rows */
.signal-category { margin-bottom: 12px; }
.signal-cat-label {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 5px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--border);
}
.signal-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0;
}
.signal-icon {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  width: 14px;
}
.signal-pass .signal-icon { color: var(--accent); }
.signal-fail .signal-icon { color: var(--accent2); }
.signal-body { flex: 1; }
.signal-label {
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
}
.signal-pass .signal-label { color: var(--muted); }
.signal-fix {
  font-size: 11px;
  color: #ff9900;
  margin-top: 2px;
  line-height: 1.4;
  font-family: var(--mono);
}
.signal-weight {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  flex-shrink: 0;
}

/* AEO/GEO tab — same fix as tab-report: ID selector needs explicit none */
#tab-aeogeo { display: none; }
#tab-aeogeo.active { display: block; }

/* signal section labels in detail drawer */
.signal-section-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.signal-weight-fail { color: var(--accent2); }

/* ============================================================
   META TAB
   ============================================================ */
.meta-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 6px; }
.meta-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 900px; }
.meta-table th {
  background: var(--surface); padding: 8px 12px;
  font-family: var(--mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--muted); border-bottom: 1px solid var(--border);
  text-align: left; white-space: nowrap;
}
.meta-table td { padding: 8px 12px; border-bottom: 1px solid rgba(42,42,58,0.4); vertical-align: top; }
.meta-table tr:last-child td { border-bottom: none; }
.meta-url-cell { font-family: var(--mono); font-size: 11px; min-width: 160px; }
.meta-url-cell a { color: var(--accent3); text-decoration: none; }
.meta-url-cell a:hover { text-decoration: underline; }
.meta-full-cell { min-width: 220px; max-width: 340px; word-break: break-word; line-height: 1.5; }
.meta-full-text { color: var(--text); font-size: 12px; }
.meta-mono-cell { font-family: var(--mono); font-size: 10px; color: var(--muted); min-width: 120px; max-width: 200px; word-break: break-all; }
.meta-len-note { font-family: var(--mono); font-size: 10px; margin-top: 3px; }
.meta-len-ok   { color: var(--accent); }
.meta-len-warn { color: #ff9900; }
.meta-cell-err  { background: rgba(255,51,102,0.06); }
.meta-cell-warn { background: rgba(255,153,0,0.06);  }

/* ============================================================
   ACTION REPORT / TASK LIST
   ============================================================ */
.action-summary-row {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px;
}
.action-summary-kpi {
  flex: 1; min-width: 80px; border: 1px solid var(--border);
  border-radius: 6px; padding: 12px 16px; text-align: center;
  background: var(--surface2);
}
.action-summary-val {
  font-family: var(--mono); font-size: 28px; font-weight: 800; line-height: 1;
}
.action-summary-label {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px; margin-top: 4px;
}
.task-group { margin-bottom: 28px; }
.task-group-title {
  font-family: var(--sans); font-size: 15px; font-weight: 700;
  color: var(--text); margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px;
}
.task-group-count {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  background: var(--surface2); padding: 2px 8px; border-radius: 10px;
}
.task-page-block { margin-bottom: 12px; }
.task-page-header {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 5px 5px 0 0; border-bottom: none;
}
.task-page-url {
  font-family: var(--mono); font-size: 11px; color: var(--accent3); text-decoration: none;
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.task-page-url:hover { text-decoration: underline; }
.task-page-count {
  font-family: var(--mono); font-size: 10px; color: var(--muted); flex-shrink: 0;
}
.task-recheck-btn, .seo-recheck-btn {
  flex-shrink: 0;
  font-family: var(--mono); font-size: 10px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface2);
  color: var(--accent3);
  cursor: pointer;
  line-height: 1.2;
}
.task-recheck-btn:hover, .seo-recheck-btn:hover {
  border-color: var(--accent3);
  color: var(--text);
}
.seo-recheck-btn { padding: 2px 6px; font-size: 12px; }
.task-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--border);
  border-top: none; background: var(--surface2);
}
.task-item:last-child { border-radius: 0 0 5px 5px; }
.task-err  { border-left: 3px solid var(--accent2); }
.task-warn { border-left: 3px solid #ff9900; }
.task-imp  { border-left: 3px solid #7c3aed; }
.task-engine-badge {
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: 1px; padding: 2px 6px; border-radius: 3px;
  flex-shrink: 0; margin-top: 2px; text-transform: uppercase;
}
.task-engine-seo { background: rgba(0,255,136,0.12); color: var(--accent); }
.task-engine-aeo { background: rgba(124,58,237,0.12); color: #a78bfa; }
.task-engine-geo { background: rgba(14,165,233,0.12); color: #38bdf8; }
.task-body { flex: 1; }
.task-title { font-size: 13px; color: var(--text); margin-bottom: 3px; line-height: 1.4; }
.task-fix   { font-size: 12px; color: var(--muted); line-height: 1.5; font-style: italic; }

/* ============================================================
   READABILITY in CONTENT PANEL
   ============================================================ */
.readability-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr));
  gap: 10px; margin-bottom: 14px;
}
.readability-stat {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 5px; padding: 10px; text-align: center;
}
.readability-val {
  font-family: var(--mono); font-size: 18px; font-weight: 700;
  color: var(--text); margin-bottom: 2px;
}
.readability-label {
  font-family: var(--mono); font-size: 9px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px;
}
.readability-intro-label, .readability-phrases-label {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; margin-top: 12px;
}
.readability-intro {
  font-size: 12px; color: var(--muted); line-height: 1.6;
  background: var(--surface2); border-radius: 4px; padding: 10px 12px;
  border-left: 3px solid var(--border); font-style: italic;
}
.readability-phrases { display: flex; flex-direction: column; gap: 3px; }
.readability-phrase-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px; background: var(--surface2); border-radius: 3px;
}
.readability-phrase { font-family: var(--mono); font-size: 11px; color: var(--accent3); flex: 1; }
.readability-phrase-count { font-family: var(--mono); font-size: 11px; color: var(--muted); min-width: 28px; text-align: right; }
.readability-phrase-density { font-family: var(--mono); font-size: 10px; color: var(--muted); min-width: 36px; text-align: right; }

/* sidebar filter banner */
#sidebarFilterBanner {
  display: none;
  padding: 4px 10px;
  background: rgba(51,136,255,0.12);
  border-bottom: 1px solid rgba(51,136,255,0.2);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent3);
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
#sidebarFilterBanner.visible { display: flex !important; }
.sidebar-filter-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.sidebar-filter-btn {
  background: none; border: 1px solid rgba(51,136,255,0.35); color: var(--accent3);
  cursor: pointer; font-size: 10px; font-family: var(--mono);
  padding: 2px 7px; border-radius: 3px; line-height: 1.3;
}
.sidebar-filter-btn:hover { border-color: var(--accent3); color: var(--text); }

/* ============================================================
   SITEMAP ROW
   ============================================================ */
.sitemap-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0 2px;
  border-top: 1px solid rgba(42,42,58,0.6);
  margin-top: 4px;
}
.sitemap-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.sitemap-toggle input[type="checkbox"] {
  accent-color: var(--accent);
  width: 13px;
  height: 13px;
  cursor: pointer;
  flex-shrink: 0;
}
.sitemap-toggle:hover { color: var(--text); }
.sitemap-url-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.15s;
}
.sitemap-url-input:focus { border-color: var(--accent); }
.sitemap-url-input::placeholder { color: var(--muted); }

/* ============================================================
   QUEUE COUNTER in status bar
   ============================================================ */
#queueCounter {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent3);
  white-space: nowrap;
  padding: 0 8px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

/* ============================================================
   ROBOTS PANEL
   ============================================================ */
.robots-alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.robots-alert-err  {
  background: rgba(255,51,102,0.08);
  border: 1px solid rgba(255,51,102,0.3);
  color: var(--accent2);
}
.robots-alert-warn {
  background: rgba(255,153,0,0.08);
  border: 1px solid rgba(255,153,0,0.3);
  color: #ff9900;
}
.robots-alert-ok   {
  background: rgba(0,255,136,0.06);
  border: 1px solid rgba(0,255,136,0.2);
  color: var(--accent);
}
.robots-section { margin-bottom: 18px; }
.robots-section-title {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 7px;
}
.robots-rule {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 4px;
  margin-bottom: 3px;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.robots-rule code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  flex: 1;
}
.robots-rule-icon {
  font-size: 11px;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}
.robots-rule-dis  { border-left: 3px solid var(--accent2); }
.robots-rule-dis  .robots-rule-icon { color: var(--accent2); }
.robots-rule-allow { border-left: 3px solid var(--accent); }
.robots-rule-allow .robots-rule-icon { color: var(--accent); }
.robots-critical-badge {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  background: var(--accent2);
  color: white;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.robots-raw {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 14px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
  line-height: 1.6;
}
.robots-empty {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 40px;
}

/* ============================================================
   DIFF / COMPARE PANEL
   ============================================================ */
.diff-panel {
  background: var(--surface);
  border: 1px solid var(--accent3);
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: hidden;
}
.diff-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(51,136,255,0.06);
  border-bottom: 1px solid rgba(51,136,255,0.2);
}
.diff-header-title {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent3);
  font-weight: 700;
}
.diff-clear-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
}
.diff-clear-btn:hover { border-color: var(--accent2); color: var(--accent2); }

.diff-kpi-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.diff-kpi {
  flex: 1;
  min-width: 80px;
  padding: 14px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.diff-kpi:last-child { border-right: none; }
.diff-kpi-val {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}
.diff-kpi-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.diff-group { padding: 16px 18px; border-top: 1px solid var(--border); }
.diff-group-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.diff-group-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--surface2);
  padding: 1px 8px;
  border-radius: 10px;
}
.diff-page-block {
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
}
.diff-page-url {
  padding: 6px 10px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
}
.diff-page-url a { color: var(--accent3); text-decoration: none; }
.diff-page-url a:hover { text-decoration: underline; }
.diff-change {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(42,42,58,0.4);
  font-size: 12px;
}
.diff-change:last-child { border-bottom: none; }
.diff-change-field {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 120px;
  margin-top: 1px;
}
.diff-change-values {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}
.diff-val-old {
  color: var(--accent2);
  font-size: 11px;
  text-decoration: line-through;
  opacity: 0.8;
  word-break: break-word;
}
.diff-val-new {
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  word-break: break-word;
}
.diff-arrow { color: var(--muted); font-size: 12px; flex-shrink: 0; }

.diff-url-list { display: flex; flex-direction: column; gap: 4px; }
.diff-url-item {
  padding: 5px 10px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  border: 1px solid var(--border);
}
.diff-url-item a { text-decoration: none; }
.diff-url-item a:hover { text-decoration: underline; }
.diff-added   { border-left: 3px solid var(--accent); background: rgba(0,255,136,0.04); }
.diff-added   a { color: var(--accent); }
.diff-removed { border-left: 3px solid var(--accent2); background: rgba(255,51,102,0.04); }
.diff-removed a { color: var(--accent2); }
.diff-no-changes {
  padding: 24px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}

/* Compare button in scan history */
.scan-history-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.scan-history-btn {
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.scan-history-btn:hover { color: var(--text); border-color: var(--accent3); }
.scan-history-compare-btn:hover { color: var(--accent3); border-color: var(--accent3); }

/* tab-robots same fix as tab-report/tab-aeogeo */
#tab-robots { display: none; }
#tab-robots.active { display: block; }

/* ============================================================
   INTERNAL LINK SUGGESTIONS
   ============================================================ */
.link-sug-block {
  border: 1px solid var(--border);
  border-radius: 5px;
  margin-bottom: 10px;
  overflow: hidden;
}
.link-sug-orphan {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(255,51,102,0.06);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.link-sug-candidates { padding: 6px 10px; }
.link-sug-label {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  flex-shrink: 0;
}
.link-sug-cand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  border-bottom: 1px solid rgba(42,42,58,0.3);
}
.link-sug-cand:last-child { border-bottom: none; }
.link-sug-cand a { color: var(--accent3); text-decoration: none; flex-shrink: 0; }
.link-sug-cand a:hover { text-decoration: underline; }
.link-sug-overlap {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
}
.link-sug-overlap em {
  color: var(--accent3);
  font-style: normal;
  background: rgba(51,136,255,0.08);
  padding: 1px 4px;
  border-radius: 2px;
}

/* ============================================================
   CORE WEB VITALS PANEL
   ============================================================ */
.cwv-metric-block { margin-bottom: 14px; }
.cwv-metric-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--border);
}
.cwv-issue {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 6px 0;
  border-bottom: 1px solid rgba(42,42,58,0.3);
  font-size: 12px;
}
.cwv-issue:last-child { border-bottom: none; }
.cwv-issue-msg  { font-weight: 600; color: var(--text); margin-bottom: 2px; }
.cwv-issue-page { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-bottom: 2px; }
.cwv-issue-page a { color: var(--accent3); text-decoration: none; }
.cwv-issue-fix  { font-size: 11px; color: var(--muted); line-height: 1.5; font-style: italic; }

/* ============================================================
   IMAGE AUDIT PANEL
   ============================================================ */
.img-audit-issue { margin-bottom: 10px; }
.img-audit-header {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
}
.img-audit-msg   { font-weight: 600; color: var(--text); margin-bottom: 3px; }
.img-audit-pages { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-bottom: 2px; }
.img-audit-pages a { color: var(--accent3); text-decoration: none; }
.img-audit-fix   { font-size: 11px; color: var(--muted); line-height: 1.5; font-style: italic; }

/* ============================================================
   BROKEN LINKS PANEL
   ============================================================ */
.bl-kpi-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.bl-kpi {
  flex: 1;
  min-width: 70px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  background: var(--surface2);
}
.bl-kpi-val   { font-family: var(--mono); font-size: 28px; font-weight: 800; line-height: 1; }
.bl-kpi-label { font-family: var(--mono); font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 3px; }
.bl-section { margin-bottom: 20px; }
.bl-section-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
.bl-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(42,42,58,0.4);
  font-size: 12px;
  flex-wrap: wrap;
}
.bl-row:last-child { border-bottom: none; }
.bl-status {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 70px;
}
.bl-url { font-family: var(--mono); font-size: 11px; flex: 1; word-break: break-all; }
.bl-url a { color: var(--accent3); text-decoration: none; }
.bl-url a:hover { text-decoration: underline; }
.bl-ms { font-family: var(--mono); font-size: 10px; color: #ff9900; flex-shrink: 0; }
.bl-sources {
  width: 100%;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  padding-left: 80px;
}
.bl-sources a { color: var(--muted); text-decoration: none; }
.bl-sources a:hover { color: var(--accent3); }

/* CWV + IMG engine badges in action report */
.task-engine-cwv { background: rgba(255,193,7,0.12); color: #ffc107; }
.task-engine-img { background: rgba(102,102,128,0.12); color: var(--muted); }

/* broken tab fix */
#tab-broken { display: none; }
#tab-broken.active { display: block; }

/* ============================================================
   HREFLANG PANEL
   ============================================================ */
.hreflang-issue {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 6px 0; border-bottom: 1px solid rgba(42,42,58,0.3); font-size: 12px;
}
.hreflang-issue:last-child { border-bottom: none; }
.hreflang-page { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-bottom: 2px; }
.hreflang-page a { color: var(--accent3); text-decoration: none; }
.hreflang-msg { font-weight: 600; color: var(--text); margin-bottom: 2px; }
.hreflang-fix { font-size: 11px; color: var(--muted); line-height: 1.5; font-style: italic; }

/* ============================================================
   SCHEMA VALIDATION PANEL
   ============================================================ */
.schema-val-page {
  border: 1px solid var(--border); border-radius: 5px;
  margin-bottom: 8px; overflow: hidden;
}
.schema-val-url {
  padding: 5px 10px; background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 11px;
}
.schema-val-url a { color: var(--accent3); text-decoration: none; }
.schema-val-url a:hover { text-decoration: underline; }
.schema-val-issue {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 6px 10px; border-bottom: 1px solid rgba(42,42,58,0.3); font-size: 12px;
}
.schema-val-issue:last-child { border-bottom: none; }
.schema-val-msg { font-weight: 600; color: var(--text); margin-bottom: 2px; font-size: 12px; }
.schema-val-fix { font-size: 11px; color: var(--muted); line-height: 1.5; font-style: italic; }

/* engine badges */
.task-engine-intl   { background: rgba(0,200,200,0.12); color: #00cccc; }
.task-engine-schema { background: rgba(51,136,255,0.12); color: var(--accent3); }

/* ============================================================
   READABILITY CONTEXT (Flesch benchmark)
   ============================================================ */
.flesch-context {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  margin-top: 8px; margin-bottom: 4px;
  padding: 7px 10px;
  background: var(--surface2);
  border-radius: 4px;
  font-size: 12px;
}
.flesch-context-label { font-family: var(--mono); font-size: 10px; color: var(--muted); flex-shrink: 0; }
.flesch-context-delta { font-family: var(--mono); font-size: 13px; font-weight: 700; flex-shrink: 0; }
.flesch-context-msg   { color: var(--muted); font-size: 11px; line-height: 1.4; }

/* Schema validation card complete styles (supplement) */
.schema-val-page + .schema-val-page { margin-top: 8px; }

/* ============================================================
   INTERNAL LINK GRAPH
   ============================================================ */

/* Tab panel — full height, no padding (SVG fills it) */
.graph-tab-content { padding: 0 !important; }

.graph-panel {
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* Controls bar */
.graph-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 8px;
  height: 44px;
}
.graph-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}
.gl-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.graph-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.graph-stat {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  padding: 3px 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 3px;
}
.graph-btn {
  font-family: var(--mono);
  font-size: 10px;
  padding: 4px 11px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
}
.graph-btn:hover { border-color: var(--accent3); color: var(--accent3); }

/* Tooltip */
.graph-tooltip {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 13px;
  pointer-events: none;
  z-index: 100;
  min-width: 170px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  font-size: 12px;
}
.gt-path {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent3);
  margin-bottom: 7px;
  word-break: break-all;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}
.gt-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 3px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}
.gt-row strong { color: var(--text); }
.gt-orphan {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent2);
  border-top: 1px solid var(--border);
  padding-top: 5px;
}

/* Fix tab-content display for graph (needs flex not block) */
#tab-graph.active { display: flex !important; flex-direction: column; padding: 0; }

/* Log tab — fill remaining height and scroll the full log */
#tab-log.active { display: flex !important; flex-direction: column; overflow: hidden; }
#tab-log .report-export-row { flex-shrink: 0; }

/* ============================================================
   SITE-WIDE KEYWORDS PANEL
   ============================================================ */
.kw-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 0 0 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.kw-list { display: flex; flex-direction: column; }
.kw-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(42,42,58,0.25);
  font-size: 12px;
}
.kw-row:last-child { border-bottom: none; }
.kw-rank {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  min-width: 22px;
  text-align: right;
  flex-shrink: 0;
}
.kw-word {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent3);
  min-width: 110px;
  flex-shrink: 0;
}
.kw-bar-wrap {
  flex: 1;
  background: var(--surface2);
  border-radius: 2px;
  height: 6px;
  overflow: hidden;
}
.kw-bar {
  height: 100%;
  background: var(--accent3);
  border-radius: 2px;
  opacity: 0.6;
}
.kw-total {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text);
  min-width: 42px;
  text-align: right;
  flex-shrink: 0;
}
.kw-pages {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  min-width: 28px;
  text-align: right;
  flex-shrink: 0;
}
